1import{c as Cm,r as hr,b1 as fu,g as Bb,d as wd,j as gt,H as Fb,L as f4,b2 as Db}from"./index-d3ab3cb5.js";import{H as Lb}from"./Header-66cc28e4.js";import{F as qb}from"./Footer-71b2468b.js";import{C as Sd,V as ke,G as Fs,M as zn,S as Ca,a as wc,F as Pm,b as Bn,c as Ao,T as Bm,d as dt,B as Pi,e as Uo,f as Wi,I as Tl,g as Fm,h as Fo,i as Ib,j as h4,k as kb,P as Md,l as Qt,m as Wt,R as jo,D as $o,W as H0,n as VA,U as Ub,H as Mi,N as bA,o as Ob,p as Oo,L as va,q as eo,r as Xi,s as Vf,t as Qi,u as Gb,v as Vb,w as zb,x as Dm,A as jb,y as $b,z as Hb,E as Wb,J as Qb,K as Yb,O as Xb,Q as Kb,X as Zb,Y as Ed,Z as Nd,_ as d4,$ as qo,a0 as cA,a1 as wl,a2 as Sl,a3 as Ml,a4 as fr,a5 as ms,a6 as El,a7 as Nl,a8 as NA,a9 as RA,aa as Yn,ab as _1,ac as zf,ad as Rl,ae as Io,af as Jb,ag as eT,ah as tT,ai as Sc,aj as W0,ak as nT,al as wi,am as Fr,an as Q0,ao as rT,ap as Lm,aq as AA,ar as qm,as as Im,at as km,au as Um,av as Om,aw as Gm,ax as Vm,ay as zm,az as jm,aA as $m,aB as Hm,aC as Wm,aD as Qm,aE as iT,aF as sT,aG as oT,aH as Y0,aI as Ym,aJ as x1,aK as b1,aL as T1,aM as Xm,aN as Km,aO as Zm,aP as Jm,aQ as e7,aR as t7,aS as n7,aT as r7,aU as aT,aV as AT,aW as i7,aX as F0,aY as D0,aZ as fA,a_ as lT,a$ as Rd,b0 as uT,b1 as cT,b2 as Cd,b3 as Pd,b4 as X0,b5 as Bd,b6 as Fd,b7 as I2,b8 as t1,b9 as n1,ba as r1,bb as p4,bc as m4,bd as g4,be as y4,bf as v4,bg as jf,bh as $f,bi as Hf,bj as Wf,bk as Qf,bl as Yf,bm as Xf,bn as Kf,bo as Zf,bp as Jf,bq as eh,br as th,bs as nh,bt as rh,bu as ih,bv as sh,bw as k2,bx as fT,by as _4,bz as x4,bA as b4,bB as Mc,bC as Dd,bD as Ec,bE as Ws,bF as s7,bG as K0,bH as oh,bI as _a,bJ as o7,bK as a7,bL as Ld,bM as A7,bN as l7,bO as u7,bP as c7,bQ as f7,bR as h7,bS as us,bT as T4,bU as hT,bV as w4,bW as dT,bX as d7,bY as Nc,bZ as pT,b_ as mT,b$ as gT,c0 as yT,c1 as vT,c2 as p7,c3 as _T,c4 as xT,c5 as bT,c6 as TT,c7 as wT,c8 as m7,c9 as ST,ca as MT,cb as ET,cc as NT,cd as L0,ce as g7,cf as RT,cg as y7,ch as v7,ci as CT,cj as PT,ck as BT,cl as FT,cm as DT,cn as LT,co as qT,cp as IT,cq as kT,cr as UT,cs as OT,ct as GT,cu as VT,cv as zT,cw as jT,cx as $T,cy as HT,cz as WT,cA as w1,cB as QT,cC as qd,cD as YT,cE as Rc,cF as XT,cG as hu,cH as KT,cI as ZT,cJ as Id,cK as JT,cL as ew,cM as _7,cN as i1,cO as s1,cP as x7,cQ as Cc,cR as tw,cS as nw,cT as rw,cU as b7,cV as T7,cW as iw,cX as n0,cY as sw,cZ as ow,c_ as kd,c$ as aw,d0 as Aw,d1 as Va,d2 as za,d3 as S4,d4 as M4,d5 as lw,d6 as zs,d7 as uw,d8 as cw,d9 as fw,da as hw}from"./react-three-fiber.esm-bc69ffdc.js";import{_ as dw}from"./extends-4c19d496.js";var Ud={},ah={exports:{}};(function(r,e){(function(t,n){n(e)})(Cm,function(t){var n=function(){return n=Object.assign||function(s){for(var a,u=1,f=arguments.length;u<f;u++)for(var m in a=arguments[u])Object.prototype.hasOwnProperty.call(a,m)&&(s[m]=a[m]);return s},n.apply(this,arguments)},i=function(){function s(a,u,f){var m=this;this.endVal=u,this.options=f,this.version="2.10.1",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",autoAnimate:!1,autoAnimateDelay:200,autoAnimateOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(y){m.startTime||(m.startTime=y);var _=y-m.startTime;m.remaining=m.duration-_,m.useEasing?m.countDown?m.frameVal=m.startVal-m.easingFn(_,0,m.startVal-m.endVal,m.duration):m.frameVal=m.easingFn(_,m.startVal,m.endVal-m.startVal,m.duration):m.frameVal=m.startVal+(m.endVal-m.startVal)*(_/m.duration);var b=m.countDown?m.frameVal<m.endVal:m.frameVal>m.endVal;m.frameVal=b?m.endVal:m.frameVal,m.frameVal=Number(m.frameVal.toFixed(m.options.decimalPlaces)),m.printValue(m.frameVal),_<m.duration?m.rAF=requestAnimationFrame(m.count):m.finalEndVal!==null?m.update(m.finalEndVal):m.options.onCompleteCallback&&m.options.onCompleteCallback()},this.formatNumber=function(y){var _,b,w,S,E=y<0?"-":"";_=Math.abs(y).toFixed(m.options.decimalPlaces);var R=(_+="").split(".");if(b=R[0],w=R.length>1?m.options.decimal+R[1]:"",m.options.useGrouping){S="";for(var P=3,L=0,D=0,O=b.length;D<O;++D)m.options.useIndianSeparators&&D===4&&(P=2,L=1),D!==0&&L%P==0&&(S=m.options.separator+S),L++,S=b[O-D-1]+S;b=S}return m.options.numerals&&m.options.numerals.length&&(b=b.replace(/[0-9]/g,function(G){return m.options.numerals[+G]}),w=w.replace(/[0-9]/g,function(G){return m.options.numerals[+G]})),E+m.options.prefix+b+w+m.options.suffix},this.easeOutExpo=function(y,_,b,w){return b*(1-Math.pow(2,-10*y/w))*1024/1023+_},this.options=n(n({},this.defaults),f),this.options.enableScrollSpy&&(this.options.autoAnimate=!0),this.options.scrollSpyDelay!==void 0&&(this.options.autoAnimateDelay=this.options.scrollSpyDelay),this.options.scrollSpyOnce&&(this.options.autoAnimateOnce=!0),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.el=typeof a=="str
1ing"?document.getElementById(a):a,u=u??this.parse(this.el.innerHTML),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(u),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,this.options.separator===""&&(this.options.useGrouping=!1),this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.autoAnimate&&(this.error||typeof IntersectionObserver>"u"?this.error?console.error(this.error,a):console.error("IntersectionObserver is not supported by this browser"):this.setupObserver())}return s.prototype.setupObserver=function(){var a=this,u=s.observedElements.get(this.el);u&&u.unobserve(),s.observedElements.set(this.el,this),this.observer=new IntersectionObserver(function(f){for(var m=0,y=f;m<y.length;m++){var _=y[m];_.isIntersecting&&a.paused&&!a.once?(a.paused=!1,a.autoAnimateTimeout=setTimeout(function(){return a.start()},a.options.autoAnimateDelay),a.options.autoAnimateOnce&&(a.once=!0,a.observer.disconnect())):_.isIntersecting||a.paused||(clearTimeout(a.autoAnimateTimeout),a.reset())}},{threshold:0}),this.observer.observe(this.el)},s.prototype.unobserve=function(){var a;clearTimeout(this.autoAnimateTimeout),(a=this.observer)===null||a===void 0||a.disconnect(),s.observedElements.delete(this.el)},s.prototype.onDestroy=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.unobserve(),this.options.onCompleteCallback=null,this.options.onStartCallback=null},s.prototype.determineDirectionAndSmartEasing=function(){var a=this.finalEndVal!==null?this.finalEndVal:this.endVal;this.countDown=this.startVal>a;var u=a-this.startVal;if(Math.abs(u)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=a;var f=this.countDown?1:-1;this.endVal=a+f*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=a,this.finalEndVal=null;this.finalEndVal!==null?this.useEasing=!1:this.useEasing=this.options.useEasing},s.prototype.start=function(a){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),a&&(this.options.onCompleteCallback=a),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},s.prototype.pauseResume=function(){if(this.paused)this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count);else{cancelAnimationFrame(this.rAF);var a=this.finalEndVal!==null?this.duration+this.remaining:this.remaining;this.remaining=a}this.paused=!this.paused},s.prototype.reset=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.once=!1,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},s.prototype.update=function(a){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(a),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal==null&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},s.prototype.printValue=function(a){var u;if(this.el){var f=this.formattingFn(a);!((u=this.options.plugin)===null||u===void 0)&&u.render?this.options.plugin.render(this.el,f):this.el.tagName==="INPUT"?this.el.value=f:this.el.tagName==="text"||this.el.tagName==="tspan"?this.el.textContent=f:this.el.innerHTML=f}},s.prototype.ensureNumber=function(a){return typeof a=="number"&&!isNaN(a)},s.prototype.validateValue=function(a){var u=Number(a);return this.ensureNumber(u)?u:(this.error="[CountUp] invalid start or end value: ".concat(a),null)},s.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},s.prototype.parse=function(a){var u=function(_){return _.replace(/([.,'Â ])/g,"\\$1")},f=u(this.options.separator),m=u(this.options.decimal),y=a.replace(new RegExp(f,"g"),"").replace(new RegExp(m,"g"),".");return parseFloat(y)},s.observedElements=new WeakMap,s}();t.CountUp=i})}
1)(ah,ah.exports);var pw=ah.exports;Object.defineProperty(Ud,"__esModule",{value:!0});var nr=hr,mw=pw;function gw(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function E4(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function S1(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?E4(Object(t),!0).forEach(function(n){_w(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):E4(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function yw(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function vw(r){var e=yw(r,"string");return typeof e=="symbol"?e:String(e)}function _w(r,e,t){return e=vw(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ah(){return Ah=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ah.apply(this,arguments)}function xw(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function w7(r,e){if(r==null)return{};var t=xw(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function bw(r,e){return Tw(r)||gw(r,e)||ww(r,e)||Sw()}function Tw(r){if(Array.isArray(r))return r}function ww(r,e){if(r){if(typeof r=="string")return N4(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N4(r,e)}}function N4(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Sw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Mw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?nr.useLayoutEffect:nr.useEffect;function Gi(r){var e=nr.useRef(r);return Mw(function(){e.current=r}),nr.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.current.apply(void 0,n)},[])}var Ew=function(e,t){var n=t.decimal,i=t.decimals,s=t.duration,a=t.easingFn,u=t.end,f=t.formattingFn,m=t.numerals,y=t.prefix,_=t.separator,b=t.start,w=t.suffix,S=t.useEasing,E=t.useGrouping,R=t.useIndianSeparators,P=t.enableScrollSpy,L=t.scrollSpyDelay,D=t.scrollSpyOnce,O=t.plugin;
2return new mw.CountUp(e,u,{startVal:b,duration:s,decimal:n,decimalPlaces:i,easingFn:a,formattingFn:f,numerals:m,separator:_,prefix:y,suffix:w,plugin:O,useEasing:S,useIndianSeparators:R,useGrouping:E,enableScrollSpy:P,scrollSpyDelay:L,scrollSpyOnce:D})},Nw=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],Rw={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},S7=function(e){var t=Object.fromEntries(Object.entries(e).filter(function(Q){var Z=bw(Q,2),K=Z[1];return K!==void 0})),n=nr.useMemo(function(){return S1(S1({},Rw),t)},[e]),i=n.ref,s=n.startOnMount,a=n.enableReinitialize,u=n.delay,f=n.onEnd,m=n.onStart,y=n.onPauseResume,_=n.onReset,b=n.onUpdate,w=w7(n,Nw),S=nr.useRef(),E=nr.useRef(),R=nr.useRef(!1),P=Gi(function(){return Ew(typeof i=="string"?i:i.current,w)}),L=Gi(function(Q){var Z=S.current;if(Z&&!Q)return Z;var K=P();return S.current=K,K}),D=Gi(function(){var Q=function(){return L(!0).start(function(){f==null||f({pauseResume:O,reset:G,start:j,update:U})})};u&&u>0?E.current=setTimeout(Q,u*1e3):Q(),m==null||m({pauseResume:O,reset:G,update:U})}),O=Gi(function(){L().pauseResume(),y==null||y({reset:G,start:j,update:U})}),G=Gi(function(){L().el&&(E.current&&clearTimeout(E.current),L().reset(),_==null||_({pauseResume:O,start:j,update:U}))}),U=Gi(function(Q){L().update(Q),b==null||b({pauseResume:O,reset:G,start:j})}),j=Gi(function(){G(),D()}),V=Gi(function(Q){s&&(Q&&G(),D())});return nr.useEffect(function(){R.current?a&&V(!0):(R.current=!0,V())},[a,R,V,u,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.formattingFn]),nr.useEffect(function(){return function(){G()}},[G]),{start:j,pauseResume:O,reset:G,update:U,getCountUp:L}},Cw=["className","redraw","containerProps","children","style"],Pw=function(e){var t=e.className,n=e.redraw,i=e.containerProps,s=e.children,a=e.style,u=w7(e,Cw),f=nr.useRef(null),m=nr.useRef(!1),y=S7(S1(S1({},u),{},{ref:f,startOnMount:typeof s!="function"||e.delay===0,enableReinitialize:!1})),_=y.start,b=y.reset,w=y.update,S=y.pauseResume,E=y.getCountUp,R=Gi(function(){_()}),P=Gi(function(O){e.preserveValue||b(),w(O)}),L=Gi(function(){if(typeof e.children=="function"&&!(f.current instanceof Element)){console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);return}E()});nr.useEffect(function(){L()},[L]),nr.useEffect(function(){m.current&&P(e.end)},[e.end,P]);var D=n&&e;return nr.useEffect(function(){n&&m.current&&R()},[R,n,D]),nr.useEffect(function(){!n&&m.current&&R()},[R,n,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.className,e.formattingFn]),nr.useEffect(function(){m.current=!0},[]),typeof s=="function"?s({countUpRef:f,start:_,reset:b,update:w,pauseResume:S,getCountUp:E}):nr.createElement("span",Ah({className:t,ref:f,style:a},i),typeof e.start<"u"?E().formattingFn(e.start):"")},Bw=Ud.default=Pw;Ud.useCountUp=S7;function lh(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Fw=typeof fu=="object"&&fu&&fu.Object===Object&&fu;const Dw=Fw;var Lw=typeof self=="object"&&self&&self.Object===Object&&self,qw=Dw||Lw||Function("return this")();const M7=qw;var Iw=function(){return M7.Date.now()};const U2=Iw;var kw=/\s/;function Uw(r){for(var e=r.length;e--&&kw.test(r.charAt(e)););return e}var Ow=/^\s+/;function Gw(r){return r&&r.slice(0,Uw(r)+1).replace(Ow,"")}var Vw=M7.Symbol;const M1=Vw;var E7=Object.prototype,zw=E7.hasOwnProperty,jw=E7.toString,r0=M1?M1.toStringTag:void 0;function $w(r){var e=zw.call(r,r0),t=r[r0];try{r[r0]=void 0;var n=!0}catch{}var i=jw.call(r);return n&&(e?r[r0]=t:delete r[r0]),i}var Hw=Object.prototype,Ww=Hw.toString;function Qw(r){return Ww.call(r)}var Yw="[object Null]",Xw="[object Undefined]",R4=M1?M1.toStringTag:void 0;function Kw(r){return r==null?r===void 0?Xw:Yw:R4&&R4 in Object(r)?$w(r):Qw(r)}function Zw(r){return r!=null&&typeof r=="object"}var Jw="[object Symbol]";function eS(r){return typeof r=="symbol"||Zw(r)&&Kw(r)==Jw}var C4=0/0,tS=/^[-+]0x[0-9a-f]+$/i,nS=/^0b[01]+$/i,rS=/^0o[0-7]+$/i,iS=parseInt;function P4(r){if(typeof r=="number")return r;if(eS(r))return C4;if(lh(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=lh(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=Gw(r);var t=nS.test(r);return t||rS.test(r)?iS(r.slice(2),t?2:8):tS.test(r)?C4:+r}var sS="Expected a function",oS=Math.max,aS=Math.min;function AS(r,e,t){var n,i,s,a,u,f,m=0,y=!1,_=!1,b=!0;if(typeof r!="function")throw new TypeError(sS);e=P4(e)||0,lh(t)&&(y=!!t.leading,_="maxWait"in t,s=_?oS(P4(t.maxWait)||0,e):s,b="trailing"in t?!!t.trailing:b);function w(U){var j=n,V=i;return n=i=void 0,m=U,a=r.apply(V,j),a}function S(U){return m=U,u=setTimeout(P,e),y?w(U):a}function E(U){var j=U-f,V=U-m,Q=e-j;return _?aS(Q,s-V):Q}function R(U){var j=U-f,V=U-m;return f===void 0||j>=e||j<0||_&&V>=s}function P(){var U=U2();if(R(U))return L(U);u=setTimeout(P,E(U))}function L(U){return u=void 0,b&&n?w(U):(n=i=void 0,a)}function D(){u!==void 0&&clearTimeout(u),m=0,n=f=i=u=void 0}
2function O(){return u===void 0?a:L(U2())}function G(){var U=U2(),j=R(U);if(n=arguments,i=this,f=U,j){if(u===void 0)return S(f);if(_)return clearTimeout(u),u=setTimeout(P,e),w(f)}return u===void 0&&(u=setTimeout(P,e)),a}return G.cancel=D,G.flush=O,G}function B4(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function lS(r){if(Array.isArray(r))return r}function uS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function cS(r,e,t){return Object.defineProperty(r,"prototype",{writable:!1}),r}function fS(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function hS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dS(r,e){return lS(r)||fS(r,e)||pS(r,e)||hS()}function pS(r,e){if(r){if(typeof r=="string")return B4(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?B4(r,e):void 0}}var mS=cS(function r(e,t){var n=t.default,i=n===void 0?null:n,s=t.triggerUpdate,a=s===void 0?!0:s,u=t.onChange,f=u===void 0?function(m,y){}:u;uS(this,r),this.name=e,this.defaultVal=i,this.triggerUpdate=a,this.onChange=f});function Mr(r){var e=r.stateInit,t=e===void 0?function(){return{}}:e,n=r.props,i=n===void 0?{}:n,s=r.methods,a=s===void 0?{}:s,u=r.aliases,f=u===void 0?{}:u,m=r.init,y=m===void 0?function(){}:m,_=r.update,b=_===void 0?function(){}:_,w=Object.keys(i).map(function(S){return new mS(S,i[S])});return function S(){for(var E=arguments.length,R=new Array(E),P=0;P<E;P++)R[P]=arguments[P];var L=!!(this instanceof S&&this.constructor),D=L?R.shift():void 0,O=R[0],G=O===void 0?{}:O,U=Object.assign({},t instanceof Function?t(G):t,{initialised:!1}),j={};function V(K){return Q(K,G),Z(),V}var Q=function(Y,ne){y.call(V,Y,U,ne),U.initialised=!0},Z=AS(function(){U.initialised&&(b.call(V,U,j),j={})},1);return w.forEach(function(K){V[K.name]=Y(K);function Y(ne){var ae=ne.name,J=ne.triggerUpdate,fe=J===void 0?!1:J,pe=ne.onChange,Re=pe===void 0?function(je,Qe){}:pe,Se=ne.defaultVal,qe=Se===void 0?null:Se;return function(je){var Qe=U[ae];if(!arguments.length)return Qe;var He=je===void 0?qe:je;return U[ae]=He,Re.call(V,He,U,Qe),!j.hasOwnProperty(ae)&&(j[ae]=Qe),fe&&Z(),V}}}),Object.keys(a).forEach(function(K){V[K]=function(){for(var Y,ne=arguments.length,ae=new Array(ne),J=0;J<ne;J++)ae[J]=arguments[J];return(Y=a[K]).call.apply(Y,[V,U].concat(ae))}}),Object.entries(f).forEach(function(K){var Y=dS(K,2),ne=Y[0],ae=Y[1];return V[ne]=V[ae]}),V.resetProps=function(){return w.forEach(function(K){V[K.name](K.defaultVal)}),V},V.resetProps(),U._rerender=Z,L&&D&&V(D),V}}var pr=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var e=1.70158;return r===1?1:r*r*((e+1)*r-e)},Out:function(r){var e=1.70158;return r===0?0:--r*r*((e+1)*r+e)+1},InOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)}}),Bounce:Object.freeze({In:function(r){return 1-pr.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?pr.Bounce.In(r*2)*.5:pr.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(e){return Math.pow(e,r)},Out:function(e){return 1-Math.pow(1-e,r)},InOut:function(e){return e<.5?Math.pow(e*2,r)/2:(1-Math.pow(2-e*2,r))/2+.5}}}}),E0=function(){return performance.now()},N7=function(){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return r.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,s=t;i<s.length;i++){var a=s[i];(e=a._group)===null||e===void 0||e.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},r.prototype.remove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var s=i[n];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},r.prototype.update=function(e,t){e===void 0&&(e=E0()),t===void 0&&(t=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var s=this._tweens[n[i]],a=!t;s&&s.update(e,a)===!1&&!t&&this.remove(s)}n=Object.keys(this._tweensAddedDuringUpdate)}},r}(),hA={Linear:function(r,e){var t=r.length-1,n=t*e,i=Math.floor(n),s=hA.Utils.Linear;return e<0?s(r[0],r[1],n):e>1?s(r[t],r[t-1],t-n):s(r[i],r[i+1>t?t:i+1],n-i)},Bezier:function(r,e){for(var t=0,n=r.length-1,i=Math.pow,s=hA.Utils.Bernstein,a=0;a<=n;a++)t+=i(1-e,n-a)*i(e,a)*r[a]*s(n,a);return t},CatmullRom:function(r,e){var t=r.length-1,n=t*e,i=Math.floor(n),s=hA.Utils.CatmullRom;return r[0]===r[t]?(e<0&&(i=Math.floor(n=t*(1+e))),s(r[(i-1+t)%t],r[i],r[(i+1)%t],r[(i+2)%t],n-i)):e<0?r[0]-(s(r[0],r[0],r[1],r[1],-n)-r[0]):e>1?r[t]-(s(r[t],r[t],r[t-1],r[t-1],n-t)-r[t]):s(r[i?i-1:0],r[i],r[t<i+1?t:i+1],r[t<i+2?t:i+2],n-i)},Utils:{Linear:function(r,e,t){return(e-r)*t+r},Bernstein:function(r,e){var t=hA.Utils.Factorial;return t(r)/t(e)/t(r-e)},Factorial:function(){var r=[1];return function(e){var t=1;if(r[e])return r[e];for(var n=e;n>1;n--)t*=n;return r[e]=t,t}}(),CatmullRom:function(r,e,t,n,i){var s=(t-r)*.5,a=(n-e)*.5,u=i*i,f=i*u;return(2*e-2*t+s+a)*f+(-3*e+3*t-2*s-a)*u+s*i+e}}},gS=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),uh=new N7,fi=function(){function r(e,t){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=pr.Linear.None,this._interpolationFunction=hA.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=gS.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof t=="object"?(this._group=t,t.add(this)):t===!0&&(this._group=uh,uh.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(e,t){if(t===void 0&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t<0?0:t,this},r.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},r.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},r.prototype.start=function(e,t){if(e===void 0&&(e=E0()),t===void 0&&(t=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},r.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},r.prototype._setupProperties=function(e,t,n,i,s){for(var a in n){var u=e[a],f=Array.isArray(u),m=f?"array":typeof u,y=!f&&Array.isArray(n[a]);if(!(m==="undefined"||m==="function")){if(y){var _=n[a];if(_.length===0)continue;for(var b=[u],w=0,S=_.length;w<S;w+=1){var E=this._handleRelativeValue(u,_[w]);if(isNaN(E)){y=!1,console.warn("Found invalid interpolation list. Skipping.");break}b.push(E)}y&&(n[a]=b)}if((m==="object"||f)&&u&&!y){t[a]=f?[]:{};var R=u;for(var P in R)t[a][P]=R[P];i[a]=f?[]:{};var _=n[a];if(!this._isDynamic){var L={};for(var P in _)L[P]=_[P];n[a]=_=L}this._setupProperties(R,t[a],_,i[a],s)}else(typeof t[a]>"u"||s)&&(t[a]=u),f||(t[a]*=1),y?i[a]=n[a].slice().reverse():i[a]=t[a]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(e){return e===void 0&&(e=E0()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},r.prototype.resume=function(e){return e===void 0&&(e=E0()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},r.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},r.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},r.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},r.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},r.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},r.prototype.easing=function(e){return e===void 0&&(e=pr.Linear.None),this._easingFunction=e,this},r.prototype.interpolation=function(e){return e===void 0&&(e=hA.Linear),this._interpolationFunction=e,this},r.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},r.prototype.onStart=function(e){return this._onStartCallback=e,this},r.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},r.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},r.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},r.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},r.prototype.onStop=function(e){return this._onStopCallback=e,this},r.prototype.update=function(e,t){var n=this,i;if(e===void 0&&(e=E0()),t===void 0&&(t=r.autoStartOnUpdate),this._isPaused)return!0;var s;if(!this._goToEnd&&!this._isPlaying)if(t)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=e-this._startTime,u=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),f=this._duration+this._repeat*u,m=function(){if(n._duration===0||a>f)return 1;var E=Math.trunc(a/u),R=a-E*u,P=Math.min(R/n._duration,1);return P===0&&a===n._duration?1:P},y=m(),_=this._easingFunction(y);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,_),this._onUpdateCallback&&this._onUpdateCallback(this._object,y),this._duration===0||a>=this._duration)if(this._repeat>0){var b=Math.min(Math.trunc((a-this._duration)/u)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=b);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])
3),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=u*b,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var w=0,S=this._chainedTweens.length;w<S;w++)this._chainedTweens[w].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(e,t,n,i){for(var s in n)if(t[s]!==void 0){var a=t[s]||0,u=n[s],f=Array.isArray(e[s]),m=Array.isArray(u),y=!f&&m;y?e[s]=this._interpolationFunction(u,i):typeof u=="object"&&u?this._updateProperties(e[s],a,u,i):(u=this._handleRelativeValue(a,u),typeof u=="number"&&(e[s]=a+(u-a)*i))}},r.prototype._handleRelativeValue=function(e,t){return typeof t!="string"?t:t.charAt(0)==="+"||t.charAt(0)==="-"?e+parseFloat(t):parseFloat(t)},r.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=t},r.autoStartOnUpdate=!1,r}(),bs=uh;bs.getAll.bind(bs);bs.removeAll.bind(bs);bs.add.bind(bs);bs.remove.bind(bs);bs.update.bind(bs);function yS(r){const e=+this._x.call(null,r),t=+this._y.call(null,r),n=+this._z.call(null,r);return R7(this.cover(e,t,n),e,t,n,r)}function R7(r,e,t,n,i){if(isNaN(e)||isNaN(t)||isNaN(n))return r;var s,a=r._root,u={data:i},f=r._x0,m=r._y0,y=r._z0,_=r._x1,b=r._y1,w=r._z1,S,E,R,P,L,D,O,G,U,j,V;if(!a)return r._root=u,r;for(;a.length;)if((O=e>=(S=(f+_)/2))?f=S:_=S,(G=t>=(E=(m+b)/2))?m=E:b=E,(U=n>=(R=(y+w)/2))?y=R:w=R,s=a,!(a=a[j=U<<2|G<<1|O]))return s[j]=u,r;if(P=+r._x.call(null,a.data),L=+r._y.call(null,a.data),D=+r._z.call(null,a.data),e===P&&t===L&&n===D)return u.next=a,s?s[j]=u:r._root=u,r;do s=s?s[j]=new Array(8):r._root=new Array(8),(O=e>=(S=(f+_)/2))?f=S:_=S,(G=t>=(E=(m+b)/2))?m=E:b=E,(U=n>=(R=(y+w)/2))?y=R:w=R;while((j=U<<2|G<<1|O)===(V=(D>=R)<<2|(L>=E)<<1|P>=S));return s[V]=a,s[j]=u,r}function vS(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,t=new Float64Array(e),n=new Float64Array(e),i=new Float64Array(e);let s=1/0,a=1/0,u=1/0,f=-1/0,m=-1/0,y=-1/0;for(let _=0,b,w,S,E;_<e;++_)isNaN(w=+this._x.call(null,b=r[_]))||isNaN(S=+this._y.call(null,b))||isNaN(E=+this._z.call(null,b))||(t[_]=w,n[_]=S,i[_]=E,w<s&&(s=w),w>f&&(f=w),S<a&&(a=S),S>m&&(m=S),E<u&&(u=E),E>y&&(y=E));if(s>f||a>m||u>y)return this;this.cover(s,a,u).cover(f,m,y);for(let _=0;_<e;++_)R7(this,t[_],n[_],i[_],r[_]);return this}function _S(r,e,t){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,i=this._y0,s=this._z0,a=this._x1,u=this._y1,f=this._z1;if(isNaN(n))a=(n=Math.floor(r))+1,u=(i=Math.floor(e))+1,f=(s=Math.floor(t))+1;else{for(var m=a-n||1,y=this._root,_,b;n>r||r>=a||i>e||e>=u||s>t||t>=f;)switch(b=(t<s)<<2|(e<i)<<1|r<n,_=new Array(8),_[b]=y,y=_,m*=2,b){case 0:a=n+m,u=i+m,f=s+m;break;case 1:n=a-m,u=i+m,f=s+m;break;case 2:a=n+m,i=u-m,f=s+m;break;case 3:n=a-m,i=u-m,f=s+m;break;case 4:a=n+m,u=i+m,s=f-m;break;case 5:n=a-m,u=i+m,s=f-m;break;case 6:a=n+m,i=u-m,s=f-m;break;case 7:n=a-m,i=u-m,s=f-m;break}this._root&&this._root.length&&(this._root=y)}return this._x0=n,this._y0=i,this._z0=s,this._x1=a,this._y1=u,this._z1=f,this}function xS(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function bS(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function nn(r,e,t,n,i,s,a){this.node=r,this.x0=e,this.y0=t,this.z0=n,this.x1=i,this.y1=s,this.z1=a}function TS(r,e,t,n){var i,s=this._x0,a=this._y0,u=this._z0,f,m,y,_,b,w,S=this._x1,E=this._y1,R=this._z1,P=[],L=this._root,D,O;for(L&&P.push(new nn(L,s,a,u,S,E,R)),n==null?n=1/0:(s=r-n,a=e-n,u=t-n,S=r+n,E=e+n,R=t+n,n*=n);D=P.pop();)if(!(!(L=D.node)||(f=D.x0)>S||(m=D.y0)>E||(y=D.z0)>R||(_=D.x1)<s||(b=D.y1)<a||(w=D.z1)<u))if(L.length){var G=(f+_)/2,U=(m+b)/2,j=(y+w)/2;P.push(new nn(L[7],G,U,j,_,b,w),new nn(L[6],f,U,j,G,b,w),new nn(L[5],G,m,j,_,U,w),new nn(L[4],f,m,j,G,U,w),new nn(L[3],G,U,y,_,b,j),new nn(L[2],f,U,y,G,b,j),new nn(L[1],G,m,y,_,U,j),new nn(L[0],f,m,y,G,U,j)),(O=(t>=j)<<2|(e>=U)<<1|r>=G)&&(D=P[P.length-1],P[P.length-1]=P[P.length-1-O],P[P.length-1-O]=D)}else{var V=r-+this._x.call(null,L.data),Q=e-+this._y.call(null,L.data),Z=t-+this._z.call(null,L.data),K=V*V+Q*Q+Z*Z;if(K<n){var Y=Math.sqrt(n=K);s=r-Y,a=e-Y,u=t-Y,S=r+Y,E=e+Y,R=t+Y,i=L.data}}return i}const wS=(r,e,t,n,i,s)=>Math.sqrt((r-n)**2+(e-i)**2+(t-s)**2);function SS(r,e,t,n){const i=[],s=r-n,a=e-n,u=t-n,f=r+n,m=e+n,y=t+n;return this.visit((_,b,w,S,E,R,P)=>{if(!_.length)do{const L=_.data;wS(r,e,t,this._x(L),this._y(L),this._z(L))<=n&&i.push(L)}while(_=_.next);return b>f||w>m||S>y||E<s||R<a||P<u}),i}function MS(r){if(isNaN(b=+this._x.call(null,r))||isNaN(w=+this._y.call(null,r))||isNaN(S=+this._z.call(null,r)))return this;var e,t=this._root,n,i,s,a=this._x0,u=this._y0,f=this._z0,m=this._x1,y=this._y1,_=this._z1,b,w,S,E,R,P,L,D,O,G,U;if(!t)return this;if(t.length)for(;;){if((L=b>=(E=(a+m)/2))?a=E:m=E,(D=w>=(R=(u+y)/2))?u=R:y=R,(O=S>=(P=(f+_)/2))?f=P:_=P,e=t,!(t=t[G=O<<2|D<<1|L]))return this;if(!t.length)break;(e[G+1&7]||e[G+2&7]||e[G+3&7]||e[G+4&7]||e[G+5&7]||e[G+6&7]||e[G+7&7])&&(n=e,U=G)}for(;t.data!==r;)if(i=t,!(t=t.next))return this;return(s=t.next)&&delete t.next,i?(s?i.next=s:delete i.next,this):e?(s?e[G]=s:delete e[G],(t=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&t===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!t.length&&(n?n[U]=t:this._root=t),this):(this._root=s,this)}function ES(r){for(var e=0,t=r.length;e<t;++e)this.remove(r[e]);return this}function NS(){return this._root}function RS(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function CS(r){var e=[],t,n=this._root,i,s,a,u,f,m,y;for(n&&e.push(new nn(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=e.pop();)if(!r(n=t.node,s=t.x0,a=t.y0,u=t.z0,f=t.x1,m=t.y1,y=t.z1)&&n.length){var _=(s+f)/2,b=(a+m)/2,
3w=(u+y)/2;(i=n[7])&&e.push(new nn(i,_,b,w,f,m,y)),(i=n[6])&&e.push(new nn(i,s,b,w,_,m,y)),(i=n[5])&&e.push(new nn(i,_,a,w,f,b,y)),(i=n[4])&&e.push(new nn(i,s,a,w,_,b,y)),(i=n[3])&&e.push(new nn(i,_,b,u,f,m,w)),(i=n[2])&&e.push(new nn(i,s,b,u,_,m,w)),(i=n[1])&&e.push(new nn(i,_,a,u,f,b,w)),(i=n[0])&&e.push(new nn(i,s,a,u,_,b,w))}return this}function PS(r){var e=[],t=[],n;for(this._root&&e.push(new nn(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var i=n.node;if(i.length){var s,a=n.x0,u=n.y0,f=n.z0,m=n.x1,y=n.y1,_=n.z1,b=(a+m)/2,w=(u+y)/2,S=(f+_)/2;(s=i[0])&&e.push(new nn(s,a,u,f,b,w,S)),(s=i[1])&&e.push(new nn(s,b,u,f,m,w,S)),(s=i[2])&&e.push(new nn(s,a,w,f,b,y,S)),(s=i[3])&&e.push(new nn(s,b,w,f,m,y,S)),(s=i[4])&&e.push(new nn(s,a,u,S,b,w,_)),(s=i[5])&&e.push(new nn(s,b,u,S,m,w,_)),(s=i[6])&&e.push(new nn(s,a,w,S,b,y,_)),(s=i[7])&&e.push(new nn(s,b,w,S,m,y,_))}t.push(n)}for(;n=t.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function BS(r){return r[0]}function FS(r){return arguments.length?(this._x=r,this):this._x}function DS(r){return r[1]}function LS(r){return arguments.length?(this._y=r,this):this._y}function qS(r){return r[2]}function IS(r){return arguments.length?(this._z=r,this):this._z}function C7(r,e,t,n){var i=new Od(e??BS,t??DS,n??qS,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?i:i.addAll(r)}function Od(r,e,t,n,i,s,a,u,f){this._x=r,this._y=e,this._z=t,this._x0=n,this._y0=i,this._z0=s,this._x1=a,this._y1=u,this._z1=f,this._root=void 0}function F4(r){for(var e={data:r.data},t=e;r=r.next;)t=t.next={data:r.data};return e}var mr=C7.prototype=Od.prototype;mr.copy=function(){var r=new Od(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,t,n;if(!e)return r;if(!e.length)return r._root=F4(e),r;for(t=[{source:e,target:r._root=new Array(8)}];e=t.pop();)for(var i=0;i<8;++i)(n=e.source[i])&&(n.length?t.push({source:n,target:e.target[i]=new Array(8)}):e.target[i]=F4(n));return r};mr.add=yS;mr.addAll=vS;mr.cover=_S;mr.data=xS;mr.extent=bS;mr.find=TS;mr.findAllWithinRadius=SS;mr.remove=MS;mr.removeAll=ES;mr.root=NS;mr.size=RS;mr.visit=CS;mr.visitAfter=PS;mr.x=FS;mr.y=LS;mr.z=IS;function o1(r,e){return r==null||e==null?NaN:r<e?-1:r>e?1:r>=e?0:NaN}function kS(r,e){return r==null||e==null?NaN:e<r?-1:e>r?1:e>=r?0:NaN}function P7(r){let e,t,n;r.length!==2?(e=o1,t=(u,f)=>o1(r(u),f),n=(u,f)=>r(u)-f):(e=r===o1||r===kS?r:US,t=r,n=r);function i(u,f,m=0,y=u.length){if(m<y){if(e(f,f)!==0)return y;do{const _=m+y>>>1;t(u[_],f)<0?m=_+1:y=_}while(m<y)}return m}function s(u,f,m=0,y=u.length){if(m<y){if(e(f,f)!==0)return y;do{const _=m+y>>>1;t(u[_],f)<=0?m=_+1:y=_}while(m<y)}return m}function a(u,f,m=0,y=u.length){const _=i(u,f,m,y-1);return _>m&&n(u[_-1],f)>-n(u[_],f)?_-1:_}return{left:i,center:a,right:s}}function US(){return 0}function OS(r){return r===null?NaN:+r}const GS=P7(o1),VS=GS.right;P7(OS).center;const B7=VS;function E1(r,e){let t,n;if(e===void 0)for(const i of r)i!=null&&(t===void 0?i>=i&&(t=n=i):(t>i&&(t=i),n<i&&(n=i)));else{let i=-1;for(let s of r)(s=e(s,++i,r))!=null&&(t===void 0?s>=s&&(t=n=s):(t>s&&(t=s),n<s&&(n=s)))}return[t,n]}class Xs{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const s=t[i],a=e+s,u=Math.abs(e)<Math.abs(s)?e-(a-s):s-(a-e);u&&(t[n++]=u),e=a}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t=this._n,n,i,s,a=0;if(t>0){for(a=e[--t];t>0&&(n=a,i=e[--t],a=n+i,s=i-(a-n),!s););t>0&&(s<0&&e[t-1]<0||s>0&&e[t-1]>0)&&(i=s*2,n=a+i,i==n-a&&(a=n))}return a}}const zS=Math.sqrt(50),jS=Math.sqrt(10),$S=Math.sqrt(2);function N1(r,e,t){const n=(e-r)/Math.max(0,t),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),a=s>=zS?10:s>=jS?5:s>=$S?2:1;let u,f,m;return i<0?(m=Math.pow(10,-i)/a,u=Math.round(r*m),f=Math.round(e*m),u/m<r&&++u,f/m>e&&--f,m=-m):(m=Math.pow(10,i)*a,u=Math.round(r/m),f=Math.round(e/m),u*m<r&&++u,f*m>e&&--f),f<u&&.5<=t&&t<2?N1(r,e,t*2):[u,f,m]}function HS(r,e,t){if(e=+e,r=+r,t=+t,!(t>0))return[];if(r===e)return[r];const n=e<r,[i,s,a]=n?N1(e,r,t):N1(r,e,t);if(!(s>=i))return[];const u=s-i+1,f=new Array(u);if(n)if(a<0)for(let m=0;m<u;++m)f[m]=(s-m)/-a;else for(let m=0;m<u;++m)f[m]=(s-m)*a;else if(a<0)for(let m=0;m<u;++m)f[m]=(i+m)/-a;else for(let m=0;m<u;++m)f[m]=(i+m)*a;return f}function ch(r,e,t){return e=+e,r=+r,t=+t,N1(r,e,t)[2]}function WS(r,e,t){e=+e,r=+r,t=+t;const n=e<r,i=n?ch(e,r,t):ch(r,e,t);return(n?-1:1)*(i<0?1/-i:i)}function QS(r,e){let t;if(e===void 0)for(const n of r)n!=null&&(t<n||t===void 0&&n>=n)&&(t=n);else{let n=-1;for(let i of r)(i=e(i,++n,r))!=null&&(t<i||t===void 0&&i>=i)&&(t=i)}return t}function YS(r,e){let t=0,n=0;if(e===void 0)for(let i of r)i!=null&&(i=+i)>=i&&(++t,n+=i);else{let i=-1;for(let s of r)(s=e(s,++i,r))!=null&&(s=+s)>=s&&(++t,n+=s)}if(t)return n/t}function*XS(r){for(const e of r)yield*e}function Z0(r){return Array.from(XS(r))}function dA(r,e,t){r=+r,e=+e,t=(i=arguments.length)<2?(e=r,r=0,1):i<3?1:+t;for(var n=-1,i=Math.max(0,Math.ceil((e-r)/t))|0,s=new Array(i);++n<i;)s[n]=r+n*t;return s}function KS(r,e){let t=0;if(e===void 0)for(let n of r)(n=+n)&&(t+=n);else{let n=-1;for(let i of r)(i=+e(i,++n,r))&&(t+=i)}return t}function F7(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}function Gd(r,e,t){r.prototype=e.prototype=t,t.constructor=r}function D7(r,e){var t=Object.create(r.prototype);for(var n in e)t[n]=e[n];return t}function Cl(){}var J0=.7,R1=1/J0,TA="\\s*([+-]?\\d+)\\s*",el="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ZS=/^#([0-9a-f]{3,8})$/,JS=new RegExp(`^rgb\\(${TA},${TA},${TA}\\)$`),eM=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),tM=new RegExp(`^rgba\\(${TA},${TA},${TA},${el}\\)$`),nM=new RegExp(`^rgba\\(${gs},${gs},${gs},${el}\\)$`),rM=new RegExp(`^hsl\\(${el},${gs},${gs}\\)$`),iM=new RegExp(`^hsla\\(${el},${gs},${gs},${el}\\)$`),D4={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};Gd(Cl,Ma,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:L4,formatHex:L4,formatHex8:sM,formatHsl:oM,formatRgb:q4,toString:q4});function L4(){return this.rgb().formatHex()}function sM(){return this.rgb().formatHex8()}function oM(){return L7(this).formatHsl()}function q4(){return this.rgb().formatRgb()}function Ma(r){var e,t;return r=(r+"").trim().toLowerCase(),(e=ZS.exec(r))?(t=e[1].length,e=parseInt(e[1],16),t===6?I4(e):t===3?new Hr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?du(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?du(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=JS.exec(r))?new Hr(e[1],e[2],e[3],1):(e=eM.exec(r))?new Hr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tM.exec(r))?du(e[1],e[2],e[3],e[4]):(e=nM.exec(r))?du(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rM.exec(r))?O4(e[1],e[2]/100,e[3]/100,1):(e=iM.exec(r))?O4(e[1],e[2]/100,e[3]/100,e[4]):D4.hasOwnProperty(r)?I4(D4[r]):r==="transparent"?new Hr(NaN,NaN,NaN,0):null}function I4(r){return new Hr(r>>16&255,r>>8&255,r&255,1)}function du(r,e,t,n){return n<=0&&(r=e=t=NaN),new Hr(r,e,t,n)}function aM(r){return r instanceof Cl||(r=Ma(r)),r?(r=r.rgb(),new Hr(r.r,r.g,r.b,r.opacity)):new Hr}function fh(r,e,t,n){return arguments.length===1?aM(r):new Hr(r,e,t,n??1)}function Hr(r,e,t,n){this.r=+r,this.g=+e,this.b=+t,this.opacity=+n}Gd(Hr,fh,D7(Cl,{brighter(r){return r=r==null?R1:Math.pow(R1,r),new Hr(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?J0:Math.pow(J0,r),new Hr(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Hr(xa(this.r),xa(this.g),xa(this.b),C1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k4,formatHex:k4,formatHex8:AM,formatRgb:U4,toString:U4}));function k4(){return`#${pa(this.r)}${pa(this.g)}${pa(this.b)}`}function AM(){return`#${pa(this.r)}${pa(this.g)}${pa(this.b)}${pa((isNaN(this.opacity)?1:this.opacity)*255)}`}function U4(){const r=C1(this.opacity);return`${r===1?"rgb(":"rgba("}${xa(this.r)}, ${xa(this.g)}, ${xa(this.b)}${r===1?")":`, ${r})`}`}function C1(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function xa(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function pa(r){return r=xa(r),(r<16?"0":"")+r.toString(16)}function O4(r,e,t,n){return n<=0?r=e=t=NaN:t<=0||t>=1?r=e=NaN:e<=0&&(r=NaN),new Vi(r,e,t,n)}function L7(r){if(r instanceof Vi)return new Vi(r.h,r.s,r.l,r.opacity);if(r instanceof Cl||(r=Ma(r)),!r)return new Vi;if(r instanceof Vi)return r;r=r.rgb();var e=r.r/255,t=r.g/255,n=r.b/255,i=Math.min(e,t,n),s=Math.max(e,t,n
vendor: 1,566 bytes, line 3
3),a=NaN,u=s-i,f=(s+i)/2;return u?(e===s?a=(t-n)/u+(t<n)*6:t===s?a=(n-e)/u+2:a=(e-t)/u+4,u/=f<.5?s+i:2-s-i,a*=60):u=f>0&&f<1?0:a,new Vi(a,u,f,r.opacity)}function lM(r,e,t,n){return arguments.length===1?L7(r):new Vi(r,e,t,n??1)}function Vi(r,e,t,n){this.h=+r,this.s=+e,this.l=+t,this.opacity=+n}Gd(Vi,lM,D7(Cl,{brighter(r){return r=r==null?R1:Math.pow(R1,r),new Vi(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?J0:Math.pow(J0,r),new Vi(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*e,i=2*t-n;return new Hr(O2(r>=240?r-240:r+120,i,n),O2(r,i,n),O2(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new Vi(G4(this.h),pu(this.s),pu(this.l),C1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=C1(this.opacity);return`${r===1?"hsl(":"hsla("}${G4(this.h)}, ${pu(this.s)*100}%, ${pu(this.l)*100}%${r===1?")":`, ${r})`}`}}));function G4(r){return r=(r||0)%360,r<0?r+360:r}function pu(r){return Math.max(0,Math.min(1,r||0))}function O2(r,e,t){return(r<60?e+(t-e)*r/60:r<180?t:r<240?e+(t-e)*(240-r)/60:e)*255}const Vd=r=>()=>r;function uM(r,e){return function(t){return r+t*e}}function cM(r,e,t){return r=Math.pow(r,t),e=Math.pow(e,t)-r,t=1/t,function(n){return Math.pow(r+n*e,t)}}function fM(r){return(r=+r)==1?q7:function(e,t){return t-e?cM(e,t,r):Vd(isNaN(e)?t:e)}}function q7(r,e){var t=e-r;return t?uM(r,t):Vd(isNaN(r)?e:r)}const V4=function r(e){var t=fM(e);
vendor: 4,559 bytes, line 3
3function n(i,s){var a=t((i=fh(i)).r,(s=fh(s)).r),u=t(i.g,s.g),f=t(i.b,s.b),m=q7(i.opacity,s.opacity);return function(y){return i.r=a(y),i.g=u(y),i.b=f(y),i.opacity=m(y),i+""}}return n.gamma=r,n}(1);function I7(r,e){e||(e=[]);var t=r?Math.min(e.length,r.length):0,n=e.slice(),i;return function(s){for(i=0;i<t;++i)n[i]=r[i]*(1-s)+e[i]*s;return n}}function k7(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function hM(r,e){return(k7(e)?I7:U7)(r,e)}function U7(r,e){var t=e?e.length:0,n=r?Math.min(t,r.length):0,i=new Array(n),s=new Array(t),a;for(a=0;a<n;++a)i[a]=zd(r[a],e[a]);for(;a<t;++a)s[a]=e[a];return function(u){for(a=0;a<n;++a)s[a]=i[a](u);return s}}function dM(r,e){var t=new Date;return r=+r,e=+e,function(n){return t.setTime(r*(1-n)+e*n),t}}function tl(r,e){return r=+r,e=+e,function(t){return r*(1-t)+e*t}}function pM(r,e){var t={},n={},i;(r===null||typeof r!="object")&&(r={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in r?t[i]=zd(r[i],e[i]):n[i]=e[i];return function(s){for(i in t)n[i]=t[i](s);return n}}var hh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,G2=new RegExp(hh.source,"g");function mM(r){return function(){return r}}function gM(r){return function(e){return r(e)+""}}function yM(r,e){var t=hh.lastIndex=G2.lastIndex=0,n,i,s,a=-1,u=[],f=[];for(r=r+"",e=e+"";(n=hh.exec(r))&&(i=G2.exec(e));)(s=i.index)>t&&(s=e.slice(t,s),u[a]?u[a]+=s:u[++a]=s),(n=n[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,f.push({i:a,x:tl(n,i)})),t=G2.lastIndex;return t<e.length&&(s=e.slice(t),u[a]?u[a]+=s:u[++a]=s),u.length<2?f[0]?gM(f[0].x):mM(e):(e=f.length,function(m){for(var y=0,_;y<e;++y)u[(_=f[y]).i]=_.x(m);return u.join("")})}function zd(r,e){var t=typeof e,n;return e==null||t==="boolean"?Vd(e):(t==="number"?tl:t==="string"?(n=Ma(e))?(e=n,V4):yM:e instanceof Ma?V4:e instanceof Date?dM:k7(e)?I7:Array.isArray(e)?U7:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?pM:tl)(r,e)}function vM(r,e){return r=+r,e=+e,function(t){return Math.round(r*(1-t)+e*t)}}function _M(r){return function(){return r}}function xM(r){return+r}var z4=[0,1];function pA(r){return r}function dh(r,e){return(e-=r=+r)?function(t){return(t-r)/e}:_M(isNaN(e)?NaN:.5)}function bM(r,e){var t;return r>e&&(t=r,r=e,e=t),function(n){return Math.max(r,Math.min(e,n))}}function TM(r,e,t){var n=r[0],i=r[1],s=e[0],a=e[1];return i<n?(n=dh(i,n),s=t(a,s)):(n=dh(n,i),s=t(s,a)),function(u){return s(n(u))}}function wM(r,e,t){var n=Math.min(r.length,e.length)-1,i=new Array(n),s=new Array(n),a=-1;for(r[n]<r[0]&&(r=r.slice().reverse(),e=e.slice().reverse());++a<n;)i[a]=dh(r[a],r[a+1]),s[a]=t(e[a],e[a+1]);return function(u){var f=B7(r,u,1,n)-1;return s[f](i[f](u))}}function SM(r,e){return e.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function MM(){var r=z4,e=z4,t=zd,n,i,s,a=pA,u,f,m;function y(){var b=Math.min(r.length,e.length);return a!==pA&&(a=bM(r[0],r[b-1])),u=b>2?wM:TM,f=m=null,_}function _(b){return b==null||isNaN(b=+b)?s:(f||(f=u(r.map(n),e,t)))(n(a(b)))}return _.invert=function(b){return a(i((m||(m=u(e,r.map(n),tl)))(b)))},_.domain=function(b){return arguments.length?(r=Array.from(b,xM),y()):r.slice()},_.range=function(b){return arguments.length?(e=Array.from(b),y()):e.slice()},_.rangeRound=function(b){return e=Array.from(b),t=vM,y()},_.clamp=function(b){return arguments.length?(a=b?!0:pA,y()):a!==pA},_.interpolate=function(b){return arguments.length?(t=b,y()):t},_.unknown=function(b){return arguments.length?(s=b,_):s},function(b,w){return n=b,i=w,y()}}function EM(){return MM()(pA,pA)}function NM(r){return Math.abs(r=Math.round(r))>=1e21?r.toLocaleString("en").replace(/,/g,""):r.toString(10)}function P1(r,e){if(!isFinite(r)||r===0)return null;var t=(r=e?r.toExponential(e-1):r.toExponential()).indexOf("e"),n=r.slice(0,t);return[n.length>1?n[0]+n.slice(2):n,+r.slice(t+1)]}function CA(r){return r=P1(Math.abs(r)),r?r[1]:NaN}function RM(r,e){return function(t,n){for(var i=t.length,s=[],a=0,u=r[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),s.push(t.substring(i-=u,i+u)),!((f+=u+1)>n));)u=r[a=(a+1)%r.length];return s.reverse().join(e)}}function CM(r){return function(e){return e.replace(/[0-9]/g,function(t){return r[+t]})}}var PM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function B1(r){if(!(e=PM.exec(r)))throw new Error("invalid format: "+r);var e;return new jd({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}B1.prototype=jd.prototype;
3function jd(r){this.fill=r.fill===void 0?" ":r.fill+"",this.align=r.align===void 0?">":r.align+"",this.sign=r.sign===void 0?"-":r.sign+"",this.symbol=r.symbol===void 0?"":r.symbol+"",this.zero=!!r.zero,this.width=r.width===void 0?void 0:+r.width,this.comma=!!r.comma,this.precision=r.precision===void 0?void 0:+r.precision,this.trim=!!r.trim,this.type=r.type===void 0?"":r.type+""}jd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function BM(r){e:for(var e=r.length,t=1,n=-1,i;t<e;++t)switch(r[t]){case".":n=i=t;break;case"0":n===0&&(n=t),i=t;break;default:if(!+r[t])break e;n>0&&(n=0);break}return n>0?r.slice(0,n)+r.slice(i+1):r}var F1;function FM(r,e){var t=P1(r,e);if(!t)return F1=void 0,r.toPrecision(e);var n=t[0],i=t[1],s=i-(F1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+P1(r,Math.max(0,e+s-1))[0]}function j4(r,e){var t=P1(r,e);if(!t)return r+"";var n=t[0],i=t[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const $4={"%":(r,e)=>(r*100).toFixed(e),b:r=>Math.round(r).toString(2),c:r=>r+"",d:NM,e:(r,e)=>r.toExponential(e),f:(r,e)=>r.toFixed(e),g:(r,e)=>r.toPrecision(e),o:r=>Math.round(r).toString(8),p:(r,e)=>j4(r*100,e),r:j4,s:FM,X:r=>Math.round(r).toString(16).toUpperCase(),x:r=>Math.round(r).toString(16)};function H4(r){return r}var W4=Array.prototype.map,Q4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DM(r){var e=r.grouping===void 0||r.thousands===void 0?H4:RM(W4.call(r.grouping,Number),r.thousands+""),t=r.currency===void 0?"":r.currency[0]+"",n=r.currency===void 0?"":r.currency[1]+"",i=r.decimal===void 0?".":r.decimal+"",s=r.numerals===void 0?H4:CM(W4.call(r.numerals,String)),a=r.percent===void 0?"%":r.percent+"",u=r.minus===void 0?"â":r.minus+"",f=r.nan===void 0?"NaN":r.nan+"";function m(_,b){_=B1(_);var w=_.fill,S=_.align,E=_.sign,R=_.symbol,P=_.zero,L=_.width,D=_.comma,O=_.precision,G=_.trim,U=_.type;U==="n"?(D=!0,U="g"):$4[U]||(O===void 0&&(O=12),G=!0,U="g"),(P||w==="0"&&S==="=")&&(P=!0,w="0",S="=");var j=(b&&b.prefix!==void 0?b.prefix:"")+(R==="$"?t:R==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():""),V=(R==="$"?n:/[%p]/.test(U)?a:"")+(b&&b.suffix!==void 0?b.suffix:""),Q=$4[U],Z=/[defgprs%]/.test(U);O=O===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function K(Y){var ne=j,ae=V,J,fe,pe;if(U==="c")ae=Q(Y)+ae,Y="";else{Y=+Y;var Re=Y<0||1/Y<0;if(Y=isNaN(Y)?f:Q(Math.abs(Y),O),G&&(Y=BM(Y)),Re&&+Y==0&&E!=="+"&&(Re=!1),ne=(Re?E==="("?E:u:E==="-"||E==="("?"":E)+ne,ae=(U==="s"&&!isNaN(Y)&&F1!==void 0?Q4[8+F1/3]:"")+ae+(Re&&E==="("?")":""),Z){for(J=-1,fe=Y.length;++J<fe;)if(pe=Y.charCodeAt(J),48>pe||pe>57){ae=(pe===46?i+Y.slice(J+1):Y.slice(J))+ae,Y=Y.slice(0,J);break}}}D&&!P&&(Y=e(Y,1/0));var Se=ne.length+Y.length+ae.length,qe=Se<L?new Array(L-Se+1).join(w):"";switch(D&&P&&(Y=e(qe+Y,qe.length?L-ae.length:1/0),qe=""),S){case"<":Y=ne+Y+ae+qe;break;case"=":Y=ne+qe+Y+ae;break;case"^":Y=qe.slice(0,Se=qe.length>>1)+ne+Y+ae+qe.slice(Se);break;default:Y=qe+ne+Y+ae;break}return s(Y)}return K.toString=function(){return _+""},K}function y(_,b){var w=Math.max(-8,Math.min(8,Math.floor(CA(b)/3)))*3,S=Math.pow(10,-w),E=m((_=B1(_),_.type="f",_),{suffix:Q4[8+w/3]});return function(R){return E(S*R)}}return{format:m,formatPrefix:y}}var mu,O7,G7;LM({thousands:",",grouping:[3],currency:["$",""]});function LM(r){return mu=DM(r),O7=mu.format,G7=mu.formatPrefix,mu}function qM(r){return Math.max(0,-CA(Math.abs(r)))}function IM(r,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(CA(e)/3)))*3-CA(Math.abs(r)))}function kM(r,e){return r=Math.abs(r),e=Math.abs(e)-r,Math.max(0,CA(e)-CA(r))+1}function UM(r,e,t,n){var i=WS(r,e,t),s;switch(n=B1(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(r),Math.abs(e));return n.precision==null&&!isNaN(s=IM(i,a))&&(n.precision=s),G7(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=kM(i,Math.max(Math.abs(r),Math.abs(e))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=qM(i))&&(n.precision=s-(n.type==="%")*2);break}}return O7(n)}function V7(r){var e=r.domain;return r.ticks=function(t){var n=e();return HS(n[0],n[n.length-1],t??10)},r.tickFormat=function(t,n){var i=e();return UM(i[0],i[i.length-1],t??10,n)},r.nice=function(t){t==null&&(t=10);var n=e(),i=0,s=n.length-1,a=n[i],u=n[s],f,m,y=10;for(u<a&&(m=a,a=u,u=m,m=i,i=s,s=m);y-- >0;){if(m=ch(a,u,t),m===f)return n[i]=a,n[s]=u,e(n);if(m>0)a=Math.floor(a/m)*m,u=Math.ceil(u/m)*m;else if(m<0)a=Math.ceil(a*m)/m,u=Math.floor(u*m)/m;else break;f=m}return r},r}function to(){var r=EM();return r.copy=function(){return SM(r,to())},F7.apply(r,arguments),V7(r)}function z7(){var r=0,e=1,t=1,n=[.5],i=[0,1],s;function a(f){return f!=null&&f<=f?i[B7(n,f,0,t)]:s}function u(){var f=-1;for(n=new Array(t);++f<t;)n[f]=((f+1)*e-(f-t)*r)/(t+1);return a}return a.domain=function(f){return arguments.length?([r,e]=f,r=+r,e=+e,u()):[r,e]},a.range=function(f){return arguments.length?(t=(i=Array.from(f)).length-1,u()):i.slice()},a.invertExtent=function(f){var m=i.indexOf(f);return m<0?[NaN,NaN]:m<1?[r,n[0]]:m>=t?[n[t-1],e]:[n[m-1],n[m]]},a.unknown=function(f){return arguments.length&&(s=f),a},a.thresholds=function(){return n.slice()},a.copy=function(){return z7().domain([r,e]).range(i).unknown(s)},F7.apply(V7(a),arguments)}var bt=1e-6,D1=1e-12,Pt=Math.PI,Wr=Pt/2,L1=Pt/4,hi=Pt*2,wn=180/Pt,At=Pt/180,Jt=Math.abs,$d=Math.atan,Ni=Math.atan2,pt=Math.cos,gu=Math.ceil,OM=Math.exp,ph=Math.hypot,GM=Math.log,ot=
vendor: 14,684 bytes, line 3
3Math.sin,VM=Math.sign||function(r){return r>0?1:r<0?-1:0},no=Math.sqrt,zM=Math.tan;function jM(r){return r>1?0:r<-1?Pt:Math.acos(r)}function ro(r){return r>1?Wr:r<-1?-Wr:Math.asin(r)}function Y4(r){return(r=ot(r/2))*r}function br(){}function q1(r,e){r&&K4.hasOwnProperty(r.type)&&K4[r.type](r,e)}var X4={Feature:function(r,e){q1(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)q1(t[n].geometry,e)}},K4={Sphere:function(r,e){e.sphere()},Point:function(r,e){r=r.coordinates,e.point(r[0],r[1],r[2])},MultiPoint:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)r=t[n],e.point(r[0],r[1],r[2])},LineString:function(r,e){mh(r.coordinates,e,0)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)mh(t[n],e,0)},Polygon:function(r,e){Z4(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)Z4(t[n],e)},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)q1(t[n],e)}};function mh(r,e,t){var n=-1,i=r.length-t,s;for(e.lineStart();++n<i;)s=r[n],e.point(s[0],s[1],s[2]);e.lineEnd()}function Z4(r,e){var t=-1,n=r.length;for(e.polygonStart();++t<n;)mh(r[t],e,1);e.polygonEnd()}function Pc(r,e){r&&X4.hasOwnProperty(r.type)?X4[r.type](r,e):q1(r,e)}var I1=new Xs,J4=new Xs,j7,$7,gh,yh,vh,io={point:br,lineStart:br,lineEnd:br,polygonStart:function(){I1=new Xs,io.lineStart=$M,io.lineEnd=HM},polygonEnd:function(){var r=+I1;J4.add(r<0?hi+r:r),this.lineStart=this.lineEnd=this.point=br},sphere:function(){J4.add(hi)}};function $M(){io.point=WM}function HM(){H7(j7,$7)}function WM(r,e){io.point=H7,j7=r,$7=e,r*=At,e*=At,gh=r,yh=pt(e=e/2+L1),vh=ot(e)}function H7(r,e){r*=At,e*=At,e=e/2+L1;var t=r-gh,n=t>=0?1:-1,i=n*t,s=pt(e),a=ot(e),u=vh*a,f=yh*s+u*pt(i),m=u*n*ot(i);I1.add(Ni(m,f)),gh=r,yh=s,vh=a}function k1(r){return[Ni(r[1],r[0]),ro(r[2])]}function Ea(r){var e=r[0],t=r[1],n=pt(t);return[n*pt(e),n*ot(e),ot(t)]}function yu(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function PA(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function V2(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function vu(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function U1(r){var e=no(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}var gn,$r,bn,ui,ua,W7,Q7,wA,q0,Eo,so,js={point:_h,lineStart:e5,lineEnd:t5,polygonStart:function(){js.point=X7,js.lineStart=QM,js.lineEnd=YM,q0=new Xs,io.polygonStart()},polygonEnd:function(){io.polygonEnd(),js.point=_h,js.lineStart=e5,js.lineEnd=t5,I1<0?(gn=-(bn=180),$r=-(ui=90)):q0>bt?ui=90:q0<-bt&&($r=-90),so[0]=gn,so[1]=bn},sphere:function(){gn=-(bn=180),$r=-(ui=90)}};function _h(r,e){Eo.push(so=[gn=r,bn=r]),e<$r&&($r=e),e>ui&&(ui=e)}function Y7(r,e){var t=Ea([r*At,e*At]);if(wA){var n=PA(wA,t),i=[n[1],-n[0],0],s=PA(i,n);U1(s),s=k1(s);var a=r-ua,u=a>0?1:-1,f=s[0]*wn*u,m,y=Jt(a)>180;y^(u*ua<f&&f<u*r)?(m=s[1]*wn,m>ui&&(ui=m)):(f=(f+360)%360-180,y^(u*ua<f&&f<u*r)?(m=-s[1]*wn,m<$r&&($r=m)):(e<$r&&($r=e),e>ui&&(ui=e))),y?r<ua?ai(gn,r)>ai(gn,bn)&&(bn=r):ai(r,bn)>ai(gn,bn)&&(gn=r):bn>=gn?(r<gn&&(gn=r),r>bn&&(bn=r)):r>ua?ai(gn,r)>ai(gn,bn)&&(bn=r):ai(r,bn)>ai(gn,bn)&&(gn=r)}else Eo.push(so=[gn=r,bn=r]);e<$r&&($r=e),e>ui&&(ui=e),wA=t,ua=r}function e5(){js.point=Y7}function t5(){so[0]=gn,so[1]=bn,js.point=_h,wA=null}function X7(r,e){if(wA){var t=r-ua;q0.add(Jt(t)>180?t+(t>0?360:-360):t)}else W7=r,Q7=e;io.point(r,e),Y7(r,e)}function QM(){io.lineStart()}function YM(){X7(W7,Q7),io.lineEnd(),Jt(q0)>bt&&(gn=-(bn=180)),so[0]=gn,so[1]=bn,wA=null}function ai(r,e){return(e-=r)<0?e+360:e}function XM(r,e){return r[0]-e[0]}function n5(r,e){return r[0]<=r[1]?r[0]<=e&&e<=r[1]:e<r[0]||r[1]<e}function K7(r){var e,t,n,i,s,a,u;if(ui=bn=-(gn=$r=1/0),Eo=[],Pc(r,js),t=Eo.length){for(Eo.sort(XM),e=1,n=Eo[0],s=[n];e<t;++e)i=Eo[e],n5(n,i[0])||n5(n,i[1])?(ai(n[0],i[1])>ai(n[0],n[1])&&(n[1]=i[1]),ai(i[0],n[1])>ai(n[0],n[1])&&(n[0]=i[0])):s.push(n=i);for(a=-1/0,t=s.length-1,e=0,n=s[t];e<=t;n=i,++e)i=s[e],(u=ai(n[1],i[0]))>a&&(a=u,gn=i[0],bn=n[1])}return Eo=so=null,gn===1/0||$r===1/0?[[NaN,NaN],[NaN,NaN]]:[[gn,$r],[bn,ui]]}var N0,O1,G1,V1,z1,j1,$1,H1,xh,bh,Th,Z7,J7,Dr,Lr,qr,ji={sphere:br,point:Hd,lineStart:r5,lineEnd:i5,polygonStart:function(){ji.lineStart=JM,ji.lineEnd=eE},polygonEnd:function(){ji.lineStart=r5,ji.lineEnd=i5}};function Hd(r,e){r*=At,e*=At;var t=pt(e);Pl(t*pt(r),t*ot(r),ot(e))}function Pl(r,e,t){++N0,G1+=(r-G1)/N0,V1+=(e-V1)/N0,z1+=(t-z1)/N0}function r5(){ji.point=KM}function KM(r,e){r*=At,e*=At;var t=pt(e);Dr=t*pt(r),Lr=t*ot(r),qr=ot(e),ji.point=ZM,Pl(Dr,Lr,qr)}function ZM(r,e){r*=At,e*=At;var t=pt(e),n=t*pt(r),i=t*ot(r),s=ot(e),a=Ni(no((a=Lr*s-qr*i)*a+(a=qr*n-Dr*s)*a+(a=Dr*i-Lr*n)*a),Dr*n+Lr*i+qr*s);O1+=a,j1+=a*(Dr+(Dr=n)),$1+=a*(Lr+(Lr=i)),H1+=a*(qr+(qr=s)),Pl(Dr,Lr,qr)}function i5(){ji.point=Hd}function JM(){ji.point=tE}function eE(){eg(Z7,J7),ji.point=Hd}function tE(r,e){Z7=r,J7=e,r*=At,e*=At,ji.point=eg;var t=pt(e);Dr=t*pt(r),Lr=t*ot(r),qr=ot(e),Pl(Dr,Lr,qr)}function eg(r,e){r*=At,e*=At;var t=pt(e),n=t*pt(r),i=t*ot(r),s=ot(e),a=Lr*s-qr*i,u=qr*n-Dr*s,f=Dr*i-Lr*n,m=ph(a,u,f),y=ro(m),_=m&&-y/m;xh.add(_*a),bh.add(_*u),Th.add(_*f),O1+=y,j1+=y*(Dr+(Dr=n)),$1+=y*(Lr+(Lr=i)),H1+=y*(qr+(qr=s)),Pl(Dr,Lr,qr)}function s5(r){N0=O1=G1=V1=z1=j1=$1=H1=0,xh=new Xs,bh=new Xs,Th=new Xs,Pc(r,ji);var e=+xh,t=+bh,n=+Th,i=ph(e,t,n);return i<D1&&(e=j1,t=$1,n=H1,O1<bt&&(e=G1,t=V1,n=z1),i=ph(e,t,n),i<D1)?[NaN,NaN]:[Ni(t,e)*wn,ro(n/i)*wn]}function wh(r,e){function t(n,i){return n=r(n,i),e(n[0],n[1])}return r.invert&&e.invert&&(t.invert=function(n,i){return n=e.invert(n,i),n&&r.invert(n[0],n[1])}),t}function Sh(r,e){return Jt(r)>Pt&&(r-=Math.round(r/hi)*hi),[r,e]}Sh.invert=Sh;function tg(r,e,t){return(r%=hi)?e||t?wh(a5(r),A5(e,t)):a5(r):e||t?A5(e,t):Sh}function o5(r){return function(e,t){return e+=r,Jt(e)>Pt&&(e-=Math.round(e/hi)*hi),[e,t]}}function a5(r){var e=o5(r);return e.invert=o5(-r),e}function A5(r,e){var t=pt(r),n=ot(r),i=pt(e),s=ot(e);function a(u,f){var m=pt(f),y=pt(u)*m,_=ot(u)*m,b=ot(f),w=b*t+y*n;return[Ni(_*i-w*s,y*t-b*n),ro(w*i+_*s)]}return a.invert=function(u,f){var m=pt(f),y=pt(u)*m,_=ot(u)*m,b=ot(f),w=b*i-_*s;return[Ni(_*i+b*s,y*t+w*n),ro(w*t-y*n)]},a}function nE(r){r=tg(r[0]*At,r[1]*At,r.length>2?r[2]*At:0);function e(t){return t=r(t[0]*At,t[1]*At),t[0]*=wn,t[1]*=wn,t}return e.invert=function(t){return t=r.invert(t[0]*At,t[1]*At),t[0]*=wn,t[1]*=wn,t},e}function rE(r,e,t,n,i,s){if(t){var a=pt(e),u=ot(e),f=n*t;i==null?(i=e+n*hi,s=e-f/2):(i=l5(a,i),s=l5(a,s),(n>0?i<s:i>s)&&(i+=n*hi));for(var m,y=i;n>0?y>s:y<s;y-=f)m=k1([a,-u*pt(y),-u*ot(y)]),r.point(m[0],m[1])}}function l5(r,e){e=Ea(e),e[0]-=r,U1(e);var t=jM(-e[1]);return((-e[2]<0?-t:t)+hi-bt)%hi}function ng(){var r=[],e;return{point:function(t,n,i){e.push([t,n,i])},lineStart:function(){r.push(e=[])},lineEnd:br,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var t=r;return r=[],e=null,t}}}function a1(r,e){return Jt(r[0]-e[0])<bt&&Jt(r[1]-e[1])<bt}function _u(r,e,t,n){this.x=r,this.z=e,this.o=t,this.e=n,this.v=!1,this.n=this.p=null}function rg(r,e,t,n,i){var s=[],a=[],u,f;if(r.forEach(function(S){if(!((E=S.length-1)<=0)){var E,R=S[0],P=S[E],L;if(a1(R,P)){if(!R[2]&&!P[2]){for(i.lineStart(),u=0;u<E;++u)i.point((R=S[u])[0],R[1]);i.lineEnd();return}P[0]+=2*bt}s.push(L=new _u(R,S,null,!0)),a.push(L.o=new _u(R,null,L,!1)),s.push(L=new _u(P,S,null,!1)),a.push(L.o=new _u(P,null,L,!0))}}),!!s.length){for(a.sort(e),u5(s),u5(a),u=0,f=a.length;u<f;++u)a[u].e=t=!t;for(var m=s[0],y,_;;){for(var b=m,w=!0;b.v;)if((b=b.n)===m)return;y=b.z,i.lineStart();do{if(b.v=b.o.v=!0,b.e){if(w)for(u=0,f=y.length;u<f;++u)i.point((_=y[u])[0],_[1]);else n(b.x,b.n.x,1,i);b=b.n}else{if(w)for(y=b.p.z,u=y.length-1;u>=0;--u)i.point((_=y[u])[0],_[1]);else n(b.x,b.p.x,-1,i);b=b.p}b=b.o,y=b.z,w=!w}while(!b.v);i.lineEnd()}}}function u5(r){if(e=r.length){for(var e,t=0,n=r[0],i;++t<e;)n.n=i=r[t],i.p=n,n=i;n.n=i=r[0],i.p=n}}function z2(r){return Jt(r[0])<=Pt?r[0]:VM(r[0])*((Jt(r[0])+Pt)%hi-Pt)}function ig(r,e){var t=z2(e),n=e[1],i=ot(n),s=[ot(t),-pt(t),0],a=0,u=0,f=new Xs;i===1?n=Wr+bt:i===-1&&(n=-Wr-bt);for(var m=0,y=r.length;m<y;++m)if(b=(_=r[m]).length)for(var _,b,w=_[b-1],S=z2(w),E=w[1]/2+L1,R=ot(E),P=pt(E),L=0;L<b;++L,S=O,R=U,P=j,w=D){var D=_[L],O=z2(D),G=D[1]/2+L1,U=ot(G),j=pt(G),V=O-S,Q=V>=0?1:-1,Z=Q*V,K=Z>Pt,Y=R*U;if(f.add(Ni(Y*Q*ot(Z),P*j+Y*pt(Z))),a+=K?V+Q*hi:V,K^S>=t^O>=t){var ne=PA(Ea(w),Ea(D));U1(ne);var ae=PA(s,ne);U1(ae);var J=(K^V>=0?-1:1)*ro(ae[2]);(n>J||n===J&&(ne[0]||ne[1]))&&(u+=K^V>=0?1:-1)}}return(a<-bt||a<bt&&f<-D1)^u&1}function sg(r,e,t,n){return function(i){var s=e(i),a=ng(),u=e(a),f=!1,m,y,_,b={point:w,lineStart:E,lineEnd:R,polygonStart:function(){b.point=P,b.lineStart=L,b.lineEnd=D,y=[],m=[]},polygonEnd:function(){b.point=w,b.lineStart=E,b.lineEnd=R,y=Z0(y);var O=ig(m,n);y.length?(f||(i.polygonStart(),f=!0),rg(y,sE,O,t,i)):O&&(f||(i.polygonStart(),f=!0),i.lineStart(),t(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),y=m=null},sphere:function(){i.polygonStart(),i.lineStart(),t(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function w(O,G){r(O,G)&&i.point(O,G)}function S(O,G){s.point(O,G)}function E(){b.point=S,s.lineStart()}function R(){b.point=w,s.lineEnd()}function P(O,G){_.push([O,G]),u.point(O,G)}function L(){u.lineStart(),_=[]}function D(){P(_[0][0],_[0][1]),u.lineEnd();var O=u.clean(),G=a.result(),U,j=G.length,V,Q,Z;if(_.pop(),m.push(_),_=null,!!j){if(O&1){if(Q=G[0],(V=Q.length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),U=0;U<V;++U)i.point((Z=Q[U])[0],Z[1]);i.lineEnd()}return}j>1&&O&2&&G.push(G.pop().concat(G.shift())),y.push(G.filter(iE))}}return b}}function iE(r){return r.length>1}function sE(r,e){return((r=r.x)[0]<0?r[1]-Wr-bt:Wr-r[1])-((e=e.x)[0]<0?e[1]-Wr-bt:Wr-e[1])}const c5=sg(function(){return!0},oE,AE,[-Pt,-Wr]);function oE(r){var e=NaN,t=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,a){var u=s>0?Pt:-Pt,f=Jt(s-e);Jt(f-Pt)<bt?(r.point(e,t=(t+a)/2>0?Wr:-Wr),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(u,t),r.point(s,t),i=0):n!==u&&f>=Pt&&(Jt(e-n)<bt&&(e-=n*bt),Jt(s-u)<bt&&(s-=u*bt),t=aE(e,t,s,a),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(u,t),i=0),r.point(e=s,t=a),n=u},lineEnd:function(){r.lineEnd(),e=t=NaN},clean:function(){return 2-i}}}function aE(r,e,t,n){var i,s,a=ot(r-t);return Jt(a)>bt?$d((ot(e)*(s=pt(n))*ot(t)-ot(n)*(i=pt(e))*ot(r))/(i*s*a)):(e+n)/2}function AE(r,e,t,n){var i;if(r==null)i=t*Wr,n.point(-Pt,i),n.point(0,i),n.point(Pt,i),n.point(Pt,0),n.point(Pt,-i),n.point(0,-i),n.point(-Pt,-i),n.point(-Pt,0),n.point(-Pt,i);else if(Jt(r[0]-e[0])>bt){var s=r[0]<e[0]?Pt:-Pt;i=t*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(e[0],e[1])}function lE(r){var e=pt(r),t=2*At,n=e>0,i=Jt(e)>bt;function s(y,_,b,w){rE(w,r,t,b,y,_)}function a(y,_){return pt(y)*pt(_)>e}function u(y){var _,b,w,S,E;return{lineStart:function(){S=w=!1,E=1},point:function(R,P){var L=[R,P],D,O=a(R,P),G=n?O?0:m(R,P):O?m(R+(R<0?Pt:-Pt),P):0;if(!_&&(S=w=O)&&y.lineStart(),O!==w&&(D=f(_,L),(!D||a1(_,D)||a1(L,D))&&(L[2]=1)),O!==w)E=0,O?(y.lineStart(),D=f(L,_),y.point(D[0],D[1])):(D=f(_,L),y.point(D[0],D[1],2),y.lineEnd()),_=D;else if(i&&_&&n^O){var U;!(G&b)&&(U=f(L,_,!0))&&(E=0,n?(y.lineStart(),y.point(U[0][0],U[0][1]),y.point(U[1][0],U[1][1]),y.lineEnd()):(y.point(U[1][0],U[1][1]),y.lineEnd(),y.lineStart(),y.point(U[0][0],U[0][1],3)))}O&&(!_||!a1(_,L))&&y.point(L[0],L[1]),_=L,w=O,b=G},lineEnd:function(){w&&y.lineEnd(),_=null},clean:function(){return E|(S&&w)<<1}}}function f(y,_,b){var w=Ea(y),S=Ea(_),E=[1,0,0],R=PA(w,S),P=yu(R,R),L=R[0],D=P-L*L;if(!D)return!b&&y;var O=e*P/D,G=-e*L/D,U=PA(E,R),j=vu(E,O),V=vu(R,G);V2(j,V);var Q=U,Z=yu(j,Q),K=yu(Q,Q),Y=Z*Z-K*(yu(j,j)-1);if(!(Y<0)){var ne=no(Y),ae=vu(Q,(-Z-ne)/K);if(V2(ae,j),ae=k1(ae),!b)return ae;var J=y[0],fe=_[0],pe=y[1],Re=_[1],Se;fe<J&&(Se=J,J=fe,fe=Se);var qe=fe-J,je=Jt(qe-Pt)<bt,Qe=je||qe<bt;if(!je&&Re<pe&&(Se=pe,pe=Re,Re=Se),Qe?je?pe+Re>0^ae[1]<(Jt(ae[0]-J)<bt?pe:Re):pe<=ae[1]&&ae[1]<=Re:qe>Pt^(J<=ae[0]&&ae[0]<=fe)){var He=vu(Q,(-Z+ne)/K);return V2(He,j),[ae,k1(He)]}}}function m(y,_){var b=n?r:Pt-r,w=0;return y<-b?w|=1:y>b&&(w|=2),_<-b?w|=4:_>b&&(w|=8),w}return sg(a,u,s,n?[0,-r]:[-Pt,r-Pt])}function uE(r,e,t,n,i,s){var a=r[0],u=r[1],f=e[0],m=e[1],y=0,_=1,b=f-a,w=m-u,S;if(S=t-a,!(!b&&S>0)){if(S/=b,b<0){if(S<y)return;S<_&&(_=S)}else if(b>0){if(S>_)return;S>y&&(y=S)}if(S=i-a,!(!b&&S<0)){if(S/=b,b<0){if(S>_)return;S>y&&(y=S)}else if(b>0){if(S<y)return;S<_&&(_=S)}if(S=n-u,!(!w&&S>0)){if(S/=w,w<0){if(S<y)return;S<_&&(_=S)}else if(w>0){if(S>_)return;S>y&&(y=S)}if(S=s-u,!(!w&&S<0)){if(S/=w,w<0){if(S>_)return;S>y&&(y=S)}else if(w>0){if(S<y)return;S<_&&(_=S)}return y>0&&(r[0]=a+y*b,r[1]=u+y*w),_<1&&(e[0]=a+_*b,e[1]=u+_*w),!0}}}}}var R0=1e9,xu=-R0;function cE(r,e,t,n){function i(m,y){return r<=m&&m<=t&&e<=y&&y<=n}function s(m,y,_,b){var w=0,S=0;if(m==null||(w=a(m,_))!==(S=a(y,_))||f(m,y)<0^_>0)do b.point(w===0||w===3?r:t,w>1?n:e);while((w=(w+_+4)%4)!==S);else b.point(y[0],y[1])}function a(m,y){return Jt(m[0]-r)<bt?y>0?0:3:Jt(m[0]-t)<bt?y>0?2:1:Jt(m[1]-e)<bt?y>0?1:0:y>0?3:2}function u(m,y){return f(m.x,y.x)}function f(m,y){var _=a(m,1),b=a(y,1);return _!==b?_-b:_===0?y[1]-m[1]:_===1?m[0]-y[0]:_===2?m[1]-y[1]:y[0]-m[0]}return function(m){var y=m,_=ng(),b,w,S,E,R,P,L,D,O,G,U,j={point:V,lineStart:Y,lineEnd:ne,polygonStart:Z,polygonEnd:K};function V(J,fe){i(J,fe)&&y.point(J,fe)}function Q(){for(var J=0,fe=0,pe=w.length;fe<pe;++fe)for(var Re=w[fe],Se=1,qe=Re.length,je=Re[0],Qe,He,vt=je[0],it=je[1];Se<qe;++Se)Qe=vt,He=it,je=Re[Se],vt=je[0],it=je[1],He<=n?it>n&&(vt-Qe)*(n-He)>(it-He)*(r-Qe)&&++J:it<=n&&(vt-Qe)*(n-He)<(it-He)*(r-Qe)&&--J;return J}function Z(){y=_,b=[],w=[],U=!0}function K(){var J=Q(),fe=U&&J,pe=(b=Z0(b)).length;(fe||pe)&&(m.polygonStart(),fe&&(m.lineStart(),s(null,null,1,m),m.lineEnd()),pe&&rg(b,u,J,s,m),m.polygonEnd()),y=m,b=w=S=null}function Y(){j.point=ae,w&&w.push(S=[]),G=!0,O=!1,L=D=NaN}function ne(){b&&(ae(E,R),P&&O&&_.rejoin(),b.push(_.result())),j.point=V,O&&y.lineEnd()}function ae(J,fe){var pe=i(J,fe);if(w&&S.push([J,fe]),G)E=J,R=fe,P=pe,G=!1,pe&&(y.lineStart(),y.point(J,fe));else if(pe&&O)y.point(J,fe);else{var Re=[L=Math.max(xu,Math.min(R0,L)),D=Math.max(xu,Math.min(R0,D))],Se=[J=Math.max(xu,Math.min(R0,J)),fe=Math.max(xu,Math.min(R0,fe))];uE(Re,Se,r,e,t,n)?(O||(y.lineStart(),y.point(Re[0],Re[1])),y.point(Se[0],Se[1]),pe||y.lineEnd(),U=!1):pe&&(y.lineStart(),y.point(J,fe),U=!1)}L=J,D=fe,O=pe}return j}}var Mh,Eh,A1,l1,BA={sphere:br,point:br,lineStart:fE,lineEnd:br,polygonStart:br,polygonEnd:br};function fE(){BA.point=dE,BA.lineEnd=hE}function hE(){BA.point=BA.lineEnd=br}function dE(r,e){r*=At,e*=At,Eh=r,A1=ot(e),l1=pt(e),BA.point=pE}function pE(r,e){r*=At,e*=At;
vendor: 5,649 bytes, line 3
3var t=ot(e),n=pt(e),i=Jt(r-Eh),s=pt(i),a=ot(i),u=n*a,f=l1*t-A1*n*s,m=A1*t+l1*n*s;Mh.add(Ni(no(u*u+f*f),m)),Eh=r,A1=t,l1=n}function mE(r){return Mh=new Xs,Pc(r,BA),+Mh}var Nh=[null,null],gE={type:"LineString",coordinates:Nh};function Go(r,e){return Nh[0]=r,Nh[1]=e,mE(gE)}var f5={Feature:function(r,e){return W1(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)if(W1(t[n].geometry,e))return!0;return!1}},h5={Sphere:function(){return!0},Point:function(r,e){return d5(r.coordinates,e)},MultiPoint:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)if(d5(t[n],e))return!0;return!1},LineString:function(r,e){return p5(r.coordinates,e)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)if(p5(t[n],e))return!0;return!1},Polygon:function(r,e){return m5(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)if(m5(t[n],e))return!0;return!1},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)if(W1(t[n],e))return!0;return!1}};function W1(r,e){return r&&h5.hasOwnProperty(r.type)?h5[r.type](r,e):!1}function d5(r,e){return Go(r,e)===0}function p5(r,e){for(var t,n,i,s=0,a=r.length;s<a;s++){if(n=Go(r[s],e),n===0||s>0&&(i=Go(r[s],r[s-1]),i>0&&t<=i&&n<=i&&(t+n-i)*(1-Math.pow((t-n)/i,2))<D1*i))return!0;t=n}return!1}function m5(r,e){return!!ig(r.map(yE),og(e))}function yE(r){return r=r.map(og),r.pop(),r}function og(r){return[r[0]*At,r[1]*At]}function vE(r,e){return(r&&f5.hasOwnProperty(r.type)?f5[r.type]:W1)(r,e)}function g5(r,e,t){var n=dA(r,e-bt,t).concat(e);return function(i){return n.map(function(s){return[i,s]})}}function y5(r,e,t){var n=dA(r,e-bt,t).concat(e);return function(i){return n.map(function(s){return[s,i]})}}function _E(){var r,e,t,n,i,s,a,u,f=10,m=f,y=90,_=360,b,w,S,E,R=2.5;function P(){return{type:"MultiLineString",coordinates:L()}}function L(){return dA(gu(n/y)*y,t,y).map(S).concat(dA(gu(u/_)*_,a,_).map(E)).concat(dA(gu(e/f)*f,r,f).filter(function(D){return Jt(D%y)>bt}).map(b)).concat(dA(gu(s/m)*m,i,m).filter(function(D){return Jt(D%_)>bt}).map(w))}return P.lines=function(){return L().map(function(D){return{type:"LineString",coordinates:D}})},P.outline=function(){return{type:"Polygon",coordinates:[S(n).concat(E(a).slice(1),S(t).reverse().slice(1),E(u).reverse().slice(1))]}},P.extent=function(D){return arguments.length?P.extentMajor(D).extentMinor(D):P.extentMinor()},P.extentMajor=function(D){return arguments.length?(n=+D[0][0],t=+D[1][0],u=+D[0][1],a=+D[1][1],n>t&&(D=n,n=t,t=D),u>a&&(D=u,u=a,a=D),P.precision(R)):[[n,u],[t,a]]},P.extentMinor=function(D){return arguments.length?(e=+D[0][0],r=+D[1][0],s=+D[0][1],i=+D[1][1],e>r&&(D=e,e=r,r=D),s>i&&(D=s,s=i,i=D),P.precision(R)):[[e,s],[r,i]]},P.step=function(D){return arguments.length?P.stepMajor(D).stepMinor(D):P.stepMinor()},P.stepMajor=function(D){return arguments.length?(y=+D[0],_=+D[1],P):[y,_]},P.stepMinor=function(D){return arguments.length?(f=+D[0],m=+D[1],P):[f,m]},P.precision=function(D){return arguments.length?(R=+D,b=g5(s,i,90),w=y5(e,r,R),S=g5(u,a,90),E=y5(n,t,R),P):R},P.extentMajor([[-180,-90+bt],[180,90-bt]]).extentMinor([[-180,-80-bt],[180,80+bt]])}function xE(){return _E()()}function Wd(r,e){var t=r[0]*At,n=r[1]*At,i=e[0]*At,s=e[1]*At,a=pt(n),u=ot(n),f=pt(s),m=ot(s),y=a*pt(t),_=a*ot(t),b=f*pt(i),w=f*ot(i),S=2*ro(no(Y4(s-n)+a*f*Y4(i-t))),E=ot(S),R=S?function(P){var L=ot(P*=S)/E,D=ot(S-P)/E,O=D*y+L*b,G=D*_+L*w,U=D*u+L*m;return[Ni(G,O)*wn,Ni(U,no(O*O+G*G))*wn]}:function(){return[t*wn,n*wn]};return R.distance=S,R}const v5=r=>r;var FA=1/0,Q1=FA,nl=-FA,Y1=nl,bE={point:TE,lineStart:br,lineEnd:br,polygonStart:br,polygonEnd:br,result:function(){var r=[[FA,Q1],[nl,Y1]];return nl=Y1=-(Q1=FA=1/0),r}};function TE(r,e){r<FA&&(FA=r),r>nl&&(nl=r),e<Q1&&(Q1=e),e>Y1&&(Y1=e)}const _5=bE;function Qd(r){return function(e){var t=new Rh;for(var n in r)t[n]=r[n];return t.stream=e,t}}function Rh(){}Rh.prototype={constructor:Rh,point:function(r,e){this.stream.point(r,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Yd(r,e,t){var n=r.clipExtent&&r.clipExtent();return r.scale(150).translate([0,0]),n!=null&&r.clipExtent(null),Pc(t,r.stream(_5)),e(_5.result()),n!=null&&r.clipExtent(n),r}function ag(r,e,t){return Yd(r,function(n){var i=e[1][0]-e[0][0],s=e[1][1]-e[0][1],a=Math.min(i/(n[1][0]-n[0][0]),s/(n[1][1]-n[0][1])),u=+e[0][0]+(i-a*(n[1][0]+n[0][0]))/2,f=+e[0][1]+(s-a*(n[1][1]+n[0][1]))/2;r.scale(150*a).translate([u,f])},t)}function wE(r,e,t){return ag(r,[[0,0],e],t)}function SE(r,e,t){return Yd(r,function(n){var i=+e,s=i/(n[1][0]-n[0][0]),a=(i-s*(n[1][0]+n[0][0]))/2,u=-s*n[0][1];r.scale(150*s).translate([a,u])},t)}function ME(r,e,t){return Yd(r,function(n){var i=+e,s=i/(n[1][1]-n[0][1]),a=-s*n[0][0],u=(i-s*(n[1][1]+n[0][1]))/2;r.scale(150*s).translate([a,u])},t)}var x5=16,EE=pt(30*At);function b5(r,e){return+e?RE(r,e):NE(r)}function NE(r){return Qd({point:function(e,t){e=r(e,t),this.stream.point(e[0],e[1])}})}function RE(r,e){function t(n,i,s,a,u,f,m,y,_,b,w,S,E,R){var P=m-n,L=y-i,D=P*P+L*L;if(D>4*e&&E--){var O=a+b,G=u+w,U=f+S,j=no(O*O+G*G+U*U),V=ro(U/=j),Q=Jt(Jt(U)-1)<bt||Jt(s-_)<bt?(s+_)/2:Ni(G,O),Z=r(Q,V),K=Z[0],Y=Z[1],ne=K-n,ae=Y-i,J=L*ne-P*ae;(J*J/D>e||Jt((P*ne+L*ae)/D-.5)>.3||a*b+u*w+f*S<EE)&&(t(n,i,s,a,u,f,K,Y,Q,O/=j,G/=j,U,E,R),R.point(K,Y),t(K,Y,Q,O,G,U,m,y,_,b,w,S,E,R))}}return function(n){var i,s,a,u,f,m,y,_,b,w,S,E,R={point:P,lineStart:L,lineEnd:O,polygonStart:function(){n.pol
vendor: 4,522 bytes, line 3
3ygonStart(),R.lineStart=G},polygonEnd:function(){n.polygonEnd(),R.lineStart=L}};function P(V,Q){V=r(V,Q),n.point(V[0],V[1])}function L(){_=NaN,R.point=D,n.lineStart()}function D(V,Q){var Z=Ea([V,Q]),K=r(V,Q);t(_,b,y,w,S,E,_=K[0],b=K[1],y=V,w=Z[0],S=Z[1],E=Z[2],x5,n),n.point(_,b)}function O(){R.point=P,n.lineEnd()}function G(){L(),R.point=U,R.lineEnd=j}function U(V,Q){D(i=V,Q),s=_,a=b,u=w,f=S,m=E,R.point=D}function j(){t(_,b,y,w,S,E,s,a,i,u,f,m,x5,n),R.lineEnd=O,O()}return R}}var CE=Qd({point:function(r,e){this.stream.point(r*At,e*At)}});function PE(r){return Qd({point:function(e,t){var n=r(e,t);return this.stream.point(n[0],n[1])}})}function BE(r,e,t,n,i){function s(a,u){return a*=n,u*=i,[e+r*a,t-r*u]}return s.invert=function(a,u){return[(a-e)/r*n,(t-u)/r*i]},s}function T5(r,e,t,n,i,s){if(!s)return BE(r,e,t,n,i);var a=pt(s),u=ot(s),f=a*r,m=u*r,y=a/r,_=u/r,b=(u*t-a*e)/r,w=(u*e+a*t)/r;function S(E,R){return E*=n,R*=i,[f*E-m*R+e,t-m*E-f*R]}return S.invert=function(E,R){return[n*(y*E-_*R+b),i*(w-_*E-y*R)]},S}function FE(r){return DE(function(){return r})()}function DE(r){var e,t=150,n=480,i=250,s=0,a=0,u=0,f=0,m=0,y,_=0,b=1,w=1,S=null,E=c5,R=null,P,L,D,O=v5,G=.5,U,j,V,Q,Z;function K(J){return V(J[0]*At,J[1]*At)}function Y(J){return J=V.invert(J[0],J[1]),J&&[J[0]*wn,J[1]*wn]}K.stream=function(J){return Q&&Z===J?Q:Q=CE(PE(y)(E(U(O(Z=J)))))},K.preclip=function(J){return arguments.length?(E=J,S=void 0,ae()):E},K.postclip=function(J){return arguments.length?(O=J,R=P=L=D=null,ae()):O},K.clipAngle=function(J){return arguments.length?(E=+J?lE(S=J*At):(S=null,c5),ae()):S*wn},K.clipExtent=function(J){return arguments.length?(O=J==null?(R=P=L=D=null,v5):cE(R=+J[0][0],P=+J[0][1],L=+J[1][0],D=+J[1][1]),ae()):R==null?null:[[R,P],[L,D]]},K.scale=function(J){return arguments.length?(t=+J,ne()):t},K.translate=function(J){return arguments.length?(n=+J[0],i=+J[1],ne()):[n,i]},K.center=function(J){return arguments.length?(s=J[0]%360*At,a=J[1]%360*At,ne()):[s*wn,a*wn]},K.rotate=function(J){return arguments.length?(u=J[0]%360*At,f=J[1]%360*At,m=J.length>2?J[2]%360*At:0,ne()):[u*wn,f*wn,m*wn]},K.angle=function(J){return arguments.length?(_=J%360*At,ne()):_*wn},K.reflectX=function(J){return arguments.length?(b=J?-1:1,ne()):b<0},K.reflectY=function(J){return arguments.length?(w=J?-1:1,ne()):w<0},K.precision=function(J){return arguments.length?(U=b5(j,G=J*J),ae()):no(G)},K.fitExtent=function(J,fe){return ag(K,J,fe)},K.fitSize=function(J,fe){return wE(K,J,fe)},K.fitWidth=function(J,fe){return SE(K,J,fe)},K.fitHeight=function(J,fe){return ME(K,J,fe)};function ne(){var J=T5(t,0,0,b,w,_).apply(null,e(s,a)),fe=T5(t,n-J[0],i-J[1],b,w,_);return y=tg(u,f,m),j=wh(e,fe),V=wh(y,j),U=b5(j,G),ae()}function ae(){return Q=Z=null,K}return function(){return e=r.apply(this,arguments),K.invert=e.invert&&Y,ne()}}function LE(r){return function(e,t){var n=no(e*e+t*t),i=r(n),s=ot(i),a=pt(i);return[Ni(e*s,n*a),ro(n&&t*s/n)]}}function Xd(r,e){return[r,GM(zM((Wr+e)/2))]}Xd.invert=function(r,e){return[r,2*$d(OM(e))-Wr]};function Ag(r,e){var t=pt(e),n=1+pt(r)*t;return[t*ot(r)/n,ot(e)/n]}Ag.invert=LE(function(r){return 2*$d(r)});function qE(){return FE(Ag).scale(250).clipAngle(142)}function Ch(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function IE(r){if(Array.isArray(r))return r}function kE(r){if(Array.isArray(r))return Ch(r)}function I0(r,e,t){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function UE(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function OE(r,e,t){return e=X1(e),XE(r,ug()?Reflect.construct(e,[],X1(r).constructor):e.apply(r,t))}function lg(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function GE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function _t(r,e){return r.get(I0(r,e))}function xo(r,e,t){lg(r,e),e.set(r,t)}function bo(r,e,t){return r.set(I0(r,e),t),t}function VE(r,e){lg(r,e),e.add(r)}function zE(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,fg(n.key),n)}}function jE(r,e,t){return e&&zE(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function ja(r,e,t){return(e=fg(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}
3function X1(r){return X1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X1(r)}function $E(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ph(r,e)}function ug(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ug=function(){return!!r})()}function HE(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function WE(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function QE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YE(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XE(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UE(r)}function Ph(r,e){return Ph=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Ph(r,e)}function u1(r,e){return IE(r)||WE(r,e)||hg(r,e)||QE()}function cg(r){return kE(r)||HE(r)||hg(r)||YE()}function KE(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function fg(r){var e=KE(r,"string");return typeof e=="symbol"?e:e+""}function hg(r,e){if(r){if(typeof r=="string")return Ch(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ch(r,e):void 0}}var dg=function(e){e instanceof Array?e.forEach(dg):(e.map&&e.map.dispose(),e.dispose())},Bh=function(e){e.geometry&&e.geometry.dispose(),e.material&&dg(e.material),e.texture&&e.texture.dispose(),e.children&&e.children.forEach(Bh)};function pg(r,e,t){var n=(90-r)*Math.PI/180,i=(90-e)*Math.PI/180;return{x:t*Math.sin(n)*Math.cos(i),y:t*Math.cos(n),z:t*Math.sin(n)*Math.sin(i)}}function ZE(r){var e=r.x,t=r.y,n=r.z,i=Math.sqrt(e*e+t*t+n*n),s=Math.acos(t/i),a=Math.atan2(n,e);return{lat:90-s*180/Math.PI,lng:90-a*180/Math.PI-(a<-Math.PI/2?360:0),r:i}}function ta(r){return r*Math.PI/180}var mg=function(e){return 1-(Xd(0,(.5-e)*Math.PI)[1]/Math.PI+1)/2},j2=function(e){return Math.max(0,Math.min(1,mg(e)))},w5=function(e){return .5-Xd.invert(0,(2*(1-e)-1)*Math.PI)[1]/Math.PI},JE=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=to().domain([1,0]).range([t,n]).clamp(!0),s=to().domain([j2(t),j2(n)]).range([1,0]).clamp(!0),a=function(_){return s(j2(i(_)))},u=e.array,f=0,m=u.length;f<m;f+=2)u[f+1]=a(u[f+1]);e.needsUpdate=!0},S5=function(e,t,n,i){var s=Math.pow(2,e),a=Math.max(0,Math.min(s-1,Math.floor((n+180)*s/360))),u=(90-i)/180;t&&(u=Math.max(0,Math.min(1,mg(u))));var f=Math.floor(u*s);return[a,f]},Fh=function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,u=[],f=Math.pow(2,e),m=360/f,y=180/f,_=s===void 0?f-1:s,b=a===void 0?f-1:a,w=n,S=Math.min(f-1,_);w<=S;w++)for(var E=i,R=Math.min(f-1,b);E<=R;E++){var P=E,L=y;if(t){P=E===0?E:w5(E/f)*f;var D=E+1===f?E+1:w5((E+1)/f)*f;L=(D-P)*180/f}var O=-180+(w+.5)*m,G=90-(P*180/f+L/2),U=L;u.push({x:w,y:E,lng:O,lat:G,latLen:U})}return u},eN=6,tN=7,nN=3,rN=90,cs=new WeakMap,Ro=new WeakMap,$2=new WeakMap,bu=new WeakMap,_i=new WeakMap,K1=new WeakMap,SA=new WeakMap,na=new WeakMap,Tu=new WeakSet,iN=function(r){function e(t){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.tileUrl,a=i.minLevel,u=a===void 0?0:a,f=i.maxLevel,m=f===void 0?17:f,y=i.mercatorProjection,_=y===void 0?!0:y;return GE(this,e),n=OE(this,e),VE(n,Tu),xo(n,cs,void 0),xo(n,Ro,void 0),xo(n,$2,void 0),xo(n,bu,void 0),xo(n,_i,{}),xo(n,K1,void 0),xo(n,SA,void 0),xo(n,na,void 0),ja(n,"minLevel",void 0),ja(n,"maxLevel",void 0),ja(n,"thresholds",cg(new Array(30)).map(function(b,w){return 8/Math.pow(2,w)}
5)),ja(n,"curvatureResolution",5),ja(n,"tileMargin",0),ja(n,"clearTiles",function(){Object.values(_t(_i,n)).forEach(function(b){b.forEach(function(w){w.obj&&(n.remove(w.obj),Bh(w.obj),delete w.obj)})}),bo(_i,n,{})}),bo(cs,n,t),n.tileUrl=s,bo(Ro,n,_),n.minLevel=u,n.maxLevel=m,n.level=0,n.add(bo(na,n,new zn(new Ca(_t(cs,n)*.99,180,90),new wc({color:0})))),_t(na,n).visible=!1,_t(na,n).material.polygonOffset=!0,_t(na,n).material.polygonOffsetUnits=3,_t(na,n).material.polygonOffsetFactor=1,n}return $E(e,r),jE(e,[{key:"tileUrl",get:function(){return _t($2,this)},set:function(n){bo($2,this,n),this.updatePov(_t(SA,this))}},{key:"level",get:function(){return _t(bu,this)},set:function(n){var i,s=this;_t(_i,this)[n]||I0(Tu,this,sN).call(this,n);var a=_t(bu,this);if(bo(bu,this,n),!(n===a||a===void 0)){if(_t(na,this).visible=n>0,_t(_i,this)[n].forEach(function(f){return f.obj&&(f.obj.material.depthWrite=!0)}),a<n&&((i=_t(_i,this)[a])===null||i===void 0||i.forEach(function(f){return f.obj&&(f.obj.material.depthWrite=!1)})),a>n)for(var u=n+1;u<=a;u++)_t(_i,this)[u]&&_t(_i,this)[u].forEach(function(f){f.obj&&(s.remove(f.obj),Bh(f.obj),delete f.obj)});I0(Tu,this,M5).call(this)}}},{key:"updatePov",value:function(n){var i=this;if(!(!n||!(n instanceof Sd))){bo(SA,this,n);var s;if(bo(K1,this,function(y){if(!y.hullPnts){var _=360/Math.pow(2,i.level),b=y.lng,w=y.lat,S=y.latLen,E=b-_/2,R=b+_/2,P=w-S/2,L=w+S/2;y.hullPnts=[[w,b],[P,E],[L,E],[P,R],[L,R]].map(function(D){var O=u1(D,2),G=O[0],U=O[1];return pg(G,U,_t(cs,i))}).map(function(D){var O=D.x,G=D.y,U=D.z;return new ke(O,G,U)})}return s||(s=new Pm,n.updateMatrix(),n.updateMatrixWorld(),s.setFromProjectionMatrix(new Bn().multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse))),y.hullPnts.some(function(D){return s.containsPoint(D.clone().applyMatrix4(i.matrixWorld))})}),this.tileUrl){var a=n.position.clone(),u=a.distanceTo(this.getWorldPosition(new ke)),f=(u-_t(cs,this))/_t(cs,this),m=this.thresholds.findIndex(function(y){return y&&y<=f});this.level=Math.min(this.maxLevel,Math.max(this.minLevel,m<0?this.thresholds.length:m)),I0(Tu,this,M5).call(this)}}}}])}(Fs);function sN(r){var e=this;if(r>tN){_t(_i,this)[r]=[];return}var t=_t(_i,this)[r]=Fh(r,_t(Ro,this));t.forEach(function(n){return n.centroid=pg(n.lat,n.lng,_t(cs,e))}),t.octree=C7().x(function(n){return n.centroid.x}).y(function(n){return n.centroid.y}).z(function(n){return n.centroid.z}).addAll(t)}function M5(){var r=this;if(!(!this.tileUrl||this.level===void 0||!_t(_i,this).hasOwnProperty(this.level))&&!(!_t(K1,this)&&this.level>eN)){var e=_t(_i,this)[this.level];if(_t(SA,this)){var t=this.worldToLocal(_t(SA,this).position.clone());if(e.octree){var n,i=this.worldToLocal(_t(SA,this).position.clone()),s=(i.length()-_t(cs,this))*nN;e=(n=e.octree).findAllWithinRadius.apply(n,cg(i).concat([s]))}else{var a=ZE(t),u=(a.r/_t(cs,this)-1)*rN,f=u/Math.cos(ta(a.lat)),m=[a.lng-f,a.lng+f],y=[a.lat+u,a.lat-u],_=S5(this.level,_t(Ro,this),m[0],y[0]),b=u1(_,2),w=b[0],S=b[1],E=S5(this.level,_t(Ro,this),m[1],y[1]),R=u1(E,2),P=R[0],L=R[1];!e.record&&(e.record={});var D=e.record;if(!D.hasOwnProperty("".concat(Math.round((w+P)/2),"_").concat(Math.round((S+L)/2))))e=Fh(this.level,_t(Ro,this),w,S,P,L).map(function(V){var Q="".concat(V.x,"_").concat(V.y);return D.hasOwnProperty(Q)?D[Q]:(D[Q]=V,e.push(V),V)});else{for(var O=[],G=w;G<=P;G++)for(var U=S;U<=L;U++){var j="".concat(G,"_").concat(U);D.hasOwnProperty(j)||(D[j]=Fh(this.level,_t(Ro,this),G,U,G,U)[0],e.push(D[j])),O.push(D[j])}e=O}}}e.filter(function(V){return!V.obj}).filter(_t(K1,this)||function(){return!0}).forEach(function(V){var Q=V.x,Z=V.y,K=V.lng,Y=V.lat,ne=V.latLen,ae=360/Math.pow(2,r.level);if(!V.obj){var J=ae*(1-r.tileMargin),fe=ne*(1-r.tileMargin),pe=ta(K),Re=ta(-Y),Se=new zn(new Ca(_t(cs,r),Math.ceil(J/r.curvatureResolution),Math.ceil(fe/r.curvatureResolution),ta(90-J/2)+pe,ta(J),ta(90-fe/2)+Re,ta(fe)),new Ao);if(_t(Ro,r)){var qe=[Y+ne/2,Y-ne/2].map(function(vt){return .5-vt/180}),je=u1(qe,2),Qe=je[0],He=je[1];JE(Se.geometry.attributes.uv,Qe,He)}V.obj=Se}V.loading||(V.loading=!0,new Bm().load(r.tileUrl(Q,Z,r.level),function(vt){var it=V.obj;
5it&&(vt.colorSpace=dt,it.material.map=vt,it.material.color=null,it.material.needsUpdate=!0,r.add(it)),V.loading=!1}))})}}const rl=new Set;let Dh=!1;function oN(r,e,t=2){const n=e&&e.length,i=n?e[0]*t:r.length;rl.size&&rl.clear();let s=gg(r,0,i,t,!0);const a=[];if(!s||s.next===s.prev)return a;let u=0,f=0,m=0;if(n&&(s=cN(r,e,s,t)),r.length>80*t){u=r[0],f=r[1];let y=u,_=f;for(let b=t;b<i;b+=t){const w=r[b],S=r[b+1];w<u&&(u=w),S<f&&(f=S),w>y&&(y=w),S>_&&(_=S)}m=Math.max(y-u,_-f),m=m!==0?32767/m:0}return Lh(s,a,u,f,m),a}function gg(r,e,t,n,i){let s=null;if(i===wN(r,e,t,n)>0)for(let a=e;a<t;a+=n)s=R5(a/n|0,r[a],r[a+1],s);else for(let a=t-n;a>=e;a-=n)s=R5(a/n|0,r[a],r[a+1],s);return s&&il(s,s.next)&&(ol(s),s=s.next),s}function Na(r,e=r){const t=e===r;let n=r,i;do i=!1,n!==n.next&&(rl.size===0||!rl.has(n))&&(il(n,n.next)||Vn(n.prev,n,n.next)===0)?((t||n===e)&&(e=n.prev),Dh=!0,ol(n),n=n.prev,i=!0):(t||n!==e)&&(n=n.next,i=!t);while(i||n!==e);return e}function Lh(r,e,t,n,i){i&&yN(r,t,n,i);let s=r,a=!1;for(;r.prev!==r.next;){const u=r.prev,f=r.next;if(Vn(u,r,f)<0&&(i?AN(r,t,n,i):aN(r))){e.push(u.i,r.i,f.i),ol(r),r=f,s=f;continue}if(r=f,r===s){if(Dh=!1,r=Na(r),Dh){s=r;continue}if(!a){r=lN(r,e),s=r,a=!0;continue}uN(r,e,t,n,i);break}}}function aN(r){const e=r.prev,t=r,n=r.next,i=e.x,s=t.x,a=n.x,u=e.y,f=t.y,m=n.y,y=Math.min(i,s,a),_=Math.min(u,f,m),b=Math.max(i,s,a),w=Math.max(u,f,m);let S=n.next;for(;S!==e;){if(S.x>=y&&S.x<=b&&S.y>=_&&S.y<=w&&!(i===S.x&&u===S.y)&&J1(i,u,s,f,a,m,S.x,S.y)&&Vn(S.prev,S,S.next)>=0)return!1;S=S.next}return!0}function AN(r,e,t,n){const i=r.prev,s=r,a=r.next,u=i.x,f=s.x,m=a.x,y=i.y,_=s.y,b=a.y,w=Math.min(u,f,m),S=Math.min(y,_,b),E=Math.max(u,f,m),R=Math.max(y,_,b),P=Uh(w,S,e,t,n),L=Uh(E,R,e,t,n);let D=r.prevZ;for(;D&&D.z>=P;){if(D.x>=w&&D.x<=E&&D.y>=S&&D.y<=R&&D!==a&&!(u===D.x&&y===D.y)&&J1(u,y,f,_,m,b,D.x,D.y)&&Vn(D.prev,D,D.next)>=0)return!1;D=D.prevZ}let O=r.nextZ;for(;O&&O.z<=L;){if(O.x>=w&&O.x<=E&&O.y>=S&&O.y<=R&&O!==a&&!(u===O.x&&y===O.y)&&J1(u,y,f,_,m,b,O.x,O.y)&&Vn(O.prev,O,O.next)>=0)return!1;O=O.nextZ}return!0}function lN(r,e){let t=r,n=!1;do{const i=t.prev,s=t.next.next;_g(i,t,t.next,s,!1)&&sl(i,s)&&sl(s,i)&&(e.push(i.i,t.i,s.i),ol(t),ol(t.next),t=r=s,n=!0),t=t.next}while(t!==r);return n?Na(t):t}function uN(r,e,t,n,i){let s=r;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&xN(s,a)){let u=xg(s,a);s=Na(s,s.next),u=Na(u,u.next),Lh(s,e,t,n,i),Lh(u,e,t,n,i);return}a=a.next}s=s.next}while(s!==r)}let qh=!1;function cN(r,e,t,n){const i=[];for(let s=0,a=e.length;s<a;s++){const u=e[s]*n,f=s<a-1?e[s+1]*n:r.length,m=gg(r,u,f,n,!1);m===m.next&&rl.add(m),i.push(_N(m))}i.sort(fN),dN(r.length/n,e.length),vg(t,t),qh=!0;for(let s=0;s<i.length;s++)t=hN(i[s],t);return qh=!1,Na(t)}
5function fN(r,e){return r.x-e.x||r.y-e.y||(r.next.y-r.y)/(r.next.x-r.x)-(e.next.y-e.y)/(e.next.x-e.x)}function hN(r,e){const t=mN(r,e);if(!t)return e;const n=xg(t,r),i=n.next;return vg(t,i.next),Na(n,n.next),Na(t,t.next)}const yg=16;let Sn=new Float64Array(0),Z1=0;const Ih=[],kh=[];function dN(r,e){const t=Math.ceil((r+2*e)/yg)+e+2;Sn.length<t*4&&(Sn=new Float64Array(t*4)),Z1=0}function vg(r,e){let t=r;do{const n=Z1++;Ih[n]=t;let i=1/0,s=1/0,a=-1/0,u=-1/0,f=0;do{const y=t.next;t.z=n,t.x<i&&(i=t.x),t.x>a&&(a=t.x),t.y<s&&(s=t.y),t.y>u&&(u=t.y),y.x<i&&(i=y.x),y.x>a&&(a=y.x),y.y<s&&(s=y.y),y.y>u&&(u=y.y),t=y}while(++f<yg&&t!==e);kh[n]=t;const m=n*4;Sn[m]=i,Sn[m+1]=s,Sn[m+2]=a,Sn[m+3]=u}while(t!==e)}function pN(r,e){const t=r.z*4;e.x<Sn[t]&&(Sn[t]=e.x),e.y<Sn[t+1]&&(Sn[t+1]=e.y),e.x>Sn[t+2]&&(Sn[t+2]=e.x),e.y>Sn[t+3]&&(Sn[t+3]=e.y)}function E5(r){let e=kh[r];for(;e.prev.next!==e;)e=e.next;return kh[r]=e,e}function N5(r){let e=Ih[r];for(;e.prev.next!==e;)e=e.next;return Ih[r]=e,e}function mN(r,e){let t=e;const n=r.x,i=r.y;let s=-1/0,a;if(il(r,t))return t;for(let b=0,w=0;b<Z1;b++,w+=4){if(i<Sn[w+1]||i>Sn[w+3]||Sn[w]>n||Sn[w+2]<=s)continue;const S=E5(b);t=N5(b);do{if(t.prev.next===t){if(il(r,t.next))return t.next;if(i<=t.y&&i>=t.next.y&&t.next.y!==t.y){const E=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(E<=n&&E>s&&(s=E,a=t.x<t.next.x?t:t.next,E===n))return a}}t=t.next}while(t!==S)}if(!a)return null;const u=a.x,f=a.y,m=Math.min(i,f),y=Math.max(i,f);let _=1/0;for(let b=0,w=0;b<Z1;b++,w+=4){if(Sn[w+2]<u||Sn[w]>n||Sn[w+3]<m||Sn[w+1]>y)continue;const S=E5(b);t=N5(b);do{if(t.prev.next===t&&n>=t.x&&t.x>=u&&n!==t.x&&J1(i<f?n:s,i,u,f,i<f?s:n,i,t.x,t.y)){const E=Math.abs(i-t.y)/(n-t.x);(sl(t,r)||t.y===i&&t.next.y===i&&t.next.x>n)&&(E<_||E===_&&(t.x>a.x||t.x===a.x&&gN(a,t)))&&(a=t,_=E)}t=t.next}while(t!==S)}return a}function gN(r,e){return Vn(r.prev,r,e.prev)<0&&Vn(e.next,r,r.next)<0}const vi=[];let i0=[],ra=new Uint32Array(0),s0=new Uint32Array(0);const o0=new Uint32Array(256);function yN(r,e,t,n){let i=r,s=0;do i.z=Uh(i.x,i.y,e,t,n),vi[s++]=i,i=i.next;while(i!==r);vN(s);let a=null;for(let u=0;u<s;u++){const f=vi[u];f.prevZ=a,a&&(a.nextZ=f),a=f}a.nextZ=null}function vN(r){if(r<=32){for(let e=1;e<r;e++){const t=vi[e],n=t.z;let i=e-1;for(;i>=0&&vi[i].z>n;)vi[i+1]=vi[i],i--;vi[i+1]=t}return}ra.length<r&&(ra=new Uint32Array(r),s0=new Uint32Array(r),i0=new Array(r));for(let e=0;e<r;e++)ra[e]=vi[e].z;wu(r,vi,ra,i0,s0,0),wu(r,i0,s0,vi,ra,8),wu(r,vi,ra,i0,s0,16),wu(r,i0,s0,vi,ra,24)}function wu(r,e,t,n,i,s){o0.fill(0);for(let u=0;u<r;u++)o0[t[u]>>>s&255]++;let a=0;for(let u=0;u<256;u++){const f=o0[u];o0[u]=a,a+=f}for(let u=0;u<r;u++){const f=t[u],m=o0[f>>>s&255]++;n[m]=e[u],i[m]=f}}function Uh(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function _N(r){let e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function J1(r,e,t,n,i,s,a,u){return(i-a)*(e-u)>=(r-a)*(s-u)&&(r-a)*(n-u)>=(t-a)*(e-u)&&(t-a)*(s-u)>=(i-a)*(n-u)}function xN(r,e){const t=il(r,e)&&Vn(r.prev,r,r.next)>0&&Vn(e.prev,e,e.next)>0;return r.next.i!==e.i&&(t||sl(r,e)&&sl(e,r)&&(Vn(r.prev,r,e.prev)!==0||Vn(r,e.prev,e)!==0))&&!bN(r,e)&&(t||TN(r,e))}function Vn(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function il(r,e){return r.x===e.x&&r.y===e.y}function _g(r,e,t,n,i=!0){const s=Vn(r,e,t),a=Vn(r,e,n),u=Vn(t,n,r),f=Vn(t,n,e);return(s>0&&a<0||s<0&&a>0)&&(u>0&&f<0||u<0&&f>0)?!0:i?!!(s===0&&Su(r,t,e)||a===0&&Su(r,n,e)||u===0&&Su(t,r,n)||f===0&&Su(t,e,n)):!1}function Su(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function bN(r,e){const t=Math.min(r.x,e.x),n=Math.max(r.x,e.x),i=Math.min(r.y,e.y),s=Math.max(r.y,e.y);let a=r;do{const u=a.next;if(a.x>n&&u.x>n||a.x<t&&u.x<t||a.y>s&&u.y>s||a.y<i&&u.y<i){a=u;continue}if(a.i!==r.i&&u.i!==r.i&&a.i!==e.i&&u.i!==e.i&&_g(a,u,r,e))return!0;a=u}while(a!==r);return!1}function sl(r,e){return Vn(r.prev,r,r.next)<0?Vn(r,e,r.next)>=0&&Vn(r,r.prev,e)>=0:Vn(r,e,r.prev)<0||Vn(r,r.next,e)<0}function TN(r,e){let t=r,n=!1;const i=(r.x+e.x)/2,s=(r.y+e.y)/2;do{const a=t.next;t.y>s!=a.y>s&&i<(a.x-t.x)*(s-t.y)/(a.y-t.y)+t.x&&(n=!n),t=a}while(t!==r);return n}function xg(r,e){const t=Oh(r.i,r.x,r.y),n=Oh(e.i,e.x,e.y),i=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function R5(r,e,t,n){const i=Oh(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ol(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ),qh&&pN(r.prev,r.next)}function Oh(r,e,t){return{i:r,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function wN(r,e,t,n){let i=0;for(let s=e,a=t-n;s<t;s+=n)i+=(r[a]-r[s])*(r[s+1]+r[a+1]),a=s;return i}function ec(r){const e=[],t=[],n=r[0][0].length;let i=0,s=0;for(const a of r){for(const u of a)for(let f=0;f<n;f++)e.push(u[f]);s&&(i+=s,t.push(i)),s=a.length}return{vertices:e,holes:t,dimensions:n}}function Gh(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function SN(r){if(Array.isArray(r))return r}function MN(r){if(Array.isArray(r))return Gh(r)}
5function EN(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function NN(r,e,t){return e=tc(e),IN(r,bg()?Reflect.construct(e,[],tc(r).constructor):e.apply(r,t))}function RN(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function CN(r,e,t){return Object.defineProperty(r,"prototype",{writable:!1}),r}function PN(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Kd(r))||e){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 6In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var f=t.next();return a=f.done,f},e:function(f){u=!0,s=f},f:function(){try{a||t.return==null||t.return()}finally{if(u)throw s}}}}function tc(r){return tc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tc(r)}function BN(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Vh(r,e)}function bg(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bg=function(){return!!r})()}function FN(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function DN(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function LN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 7In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qN(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IN(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EN(r)}function Vh(r,e){return Vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Vh(r,e)}function a0(r,e){return SN(r)||DN(r,e)||Kd(r,e)||LN()}function kN(r){return MN(r)||FN(r)||Kd(r)||qN()}function Kd(r,e){if(r){if(typeof r=="string")return Gh(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Gh(r,e):void 0}}var C5=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=[],i=null;return e.forEach(function(s){if(i){var a=Go(s,i)*180/Math.PI;if(a>t)for(var u=Wd(i,s),f=i.length>2||s.length>2?tl(i[2]||0,s[2]||0):null,m=f?function(b){return[].concat(kN(u(b)),[f(b)])}:u,y=1/Math.ceil(a/t),_=y;_<1;)n.push(m(_)),_+=y}n.push(i=s)}),n},zh=typeof window<"u"&&window.THREE?window.THREE:{BufferGeometry:Pi,Float32BufferAttribute:Uo},UN=new zh.BufferGeometry().setAttribute?"setAttribute":"addAttribute",Tg=function(r){function e(t){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5;RN(this,e),n=NN(this,e),n.type="GeoJsonGeometry",n.parameters={geoJson:t,radius:i,resolution:s};var a=({Point:y,MultiPoint:_,LineString:b,MultiLineString:w,Polygon:S,MultiPolygon:E}[t.type]||function(){return[]})(t.coordinates,i),u=[],f=[],m=0;a.forEach(function(R){var P=u.length;A0({indices:u,vertices:f},R),n.addGroup(P,u.length-P,m++)}),u.length&&n.setIndex(u),f.length&&n[UN]("position",new zh.Float32BufferAttribute(f,3));function y(R,P){var L=H2(R[1],R[0],P+(R[2]||0)),D=[];return[{vertices:L,indices:D}]}function _(R,P){var L={vertices:[],indices:[]};return R.map(function(D){return y(D,P)}
8).forEach(function(D){var O=a0(D,1),G=O[0];A0(L,G)}),[L]}function b(R,P){for(var L=C5(R,s).map(function(V){var Q=a0(V,3),Z=Q[0],K=Q[1],Y=Q[2],ne=Y===void 0?0:Y;return H2(K,Z,P+ne)}),D=ec([L]),O=D.vertices,G=Math.round(O.length/3),U=[],j=1;j<G;j++)U.push(j-1,j);return[{vertices:O,indices:U}]}function w(R,P){var L={vertices:[],indices:[]};return R.map(function(D){return b(D,P)}).forEach(function(D){var O=a0(D,1),G=O[0];A0(L,G)}),[L]}function S(R,P){for(var L=R.map(function(J){return C5(J,s).map(function(fe){var pe=a0(fe,3),Re=pe[0],Se=pe[1],qe=pe[2],je=qe===void 0?0:qe;return H2(Se,Re,P+je)})}),D=ec(L),O=D.vertices,G=D.holes,U=G[0]||1/0,j=O.slice(0,U*3),V=O.slice(U*3),Q=new Set(G),Z=Math.round(O.length/3),K=[],Y=[],ne=1;ne<Z;ne++)Q.has(ne)||(ne<U?K.push(ne-1,ne):Y.push(ne-1-U,ne-U));var ae=[{indices:K,vertices:j}];return G.length&&ae.push({indices:Y,vertices:V}),ae}function E(R,P){var L={vertices:[],indices:[]},D={vertices:[],indices:[]};R.map(function(G){return S(G,P)}).forEach(function(G){var U=a0(G,2),j=U[0],V=U[1];A0(L,j),V&&A0(D,V)});var O=[L];return D.vertices.length&&O.push(D),O}return n}return BN(e,r),CN(e)}(zh.BufferGeometry);function A0(r,e){var t=Math.round(r.vertices.length/3);P5(r.vertices,e.vertices),P5(r.indices,e.indices.map(function(n){return n+t}))}function P5(r,e){var t=PN(e),n;try{for(t.s();!(n=t.n()).done;){var i=n.value;r.push(i)}}catch(s){t.e(s)}finally{t.f()}}function H2(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(90-r)*Math.PI/180,i=(90-e)*Math.PI/180;return[t*Math.sin(n)*Math.cos(i),t*Math.cos(n),t*Math.sin(n)*Math.sin(i)]}function ON(r,e,t=!0){if(!e||!e.isReady)throw new Error("BufferGeometryUtils: Initialized MikkTSpace library required.");if(!r.hasAttribute("position")||!r.hasAttribute("normal")||!r.hasAttribute("uv"))throw new Error('BufferGeometryUtils: Tangents require "position", "normal", and "uv" attributes.');function n(a){if(a.normalized||a.isInterleavedBufferAttribute){const u=new Float32Array(a.count*a.itemSize);for(let f=0,m=0;f<a.count;f++)u[m++]=a.getX(f),u[m++]=a.getY(f),a.itemSize>2&&(u[m++]=a.getZ(f));return u}return a.array instanceof Float32Array?a.array:new Float32Array(a.array)}const i=r.index?r.toNonIndexed():r,s=e.generateTangents(n(i.attributes.position),n(i.attributes.normal),n(i.attributes.uv));if(t)for(let a=3;a<s.length;a+=4)s[a]*=-1;return i.setAttribute("tangent",new Wi(s,4)),r!==i&&r.copy(i),r}function GN(r,e=!1){const t=r[0].index!==null,n=new Set(Object.keys(r[0].attributes)),i=new Set(Object.keys(r[0].morphAttributes)),s={},a={},u=r[0].morphTargetsRelative,f=new Pi;let m=0;for(let y=0;y<r.length;++y){const _=r[y];let b=0;if(t!==(_.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const w in _.attributes){if(!n.has(w))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+'. All geometries must have compatible attributes; make sure "'+w+'" attribute exists among all geometries, or in none of them.'),null;s[w]===void 0&&(s[w]=[]),s[w].push(_.attributes[w]),b++}if(b!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+". Make sure all geometries have the same number of attributes."),null;if(u!==_.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const w in _.morphAttributes){if(!i.has(w))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+". .morphAttributes must be consistent throughout all geometries."),null;a[w]===void 0&&(a[w]=[]),a[w].push(_.morphAttributes[w])}if(e){let w;if(t)w=_.index.count;else if(_.attributes.position!==void 0)w=_.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+y+". The geometry must have either an index or a position attribute"),null;f.addGroup(m,w,y),m+=w}}if(t){let y=0;const _=[];for(let b=0;b<r.length;++b){const w=r[b].index;for(let S=0;S<w.count;++S)_.push(w.getX(S)+y);y+=r[b].attributes.position.count}f.setIndex(_)}for(const y in s){const _=jh(s[y]);if(!_)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+y+" attribute."),null;f.setAttribute(y,_)}for(const y in a){const _=a[y][0].length;if(_===0)break;f.morphAttributes=f.morphAttributes||{},f.morphAttributes[y]=[];for(let b=0;b<_;++b){const w=[];for(let E=0;E<a[y].length;++E)w.push(a[y][E][b]);const S=jh(w);if(!S)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+y+" morphAttribute."),null;f.morphAttributes[y].push(S)}}return f}function jh(r){let e,t,n,i=-1,s=0;for(let m=0;m<r.length;++m){const y=r[m];
8if(e===void 0&&(e=y.array.constructor),e!==y.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=y.itemSize),t!==y.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=y.normalized),n!==y.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=y.gpuType),i!==y.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;s+=y.count*t}const a=new e(s),u=new Wi(a,t,n);let f=0;for(let m=0;m<r.length;++m){const y=r[m];if(y.isInterleavedBufferAttribute){const _=f/t;for(let b=0,w=y.count;b<w;b++)for(let S=0;S<t;S++){const E=y.getComponent(b,S);u.setComponent(b+_,S,E)}}else a.set(y.array,f);f+=y.count*t}return i!==void 0&&(u.gpuType=i),u}function VN(r){return r.isInstancedInterleavedBufferAttribute||r.isInterleavedBufferAttribute?nc(r):r.isInstancedBufferAttribute?new Tl().copy(r):new Wi().copy(r)}function zN(r){let e,t=0,n=0;for(let m=0,y=r.length;m<y;++m){const _=r[m];if(e===void 0&&(e=_.array.constructor),e!==_.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;t+=_.array.length,n+=_.itemSize}const i=new Fm(new e(t),n);let s=0;const a=[],u=["getX","getY","getZ","getW"],f=["setX","setY","setZ","setW"];for(let m=0,y=r.length;m<y;m++){const _=r[m],b=_.itemSize,w=_.count,S=new Fo(i,b,s,_.normalized);a.push(S),s+=b;for(let E=0;E<w;E++)for(let R=0;R<b;R++)S[f[R]](E,_[u[R]](E))}return a}function nc(r){const e=r.data.array.constructor,t=r.count,n=r.itemSize,i=r.normalized,s=new e(t*n);let a;r.isInstancedInterleavedBufferAttribute?a=new Tl(s,n,i,r.meshPerAttribute):a=new Wi(s,n,i);for(let u=0;u<t;u++)a.setX(u,r.getX(u)),n>=2&&a.setY(u,r.getY(u)),n>=3&&a.setZ(u,r.getZ(u)),n>=4&&a.setW(u,r.getW(u));return a}function jN(r){const e=r.attributes,t=r.morphTargets,n=new Map;for(const i in e){const s=e[i];s.isInterleavedBufferAttribute&&(n.has(s)||n.set(s,nc(s)),e[i]=n.get(s))}for(const i in t){const s=t[i];s.isInterleavedBufferAttribute&&(n.has(s)||n.set(s,nc(s)),t[i]=n.get(s))}}function $N(r){let e=0;for(const n in r.attributes){const i=r.getAttribute(n);e+=i.count*i.itemSize*i.array.BYTES_PER_ELEMENT}const t=r.getIndex();return e+=t?t.count*t.itemSize*t.array.BYTES_PER_ELEMENT:0,e}function HN(r,e=1e-4){e=Math.max(e,Number.EPSILON);const t={},n=r.getIndex(),i=r.getAttribute("position"),s=n?n.count:i.count;let a=0;const u=Object.keys(r.attributes),f={},m={},y=[],_=["getX","getY","getZ","getW"],b=["setX","setY","setZ","setW"];for(let L=0,D=u.length;L<D;L++){const O=u[L],G=r.attributes[O];f[O]=new G.constructor(new G.array.constructor(G.count*G.itemSize),G.itemSize,G.normalized);const U=r.morphAttributes[O];U&&(m[O]||(m[O]=[]),U.forEach((j,V)=>{const Q=new j.array.constructor(j.count*j.itemSize);m[O][V]=new j.constructor(Q,j.itemSize,j.normalized)}))}const w=e*.5,S=Math.log10(1/e),E=Math.pow(10,S),R=w*E;for(let L=0;L<s;L++){const D=n?n.getX(L):L;let O="";for(let G=0,U=u.length;G<U;G++){const j=u[G],V=r.getAttribute(j),Q=V.itemSize;for(let Z=0;Z<Q;Z++)O+=`${~~(V[_[Z]](D)*E+R)},`}if(O in t)y.push(t[O]);else{for(let G=0,U=u.length;G<U;G++){const j=u[G],V=r.getAttribute(j),Q=r.morphAttributes[j],Z=V.itemSize,K=f[j],Y=m[j];for(let ne=0;ne<Z;ne++){const ae=_[ne],J=b[ne];if(K[J](a,V[ae](D)),Q)for(let fe=0,pe=Q.length;fe<pe;fe++)Y[fe][J](a,Q[fe][ae](D))}}t[O]=a,y.push(a),a++}}const P=r.clone();for(const L in r.attributes){const D=f[L];if(P.setAttribute(L,new D.constructor(D.array.slice(0,a*D.itemSize),D.itemSize,D.normalized)),L in m)for(let O=0;O<m[L].length;O++){const G=m[L][O];P.morphAttributes[L][O]=new G.constructor(G.array.slice(0,a*G.itemSize),G.itemSize,G.normalized)}}return P.setIndex(y),P}function WN(r,e){if(e===Ib)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),r;if(e===h4||e===kb){let t=r.getIndex();if(t===null){const a=[],u=r.getAttribute("position");if(u!==void 0){for(let f=0;f<u.count;f++)a.push(f);r.setIndex(a),t=r.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),r}const n=t.count-2,i=[];if(e===h4)for(let a=1;a<=n;a++)i.push(t.getX(0)),i.push(t.getX(a)),i.push(t.getX(a+1));else for(let a=0;a<n;a++)a%2===0?(i.push(t.getX(a)),i.push(t.getX(a+1)),i.push(t.getX(a+2))):(i.push(t.getX(a+2)),i.push(t.getX(a+1)),i.push(t.getX(a)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=r.clone();return s.setIndex(i),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),r}function QN(r){const e=new ke,t=new ke,n=new ke,i=new ke,s=new ke,a=new ke,u=new ke,f=new ke,m=ne
8w ke;function y(Se,qe,je,Qe,He,vt,it,yt){e.fromBufferAttribute(qe,He),t.fromBufferAttribute(qe,vt),n.fromBufferAttribute(qe,it);const Tt=Se.morphTargetInfluences;if(je&&Tt){u.set(0,0,0),f.set(0,0,0),m.set(0,0,0);for(let Xt=0,sn=je.length;Xt<sn;Xt++){const Ut=Tt[Xt],Ot=je[Xt];Ut!==0&&(i.fromBufferAttribute(Ot,He),s.fromBufferAttribute(Ot,vt),a.fromBufferAttribute(Ot,it),Qe?(u.addScaledVector(i,Ut),f.addScaledVector(s,Ut),m.addScaledVector(a,Ut)):(u.addScaledVector(i.sub(e),Ut),f.addScaledVector(s.sub(t),Ut),m.addScaledVector(a.sub(n),Ut)))}e.add(u),t.add(f),n.add(m)}Se.isSkinnedMesh&&(Se.applyBoneTransform(He,e),Se.applyBoneTransform(vt,t),Se.applyBoneTransform(it,n)),yt[He*3+0]=e.x,yt[He*3+1]=e.y,yt[He*3+2]=e.z,yt[vt*3+0]=t.x,yt[vt*3+1]=t.y,yt[vt*3+2]=t.z,yt[it*3+0]=n.x,yt[it*3+1]=n.y,yt[it*3+2]=n.z}const _=r.geometry,b=r.material;let w,S,E;const R=_.index,P=_.attributes.position,L=_.morphAttributes.position,D=_.morphTargetsRelative,O=_.attributes.normal,G=_.morphAttributes.position,U=_.groups,j=_.drawRange;let V,Q,Z,K,Y,ne,ae;const J=new Float32Array(P.count*P.itemSize),fe=new Float32Array(O.count*O.itemSize);if(R!==null)if(Array.isArray(b))for(V=0,Z=U.length;V<Z;V++)for(Y=U[V],ne=Math.max(Y.start,j.start),ae=Math.min(Y.start+Y.count,j.start+j.count),Q=ne,K=ae;Q<K;Q+=3)w=R.getX(Q),S=R.getX(Q+1),E=R.getX(Q+2),y(r,P,L,D,w,S,E,J),y(r,O,G,D,w,S,E,fe);else for(ne=Math.max(0,j.start),ae=Math.min(R.count,j.start+j.count),V=ne,Z=ae;V<Z;V+=3)w=R.getX(V),S=R.getX(V+1),E=R.getX(V+2),y(r,P,L,D,w,S,E,J),y(r,O,G,D,w,S,E,fe);else if(Array.isArray(b))for(V=0,Z=U.length;V<Z;V++)for(Y=U[V],ne=Math.max(Y.start,j.start),ae=Math.min(Y.start+Y.count,j.start+j.count),Q=ne,K=ae;Q<K;Q+=3)w=Q,S=Q+1,E=Q+2,y(r,P,L,D,w,S,E,J),y(r,O,G,D,w,S,E,fe);else for(ne=Math.max(0,j.start),ae=Math.min(P.count,j.start+j.count),V=ne,Z=ae;V<Z;V+=3)w=V,S=V+1,E=V+2,y(r,P,L,D,w,S,E,J),y(r,O,G,D,w,S,E,fe);const pe=new Uo(J,3),Re=new Uo(fe,3);return{positionAttribute:P,normalAttribute:O,morphedPositionAttribute:pe,morphedNormalAttribute:Re}}function YN(r){if(r.groups.length===0)return console.warn("THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge."),r;let e=r.groups;if(e=e.sort((a,u)=>a.materialIndex!==u.materialIndex?a.materialIndex-u.materialIndex:a.start-u.start),r.getIndex()===null){const a=r.getAttribute("position"),u=[];for(let f=0;f<a.count;f+=3)u.push(f,f+1,f+2);r.setIndex(u)}const t=r.getIndex(),n=[];for(let a=0;a<e.length;a++){const u=e[a],f=u.start,m=f+u.count;for(let y=f;y<m;y++)n.push(t.getX(y))}r.dispose(),r.setIndex(n);let i=0;for(let a=0;a<e.length;a++){const u=e[a];u.start=i,i+=u.count}let s=e[0];r.groups=[s];for(let a=1;a<e.length;a++){const u=e[a];s.materialIndex===u.materialIndex?s.count+=u.count:(s=u,r.groups.push(s))}return r}function XN(r,e=Math.PI/3){const t=Math.cos(e),n=(1+1e-10)*100,i=[new ke,new ke,new ke],s=new ke,a=new ke,u=new ke,f=new ke;function m(E){const R=~~(E.x*n),P=~~(E.y*n),L=~~(E.z*n);return`${R},${P},${L}`}const y=r.index?r.toNonIndexed():r,_=y.attributes.position,b={};for(let E=0,R=_.count/3;E<R;E++){const P=3*E,L=i[0].fromBufferAttribute(_,P+0),D=i[1].fromBufferAttribute(_,P+1),O=i[2].fromBufferAttribute(_,P+2);s.subVectors(O,D),a.subVectors(L,D);const G=new ke().crossVectors(s,a).normalize();for(let U=0;U<3;U++){const j=i[U],V=m(j);V in b||(b[V]=[]),b[V].push(G)}}const w=new Float32Array(_.count*3),S=new Wi(w,3,!1);for(let E=0,R=_.count/3;E<R;E++){const P=3*E,L=i[0].fromBufferAttribute(_,P+0),D=i[1].fromBufferAttribute(_,P+1),O=i[2].fromBufferAttribute(_,P+2);s.subVectors(O,D),a.subVectors(L,D),u.crossVectors(s,a).normalize();for(let G=0;G<3;G++){const U=i[G],j=m(U),V=b[j];f.set(0,0,0);for(let Q=0,Z=V.length;Q<Z;Q++){const K=V[Q];u.dot(K)>t&&f.add(K)}f.normalize(),S.setXYZ(P+G,f.x,f.y,f.z)}}return y.setAttribute("normal",S),y}const Zd=Object.freeze(Object.defineProperty({__proto__:null,computeMikkTSpaceTangents:ON,computeMorphedAttributes:QN,deepCloneAttribute:VN,deinterleaveAttribute:nc,deinterleaveGeometry:jN,estimateBytesUsed:$N,interleaveAttributes:zN,mergeAttributes:jh,mergeGeometries:GN,mergeGroups:YN,mergeVertices:HN,toCreasedNormals:XN,toTrianglesDrawMode:WN},Symbol.toStringTag,{value:"Module"}));var Ce=function(r){return typeof r=="function"?r:typeof r=="string"?function(e){return e[r]}:function(e){return r}};function rc(r){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rc(r)}var KN=/^\s+/,ZN=/\s+$/;function Xe(r,e){if(r=r||"",e=e||{},r instanceof Xe)return r;if(!(this instanceof Xe))return new Xe(r,e);var t=JN(r);this._originalInput=r,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Xe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,i,s,a,u;return t=e.r/255,n=e.g/255,i=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*a+.0722*u},setAlpha:function(e){return this._a=wg(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=F5(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=F5(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+i+"%)":"hsva("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=B5(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=B5(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+i+"%)":"hsla("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return D5(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return rR(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(pn(this._r,255)*100)+"%",g:Math.round(pn(this._g,255)*100)+"%",b:Math.round(pn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(pn(this._r,255)*100)+"%, "+Math.round(pn(this._g,255)*100)+"%, "+Math.round(pn(this._b,255)*100)+"%)":"rgba("+Math.round(pn(this._r,255)*100)+"%, "+Math.round(pn(this._g,255)*100)+"%, "+Math.round(pn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:pR[D5(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+L5(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var s=Xe(e);n="#"+L5(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,s=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Xe(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(aR,arguments)},brighten:function(){return this._applyModification(AR,arguments)},darken:function(){return this._applyModification(lR,arguments)},desaturate:function(){return this._applyModification(iR,arguments)},saturate:function(){return this._applyModification(sR,arguments)},greyscale:function(){return this._applyModification(oR,arguments)},spin:function(){return this._applyModification(uR,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(hR,arguments)},complement:function(){return this._applyCombination(cR,arguments)},monochromatic:function(){return this._applyCombination(dR,arguments)},splitcomplement:function(){return this._applyCombination(fR,arguments)},triad:function(){return this._applyCombination(q5,[3])},tetrad:function(){return this._applyCombination(q5,[4])}};Xe.fromRatio=function(r,e){if(rc(r)=="object"){var t={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?t[n]=r[n]:t[n]=C0(r[n]));r=t}return Xe(r,e)};function JN(r){var e={r:0,g:0,b:0}
vendor: 6,195 bytes, line 8
8,t=1,n=null,i=null,s=null,a=!1,u=!1;return typeof r=="string"&&(r=vR(r)),rc(r)=="object"&&(Vs(r.r)&&Vs(r.g)&&Vs(r.b)?(e=eR(r.r,r.g,r.b),a=!0,u=String(r.r).substr(-1)==="%"?"prgb":"rgb"):Vs(r.h)&&Vs(r.s)&&Vs(r.v)?(n=C0(r.s),i=C0(r.v),e=nR(r.h,n,i),a=!0,u="hsv"):Vs(r.h)&&Vs(r.s)&&Vs(r.l)&&(n=C0(r.s),s=C0(r.l),e=tR(r.h,n,s),a=!0,u="hsl"),r.hasOwnProperty("a")&&(t=r.a)),t=wg(t),{ok:a,format:r.format||u,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function eR(r,e,t){return{r:pn(r,255)*255,g:pn(e,255)*255,b:pn(t,255)*255}}function B5(r,e,t){r=pn(r,255),e=pn(e,255),t=pn(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),s,a,u=(n+i)/2;if(n==i)s=a=0;else{var f=n-i;switch(a=u>.5?f/(2-n-i):f/(n+i),n){case r:s=(e-t)/f+(e<t?6:0);break;case e:s=(t-r)/f+2;break;case t:s=(r-e)/f+4;break}s/=6}return{h:s,s:a,l:u}}function tR(r,e,t){var n,i,s;r=pn(r,360),e=pn(e,100),t=pn(t,100);function a(m,y,_){return _<0&&(_+=1),_>1&&(_-=1),_<1/6?m+(y-m)*6*_:_<1/2?y:_<2/3?m+(y-m)*(2/3-_)*6:m}if(e===0)n=i=s=t;else{var u=t<.5?t*(1+e):t+e-t*e,f=2*t-u;n=a(f,u,r+1/3),i=a(f,u,r),s=a(f,u,r-1/3)}return{r:n*255,g:i*255,b:s*255}}function F5(r,e,t){r=pn(r,255),e=pn(e,255),t=pn(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),s,a,u=n,f=n-i;if(a=n===0?0:f/n,n==i)s=0;else{switch(n){case r:s=(e-t)/f+(e<t?6:0);break;case e:s=(t-r)/f+2;break;case t:s=(r-e)/f+4;break}s/=6}return{h:s,s:a,v:u}}function nR(r,e,t){r=pn(r,360)*6,e=pn(e,100),t=pn(t,100);var n=Math.floor(r),i=r-n,s=t*(1-e),a=t*(1-i*e),u=t*(1-(1-i)*e),f=n%6,m=[t,a,s,s,u,t][f],y=[u,t,t,a,s,s][f],_=[s,s,u,t,t,a][f];return{r:m*255,g:y*255,b:_*255}}function D5(r,e,t,n){var i=[$i(Math.round(r).toString(16)),$i(Math.round(e).toString(16)),$i(Math.round(t).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rR(r,e,t,n,i){var s=[$i(Math.round(r).toString(16)),$i(Math.round(e).toString(16)),$i(Math.round(t).toString(16)),$i(Sg(n))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function L5(r,e,t,n){var i=[$i(Sg(n)),$i(Math.round(r).toString(16)),$i(Math.round(e).toString(16)),$i(Math.round(t).toString(16))];return i.join("")}Xe.equals=function(r,e){return!r||!e?!1:Xe(r).toRgbString()==Xe(e).toRgbString()};Xe.random=function(){return Xe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function iR(r,e){e=e===0?0:e||10;var t=Xe(r).toHsl();return t.s-=e/100,t.s=Bc(t.s),Xe(t)}function sR(r,e){e=e===0?0:e||10;var t=Xe(r).toHsl();return t.s+=e/100,t.s=Bc(t.s),Xe(t)}function oR(r){return Xe(r).desaturate(100)}function aR(r,e){e=e===0?0:e||10;var t=Xe(r).toHsl();return t.l+=e/100,t.l=Bc(t.l),Xe(t)}function AR(r,e){e=e===0?0:e||10;var t=Xe(r).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Xe(t)}function lR(r,e){e=e===0?0:e||10;var t=Xe(r).toHsl();return t.l-=e/100,t.l=Bc(t.l),Xe(t)}function uR(r,e){var t=Xe(r).toHsl(),n=(t.h+e)%360;return t.h=n<0?360+n:n,Xe(t)}function cR(r){var e=Xe(r).toHsl();return e.h=(e.h+180)%360,Xe(e)}function q5(r,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Xe(r).toHsl(),n=[Xe(r)],i=360/e,s=1;s<e;s++)n.push(Xe({h:(t.h+s*i)%360,s:t.s,l:t.l}));return n}function fR(r){var e=Xe(r).toHsl(),t=e.h;return[Xe(r),Xe({h:(t+72)%360,s:e.s,l:e.l}),Xe({h:(t+216)%360,s:e.s,l:e.l})]}function hR(r,e,t){e=e||6,t=t||30;var n=Xe(r).toHsl(),i=360/t,s=[Xe(r)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,s.push(Xe(n));return s}function dR(r,e){e=e||6;for(var t=Xe(r).toHsv(),n=t.h,i=t.s,s=t.v,a=[],u=1/e;e--;)a.push(Xe({h:n,s:i,v:s})),s=(s+u)%1;return a}Xe.mix=function(r,e,t){t=t===0?0:t||50;var n=Xe(r).toRgb(),i=Xe(e).toRgb(),s=t/100,a={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return Xe(a)};Xe.readability=function(r,e){var t=Xe(r),n=Xe(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};Xe.isReadable=function(r,e,t){var n=Xe.readability(r,e),i,s;switch(s=!1,i=_R(t),i.level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s};Xe.mostReadable=function(r,e,t){var n=null,i=0,s,a,u,f;t=t||{},a=t.includeFallbackColors,u=t.level,f=t.size;for(var m=0;m<e.length;m++)s=Xe.readability(r,e[m]),s>i&&(i=s,n=Xe(e[m]));return Xe.isReadable(r,n,{level:u,size:f})||!a?n:(t.includeFallbackColors=!1,Xe.mostReadable(r,["#fff","#000"],t))};var $h=Xe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
80",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},pR=Xe.hexNames=mR($h);function mR(r){var e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);return e}function wg(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function pn(r,e){gR(r)&&(r="100%");var t=yR(r);return r=Math.min(e,Math.max(0,parseFloat(r))),t&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function Bc(r){return Math.min(1,Math.max(0,r))}function si(r){return parseInt(r,16)}function gR(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function yR(r){return typeof r=="string"&&r.indexOf("%")!=-1}function $i(r){return r.length==1?"0"+r:""+r}function C0(r){return r<=1&&(r=r*100+"%"),r}function Sg(r){return Math.round(parseFloat(r)*255).toString(16)}function I5(r){return si(r)/255}var Oi=function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"
8+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Vs(r){return!!Oi.CSS_UNIT.exec(r)}function vR(r){r=r.replace(KN,"").replace(ZN,"").toLowerCase();var e=!1;if($h[r])r=$h[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Oi.rgb.exec(r))?{r:t[1],g:t[2],b:t[3]}:(t=Oi.rgba.exec(r))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Oi.hsl.exec(r))?{h:t[1],s:t[2],l:t[3]}:(t=Oi.hsla.exec(r))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Oi.hsv.exec(r))?{h:t[1],s:t[2],v:t[3]}:(t=Oi.hsva.exec(r))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Oi.hex8.exec(r))?{r:si(t[1]),g:si(t[2]),b:si(t[3]),a:I5(t[4]),format:e?"name":"hex8"}:(t=Oi.hex6.exec(r))?{r:si(t[1]),g:si(t[2]),b:si(t[3]),format:e?"name":"hex"}:(t=Oi.hex4.exec(r))?{r:si(t[1]+""+t[1]),g:si(t[2]+""+t[2]),b:si(t[3]+""+t[3]),a:I5(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Oi.hex3.exec(r))?{r:si(t[1]+""+t[1]),g:si(t[2]+""+t[2]),b:si(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function _R(r){var e,t;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),t=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}function Hh(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function xR(r){if(Array.isArray(r))return r}function bR(r){if(Array.isArray(r))return Hh(r)}function Mg(r,e,t){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function TR(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wR(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function vr(r,e){return r.get(Mg(r,e))}function $a(r,e,t){TR(r,e),e.set(r,t)}function Mu(r,e,t){return r.set(Mg(r,e),t),t}function SR(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,DR(n.key),n)}}function MR(r,e,t){return e&&SR(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function ER(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function NR(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function RR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CR(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PR(r,e){return xR(r)||NR(r,e)||Eg(r,e)||RR()}function BR(r){return bR(r)||ER(r)||Eg(r)||CR()}function FR(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function DR(r){var e=FR(r,"string");return typeof e=="symbol"?e:e+""}function Eg(r,e){if(r){if(typeof r=="string")return Hh(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Hh(r,e):void 0}}var Ha=new WeakMap,l0=new WeakMap,Wa=new WeakMap,W2=new WeakMap,Q2=new WeakMap,Y2=new WeakMap,LR=function(){function r(){wR(this,r),$a(this,Ha,new Map),$a(this,l0,new Map),$a(this,Wa,function(e){return e}),$a(this,W2,function(){return{}}),$a(this,Q2,function(){}),$a(this,Y2,function(){})}return MR(r,[{key:"getObj",value:function(t){return vr(Ha,this).get(vr(Wa,this).call(this,t))}},{key:"getData",value:function(t){return vr(l0,this).get(t)}},{key:"entries",value:function(){return BR(vr(l0,this).entries()).map(function(t){var n=PR(t,2),i=n[0],s=n[1];return[s,i]})}},{key:"id",value:function(t){return Mu(Wa,this,Ce(t)),this}},{key:"onCreateObj",value:function(t){return Mu(W2,this,t),this}}
10,{key:"onUpdateObj",value:function(t){return Mu(Q2,this,t),this}},{key:"onRemoveObj",value:function(t){return Mu(Y2,this,t),this}},{key:"digest",value:function(t){var n=this;t.filter(function(s){return!vr(Ha,n).has(vr(Wa,n).call(n,s))}).forEach(function(s){var a=vr(W2,n).call(n,s);vr(Ha,n).set(vr(Wa,n).call(n,s),a),vr(l0,n).set(a,s)});var i=new Map(t.map(function(s){return[vr(Wa,n).call(n,s),s]}));return vr(Ha,this).forEach(function(s,a){i.has(a)?vr(Q2,n).call(n,s,i.get(a)):(vr(Y2,n).call(n,s,a),vr(Ha,n).delete(a),vr(l0,n).delete(s))}),this}},{key:"clear",value:function(){return this.digest([]),this}}])}(),Ng={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(Cm,function(){return function(t){function n(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var i={};return n.m=t,n.c=i,n.p="",n(0)}([function(t,n,i){var s=i(1),a=function(){function u(f,m,y){f===void 0&&(f=NaN),m===void 0&&(m=NaN),y===void 0&&(y=!1),this._minFPS=m,this._maxFPS=f,this._timeScale=1,this._currentTick=0,this._currentTime=0,this._tickDeltaTime=0,this._isRunning=!1,this._maxInterval=isNaN(this._minFPS)?NaN:1e3/this._minFPS,this._minInterval=isNaN(this._maxFPS)?NaN:1e3/this._maxFPS,this._onResume=new s.default,this._onPause=new s.default,this._onTick=new s.default,this._onTickOncePerFrame=new s.default,y||this.resume()}return u.prototype.updateOnce=function(f){f(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},u.prototype.resume=function(){this._isRunning||(this._isRunning=!0,this._lastTimeUpdated=this.getTimer(),this._onResume.dispatch(),this.animateOnce())},u.prototype.pause=function(){this._isRunning&&(this._isRunning=!1,this._onPause.dispatch(),window.cancelAnimationFrame(this._animationFrameHandle))},u.prototype.dispose=function(){this.pause(),this._onResume.removeAll(),this._onPause.removeAll(),this._onTick.removeAll()},Object.defineProperty(u.prototype,"currentTick",{get:function(){return this._currentTick},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"currentTimeSeconds",{get:function(){return this._currentTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"tickDeltaTimeSeconds",{get:function(){return this._tickDeltaTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"timeScale",{get:function(){return this._timeScale},set:function(f){this._timeScale!==f&&(this._timeScale=f)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"onResume",{get:function(){return this._onResume},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"onPause",{get:function(){return this._onPause},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"onTick",{get:function(){return this._onTick},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"onTickOncePerFrame",{get:function(){return this._onTickOncePerFrame},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isRunning",{get:function(){return this._isRunning},enumerable:!0,configurable:!0}),u.prototype.animateOnce=function(){var f=this;this._animationFrameHandle=window.requestAnimationFrame(function(){return f.onFrame()})},u.prototype.onFrame=function(){if(this._now=this.getTimer(),this._frameDeltaTime=this._now-this._lastTimeUpdated,isNaN(this._minInterval)||this._frameDeltaTime>=this._minInterval)if(isNaN(this._maxInterval))this.update(this._frameDeltaTime*this._timeScale,!0),this._lastTimeUpdated=this._now;else for(this._interval=Math.min(this._frameDeltaTime,this._maxInterval);this._now>=this._lastTimeUpdated+this._interval;)this.update(this._interval*this._timeScale,this._now<=this._lastTimeUpdated+2*this._maxInterval),this._lastTimeUpdated+=this._interval;this._isRunning&&this.animateOnce()},u.prototype.update=function(f,m){m===void 0&&(m=!0),this._currentTick++,this._currentTime+=f,this._tickDeltaTime=f,this._onTick.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick),m&&this._onTickOncePerFrame.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},u.prototype.getTimer=function(){return Date.now()},u}();Object.defineProperty(n,"__esModule",{value:!0}),n.default=a},function(t,n,i){(function(s,a){t.exports=a()})(this,function(){return function(s){function a(f){if(u[f])return u[f].exports;var m=u[f]={exports:{},id:f,loaded:!1};
vendor: 6,874 bytes, line 10
10return s[f].call(m.exports,m,m.exports,a),m.loaded=!0,m.exports}var u={};return a.m=s,a.c=u,a.p="",a(0)}([function(s,a){var u=function(){function f(){this.functions=[]}return f.prototype.add=function(m){return this.functions.indexOf(m)===-1&&(this.functions.push(m),!0)},f.prototype.remove=function(m){var y=this.functions.indexOf(m);return y>-1&&(this.functions.splice(y,1),!0)},f.prototype.removeAll=function(){return this.functions.length>0&&(this.functions.length=0,!0)},f.prototype.dispatch=function(){for(var m=[],y=0;y<arguments.length;y++)m[y]=arguments[y];var _=this.functions.concat();_.forEach(function(b){b.apply(void 0,m)})},Object.defineProperty(f.prototype,"numItems",{get:function(){return this.functions.length},enumerable:!0,configurable:!0}),f}();Object.defineProperty(a,"__esModule",{value:!0}),a.default=u}])})}])})})(Ng);var qR=Ng.exports;const DA=Bb(qR),Ks=11102230246251565e-32,_r=134217729,IR=(3+8*Ks)*Ks;function X2(r,e,t,n,i){let s,a,u,f,m=e[0],y=n[0],_=0,b=0;y>m==y>-m?(s=m,m=e[++_]):(s=y,y=n[++b]);let w=0;if(_<r&&b<t)for(y>m==y>-m?(a=m+s,u=s-(a-m),m=e[++_]):(a=y+s,u=s-(a-y),y=n[++b]),s=a,u!==0&&(i[w++]=u);_<r&&b<t;)y>m==y>-m?(a=s+m,f=a-s,u=s-(a-f)+(m-f),m=e[++_]):(a=s+y,f=a-s,u=s-(a-f)+(y-f),y=n[++b]),s=a,u!==0&&(i[w++]=u);for(;_<r;)a=s+m,f=a-s,u=s-(a-f)+(m-f),m=e[++_],s=a,u!==0&&(i[w++]=u);for(;b<t;)a=s+y,f=a-s,u=s-(a-f)+(y-f),y=n[++b],s=a,u!==0&&(i[w++]=u);return(s!==0||w===0)&&(i[w++]=s),w}function kR(r,e){let t=e[0];for(let n=1;n<r;n++)t+=e[n];return t}function Bl(r){return new Float64Array(r)}const UR=(3+16*Ks)*Ks,OR=(2+12*Ks)*Ks,GR=(9+64*Ks)*Ks*Ks,Qa=Bl(4),k5=Bl(8),U5=Bl(12),O5=Bl(16),Br=Bl(4);function VR(r,e,t,n,i,s,a){let u,f,m,y,_,b,w,S,E,R,P,L,D,O,G,U,j,V;const Q=r-i,Z=t-i,K=e-s,Y=n-s;O=Q*Y,b=_r*Q,w=b-(b-Q),S=Q-w,b=_r*Y,E=b-(b-Y),R=Y-E,G=S*R-(O-w*E-S*E-w*R),U=K*Z,b=_r*K,w=b-(b-K),S=K-w,b=_r*Z,E=b-(b-Z),R=Z-E,j=S*R-(U-w*E-S*E-w*R),P=G-j,_=G-P,Qa[0]=G-(P+_)+(_-j),L=O+P,_=L-O,D=O-(L-_)+(P-_),P=D-U,_=D-P,Qa[1]=D-(P+_)+(_-U),V=L+P,_=V-L,Qa[2]=L-(V-_)+(P-_),Qa[3]=V;let ne=kR(4,Qa),ae=OR*a;if(ne>=ae||-ne>=ae||(_=r-Q,u=r-(Q+_)+(_-i),_=t-Z,m=t-(Z+_)+(_-i),_=e-K,f=e-(K+_)+(_-s),_=n-Y,y=n-(Y+_)+(_-s),u===0&&f===0&&m===0&&y===0)||(ae=GR*a+IR*Math.abs(ne),ne+=Q*y+Y*u-(K*m+Z*f),ne>=ae||-ne>=ae))return ne;O=u*Y,b=_r*u,w=b-(b-u),S=u-w,b=_r*Y,E=b-(b-Y),R=Y-E,G=S*R-(O-w*E-S*E-w*R),U=f*Z,b=_r*f,w=b-(b-f),S=f-w,b=_r*Z,E=b-(b-Z),R=Z-E,j=S*R-(U-w*E-S*E-w*R),P=G-j,_=G-P,Br[0]=G-(P+_)+(_-j),L=O+P,_=L-O,D=O-(L-_)+(P-_),P=D-U,_=D-P,Br[1]=D-(P+_)+(_-U),V=L+P,_=V-L,Br[2]=L-(V-_)+(P-_),Br[3]=V;const J=X2(4,Qa,4,Br,k5);O=Q*y,b=_r*Q,w=b-(b-Q),S=Q-w,b=_r*y,E=b-(b-y),R=y-E,G=S*R-(O-w*E-S*E-w*R),U=K*m,b=_r*K,w=b-(b-K),S=K-w,b=_r*m,E=b-(b-m),R=m-E,j=S*R-(U-w*E-S*E-w*R),P=G-j,_=G-P,Br[0]=G-(P+_)+(_-j),L=O+P,_=L-O,D=O-(L-_)+(P-_),P=D-U,_=D-P,Br[1]=D-(P+_)+(_-U),V=L+P,_=V-L,Br[2]=L-(V-_)+(P-_),Br[3]=V;const fe=X2(J,k5,4,Br,U5);O=u*y,b=_r*u,w=b-(b-u),S=u-w,b=_r*y,E=b-(b-y),R=y-E,G=S*R-(O-w*E-S*E-w*R),U=f*m,b=_r*f,w=b-(b-f),S=f-w,b=_r*m,E=b-(b-m),R=m-E,j=S*R-(U-w*E-S*E-w*R),P=G-j,_=G-P,Br[0]=G-(P+_)+(_-j),L=O+P,_=L-O,D=O-(L-_)+(P-_),P=D-U,_=D-P,Br[1]=D-(P+_)+(_-U),V=L+P,_=V-L,Br[2]=L-(V-_)+(P-_),Br[3]=V;const pe=X2(fe,U5,4,Br,O5);return O5[pe-1]}function P0(r,e,t,n,i,s){const a=(e-s)*(t-i),u=(r-i)*(n-s),f=a-u,m=Math.abs(a+u);return Math.abs(f)>=UR*m?f:-VR(r,e,t,n,i,s,m)}const G5=Math.pow(2,-52),Eu=new Uint32Array(512);class al{static from(e,t=WR,n=QR){const i=e.length,s=new Float64Array(i*2);for(let a=0;a<i;a++){const u=e[a];s[2*a]=t(u),s[2*a+1]=n(u)}return new al(s)}constructor(e){const t=e.length>>1;if(t>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:i,_hullHash:s}=this,a=e.length>>1;let u=1/0,f=1/0,m=-1/0,y=-1/0;for(let Q=0;Q<a;Q++){const Z=e[2*Q],K=e[2*Q+1];Z<u&&(u=Z),K<f&&(f=K),Z>m&&(m=Z),K>y&&(y=K),this._ids[Q]=Q}const _=(u+m)/2,b=(f+y)/2;let w=0,S=0,E=0;for(let Q=0,Z=1/0;Q<a;Q++){const K=K2(_,b,e[2*Q],e[2*Q+1]);K<Z&&(w=Q,Z=K)}const R=e[2*w],P=e[2*w+1];for(let Q=0,Z=1/0;Q<a;Q++){if(Q===w)continue;const K=K2(R,P,e[2*Q],e[2*Q+1]);K<Z&&K>0&&(S=Q,Z=K)}let L=e[2*S],D=e[2*S+1],O=1/0;for(let Q=0;Q<a;Q++){if(Q===w||Q===S)continue;const Z=$R(R,P,L,D,e[2*Q],e[2*Q+1]);Z<O&&(E=Q,O=Z)}let G=e[2*E],U=e[2*E+1];if(O===1/0){for(let K=0;K<a;K++)this._dists[K]=e[2*K]-e[0]||e[2*K+1]-e[1];mA(this._ids,this._dists,0,a-1);const Q=new Uint32Array(a);let Z=0;for(let K=0,Y=-1/0;K<a;K++){const ne=this._ids[K],ae=this._dists[ne];ae>Y&&(Q[Z++]=ne,Y=ae)}this.hull=Q.subarray(0,Z),this.triangles=new Uint32Array(0),this.halfedges=new Int32Array(0);return}if(P0(R,P,L,D,G,U)<0){const Q=S,Z=L,K=D;S=E,L=G,D=U,E=Q,G=Z,U=K}const j=HR(R,P,L,D,G,U);this._cx=j.x,this._cy=j.y;for(let Q=0;Q<a;Q++)this._dists[Q]=K2(e[2*Q],e[2*Q+1],j.x,j.y);mA(this._ids,this._dists,0,a-1),this._hullStart=w;let V=3;n[w]=t[E]=S,n[S]=t[w]=E,n[E]=t[S]=w,i[w]=0,i[S]=1,i[E]=2,s.fill(-1),s[this._hashKey(R,P)]=w,s[this._hashKey(L,D)]=S,s[this._hashKey(G,U)]=E,this.trianglesLen=0,this._addTriangle(w,S,E,-1,-1,-1);for(let Q=0,Z=0,K=0;Q<this._ids.length;Q++){const Y=this._ids[Q],ne=e[2*Y],ae=e[2*Y+1];if(Q>0&&Math.abs(ne-Z)<=G5&&Math.abs(ae-K)<=G5||(Z=ne,K=ae,Y===w||Y===S||Y===E))continue;let J=0;for(let qe=0,je=this._hashKey(ne,ae);qe<this._hashSize&&(J=s[(je+qe)%this._hashSize],!(J!==-1&&J!==n[J]));qe++);J=t[J];let fe=J,pe;for(;pe=n[fe],P0(ne,ae,e[2*fe],e[2*fe+1],e[2*pe],e[2*pe+1])>=0;)if(fe=pe,fe===J){fe=-1;break}if(fe===-1)continue;let Re=this._addTriangle(fe,Y,n[fe],-1,-1,i[fe]);i[Y]=this._legalize(Re+2),i[fe]=Re,V++;let Se=n[fe];for(;pe=n[Se],P0(ne,ae,e[2*Se],e[2*Se+1],e[2*pe],e[2*pe+1])<0;)Re=this._addTriangle(Se,Y,pe,i[Y],-1,i[Se]),i[Y]=this._legalize(Re+2),n[Se]=Se,V--,Se=pe;if(fe===J)for(;pe=t[fe],P0(ne,ae,e[2*pe],e[2*pe+1],e[2*fe],e[2*fe+1])<0;)Re=this._addTriangle(pe,Y,fe,-1,i[fe],i[pe]),this._legalize(Re+2),i[pe]=Re,n[fe]=fe,V--,fe=pe;this._hullStart=t[Y]=fe,n[fe]=t[Se]=Y,n[Y]=Se,s[this._hashKey(ne,ae)]=Y,s[this._hashKey(e[2*fe],e[2*fe+1])]=fe}this.hull=new Uint32Array(V);for(let Q=0,Z=this._hullStart;Q<V;Q++)this.hull[Q]=Z,Z=n[Z];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(zR(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:i}=this;let s=0,a=0;for(;;
10){const u=n[e],f=e-e%3;if(a=f+(e+2)%3,u===-1){if(s===0)break;e=Eu[--s];continue}const m=u-u%3,y=f+(e+1)%3,_=m+(u+2)%3,b=t[a],w=t[e],S=t[y],E=t[_];if(jR(i[2*b],i[2*b+1],i[2*w],i[2*w+1],i[2*S],i[2*S+1],i[2*E],i[2*E+1])){t[e]=E,t[u]=b;const P=n[_];if(P===-1){let D=this._hullStart;do{if(this._hullTri[D]===_){this._hullTri[D]=e;break}D=this._hullPrev[D]}while(D!==this._hullStart)}this._link(e,P),this._link(u,n[a]),this._link(a,_);const L=m+(u+1)%3;s<Eu.length&&(Eu[s++]=L)}else{if(s===0)break;e=Eu[--s]}}return a}_link(e,t){this._halfedges[e]=t,t!==-1&&(this._halfedges[t]=e)}_addTriangle(e,t,n,i,s,a){const u=this.trianglesLen;return this._triangles[u]=e,this._triangles[u+1]=t,this._triangles[u+2]=n,this._link(u,i),this._link(u+1,s),this._link(u+2,a),this.trianglesLen+=3,u}}function zR(r,e){const t=r/(Math.abs(r)+Math.abs(e));return(e>0?3-t:1+t)/4}function K2(r,e,t,n){const i=r-t,s=e-n;return i*i+s*s}function jR(r,e,t,n,i,s,a,u){const f=r-a,m=e-u,y=t-a,_=n-u,b=i-a,w=s-u,S=f*f+m*m,E=y*y+_*_,R=b*b+w*w;return f*(_*R-E*w)-m*(y*R-E*b)+S*(y*w-_*b)<0}function $R(r,e,t,n,i,s){const a=t-r,u=n-e,f=i-r,m=s-e,y=a*a+u*u,_=f*f+m*m,b=.5/(a*m-u*f),w=(m*y-u*_)*b,S=(a*_-f*y)*b;return w*w+S*S}function HR(r,e,t,n,i,s){const a=t-r,u=n-e,f=i-r,m=s-e,y=a*a+u*u,_=f*f+m*m,b=.5/(a*m-u*f),w=r+(m*y-u*_)*b,S=e+(a*_-f*y)*b;return{x:w,y:S}}function mA(r,e,t,n){if(n-t<=20)for(let i=t+1;i<=n;i++){const s=r[i],a=e[s];let u=i-1;for(;u>=t&&e[r[u]]>a;)r[u+1]=r[u--];r[u+1]=s}else{const i=t+n>>1;let s=t+1,a=n;u0(r,i,s),e[r[t]]>e[r[n]]&&u0(r,t,n),e[r[s]]>e[r[n]]&&u0(r,s,n),e[r[t]]>e[r[s]]&&u0(r,t,s);const u=r[s],f=e[u];for(;;){do s++;while(e[r[s]]<f);do a--;while(e[r[a]]>f);if(a<s)break;u0(r,s,a)}r[t+1]=r[a],r[a]=u,n-s+1>=a-t?(mA(r,e,s,n),mA(r,e,t,a-1)):(mA(r,e,t,a-1),mA(r,e,s,n))}}function u0(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function WR(r){return r[0]}function QR(r){return r[1]}function YR(r,e){var t,n,i=0,s,a,u,f,m,y,_,b=r[0],w=r[1],S=e.length;for(t=0;t<S;t++){n=0;var E=e[t],R=E.length-1;if(y=E[0],y[0]!==E[R][0]&&y[1]!==E[R][1])throw new Error("First and last coordinates in a ring must be the same");for(a=y[0]-b,u=y[1]-w,n;n<R;n++){if(_=E[n+1],f=_[0]-b,m=_[1]-w,u===0&&m===0){if(f<=0&&a>=0||a<=0&&f>=0)return 0}else if(m>=0&&u<=0||m<=0&&u>=0){if(s=P0(a,f,u,m,0,0),s===0)return 0;(s>0&&m>0&&u<=0||s<0&&m<=0&&u>0)&&i++}y=_,u=m,a=f}}return i%2!==0}
10function XR(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return[...r.geometry.coordinates];if(r.type==="Point")return[...r.coordinates]}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return[...r];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function KR(r){return r.type==="Feature"?r.geometry:r}function ZR(r,e,t={}){if(!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");const n=XR(r),i=KR(e),s=i.type,a=e.bbox;let u=i.coordinates;if(a&&JR(n,a)===!1)return!1;s==="Polygon"&&(u=[u]);for(var f=0;f<u.length;++f){const m=YR(n,u[f]);if(m===0&&!t.ignoreBoundary)return!0;if(m)return!0}return!1}function JR(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}var eC=ZR;const V5=1e-6;class ma{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){e=+e,t=+t,n=+n;const i=e+n,s=t;if(n<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${s}`:(Math.abs(this._x1-i)>V5||Math.abs(this._y1-s)>V5)&&(this._+="L"+i+","+s),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=i},${this._y1=s}`)}rect(e,t,n,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+i}h${-n}Z`}value(){return this._||null}}class Wh{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class tC{constructor(e,[t,n,i,s]=[0,0,960,500]){if(!((i=+i)>=(t=+t))||!((s=+s)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=t,this.ymax=s,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:i}=this;let s,a;const u=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let E=0,R=0,P=n.length,L,D;E<P;E+=3,R+=2){const O=n[E]*2,G=n[E+1]*2,U=n[E+2]*2,j=e[O],V=e[O+1],Q=e[G],Z=e[G+1],K=e[U],Y=e[U+1],ne=Q-j,ae=Z-V,J=K-j,fe=Y-V,pe=(ne*fe-ae*J)*2;if(Math.abs(pe)<1e-9){if(s===void 0){s=a=0;for(const Se of t)s+=e[Se*2],a+=e[Se*2+1];s/=t.length,a/=t.length}const Re=1e9*Math.sign((s-j)*fe-(a-V)*J);L=(j+K)/2-Re*fe,D=(V+Y)/2+Re*J}else{const Re=1/pe,Se=ne*ne+ae*ae,qe=J*J+fe*fe;L=j+(fe*Se-ae*qe)*Re,D=V+(ne*qe-J*Se)*Re}u[R]=L,u[R+1]=D}let f=t[t.length-1],m,y=f*4,_,b=e[2*f],w,S=e[2*f+1];i.fill(0);for(let E=0;E<t.length;++E)f=t[E],m=y,_=b,w=S,y=f*4,b=e[2*f],S=e[2*f+1],i[m+2]=i[y]=w-S,i[m+3]=i[y+1]=b-_}render(e){const t=e==null?e=new ma:void 0,{delaunay:{halfedges:n,inedges:i,hull:s},circumcenters:a,vectors:u}=this;if(s.length<=1)return null;for(let y=0,_=n.length;y<_;++y){const b=n[y];if(b<y)continue;const w=Math.floor(y/3)*2,S=Math.floor(b/3)*2,E=a[w],R=a[w+1],P=a[S],L=a[S+1];this._renderSegment(E,R,P,L,e)}let f,m=s[s.length-1];for(let y=0;y<s.length;++y){f=m,m=s[y];const _=Math.floor(i[m]/3)*2,b=a[_],w=a[_+1],S=f*4,E=this._project(b,w,u[S+2],u[S+3]);E&&this._renderSegment(b,w,E[0],E[1],e)}return t&&t.value()}renderBounds(e){const t=e==null?e=new ma:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=t==null?t=new ma:void 0,i=this._clip(e);if(i===null||!i.length)return;t.moveTo(i[0],i[1]);let s=i.length;for(;i[0]===i[s-2]&&i[1]===i[s-1]&&s>1;)s-=2;for(let a=2;a<s;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&t.lineTo(i[a],i[a+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const i=this.cellPolygon(t);i&&(i.index=t,yield i)}}cellPolygon(e){const t=new Wh;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,i,s){let a;const u=this._regioncode(e,t),f=this._regioncode(n,i);u===0&&f===0?(s.moveTo(e,t),s.lineTo(n,i)):(a=this._clipSegment(e,t,n,i,u,f))&&(s.moveTo(a[0],a[1]),s.lineTo(a[2],a[3]))}contains(e,t,n){return t=+t,t!==t||(n=+n,n!==n)?!1:this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const i=this._clip(n);if(i){e:for(let s=0,a=t.length;s<a;s+=2)for(let u=0,f=i.length;u<f;u+=2)if(t[s]===i[u]&&t[s+1]===i[u+1]&&t[(s+2)%a]===i[(u+f-2)%f]&&t[(s+3)%a]===i[(u+f-1)%f]){yield n;break e}}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:i,tri
vendor: 5,325 bytes, line 10
10angles:s}}=this,a=n[e];if(a===-1)return null;const u=[];let f=a;do{const m=Math.floor(f/3);if(u.push(t[m*2],t[m*2+1]),f=f%3===2?f-2:f+1,s[f]!==e)break;f=i[f]}while(f!==a&&f!==-1);return u}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(t===null)return null;const{vectors:n}=this,i=e*4;return this._simplify(n[i]||n[i+1]?this._clipInfinite(e,t,n[i],n[i+1],n[i+2],n[i+3]):this._clipFinite(e,t))}_clipFinite(e,t){const n=t.length;let i=null,s,a,u=t[n-2],f=t[n-1],m,y=this._regioncode(u,f),_,b=0;for(let w=0;w<n;w+=2)if(s=u,a=f,u=t[w],f=t[w+1],m=y,y=this._regioncode(u,f),m===0&&y===0)_=b,b=0,i?i.push(u,f):i=[u,f];else{let S,E,R,P,L;if(m===0){if((S=this._clipSegment(s,a,u,f,m,y))===null)continue;[E,R,P,L]=S}else{if((S=this._clipSegment(u,f,s,a,y,m))===null)continue;[P,L,E,R]=S,_=b,b=this._edgecode(E,R),_&&b&&this._edge(e,_,b,i,i.length),i?i.push(E,R):i=[E,R]}_=b,b=this._edgecode(P,L),_&&b&&this._edge(e,_,b,i,i.length),i?i.push(P,L):i=[P,L]}if(i)_=b,b=this._edgecode(i[0],i[1]),_&&b&&this._edge(e,_,b,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,t,n,i,s,a){const u=s<a;for(u&&([e,t,n,i,s,a]=[n,i,e,t,a,s]);;){if(s===0&&a===0)return u?[n,i,e,t]:[e,t,n,i];if(s&a)return null;let f,m,y=s||a;y&8?(f=e+(n-e)*(this.ymax-t)/(i-t),m=this.ymax):y&4?(f=e+(n-e)*(this.ymin-t)/(i-t),m=this.ymin):y&2?(m=t+(i-t)*(this.xmax-e)/(n-e),f=this.xmax):(m=t+(i-t)*(this.xmin-e)/(n-e),f=this.xmin),s?(e=f,t=m,s=this._regioncode(e,t)):(n=f,i=m,a=this._regioncode(n,i))}}_clipInfinite(e,t,n,i,s,a){let u=Array.from(t),f;if((f=this._project(u[0],u[1],n,i))&&u.unshift(f[0],f[1]),(f=this._project(u[u.length-2],u[u.length-1],s,a))&&u.push(f[0],f[1]),u=this._clipFinite(e,u))for(let m=0,y=u.length,_,b=this._edgecode(u[y-2],u[y-1]);m<y;m+=2)_=b,b=this._edgecode(u[m],u[m+1]),_&&b&&(m=this._edge(e,_,b,u,m),y=u.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(e,t,n,i,s){for(;t!==n;){let a,u;switch(t){case 5:t=4;continue;case 4:t=6,a=this.xmax,u=this.ymin;break;case 6:t=2;continue;case 2:t=10,a=this.xmax,u=this.ymax;break;case 10:t=8;continue;case 8:t=9,a=this.xmin,u=this.ymax;break;case 9:t=1;continue;case 1:t=5,a=this.xmin,u=this.ymin;break}(i[s]!==a||i[s+1]!==u)&&this.contains(e,a,u)&&(i.splice(s,0,a,u),s+=2)}return s}_project(e,t,n,i){let s=1/0,a,u,f;if(i<0){if(t<=this.ymin)return null;(a=(this.ymin-t)/i)<s&&(f=this.ymin,u=e+(s=a)*n)}else if(i>0){if(t>=this.ymax)return null;(a=(this.ymax-t)/i)<s&&(f=this.ymax,u=e+(s=a)*n)}if(n>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/n)<s&&(u=this.xmax,f=t+(s=a)*i)}else if(n<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/n)<s&&(u=this.xmin,f=t+(s=a)*i)}return[u,f]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){const n=(t+2)%e.length,i=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[i]||e[t+1]===e[n+1]&&e[n+1]===e[i+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}}const nC=2*Math.PI,Ya=Math.pow;function rC(r){return r[0]}function iC(r){return r[1]}function sC(r){const{triangles:e,coords:t}=r;for(let n=0;n<e.length;n+=3){const i=2*e[n],s=2*e[n+1],a=2*e[n+2];if((t[a]-t[i])*(t[s+1]-t[i+1])-(t[s]-t[i])*(t[a+1]-t[i+1])>1e-10)return!1}return!0}function oC(r,e,t){return[r+Math.sin(r+e)*t,e+Math.cos(r-e)*t]}class Jd{static from(e,t=rC,n=iC,i){return new Jd("length"in e?aC(e,t,n,i):Float64Array.from(AC(e,t,n,i)))}constructor(e){this._delaunator=new al(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&sC(e)){this.collinear=Int32Array.from({length:t.length/2},(b,w)=>w).sort((b,w)=>t[2*b]-t[2*w]||t[2*b+1]-t[2*w+1]);const f=this.collinear[0],m=this.collinear[this.collinear.length-1],y=[t[2*f],t[2*f+1],t[2*m],t[2*m+1]],_=1e-8*Math.hypot(y[3]-y[1],y[2]-y[0]);for(let b=0,w=t.length/2;b<w;++b){const S=oC(t[2*b],t[2*b+1],_);t[2*b]=S[0],t[2*b+1]=S[1]}this._delaunator=new al(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,s=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),u=this._hullIndex.fill(-1);for(let f=0,m=n.length;f<m;++f){const y=s[f%3===2?f-2:f+1];(n[f]===-1||a[y]===-1)&&(a[y]=f)}for(let f=0,m=i.length;f<m;++f)u[i[f]]=f;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new tC(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:i,halfedges:s,triangles:a,collinear:u}=this;if(u){const _=u.indexOf(e);_>0&&(yield u[_-1]),_<u.length-1&&(yield u[_+1]);return}const f=t[e];if(f===-1)return;let m=f,y=-1;
10do{if(yield y=a[m],m=m%3===2?m-2:m+1,a[m]!==e)return;if(m=s[m],m===-1){const _=n[(i[e]+1)%n.length];_!==y&&(yield _);return}}while(m!==f)}find(e,t,n=0){if(e=+e,e!==e||(t=+t,t!==t))return-1;const i=n;let s;for(;(s=this._step(n,e,t))>=0&&s!==n&&s!==i;)n=s;return s}_step(e,t,n){const{inedges:i,hull:s,_hullIndex:a,halfedges:u,triangles:f,points:m}=this;if(i[e]===-1||!m.length)return(e+1)%(m.length>>1);let y=e,_=Ya(t-m[e*2],2)+Ya(n-m[e*2+1],2);const b=i[e];let w=b;do{let S=f[w];const E=Ya(t-m[S*2],2)+Ya(n-m[S*2+1],2);if(E<_&&(_=E,y=S),w=w%3===2?w-2:w+1,f[w]!==e)break;if(w=u[w],w===-1){if(w=s[(a[e]+1)%s.length],w!==S&&Ya(t-m[w*2],2)+Ya(n-m[w*2+1],2)<_)return w;break}}while(w!==b);return y}render(e){const t=e==null?e=new ma:void 0,{points:n,halfedges:i,triangles:s}=this;for(let a=0,u=i.length;a<u;++a){const f=i[a];if(f<a)continue;const m=s[a]*2,y=s[f]*2;e.moveTo(n[m],n[m+1]),e.lineTo(n[y],n[y+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){t===void 0&&(!e||typeof e.moveTo!="function")&&(t=e,e=null),t=t==null?2:+t;const n=e==null?e=new ma:void 0,{points:i}=this;for(let s=0,a=i.length;s<a;s+=2){const u=i[s],f=i[s+1];e.moveTo(u+t,f),e.arc(u,f,t,0,nC)}return n&&n.value()}renderHull(e){const t=e==null?e=new ma:void 0,{hull:n,points:i}=this,s=n[0]*2,a=n.length;e.moveTo(i[s],i[s+1]);for(let u=1;u<a;++u){const f=2*n[u];e.lineTo(i[f],i[f+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new Wh;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=t==null?t=new ma:void 0,{points:i,triangles:s}=this,a=s[e*=3]*2,u=s[e+1]*2,f=s[e+2]*2;return t.moveTo(i[a],i[a+1]),t.lineTo(i[u],i[u+1]),t.lineTo(i[f],i[f+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new Wh;return this.renderTriangle(e,t),t.value()}}function aC(r,e,t,n){const i=r.length,s=new Float64Array(i*2);for(let a=0;a<i;++a){const u=r[a];s[a*2]=e.call(n,u,a,r),s[a*2+1]=t.call(n,u,a,r)}return s}function*AC(r,e,t,n){let i=0;for(const s of r)yield e.call(n,s,i,r),yield t.call(n,s,i,r),++i}const ep=Math.PI,z5=ep/2,j5=180/ep,$5=ep/180,lC=Math.atan2,H5=Math.cos,uC=Math.max,cC=Math.min,W5=Math.sin,fC=Math.sign||function(r){return r>0?1:r<0?-1:0},Rg=Math.sqrt;function hC(r){return r>1?z5:r<-1?-z5:Math.asin(r)}function Cg(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Ai(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function ic(r,e){return[r[0]+e[0],r[1]+e[1],r[2]+e[2]]}function sc(r){var e=Rg(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);return[r[0]/e,r[1]/e,r[2]/e]}function tp(r){return[lC(r[1],r[0])*j5,hC(uC(-1,cC(1,r[2])))*j5]}function ys(r){const e=r[0]*$5,t=r[1]*$5,n=H5(t);return[n*H5(e),n*W5(e),W5(t)]}function np(r){return r=r.map(e=>ys(e)),Cg(r[0],Ai(r[2],r[1]))}function dC(r){const e=mC(r),t=yC(e),n=gC(t,r),i=_C(t,r.length),s=pC(i,r),a=vC(t,r),{polygons:u,centers:f}=xC(a,t,r),m=bC(u),y=wC(t,r),_=TC(n,t);return{delaunay:e,edges:n,triangles:t,centers:f,neighbors:i,polygons:u,mesh:m,hull:y,urquhart:_,find:s}}function pC(r,e){function t(n,i){let s=n[0]-i[0],a=n[1]-i[1],u=n[2]-i[2];return s*s+a*a+u*u}return function(i,s,a){a===void 0&&(a=0);let u,f,m=a;const y=ys([i,s]);do u=a,a=null,f=t(y,ys(e[u])),r[u].forEach(_=>{let b=t(y,ys(e[_]));if(b<f){f=b,a=_,m=_;return}});while(a!==null);return m}}function mC(r){if(r.length<2)return{};let e=0;for(;isNaN(r[e][0]+r[e][1])&&e++<r.length;);const t=nE(r[e]),n=qE().translate([0,0]).scale(1).rotate(t.invert([180,0]));r=r.map(n);const i=[];let s=1;for(let _=0,b=r.length;_<b;_++){let w=r[_][0]**2+r[_][1]**2;!isFinite(w)||w>1e32?i.push(_):w>s&&(s=w)}
10const a=1e6*Rg(s);i.forEach(_=>r[_]=[a,0]),r.push([0,a]),r.push([-a,0]),r.push([0,-a]);const u=Jd.from(r);u.projection=n;const{triangles:f,halfedges:m,inedges:y}=u;for(let _=0,b=m.length;_<b;_++)if(m[_]<0){const w=_%3==2?_-2:_+1,S=_%3==0?_+2:_-1,E=m[w],R=m[S];m[E]=R,m[R]=E,m[w]=m[S]=-1,f[_]=f[w]=f[S]=e,y[f[E]]=E%3==0?E+2:E-1,y[f[R]]=R%3==0?R+2:R-1,_+=2-_%3}else f[_]>r.length-3-1&&(f[_]=e);return u}function gC(r,e){const t=new Set;return e.length===2?[[0,1]]:(r.forEach(n=>{if(n[0]!==n[1]&&!(np(n.map(i=>e[i]))<0))for(let i=0,s;i<3;i++)s=(i+1)%3,t.add(E1([n[i],n[s]]).join("-"))}),Array.from(t,n=>n.split("-").map(Number)))}function yC(r){const{triangles:e}=r;if(!e)return[];const t=[];for(let n=0,i=e.length/3;n<i;n++){const s=e[3*n],a=e[3*n+1],u=e[3*n+2];s!==a&&a!==u&&t.push([s,u,a])}return t}function vC(r,e){return r.map(t=>{const n=t.map(s=>e[s]).map(ys),i=ic(ic(Ai(n[1],n[0]),Ai(n[2],n[1])),Ai(n[0],n[2]));return tp(sc(i))})}function _C(r,e){const t=[];return r.forEach(n=>{for(let i=0;i<3;i++){const s=n[i],a=n[(i+1)%3];t[s]=t[s]||[],t[s].push(a)}}),r.length===0&&(e===2?(t[0]=[1],t[1]=[0]):e===1&&(t[0]=[])),t}function xC(r,e,t){const n=[],i=r.slice();if(e.length===0){if(t.length<2)return{polygons:n,centers:i};if(t.length===2){const u=ys(t[0]),f=ys(t[1]),m=sc(ic(u,f)),y=sc(Ai(u,f)),_=Ai(m,y),b=[m,Ai(m,_),Ai(Ai(m,_),_),Ai(Ai(Ai(m,_),_),_)].map(tp).map(a);return n.push(b),n.push(b.slice().reverse()),{polygons:n,centers:i}}}e.forEach((u,f)=>{for(let m=0;m<3;m++){const y=u[m],_=u[(m+1)%3],b=u[(m+2)%3];n[y]=n[y]||[],n[y].push([_,b,f,[y,_,b]])}});const s=n.map(u=>{const f=[u[0][2]];let m=u[0][1];for(let y=1;y<u.length;y++)for(let _=0;_<u.length;_++)if(u[_][0]==m){m=u[_][1],f.push(u[_][2]);break}if(f.length>2)return f;if(f.length==2){const y=Q5(t[u[0][3][0]],t[u[0][3][1]],i[f[0]]),_=Q5(t[u[0][3][2]],t[u[0][3][0]],i[f[0]]),b=a(y),w=a(_);return[f[0],w,f[1],b]}});function a(u){let f=-1;return i.slice(e.length,1/0).forEach((m,y)=>{m[0]===u[0]&&m[1]===u[1]&&(f=y+e.length)}),f<0&&(f=i.length,i.push(u)),f}return{polygons:s,centers:i}}function Q5(r,e,t){r=ys(r),e=ys(e),t=ys(t);const n=fC(Cg(Ai(e,r),t));return tp(sc(ic(r,e)).map(i=>n*i))}function bC(r){const e=[];return r.forEach(t=>{if(!t)return;let n=t[t.length-1];for(let i of t)i>n&&e.push([n,i]),n=i}),e}function TC(r,e){return function(t){const n=new Map,i=new Map;return r.forEach((s,a)=>{const u=s.join("-");n.set(u,t[a]),i.set(u,!0)}),e.forEach(s=>{let a=0,u=-1;for(let f=0;f<3;f++){let m=E1([s[f],s[(f+1)%3]]).join("-");n.get(m)>a&&(a=n.get(m),u=m)}i.set(u,!1)}),r.map(s=>i.get(s.join("-")))}}function wC(r,e){const t=new Set,n=[];r.map(u=>{if(!(np(u.map(f=>e[f>e.length?0:f]))>1e-12))for(let f=0;f<3;f++){let m=[u[f],u[(f+1)%3]],y=`${m[0]}-${m[1]}`;t.has(y)?t.delete(y):t.add(`${m[1]}-${m[0]}`)}});const i=new Map;let s;if(t.forEach(u=>{u=u.split("-").map(Number),i.set(u[0],u[1]),s=u[0]}),s===void 0)return n;let a=s;do{n.push(a);let u=i.get(a);i.set(a,-1),a=u}while(a>-1&&a!==s);return n}function SC(r){const e=function(t){if(e.delaunay=null,e._data=t,typeof e._data=="object"&&e._data.type==="FeatureCollection"&&(e._data=e._data.features),typeof e._data=="object"){const n=e._data.map(i=>[e._vx(i),e._vy(i),i]).filter(i=>isFinite(i[0]+i[1]));e.points=n.map(i=>[i[0],i[1]]),e.valid=n.map(i=>i[2]),e.delaunay=dC(e.points)}return e};return e._vx=function(t){if(typeof t=="object"&&"type"in t)return s5(t)[0];if(0 in t)return t[0]},e._vy=function(t){if(typeof t=="object"&&"type"in t)return s5(t)[1];if(1 in t)return t[1]},e.x=function(t){return t?(e._vx=t,e):e._vx},e.y=function(t){return t?(e._vy=t,e):e._vy},e.polygons=function(t){if(t!==void 0&&e(t),!e.delaunay)return!1;const n={type:"FeatureCollection",features:[]};return e.valid.length===0||(e.delaunay.polygons.forEach((i,s)=>n.features.push({type:"Feature",geometry:i?{type:"Polygon",coordinates:[[...i,i[0]].map(a=>e.delaunay.centers[a])]}:null,properties:{site:e.valid[s],sitecoordinates:e.points[s],neighbours:e.delaunay.neighbors[s]}})),e.valid.length===1&&n.features.push({type:"Feature",geometry:{type:"Sphere"},properties:{site:e.valid[0],sitecoordinates:e.points[0],neighbours:[]}})),n},e.triangles=function(t){return t!==void 0&&e(t),e.delaunay?{type:"FeatureCollection",features:e.delaunay.triangles.map((n,i)=>(n=n.map(s=>e.points[s]),n.center=e.delaunay.centers[i],n)).filter(n=>np(n)>0).map(n=>
10({type:"Feature",properties:{circumcenter:n.center},geometry:{type:"Polygon",coordinates:[[...n,n[0]]]}}))}:!1},e.links=function(t){if(t!==void 0&&e(t),!e.delaunay)return!1;const n=e.delaunay.edges.map(s=>Go(e.points[s[0]],e.points[s[1]])),i=e.delaunay.urquhart(n);return{type:"FeatureCollection",features:e.delaunay.edges.map((s,a)=>({type:"Feature",properties:{source:e.valid[s[0]],target:e.valid[s[1]],length:n[a],urquhart:!!i[a]},geometry:{type:"LineString",coordinates:[e.points[s[0]],e.points[s[1]]]}}))}},e.mesh=function(t){return t!==void 0&&e(t),e.delaunay?{type:"MultiLineString",coordinates:e.delaunay.edges.map(n=>[e.points[n[0]],e.points[n[1]]])}:!1},e.cellMesh=function(t){if(t!==void 0&&e(t),!e.delaunay)return!1;const{centers:n,polygons:i}=e.delaunay,s=[];for(const a of i)if(a)for(let u=a.length,f=a[u-1],m=a[0],y=0;y<u;f=m,m=a[++y])m>f&&s.push([n[f],n[m]]);return{type:"MultiLineString",coordinates:s}},e._found=void 0,e.find=function(t,n,i){if(e._found=e.delaunay.find(t,n,e._found),!i||Go([t,n],e.points[e._found])<i)return e._found},e.hull=function(t){t!==void 0&&e(t);const n=e.delaunay.hull,i=e.points;return n.length===0?null:{type:"Polygon",coordinates:[[...n.map(s=>i[s]),i[n[0]]]]}},r?e(r):e}function Qh(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function MC(r){if(Array.isArray(r))return r}function EC(r){if(Array.isArray(r))return Qh(r)}function NC(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function RC(r,e,t){return e=oc(e),IC(r,Pg()?Reflect.construct(e,[],oc(r).constructor):e.apply(r,t))}function CC(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function PC(r,e,t){return Object.defineProperty(r,"prototype",{writable:!1}),r}function oc(r){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oc(r)}function BC(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Yh(r,e)}function Pg(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pg=function(){return!!r})()}function FC(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function DC(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function LC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qC(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IC(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NC(r)}function Yh(r,e){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Yh(r,e)}function fs(r,e){return MC(r)||DC(r,e)||Bg(r,e)||LC()}function Z2(r){return EC(r)||FC(r)||Bg(r)||qC()}function Bg(r,e){if(r){if(typeof r=="string")return Qh(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Qh(r,e):void 0}}function kC(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.resolution,n=t===void 0?1/0:t,i=UC(r,n),s=Z0(i),a=OC(r,n),u=[].concat(Z2(s),Z2(a)),f={type:"Polygon",coordinates:r},m=K7(f),y=fs(m,2),_=fs(y[0],2),b=_[0],w=_[1],S=fs(y[1],2),E=S[0],R=S[1],P=b>E||R>=89||w<=-89,L=[];if(P){var D=SC(u).triangles(),O=new Map(u.map(function(pe,Re){var Se=fs(pe,2),qe=Se[0],je=Se[1];return["".concat(qe,"-").concat(je),Re]}));
12D.features.forEach(function(pe){var Re,Se=pe.geometry.coordinates[0].slice(0,3).reverse(),qe=[];if(Se.forEach(function(Qe){var He=fs(Qe,2),vt=He[0],it=He[1],yt="".concat(vt,"-").concat(it);O.has(yt)&&qe.push(O.get(yt))}),qe.length===3){if(qe.some(function(Qe){return Qe<s.length})){var je=pe.properties.circumcenter;if(!Xh(je,f,P))return}(Re=L).push.apply(Re,qe)}})}else if(a.length)for(var Q=al.from(u),Z=function(Re){var Se,qe=[2,1,0].map(function(He){return Q.triangles[Re+He]}),je=qe.map(function(He){return u[He]});if(qe.some(function(He){return He<s.length})){var Qe=[0,1].map(function(He){return YS(je,function(vt){return vt[He]})});if(!Xh(Qe,f,P))return 1}(Se=L).push.apply(Se,Z2(qe))},K=0,Y=Q.triangles.length;K<Y;K+=3)Z(K);else{var G=ec(i),U=G.vertices,j=G.holes,V=j===void 0?[]:j;L=oN(U,V,2)}var ne=to(E1(u,function(pe){return pe[0]}),[0,1]),ae=to(E1(u,function(pe){return pe[1]}),[0,1]),J=u.map(function(pe){var Re=fs(pe,2),Se=Re[0],qe=Re[1];return[ne(Se),ae(qe)]}),fe={points:u,indices:L,uvs:J};return{contour:i,triangles:fe}}function UC(r,e){return r.map(function(t){var n=[],i;return t.forEach(function(s){if(i){var a=Go(s,i)*180/Math.PI;if(a>e)for(var u=Wd(i,s),f=1/Math.ceil(a/e),m=f;m<1;)n.push(u(m)),m+=f}n.push(i=s)}),n})}function OC(r,e){var t={type:"Polygon",coordinates:r},n=K7(t),i=fs(n,2),s=fs(i[0],2),a=s[0],u=s[1],f=fs(i[1],2),m=f[0],y=f[1];if(Math.min(Math.abs(m-a),Math.abs(y-u))<e)return[];var _=a>m||y>=89||u<=-89;return GC(e,{minLng:a,maxLng:m,minLat:u,maxLat:y}).filter(function(b){return Xh(b,t,_)})}function GC(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.minLng,n=e.maxLng,i=e.minLat,s=e.maxLat,a=Math.round(Math.pow(360/r,2)/Math.PI),u=(1+Math.sqrt(5))/2,f=function(P){return P/u*360%360-180},m=function(P){return Math.acos(2*P/a-1)/Math.PI*180-90},y=function(P){return a*(Math.cos((P+90)*Math.PI/180)+1)/2},_=[s!==void 0?Math.ceil(y(s)):0,i!==void 0?Math.floor(y(i)):a-1],b=t===void 0&&n===void 0?function(){return!0}:t===void 0?function(R){return R<=n}:n===void 0?function(R){return R>=t}:n>=t?function(R){return R>=t&&R<=n}:function(R){return R>=t||R<=n},w=[],S=_[0];S<=_[1];S++){var E=f(S);b(E)&&w.push([E,m(S)])}return w}function Xh(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t?vE(e,r):eC(r,e)}var c1=window.THREE?window.THREE:{BufferGeometry:Pi,Float32BufferAttribute:Uo},Y5=new c1.BufferGeometry().setAttribute?"setAttribute":"addAttribute",rp=function(r){function e(t,n,i,s,a,u,f){var m;CC(this,e),m=RC(this,e),m.type="ConicPolygonGeometry",m.parameters={polygonGeoJson:t,bottomHeight:n,topHeight:i,closedBottom:s,closedTop:a,includeSides:u,curvatureResolution:f},n=n||0,i=i||1,s=s!==void 0?s:!0,a=a!==void 0?a:!0,u=u!==void 0?u:!0,f=f||5;var y=kC(t,{resolution:f}),_=y.contour,b=y.triangles,w=Z0(b.uvs),S=[],E=[],R=[],P=0,L=function(j){var V=Math.round(S.length/3),Q=R.length;S=S.concat(j.vertices),E=E.concat(j.uvs),R=R.concat(V?j.indices.map(function(Z){return Z+V}):j.indices),m.addGroup(Q,R.length-Q,P++)};u&&L(O()),s&&L(G(n,!1)),a&&L(G(i,!0)),m.setIndex(R),m[Y5]("position",new c1.Float32BufferAttribute(S,3)),m[Y5]("uv",new c1.Float32BufferAttribute(E,2)),m.computeVertexNormals();function D(U,j){var V=typeof j=="function"?j:function(){return j},Q=U.map(function(Z){return Z.map(function(K){var Y=fs(K,2),ne=Y[0],ae=Y[1];return VC(ae,ne,V(ne,ae))})});return ec(Q)}function O(){for(var U=D(_,n),j=U.vertices,V=U.holes,Q=D(_,i),Z=Q.vertices,K=Z0([Z,j]),Y=Math.round(Z.length/3),ne=new Set(V),ae=0,J=[],fe=0;fe<Y;fe++){var pe=fe+1;if(pe===Y)pe=ae;else if(ne.has(pe)){var Re=pe;pe=ae,ae=Re}J.push(fe,fe+Y,pe+Y),J.push(pe+Y,pe,fe)}for(var Se=[],qe=1;qe>=0;qe--)for(var je=0;je<Y;je+=1)Se.push(je/(Y-1),qe);return{indices:J,vertices:K,uvs:Se}}function G(U){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{indices:j?b.indices:b.indices.slice().reverse(),vertices:D([b.points],U).vertices,uvs:w}}return m}return BC(e,r),PC(e)}(c1.BufferGeometry);function VC(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(90-r)*Math.PI/180,i=(90-e)*Math.PI/180;return[t*Math.sin(n)*Math.cos(i),t*Math.cos(n),t*Math.sin(n)*Math.sin(i)]}function Kh(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function zC(r){if(Array.isArray(r))return r}function jC(r){if(Array.isArray(r))return Kh(r)}function $C(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function HC(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;
12!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function WC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QC(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YC(r,e){if(r==null)return{};var t,n,i=XC(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n<s.length;n++)t=s[n],e.includes(t)||{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function XC(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function KC(r,e){return zC(r)||HC(r,e)||Fg(r,e)||WC()}function ZC(r){return jC(r)||$C(r)||Fg(r)||QC()}function JC(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function eP(r){var e=JC(r,"string");return typeof e=="symbol"?e:e+""}function Fg(r,e){if(r){if(typeof r=="string")return Kh(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Kh(r,e):void 0}}var tP=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),s=r.reduce(function(u,f){var m=u,y=f;return i.forEach(function(_,b){var w=_.keyAccessor,S=_.isProp,E;if(S){var R=y,P=R[w],L=YC(R,[w].map(eP));E=P,y=L}else E=w(y,b);b+1<i.length?(m.hasOwnProperty(E)||(m[E]={}),m=m[E]):t?(m.hasOwnProperty(E)||(m[E]=[]),m[E].push(y)):m[E]=y}),u},{});t instanceof Function&&function u(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;m===i.length?Object.keys(f).forEach(function(y){return f[y]=t(f[y])}):Object.values(f).forEach(function(y){return u(y,m+1)})}(s);var a=s;return n&&(a=[],function u(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];m.length===i.length?a.push({keys:m,vals:f}):Object.entries(f).forEach(function(y){var _=KC(y,2),b=_[0],w=_[1];return u(w,[].concat(ZC(m),[b]))})}(s),e instanceof Array&&e.length===0&&a.length===1&&(a[0].keys=[])),a},Mt=function(r){r=r||{};var e=typeof r<"u"?r:{},t={},n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);var i="";function s(de){return e.locateFile?e.locateFile(de,i):i+de}var a;typeof document<"u"&&document.currentScript&&(i=document.currentScript.src),i.indexOf("blob:")!==0?i=i.substr(0,i.lastIndexOf("/")+1):i="",a=function(Me,Oe,ve){var o=new XMLHttpRequest;o.open("GET",Me,!0),o.responseType="arraybuffer",o.onload=function(){if(o.status==200||o.status==0&&o.response){Oe(o.response);return}var ht=_n(Me);if(ht){Oe(ht.buffer);return}ve()},o.onerror=ve,o.send(null)};var u=e.print||console.log.bind(console),f=e.printErr||console.warn.bind(console);for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);t=null,e.arguments&&e.arguments;var m=0,y=function(de){m=de},_=function(){return m},b=8;function w(de,Me,Oe,ve){switch(Oe=Oe||"i8",Oe.charAt(Oe.length-1)==="*"&&(Oe="i32"),Oe){case"i1":Y[de>>0]=Me;break;case"i8":Y[de>>0]=Me;break;case"i16":ae[de>>1]=Me;break;case"i32":J[de>>2]=Me;break;case"i64":Ji=[Me>>>0,(sr=Me,+en(sr)>=1?sr>0?(kr(+Nr(sr/4294967296),4294967295)|0)>>>0:~~+Kn((sr-+(~~sr>>>0))/4294967296)>>>0:0)],J[de>>2]=Ji[0],J[de+4>>2]=Ji[1];break;case"float":fe[de>>2]=Me;break;case"double":pe[de>>3]=Me;break;default:Ko("invalid type for setValue: "+Oe)}}function S(de,Me,Oe){switch(Me=Me||"i8",Me.charAt(Me.length-1)==="*"&&(Me="i32"),Me){case"i1":return Y[de>>0];case"i8":return Y[de>>0];case"i16":return ae[de>>1];case"i32":return J[de>>2];case"i64":return J[de>>2];case"float":return fe[de>>2];case"double":return pe[de>>3];default:Ko("invalid type for getValue: "+Me)}return null}var E=!1;function R(de,Me){de||Ko("Assertion failed: "+Me)}function P(de){var Me=e["_"+de];return R(Me,"Cannot call unknown function "+de+", make sure it is exported"),Me}function L(de,Me,Oe,ve,o){var z={string:function(Ur){var fo=0;if(Ur!=null&&Ur!==0){var ho=(Ur.length<<2)+1;fo=di(ho),V(Ur,fo,ho)}return fo},array:function(Ur){var fo=di(Ur.length);return Q(Ur,fo),fo}};function ht(Ur){return Me==="string"?U(Ur):Me==="boolean"?!!Ur:Ur}var Gt=P(de),Zn=[],Kt=0;if(ve)for(var Dt=0;Dt<ve.length;Dt++){var Zt=z[Oe[Dt]];Zt?(Kt===0&&(Kt=Yo()),Zn[Dt]=Zt(ve[Dt])):Zn[Dt]=ve[Dt]}var tn=Gt.apply(null,Zn);return tn=ht(tn),Kt!==0&&Di(Kt),tn}function D(de,Me,Oe,ve){Oe=Oe||[];var o=Oe.every(function(ht){return ht==="number"}),z=Me!=="string";return z&&o&&!ve?P(de):function(){return L(de,Me,Oe,arguments)}}var O=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function G(de,Me,Oe){for(var ve=Me+Oe,o=Me;de[o]&&!(o>=ve);)++o;if(o-Me>16&&de.subarray&&O)return O.decode(de.subarray(Me,o));for(var z="";Me<o;){var ht=de[Me++];if(!(ht&128)){z+=String.fromCharCode(ht);continue}var Gt=de[Me++]&63;
14if((ht&224)==192){z+=String.fromCharCode((ht&31)<<6|Gt);continue}var Zn=de[Me++]&63;if((ht&240)==224?ht=(ht&15)<<12|Gt<<6|Zn:ht=(ht&7)<<18|Gt<<12|Zn<<6|de[Me++]&63,ht<65536)z+=String.fromCharCode(ht);else{var Kt=ht-65536;z+=String.fromCharCode(55296|Kt>>10,56320|Kt&1023)}}return z}function U(de,Me){return de?G(ne,de,Me):""}function j(de,Me,Oe,ve){if(!(ve>0))return 0;for(var o=Oe,z=Oe+ve-1,ht=0;ht<de.length;++ht){var Gt=de.charCodeAt(ht);if(Gt>=55296&&Gt<=57343){var Zn=de.charCodeAt(++ht);Gt=65536+((Gt&1023)<<10)|Zn&1023}if(Gt<=127){if(Oe>=z)break;Me[Oe++]=Gt}else if(Gt<=2047){if(Oe+1>=z)break;Me[Oe++]=192|Gt>>6,Me[Oe++]=128|Gt&63}else if(Gt<=65535){if(Oe+2>=z)break;Me[Oe++]=224|Gt>>12,Me[Oe++]=128|Gt>>6&63,Me[Oe++]=128|Gt&63}else{if(Oe+3>=z)break;Me[Oe++]=240|Gt>>18,Me[Oe++]=128|Gt>>12&63,Me[Oe++]=128|Gt>>6&63,Me[Oe++]=128|Gt&63}}return Me[Oe]=0,Oe-o}function V(de,Me,Oe){return j(de,ne,Me,Oe)}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");function Q(de,Me){Y.set(de,Me)}function Z(de,Me){return de%Me>0&&(de+=Me-de%Me),de}var K,Y,ne,ae,J,fe,pe;function Re(de){K=de,e.HEAP8=Y=new Int8Array(de),e.HEAP16=ae=new Int16Array(de),e.HEAP32=J=new Int32Array(de),e.HEAPU8=ne=new Uint8Array(de),e.HEAPU16=new Uint16Array(de),e.HEAPU32=new Uint32Array(de),e.HEAPF32=fe=new Float32Array(de),e.HEAPF64=pe=new Float64Array(de)}var Se=5271296,qe=28384,je=e.TOTAL_MEMORY||33554432;e.buffer?K=e.buffer:K=new ArrayBuffer(je),je=K.byteLength,Re(K),J[qe>>2]=Se;function Qe(de){for(;de.length>0;){var Me=de.shift();if(typeof Me=="function"){Me();continue}var Oe=Me.func;typeof Oe=="number"?Me.arg===void 0?e.dynCall_v(Oe):e.dynCall_vi(Oe,Me.arg):Oe(Me.arg===void 0?null:Me.arg)}}var He=[],vt=[],it=[],yt=[];function Tt(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Ot(e.preRun.shift());Qe(He)}function Xt(){Qe(vt)}function sn(){Qe(it)}function Ut(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)$t(e.postRun.shift());Qe(yt)}function Ot(de){He.unshift(de)}function $t(de){yt.unshift(de)}var en=Math.abs,Kn=Math.ceil,Nr=Math.floor,kr=Math.min,In=0,$n=null;function qs(de){In++,e.monitorRunDependencies&&e.monitorRunDependencies(In)}function uo(de){if(In--,e.monitorRunDependencies&&e.monitorRunDependencies(In),In==0&&$n){var Me=$n;$n=null,Me()}}e.preloadedImages={},e.preloadedAudios={};var yr=null,ti="data:application/octet-stream;base64,";function ni(de){return String.prototype.startsWith?de.startsWith(ti):de.indexOf(ti)===0}var sr,Ji;y
vendor: 27,818 bytes, line 14
14r="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAGC1EVPsh+T8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgtRFT7Ifk/GC1EVPsh+T8AAAAAAAAAAAAAAAAAAAAAGC1EVPsh+T8AAAAAAAAAABgtRFT7IQlAGC1EVPsh+T8AAAAAAAAAAAAAAAAAAAAAGC1EVPshCUAAAAAAAAAAABgtRFT7Ifm/GC1EVPsh+T8AAAAAAAAAAAAAAAAAAAAAGC1EVPsh+b8AAAAAAAAAAAAAAAAAAAAAGC1EVPsh+b8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgtRFT7Ifm/GC1EVPsh+b8AAAAAAAAAAAAAAAAAAAAAGC1EVPsh+b8AAAAAAAAAABgtRFT7IQnAGC1EVPsh+b8AAAAAAAAAAAAAAAAAAAAAGC1EVPshCcAAAAAAAAAAABgtRFT7Ifk/GC1EVPsh+b8AAAAAAAAAAAAAAAAAAAAAGC1EVPsh+T8AAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAMpi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAABAAAAAAEAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAEAAAAAAAAAAAAAOgehWlKfUEEz1zLi+JsiQa2og3wcMfVAWCbHorc0yEDi+Yn/Y6mbQJ11/mfsnG9At6bnG4UQQkBvMCQWKqUUQJVmwwswmOc/3hVgVBL3uj//qqOEOdGOPw/WDN4gnGE/H3ANkCUgND+AA8btKgAHPwTXBqJVSdo+XfRQAqsKrj4fc+zLYbSPQklEmCZHv2FCUP+uDso1NEKYtPhwphUHQptxnyFXYdpB7CddZAMmrkGAt1AxSTqBQUibBVdTsFNBSuX3MV+AJkFocv82SLf5QAqmgj7AY81A23
vendor: 9,112 bytes, line 14
14VDSEnLoEDGEJVSeDFzQDYrqvBk70VA8U157pcRGUBWfEF+ZKbsP6phvycGBZRAJbod0OgwfkCp+L8jatBmQCjl3pGrPlFAfMWm114SOkButwtqS7UjQHQwbcjXyw1A8jnLuuyA9j9KwjL0VwHhPyotk0lcs8k/Q5PvEs9rsz+SfsOQEVqdPzUAKDojLoY/WJz/kcjCcD8YFu070FRZPyoLC2BdJEM/YOXQAuiMM0HIBz1bw3sdQdV46aaHRwZByatzjDPX8EDb3Jie8HXZQCJxj6ULP8NAUaG6uRAZrUCWdmou5/mVQLb9huRPm4BAhvoCHygZaUCuX/I3SPdSQC9/bC/1qTxAfKxsYQ6pJUCuslH+N14QQMS/cv7SvPg/Ol8maYKx4j8AAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAD/////AAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA/////wAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAP////8AAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////BQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAEAAQAAAQEAAAAAAAEAAAABAAAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAKriWFiWZfg/Y2nmTbY/8z8MHSPSqmnjv6hnn18HR3c/quJYWJZl+D/jq5TzDdzyPwwdI9KqaeO/u0kC1eFSBECq4lhYlmX4P69pJmt7c/E/NnkJi6jSBsDESFlzKkr6P33ArMz7sfY/o2q2uqM08D+oZ59fB0d3PzEqCi3qrvK/kmm4ANp49D+4wS2wzhzvP9WJvyAnx+E/upcY75RVx7+95t+9y0T1P9L18g1caO0/k6CkRyVzAEBf99+e/GjxP6QMsuuLQ/U/PlP4Qr8q7j8Mb/GO2GMCwLl2K/DQIghAePiwytEp9D9UHrsuI/nqPzjMedJ+yuy/k6xgf58n/L+XoQtn22DzP2lzCnsYk+s/JhUSDI4P8z+8lFcBhgTcPxOqKRxEX/M/89MEdoPQ6j8OKQaXDob7vzWwNvblgAPAzGkxMcl88j9Nm4okPkbpP0vI89vxSgRAdac2Z6W2/T+6UFOMC3zyP/+2XEF3hug/QqhELwGKCMAwdlQerEoEQFcr/B+VnvE/hB1hfFzT5j8wdsE/Da64P0hIvnF/sOC/KH/hrXUg8T9bI5OQHaLlP+mYzla7td6/CtKG6iOm8b8FW3TV8oXwP8ORhtNuJ+c/q8JrTMz/AcC8PaUl+PUFwAXv9rkMT/A/m+sAswr15D+7hk/O3yvkP6c/yVsOHKI/qqAX9idJ8D/8hNz1KNPiP7xSXh3Ggvg/epbkiKr57T/23/LB1GLvP4GTTeNZi+M/W4TqlTheBcDupZgIdYUIQGwlcW3YZO8/tQvDXQ3H4j8Bt+sf9DkAQMdFie+nNvg/Z5Uh1wDX7j9h5X2d4KjhPxMJ1ZVT4Pa/evqB8xB//7+W183U9QLsPwzNxsC7AOA/af/LqCnK/r/lPceQ0FQDwHoY0nYIW+w/bHNSHrTg4D/DFcMAdabuv2sz5Ojhnve/FvLf01HN6z/tEDL2Hz/gP0bBv0KUhPA/pd7sEnMc4D8EGon4Lo7sP5NVbYtSON8/DAMC50odBkB+Z2J8MGYCQIhlM1gubOo/FssiPwWy4D8OIlGqRnkCQAd1vopp6f4/QS1keLLK6T9rfoBuT7LZP3KQbH5ugwjAjqVPXTmbBUBL/JxcqR3qP3oSeovuktg/Y6pRhJmqy7+0kwuU0Yjmv2wvsfFmQ+g/R98lJFqQ2T/IGb5gjLkCwK3mNff3kQbAqDznPFM86T+iiP0FfsvYP7fzKG6Mls0/h7+at2btzL8tsUTgk+LmP/YEIrTDINU/WmwKoVjA5L9aC02r6FHxvzzFCT/Qg+Y/nx0V97en0j8+1toJOm77P1kZ7h8KjfQ/GBbbqxgk5j9RGXM79G/SP+beHsWmweQ/9REi4eX0xD/V9s+kmMHkP+pb9yNs09A/c5ERjVDTAECqEr3OBCH7P14ILfMECOU/piRx4P8P0j+JYU//bfL0Pw62fw28B+w/l5YW2Ga45D9+CyKRbenOP5cH6fHy1/S/o/egk03++r91nTYRL/bjP3fHN6OJVdA/7xXQh1XLBcAB3g6tBdUIQKW2KnGYjeQ/SqIpagclyz8F9P3YgNL6v9H6NBsZ8QDAW2k5L5Qs4z/0axa1l6zLP1GE65Mu4wNAwfX+BYmWAEBBgJP90M3hP6/03qhPLdA/zqo5bJz2778/ESlPCTn1v7JkhGyvzuE/DM7sj5twwz/6xbXLavYGQH29RFRGkgNA7bOXVSJ54T9fEhTHO/TDP+8t+HMOiwDAxa0SbGTtA8Atii7y0mLgP4cecHFB3sM/uPUpyv+K7j8nktD1/WvhP2cWmi772d8/Fj7uU9kEvD8oKOESLzKmvwSdCqrHdNu/XCluGsvI3T929OW5md+uP9dP6rXcZNq/gXM+ggzL6b+eKjsPgJncP6i1e9aVu7E/2CnPNJyD1D/DnyGgSe+xvy8k7g9bp9s/nYmLvHn1sz9cFOwApH8IwGa6Mjy9cgZAJr95SiSW2z8rCkhOFvqdP3SIKmO/UwPAEy0zkN7bBsCds8Hg/13YP1zv413hVGi/FVtqixSn6L9XAPQGul3yv7SGu2BoCNk/n94bv7Maj79p13T6X9z3P45MPCW3WvI/rU/8/LRj1T9cgR6SXd+ZPymL2DstbPI/8s/pAkIz6z/fmoB+8efYPz2XyfWgYaa/6wys72AW/j8LZImhgrf3P729Zla/n9U/ySB8B3PBqL8O2nhevvbxv17+5A+n6fe/YrGIqEGB1T+wCEGbkhaxv989QHVE5wFAzd12PTu3/T9AHUPZY2DUP3SQDST0zq2/JCxAlIoj5T+Mhe1IJkrQP/cRpl8QhtU/amc4seFts79khiUSVaz3vxYfWtjPwf2/CHscxQqD0j/ctUBQ9my3v0POnFiyXv2/pjjn2Ju/AcDk45DwBhPRP/GjwlCrv7m/aT2ciwolBsAQOzHr/wUJQCzpq5UYvtI/gDCf3SlCwb+4i7S+mukEQBDA1f8mowFA2utnRN3KyT9T+9EYAVG6v9/IVZ0enrE/7NbRtdGfzr/8y8GpRz7LP3U0vTSk18e/JzHEcwiBB0AGm8Q7AJkEQNLciyt4Esk/gLou5zoQxr+RrOfM91oBwEzd36KybgTAgLou5zoQxj/S3IsreBLJv1gCch0OHO8/FD+RxSLN4j91NL00pNfHP/zLwalHPsu/nL7/By4Pyr8tSP5h7CPiv1P70RgBUbo/2utnRN3Kyb/KfllfCpUIwLkP5zj+NwdAgDCf3SlCwT8s6auVGL7Sv2aFPlaC4eC/XrS5UVH77b/xo8JQq7+5P+TjkPAGE9G/Q30/RYbn1z8FF/ISafuLv9y1QFD2bLc/CHscxQqD0r/fi+tPROX0P6vRc+19ie0/amc4seFtsz/3EaZfEIbVv77TYpahl/o/DDsu0CaC9D90kA0k9M6tP0AdQ9ljYNS/CCI0rxjZA8BgfCaLthgHwLAIQZuSFrE/YrGIqEGB1b8kvQ982+rsv4J8EWu7jPS/ySB8B3PBqD+9vWZWv5/VvwrAByWcJgBAxFujmE9a+j89l8n1oGGmP9+agH7x59i/N03cuJUt9L8X9v4GdIz6v1yBHpJd35m/rU/8/LRj1b8mz69sydf/vyu5idMqVQLAn94bv7Majz8AhrtgaAjZv+aCE66WZ/q/lA1Mgz/p/79c7+Nd4VRoP52zweD/Xdi/TJZpMTb4AkDLWZShPOb/PysKSE4W+p2/Jr95SiSW27/PkmbE7zjnP6UAiCDmMNI/nYmLvHn1s78vJO4PW6fbv5MWA2vqSrQ/V5WLwPB51b+otXvWlbuxv54qOw+Amdy/1keqzYeRBsApIEMHgZIIQHb05bmZ366/XCluGsvI3b8W44a9X9UFQEeQtDM4rwJAFj7uU9kEvL9nFpou+9nfv3Co+JcyyQhAcdkCX2KzBUCHHnBxQd7Dvy2KLvLSYuC/o6+5YTt/AcCHCNDW+8YEwF8SFMc79MO/7bOXVSJ54b9E/pfA2S3xPzD9xaBb0uQ/DM7sj5tww7+yZIRsr87hv7c4c0SEXNG/Tr79/9M+5r+v9N6oTy3Qv5uAk/3QzeG/XcI1OVQkAUAQSV9Z7Qr9P/RrFrWXrMu/W2k5L5Qs479Zo2IBM/vkv6FuipzkFvG/SqIpagcly7+ltipxmI3kv0pmis91cfc/gWQecsRh8D93xzejiVXQv3WdNhEv9uO/D7mgYy612j+PyVPNaT2jv34LIpFt6c6/l5YW2Ga45L+LUp+2A2z9P39i5xSpRfc/piRx4P8P0r9eCC3zBAjlv5n4OKmIUf2/jj/kUAwgAsDqW/cjbNPQv9X2z6SYweS/aTdljlWd8L94R8vZ8SL3v1EZczv0b9K/GBbbqxgk5r9XdfyikfEDwPILMvas0gfAnx0V97en0r88xQk/0IPmvxGErZ681fa/9kCaiOy2/b/2BCK0wyDVvy2xROCT4ua/+5EBLOXxA0B7p53+BnkAQKKI/QV+y9i/qDznPFM86b/snWGNkkgHwC+ByugkUwdAR98lJFqQ2b9sL7HxZkPovyJNGM67oek/HzNy6BqA1D96EnqL7pLYv0v8nFypHeq/axL/u1FnB0AkSEHvxn8DQGt+gG5Pstm/QS1keLLK6b/Sk/O6mtGzPxU8pLcPNty/FssiPwWy4L+IZTNYLmzqvw4szKfSouq/G+XJHY1a87+TVW2LUjjfvwQaifgujuy/3VARaoMl2L9NFodfK+/qv+0QMvYfP+C/FvLf01HN67+ETOQysd8AwH71iI/eGgXAbHNSHrTg4L96GNJ2CFvsv6BnExReeAFA5CakvxSl+j8MzcbAuwDgv5bXzdT1Auy/uVq8/8x58z+uvPMNqzTnP2HlfZ3gqOG/Z5Uh1wDX7r8PUbMSo2P7P9VfBrXlxPI/tQvDXQ3H4r9sJXFt2GTvvyDssGgO0PG/WxT/uE4N+r+Bk03jWYvjv/bf8sHUYu+/rUXN8hUe3j9m5HB1yZCzv/yE3PUo0+K/qqAX9idJ8L9mByqLMMH5v4kHC7KQowHAm+sAswr15L8F7/a5DE/wv2JLsGADFwTAKQjVGovZCMDDkYbTbifnvwVbdNXyhfC/malhH7yI7D+oevd0GWDZP1sjk5AdouW/KH/hrXUg8b8KWmrpQ0sFQAzEAF/pTgBAhB1hfFzT5r9XK/wflZ7xv18hRuqKXAjA/5rUd9v1BED/tlxBd4bov7pQU4wLfPK/4pnwn0T/sj/c277XPF3jv02biiQ+Rum/zGkxMcl88r8Yk0HhJVzjv62yUUFRjfS/89MEdoPQ6r8TqikcRF/zvxQxghHovfY/cfM1eFWE5j9pcwp7GJPrv5ehC2fbYPO/KUV2nGg0/795OhmUaqEFwFQeuy4j+eq/ePiwytEp9L8DuqWfW+8BQLytJylXHPY/PlP4Qr8q7r+kDLLri0P1vxT4ShWL+Oo/DMsWg0zlv7/S9fINXGjtv73m373LRPW/+xg/Gaxd8b94MdQEfW0AwLjBLbDOHO+/kmm4ANp49L+cShSMMbAEwKyjUgWirAdAo2q2uqM08L99wKzM+7H2v3RdlNBXFgnA8S9+ewyV/z+vaSZre3Pxv6riWFiWZfi/2J7VSZZ60j+LES81zPn3v+OrlPMN3PK/quJYWJZl+L/OZbufkEcEQLCNB/1lPOO/Y2nmTbY/87+q4lhYlmX4v7CNB/1lPOO/zmW7n5BHBEBwKD1Aa57LP/XsSsw7RbU/PMDPJGsfoD/TqningGKIPzFtCLYmb3I/qYfrJr7eWz9pQmleXRFFP0rWlJkA2i8/pCvcttgTGD9Dt8IWbjMCPyCG4GRlhOs+1JI2GhDN1D7ns8cGvXK/Pi8m8UTJxac+hNTfA2z4kT7GI8kjLyt7Pv//////HwAI//////8zEAj/////fzIgCP////9vMjAI/////2MyQAj///8/YjJQCP///zdiMmAI////M2IycAj//78zYjKACP//qzNiMpAI/3+rM2IyoAj/D6szYjKwCP8DqzNiMsAIvwOrM2Iy0AifA6szYjLgCJkDqzNiMvAI//////8/Dwj//////ysfCP////9/KS8I/////z8pPwj/////OSlPCP///z84KV8I////Dzgpbwj///8OOCl/CP//Hw44KY8I//8PDjgpnwj/fw0OOCmvCP8PDQ44Kb8I/w0NDjgpzwj/DA0OOCnfCMcMDQ44Ke8IxAwNDjgp/wgHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAgAAAAEAAAADAAAADgAAAAYAAAALAAAAAgAAAAcAAAABAAAAGAAAAAUAAAAKAAAAAQAAAAYAAAAAAAAAJgAAAAcAAAAMAAAAAwAAAAgAAAACAAAAMQAAAAkAAAAOAAAAAAAAAAUAAAAEAAAAOgAAAAgAAAANAAAABAAAAAkAAAADAAAAPwAAAAsAAAAGAAAADwAAAAoAAAAQAAAASAAAAAwAAAAHAAAAEAAAAAsAAAARAAAAUwAAAAoAAAAFAAAAEwAAAA4AAAAPAAAAYQAAAA0AAAAIAAAAEQAAAAwAAAASAAAAawAAAA4AAAAJAAAAEgAAAA0AAAATAAAAdQAAAA8AAAATAAAAEQAAABIAAAAQAAAABgAAAAIAAAADAAAABQAAAAQAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAMAAAABAAAABQAAAAQAAAAAAAAAAAAAAAcAAAAFAAAAAwAAAAQAAAABAAAAAAAAAAIAAAAAAAAAAgAAAAMAAAABAAAABQAAAAQAAAAGAAAAAAAAAAAAAAAYLURU+yH5PxgtRFT7Ifm/GC1EVPshCUAYLURU+yEJwGFsZ29zLmMAaDNOZWlnaGJvclJvdGF0aW9ucwBjZWxsc1RvTXVsdGlQb2x5LmMAY2VsbFRvRWRnZUFyY3MAAAEDAgQABAMFAQJjYW5jZWxBcmNQYWlycwBjcmVhdGVTb3J0YWJsZUxvb3AAZGlyZWN0ZWRFZGdlLmMAZGlyZWN0ZWRFZGdlVG9Cb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0NlbGxCb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbY2VudGVySUpLLmZhY2VdW2ZhY2UyXSA9PSBLSQBfZmFjZUlqa1RvQ2VsbEJvdW5kYXJ5AGgzSW5kZXguYwBjb21wYWN0Q2VsbHMAdmVjM1RvQ2VsbABjZWxsVG9DaGlsZFBvcwB2YWxpZGF0ZUNoaWxkUG9zAHJldkRpciAhPSBJTlZBTElEX0RJR0lUAGxvY2FsaWouYwBjZWxsVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAYmFzZUNlbGwgPT0gb3JpZ2luQmFzZUNlbGwALi4vaW5jbHVkZS9jb29yZGlqay5oAF91cEFwN0NoZWNrZWQAX3VwQXA3ckNoZWNrZWQAYmFzZUNlbGwgIT0gSU5WQUxJRF9CQVNFX0NFTEwAbG9jYWxJamtUb0NlbGwAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAZ3JpZFBhdGhDZWxsc0ludGVycG9sYXRlAHBvbHlmaWxsLmMAaXRlclN0ZXBQb2x5Z29uQ29tcGFjdAAwAHZlcnRleC5jAHZlcnRleFJvdGF0aW9ucwBjZWxsVG9WZXJ0ZXg=";
14var es=28400;function Is(de){return de}function Bi(de){var Me=/\b__Z[\w\d_]+/g;return de.replace(Me,function(Oe){var ve=Oe;return Oe===ve?Oe:ve+" ["+Oe+"]"})}function ks(){var de=new Error;if(!de.stack){try{throw new Error(0)}catch(Me){de=Me}if(!de.stack)return"(no stack trace available)"}return de.stack.toString()}function Yl(){var de=ks();return e.extraStackTrace&&(de+=` 15`+e.extraStackTrace()),Bi(de)}function Ia(de,Me,Oe,ve){Ko("Assertion failed: "+U(de)+", at: "+[Me?U(Me):"unknown filename",Oe,ve?U(ve):"unknown function"])}function Xl(){return Y.length}function l2(de,Me,Oe){ne.set(ne.subarray(Me,Me+Oe),de)}function Kl(de){return e.___errno_location&&(J[e.___errno_location()>>2]=de),de}function HA(de){Ko("OOM")}function he(de){try{var Me=new ArrayBuffer(de);return Me.byteLength!=de?void 0:(new Int8Array(Me).set(Y),Zl(Me),Re(Me),1)}catch{}}function Ge(de){var Me=Xl(),Oe=16777216,ve=2147483648-Oe;if(de>ve)return!1;for(var o=16777216,z=Math.max(Me,o);z<de;)z<=536870912?z=Z(2*z,Oe):z=Math.min(Z((3*z+2147483648)/4,Oe),ve);var ht=he(z);return!!ht}var st=typeof atob=="function"?atob:function(de){var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
15+/=",Oe="",ve,o,z,ht,Gt,Zn,Kt,Dt=0;de=de.replace(/[^A-Za-z0-9\+\/\=]/g,"");do ht=Me.indexOf(de.charAt(Dt++)),Gt=Me.indexOf(de.charAt(Dt++)),Zn=Me.indexOf(de.charAt(Dt++)),Kt=Me.indexOf(de.charAt(Dt++)),ve=ht<<2|Gt>>4,o=(Gt&15)<<4|Zn>>2,z=(Zn&3)<<6|Kt,Oe=Oe+String.fromCharCode(ve),Zn!==64&&(Oe=Oe+String.fromCharCode(o)),Kt!==64&&(Oe=Oe+String.fromCharCode(z));while(Dt<de.length);return Oe};function Ct(de){try{for(var Me=st(de),Oe=new Uint8Array(Me.length),ve=0;ve<Me.length;++ve)Oe[ve]=Me.charCodeAt(ve);return Oe}catch{throw new Error("Converting base64 string to bytes failed.")}}function _n(de){if(ni(de))return Ct(de.slice(ti.length))}var Fi={Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},ts={a:Ko,b:y,c:_,d:Ia,e:Kl,f:Xl,g:l2,h:Ge,i:HA,j:Is,k:Bi,l:he,m:ks,n:Yl,o:es,p:qe},Pe=function(de,Me,Oe){"almost asm";var ve=new de.Int8Array(Oe),o=new de.Int32Array(Oe);new de.Uint8Array(Oe),new de.Float32Array(Oe);var z=new de.Float64Array(Oe),ht=Me.o|0,Gt=Me.p|0,Zn=de.Math.floor,Kt=de.Math.abs,Dt=de.Math.sqrt,Zt=de.Math.cos,tn=de.Math.sin,Ur=de.Math.tan,fo=de.Math.acos,ho=de.Math.asin,S3=de.Math.atan,Rr=de.Math.atan2,ka=de.Math.ceil,Or=de.Math.imul,c2=de.Math.min,Y_=de.Math.max,Os=de.Math.clz32,X_=Me.a,at=Me.b,k=Me.c,wt=Me.d,M3=Me.e,K_=Me.f,Z_=Me.g,J_=Me.h,ex=Me.i,I=28416;function tx(A){return ve=new Int8Array(A),o=new Int32Array(A),z=new Float64Array(A),Oe=A,!0}function nx(A){A=A|0;var l=0;return l=I,I=I+A|0,I=I+15&-16,l|0}function rx(){return I|0}function ix(A){A=A|0,I=A}function sx(A,l){A=A|0,I=A}function ox(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;return(A|0)<0?(l=2,l|0):(A|0)>13780509?(l=ru(15,l)|0,l|0):(c=((A|0)<0)<<31>>31,h=ln(A|0,c|0,3,0)|0,d=k()|0,c=De(A|0,c|0,1,0)|0,c=ln(h|0,d|0,c|0,k()|0)|0,c=De(c|0,k()|0,1,0)|0,A=k()|0,o[l>>2]=c,o[l+4>>2]=A,l=0,l|0)}function E3(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,N3(A,l,c,d,0)|0}function N3(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0;if(x=I,I=I+16|0,g=x,!(R3(A,l,c,d,h)|0))return d=0,I=x,d|0;do if((c|0)>=0){if((c|0)>13780509){if(p=ru(15,g)|0,p|0)break;v=g,g=o[v>>2]|0,v=o[v+4>>2]|0}else p=((c|0)<0)<<31>>31,T=ln(c|0,p|0,3,0)|0,v=k()|0,p=De(c|0,p|0,1,0)|0,p=ln(T|0,v|0,p|0,k()|0)|0,p=De(p|0,k()|0,1,0)|0,v=k()|0,o[g>>2]=p,o[g+4>>2]=v,g=p;if(yo(d|0,0,g<<3|0)|0,h|0){yo(h|0,0,g<<2|0)|0,p=ns(A,l,c,d,h,g,v,0)|0;break}p=Cr(g,4)|0,p?(T=ns(A,l,c,d,p,g,v,0)|0,Ie(p),p=T):p=13}else p=2;while(0);return T=p,I=x,T|0}function R3(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0;if(H=I,I=I+16|0,F=H,q=H+8|0,B=F,o[B>>2]=A,o[B+4>>2]=l,(c|0)<0)return q=2,I=H,q|0;if(p=d,o[p>>2]=A,o[p+4>>2]=l,p=(h|0)!=0,p&&(o[h>>2]=0),Ht(A,l)|0)return q=9,I=H,q|0;o[q>>2]=0;e:do if((c|0)>=1)if(p)for(M=1,T=0,N=0,B=1,p=A;;){if(!(T|N)){if(p=Hn(p,l,4,q,F)|0,p|0)break e;if(l=F,p=o[l>>2]|0,l=o[l+4>>2]|0,Ht(p,l)|0){p=9;break e}}if(p=Hn(p,l,o[26864+(N<<2)>>2]|0,q,F)|0,p|0)break e;if(l=F,p=o[l>>2]|0,l=o[l+4>>2]|0,A=d+(M<<3)|0,o[A>>2]=p,o[A+4>>2]=l,o[h+(M<<2)>>2]=B,A=T+1|0,g=(A|0)==(B|0),v=N+1|0,x=(v|0)==6,Ht(p,l)|0){p=9;break e}if(B=B+(x&g&1)|0,(B|0)>(c|0)){p=0;break}else M=M+1|0,T=g?0:A,N=g?x?0:v:N}else for(M=1,T=0,N=0,B=1,p=A;;){if(!(T|N)){if(p=Hn(p,l,4,q,F)|0,p|0)break e;if(l=F,p=o[l>>2]|0,l=o[l+4>>2]|0,Ht(p,l)|0){p=9;break e}}if(p=Hn(p,l,o[26864+(N<<2)>>2]|0,q,F)|0,p|0)break e;if(l=F,p=o[l>>2]|0,l=o[l+4>>2]|0,A=d+(M<<3)|0,o[A>>2]=p,o[A+4>>2]=l,A=T+1|0,g=(A|0)==(B|0),v=N+1|0,x=(v|0)==6,Ht(p,l)|0){p=9;break e}if(B=B+(x&g&1)|0,(B|0)>(c|0)){p=0;break}else M=M+1|0,T=g?0:A,N=g?x?0:v:N}else p=0;while(0);return q=p,I=H,q|0}function ns(A,l,c,d,h,p,g,v){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0,g=g|0,v=v|0;var x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0;if(H=I,I=I+16|0,F=H+8|0,q=H,x=Gs(A|0,l|0,p|0,g|0)|0,M=k()|0,N=d+(x<<3)|0,X=N,se=o[X>>2]|0,X=o[X+4>>2]|0,T=(se|0)==(A|0)&(X|0)==(l|0),!((se|0)==0&(X|0)==0|T))do x=De(x|0,M|0,1,0)|0,x=go(x|0,k()|0,p|0,g|0)|0,M=k()|0,N=d+(x<<3)|0,se=N,X=o[se>>2]|0,se=o[se+4>>2]|0,T=(X|0)==(A|0)&(se|0)==(l|0);while(!((X|0)==0&(se|0)==0|T));if(x=h+(x<<2)|0,T&&(o[x>>2]|0)<=(v|0)||(se=N,o[se>>2]=A,o[se+4>>2]=l,o[x>>2]=v,(v|0)>=(c|0)))return se=0,I=H,se|0;switch(T=v+1|0,o[F>>2]=0,x=Hn(A,l,2,F,q)|0,x|0){case 9:{B=9;break}case 0:{x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x||(B=9);break}}e:do if((B|0)==9){switch(o[F>>2]=0,x=Hn(A,l,3,F,q)|0,x|0){case 9:break;case 0:{if(x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x|0)break e;break}default:break e}switch(o[F>>2]=0,x=Hn(A,l,1,F,q)|0,x|0){case 9:break;case 0:{if(x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x|0)break e;break}default:break e}switch(o[F>>2]=0,x=Hn(A,l,5,F,q)|0,x|0){case 9:break;case 0:{if(x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x|0)break e;break}default:break e}switch(o[F>>2]=0,x=Hn(A,l,4,F,q)|0,x|0){case 9:break;case 0:{if(x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x|0)break e;break}default:break e}switch(o[F>>2]=0,x=Hn(A,l,6,F,q)|0,x|0){case 9:break;case 0:{if(x=q,x=ns(o[x>>2]|0,o[x+4>>2]|0,c,d,h,p,g,T)|0,x|0)break e;break}default:break e}return se=0,I=H,se|0}while(0);return se=x,I=H,se|0}function Hn(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;if(c>>>0>6)return h=1,h|0;g=(o[d>>2]|0)%6|0,o[d>>2]=g;e:do if((g|0)>0)for(p=0;;){switch(c|0){case 1:{c=5;break}case 5:{c=4;break}case 4:{c=6;break}case 6:{c=2;break}case 2:{c=3;break}case 3:{c=1;break}}if(p=p+1|0,(p|0)==(g|0))break e}while(0);if(N=we(A|0,l|0,45)|0,k()|0,M=N&127,M>>>0>121)return h=5,h|0;x=Gr(A,l)|0,p=we(A|0,l|0,52)|0,k()|0,p=p&15;e:do if(!p)T=15;else{for(;;
15){if(g=(15-p|0)*3|0,v=we(A|0,l|0,g|0)|0,k()|0,v=v&7,(v|0)==7){l=5;break}if(q=(mi(p)|0)==0,p=p+-1|0,B=Be(7,0,g|0)|0,l=l&~(k()|0),F=Be(o[(q?432:16)+(v*28|0)+(c<<2)>>2]|0,0,g|0)|0,g=k()|0,c=o[(q?640:224)+(v*28|0)+(c<<2)>>2]|0,A=F|A&~B,l=g|l,!c){c=0;break e}if(!p){T=15;break e}}return l|0}while(0);(T|0)==15&&(q=o[848+(M*28|0)+(c<<2)>>2]|0,F=Be(q|0,0,45)|0,A=F|A,l=k()|0|l&-1040385,c=o[4272+(M*28|0)+(c<<2)>>2]|0,(q&127|0)==127&&(q=Be(o[848+(M*28|0)+20>>2]|0,0,45)|0,l=k()|0|l&-1040385,c=o[4272+(M*28|0)+20>>2]|0,A=Zo(q|A,l)|0,l=k()|0,o[d>>2]=(o[d>>2]|0)+1)),v=we(A|0,l|0,45)|0,k()|0,v=v&127;e:do if(an(v)|0){t:do if((Gr(A,l)|0)==1){if((M|0)!=(v|0))if(F3(v,o[7696+(M*28|0)>>2]|0)|0){A=T2(A,l)|0,g=1,l=k()|0;break}else wt(27634,26928,533,26936);switch(x|0){case 3:{A=Zo(A,l)|0,l=k()|0,o[d>>2]=(o[d>>2]|0)+1,g=0;break t}case 5:{A=T2(A,l)|0,l=k()|0,o[d>>2]=(o[d>>2]|0)+5,g=0;break t}case 0:return q=9,q|0;default:return q=1,q|0}}else g=0;while(0);if((c|0)>0){p=0;do A=b2(A,l)|0,l=k()|0,p=p+1|0;while((p|0)!=(c|0))}if((M|0)!=(v|0)){if(!(f2(v)|0)){if((g|0)!=0|(Gr(A,l)|0)!=5)break;o[d>>2]=(o[d>>2]|0)+1;break}switch(N&127){case 8:case 118:break e}(Gr(A,l)|0)!=3&&(o[d>>2]=(o[d>>2]|0)+1)}}else if((c|0)>0){p=0;do A=Zo(A,l)|0,l=k()|0,p=p+1|0;while((p|0)!=(c|0))}while(0);return o[d>>2]=((o[d>>2]|0)+c|0)%6|0,q=h,o[q>>2]=A,o[q+4>>2]=l,q=0,q|0}function ax(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,C3(A,l,c,d)|0?(yo(d|0,0,c*48|0)|0,d=Ax(A,l,c,d)|0,d|0):(d=0,d|0)}function C3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;if(q=I,I=I+16|0,B=q,F=q+8|0,N=B,o[N>>2]=A,o[N+4>>2]=l,(c|0)<0)return F=2,I=q,F|0;if(!c)return F=d,o[F>>2]=A,o[F+4>>2]=l,F=0,I=q,F|0;o[F>>2]=0;e:do if(Ht(A,l)|0)A=9;else{h=0,N=A;do{if(A=Hn(N,l,4,F,B)|0,A|0)break e;if(l=B,N=o[l>>2]|0,l=o[l+4>>2]|0,h=h+1|0,Ht(N,l)|0){A=9;break e}}while((h|0)<(c|0));M=d,o[M>>2]=N,o[M+4>>2]=l,M=c+-1|0,T=0,A=1;do{if(h=26864+(T<<2)|0,(T|0)==5)for(g=o[h>>2]|0,p=0,h=A;;){if(A=B,A=Hn(o[A>>2]|0,o[A+4>>2]|0,g,F,B)|0,A|0)break e;if((p|0)!=(M|0))if(x=B,v=o[x>>2]|0,x=o[x+4>>2]|0,A=d+(h<<3)|0,o[A>>2]=v,o[A+4>>2]=x,!(Ht(v,x)|0))A=h+1|0;else{A=9;break e}else A=h;if(p=p+1|0,(p|0)>=(c|0))break;h=A}else for(g=B,x=o[h>>2]|0,v=0,h=A,p=o[g>>2]|0,g=o[g+4>>2]|0;;){if(A=Hn(p,g,x,F,B)|0,A|0)break e;if(g=B,p=o[g>>2]|0,g=o[g+4>>2]|0,A=d+(h<<3)|0,o[A>>2]=p,o[A+4>>2]=g,A=h+1|0,Ht(p,g)|0){A=9;break e}if(v=v+1|0,(v|0)>=(c|0))break;h=A}T=T+1|0}while(T>>>0<6);A=B,A=(N|0)==(o[A>>2]|0)&&(l|0)==(o[A+4>>2]|0)?0:9}while(0);return F=A,I=q,F|0}function Ax(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0;if(N=I,I=I+16|0,g=N,!c)return o[d>>2]=A,o[d+4>>2]=l,d=0,I=N,d|0;do if((c|0)>=0){if((c|0)>13780509){if(h=ru(15,g)|0,h|0)break;p=g,h=o[p>>2]|0,p=o[p+4>>2]|0}else h=((c|0)<0)<<31>>31,M=ln(c|0,h|0,3,0)|0,p=k()|0,h=De(c|0,h|0,1,0)|0,h=ln(M|0,p|0,h|0,k()|0)|0,h=De(h|0,k()|0,1,0)|0,p=k()|0,M=g,o[M>>2]=h,o[M+4>>2]=p;if(T=Cr(h,8)|0,!T)h=13;else{if(M=Cr(h,4)|0,!M){Ie(T),h=13;break}if(h=ns(A,l,c,T,M,h,p,0)|0,h|0){Ie(T),Ie(M);break}if(l=o[g>>2]|0,g=o[g+4>>2]|0,(g|0)>0|(g|0)==0&l>>>0>0){h=0,v=0,x=0;do A=T+(v<<3)|0,p=o[A>>2]|0,A=o[A+4>>2]|0,!((p|0)==0&(A|0)==0)&&(o[M+(v<<2)>>2]|0)==(c|0)&&(B=d+(h<<3)|0,o[B>>2]=p,o[B+4>>2]=A,h=h+1|0),v=De(v|0,x|0,1,0)|0,x=k()|0;while((x|0)<(g|0)|(x|0)==(g|0)&v>>>0<l>>>0)}Ie(T),Ie(M),h=0}}else h=2;while(0);return B=h,I=N,B|0}function eu(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0;for(v=I,I=I+16|0,p=v,g=v+8|0,h=(Ht(A,l)|0)==0,h=h?1:2;;){if(o[g>>2]=0,T=(Hn(A,l,h,g,p)|0)==0,x=p,T&((o[x>>2]|0)==(c|0)?(o[x+4>>2]|0)==(d|0):0)){A=4;break}if(h=h+1|0,h>>>0>=7){h=7,A=4;break}}return(A|0)==4?(I=v,h|0):0}function lx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0;if(v=I,I=I+48|0,h=v+16|0,p=v+8|0,g=v,c=e0(c)|0,c|0)return g=c,I=v,g|0;if(T=A,x=o[T+4>>2]|0,c=p,o[c>>2]=o[T>>2],o[c+4>>2]=x,K3(p,h),c=I3(h,l,g)|0,!c){if(l=o[p>>2]|0,p=o[A+8>>2]|0,(p|0)>0){h=o[A+12>>2]|0,c=0;do l=(o[h+(c<<3)>>2]|0)+l|0,c=c+1|0;while((c|0)<(p|0))}c=g,h=o[c>>2]|0,c=o[c+4>>2]|0,p=((l|0)<0)<<31>>31,(c|0)<(p|0)|(c|0)==(p|0)&h>>>0<l>>>0?(c=g,o[c>>2]=l,o[c+4>>2]=p,c=p):l=h,x=De(l|0,c|0,12,0)|0,T=k()|0,c=g,o[c>>2]=x,o[c+4>>2]=T,c=d,o[c>>2]=x,o[c+4>>2]=T,c=0}return T=c,I=v,T|0}function P3(A,l,c,d,h,p,g){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0,g=g|0;var v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0,St=0,Nt=0,or=0,ct=0,Rt=0,Pr=0;if(Nt=I,I=I+64|0,ze=Nt+48|0,Ne=Nt+32|0,Fe=Nt+24|0,me=Nt+8|0,be=Nt,x=o[A>>2]|0,(x|0)<=0)return St=0,I=Nt,St|0;for(ce=A+4|0,oe=ze+8|0,Le=Ne+8|0,_e=me+8|0,v=0,Ae=0;;){T=o[ce>>2]|0,$=T+(Ae<<4)|0,o[ze>>2]=o[$>>2],o[ze+4>>2]=o[$+4>>2],o[ze+8>>2]=o[$+8>>2],o[ze+12>>2]=o[$+12>>2],(Ae|0)==(x+-1|0)?(o[Ne>>2]=o[T>>2],o[Ne+4>>2]=o[T+4>>2],o[Ne+8>>2]=o[T+8>>2],o[Ne+12>>2]=o[T+12>>2]):($=T+(Ae+1<<4)|0,o[Ne>>2]=o[$>>2],o[Ne+4>>2]=o[$+4>>2],o[Ne+8>>2]=o[$+8>>2],o[Ne+12>>2]=o[$+12>>2]),x=wx(ze,Ne,d,Fe)|0;e:do if(x)T=0,v=x;else if(x=Fe,T=o[x>>2]|0,x=o[x+4>>2]|0,(x|0)>0|(x|0)==0&T>>>0>0){se=0,$=0;t:for(;;){if(ct=1/(+(T>>>0)+4294967296*+(x|0)),Pr=+z[ze>>3],x=Wn(T|0,x|0,se|0,$|0)|0,Rt=+(x>>>0)+4294967296*+(k()|0),or=+(se>>>0)+4294967296*+($|0),z[me>>3]=ct*(Pr*Rt)+ct*(+z[Ne>>3]*or),z[_e>>3]=ct*(+z[oe>>3]*Rt)+ct*(+z[Le>>3]*or),x=w2(me,d,be)|0,x|0){v=x;break}X=be,H=o[X>>2]|0,X=o[X+4>>2]|0,B=Gs(H|0,X|0,l|0,c|0)|0,M=k()|0,x=g+(B<<3)|0,N=x,T=o[N>>2]|0,N=o[N+4>>2]|0;n:do if((T|0)==0&(N|0)==0)ee=x,St=16;else for(F=0,q=0;;){if((F|0)>(c|0)|(F|0)==(c|0)&q>>>0>l>>>0){v=1;break t}if((T|0)==(H|0)&(N|0)==(X|0))break n;if(x=De(B|0,M|0,1,0)|0,B=go(x|0,k()|0,l|0,c|0)|0,M=k()|0,q=De(q|0,F|0,1,0)|0,F=k()|0,x=g+(B<<3)|0,N=x,T=o[N>>2]|0,N=o[N+4>>2]|0,(T|0)==0&(N|0)==0){ee=x,St=16;break}}while(0);if((St|0)==16&&(St=0,!((H|0)==0&(X|0)==0))&&(q=ee,o[q>>2]=H,o[q+4>>2]=X,q=p+(o[h>>2]<<3)|0,o[q>>2]=H,o[q+4>>2]=X,q=h,q=De(o[q>>2]|0,o[q+4>>2]|0,1,0)|0,H=k()|0,X=h,o[X>>2]=q,o[X+4>>2]=H),se=De(se|0,$|0,1,0)|0,$=k()|0,x=Fe,T=o[x>>2]|0,x=o[x+4>>2]|0,!((x|0)>($|0)|(x|0)==($|0)&T>>>0>se>>>0)){T=1;break e}}T=0}else T=1;while(0);if(Ae=Ae+1|0,!T){St=21;break}if(x=o[A>>2]|0,(Ae|0)>=(x|0)){v=0,St=21;break}}return(St|0)==21?(I=Nt,v|0):0}function ux(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0,St=0,Nt=0,or=0,ct=0,Rt=0;if(Rt=I,I=I+112|0,St=Rt+80|0,x=Rt+72|0,Nt=Rt,or=Rt+56|0,h=e0(c)|0,h|0)return ct=h,I=Rt,ct|0;if(T=A+8|0,ct=An((o[T>>2]<<5)+32|0)|0,!ct)return ct=13,I=Rt,ct|0;
15if(P2(A,ct),h=e0(c)|0,!h){if(Ne=A,Fe=o[Ne+4>>2]|0,h=x,o[h>>2]=o[Ne>>2],o[h+4>>2]=Fe,K3(x,St),h=I3(St,l,Nt)|0,h)Ne=0,Fe=0;else{if(h=o[x>>2]|0,p=o[T>>2]|0,(p|0)>0){g=o[A+12>>2]|0,c=0;do h=(o[g+(c<<3)>>2]|0)+h|0,c=c+1|0;while((c|0)!=(p|0));c=h}else c=h;h=Nt,p=o[h>>2]|0,h=o[h+4>>2]|0,g=((c|0)<0)<<31>>31,(h|0)<(g|0)|(h|0)==(g|0)&p>>>0<c>>>0?(h=Nt,o[h>>2]=c,o[h+4>>2]=g,h=g):c=p,Ne=De(c|0,h|0,12,0)|0,Fe=k()|0,h=Nt,o[h>>2]=Ne,o[h+4>>2]=Fe,h=0}if(!h){if(c=Cr(Ne,8)|0,!c)return Ie(ct),ct=13,I=Rt,ct|0;if(v=Cr(Ne,8)|0,!v)return Ie(ct),Ie(c),ct=13,I=Rt,ct|0;_e=St,o[_e>>2]=0,o[_e+4>>2]=0,_e=A,ze=o[_e+4>>2]|0,h=x,o[h>>2]=o[_e>>2],o[h+4>>2]=ze,h=P3(x,Ne,Fe,l,St,c,v)|0;e:do if(h)Ie(c),Ie(v),Ie(ct);else{t:do if((o[T>>2]|0)>0){for(g=A+12|0,p=0;h=P3((o[g>>2]|0)+(p<<3)|0,Ne,Fe,l,St,c,v)|0,p=p+1|0,!(h|0);)if((p|0)>=(o[T>>2]|0))break t;Ie(c),Ie(v),Ie(ct);break e}while(0);(Fe|0)>0|(Fe|0)==0&Ne>>>0>0&&yo(v|0,0,Ne<<3|0)|0,ze=St,_e=o[ze+4>>2]|0;t:do if((_e|0)>0|(_e|0)==0&(o[ze>>2]|0)>>>0>0){ce=c,oe=v,Le=c,_e=v,ze=c,h=c,ee=c,me=v,be=v,c=v;n:for(;;){for(X=0,se=0,$=0,Ae=0,p=0,g=0;;){v=Nt,x=v+56|0;do o[v>>2]=0,v=v+4|0;while((v|0)<(x|0));if(l=ce+(X<<3)|0,T=o[l>>2]|0,l=o[l+4>>2]|0,R3(T,l,1,Nt,0)|0){v=Nt,x=v+56|0;do o[v>>2]=0,v=v+4|0;while((v|0)<(x|0));v=Cr(7,4)|0,v|0&&(ns(T,l,1,Nt,v,7,0,0)|0,Ie(v))}for(H=0;;){q=Nt+(H<<3)|0,F=o[q>>2]|0,q=o[q+4>>2]|0;r:do if((F|0)==0&(q|0)==0)v=p,x=g;else{if(M=Gs(F|0,q|0,Ne|0,Fe|0)|0,T=k()|0,v=d+(M<<3)|0,l=v,x=o[l>>2]|0,l=o[l+4>>2]|0,!((x|0)==0&(l|0)==0)){N=0,B=0;do{if((N|0)>(Fe|0)|(N|0)==(Fe|0)&B>>>0>Ne>>>0)break n;if((x|0)==(F|0)&(l|0)==(q|0)){v=p,x=g;break r}v=De(M|0,T|0,1,0)|0,M=go(v|0,k()|0,Ne|0,Fe|0)|0,T=k()|0,B=De(B|0,N|0,1,0)|0,N=k()|0,v=d+(M<<3)|0,l=v,x=o[l>>2]|0,l=o[l+4>>2]|0}while(!((x|0)==0&(l|0)==0))}if((F|0)==0&(q|0)==0){v=p,x=g;break}Ga(F,q,or)|0,B2(A,ct,or)|0&&(B=De(p|0,g|0,1,0)|0,g=k()|0,N=v,o[N>>2]=F,o[N+4>>2]=q,p=oe+(p<<3)|0,o[p>>2]=F,o[p+4>>2]=q,p=B),v=p,x=g}while(0);if(H=H+1|0,H>>>0>=7)break;p=v,g=x}if(X=De(X|0,se|0,1,0)|0,se=k()|0,$=De($|0,Ae|0,1,0)|0,Ae=k()|0,g=St,p=o[g>>2]|0,g=o[g+4>>2]|0,(Ae|0)<(g|0)|(Ae|0)==(g|0)&$>>>0<p>>>0)p=v,g=x;else break}if((g|0)>0|(g|0)==0&p>>>0>0){p=0,g=0;do Ae=ce+(p<<3)|0,o[Ae>>2]=0,o[Ae+4>>2]=0,p=De(p|0,g|0,1,0)|0,g=k()|0,Ae=St,$=o[Ae+4>>2]|0;while((g|0)<($|0)|((g|0)==($|0)?p>>>0<(o[Ae>>2]|0)>>>0:0))}if(Ae=St,o[Ae>>2]=v,o[Ae+4>>2]=x,(x|0)>0|(x|0)==0&v>>>0>0)H=c,X=be,se=ze,$=me,Ae=oe,c=ee,be=h,me=Le,ee=H,h=X,ze=_e,_e=se,Le=$,oe=ce,ce=Ae;else break t}Ie(Le),Ie(_e),Ie(ct),h=1;break e}else h=v;while(0);Ie(ct),Ie(c),Ie(h),h=0}while(0);return ct=h,I=Rt,ct|0}}return Ie(ct),ct=h,I=Rt,ct|0}function cx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0;if(v=I,I=I+16|0,g=v,A=Mx(A,l,((l|0)<0)<<31>>31,g)|0,A|0)return g=A,I=v,g|0;if(p=ab(g,c)|0,c=g+4|0,(o[g>>2]|0)>0){l=0;do{if(h=o[c>>2]|0,d=h+(l<<4)+4|0,Ie(o[d>>2]|0),o[d>>2]=0,o[h+(l<<4)>>2]=0,d=h+(l<<4)+8|0,h=h+(l<<4)+12|0,(o[d>>2]|0)>0){A=0;do x=o[h>>2]|0,T=x+(A<<3)+4|0,Ie(o[T>>2]|0),o[T>>2]=0,o[x+(A<<3)>>2]=0,A=A+1|0;while((A|0)<(o[d>>2]|0))}Ie(o[h>>2]|0),o[h>>2]=0,o[d>>2]=0,l=l+1|0}while((l|0)<(o[g>>2]|0))}return Ie(o[c>>2]|0),o[c>>2]=0,o[g>>2]=0,T=p,I=v,T|0}function pi(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0;if(g=o[A>>2]|0,(g|0)<=0)return h=0,d=0,g=h<0,d=12.566370614359172-d,d=h+d,h=g?d:h,z[l>>3]=h,0;if(p=o[A+4>>2]|0,A=(g|0)!=1&1,v=+z[p>>3]*.5+.7853981633974483,h=+z[p+(A<<4)>>3]*.5+.7853981633974483,c=+tn(+v)*+tn(+h),d=+z[p+(A<<4)+8>>3]-+z[p+8>>3],c=+Rr(+(+tn(+d)*c),+(+Zt(+v)*+Zt(+h)+ +Zt(+d)*c))*-2,d=c+0,c=d-c,(g|0)==1)return v=d,h=c,g=v<0,h=12.566370614359172-h,h=v+h,v=g?h:v,z[l>>3]=v,0;for(A=1,h=d;M=A,A=A+1|0,N=(A|0)%(g|0)|0,T=+z[p+(M<<4)>>3]*.5+.7853981633974483,x=+z[p+(N<<4)>>3]*.5+.7853981633974483,d=+tn(+T)*+tn(+x),v=+z[p+(N<<4)+8>>3]-+z[p+(M<<4)+8>>3],c=+Rr(+(+tn(+v)*d),+(+Zt(+T)*+Zt(+x)+ +Zt(+v)*d))*-2-c,d=h+c,c=d-h-c,!((A|0)>=(g|0));)h=d;return N=d<0,T=12.566370614359172-c,T=d+T,T=N?T:d,z[l>>3]=T,0}function fx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return g=I,I=I+192|0,d=g+176|0,h=g,p=g+168|0,A=Jo(A,l,h)|0,A|0?(p=A,I=g,p|0):(o[p>>2]=o[h>>2],o[p+4>>2]=h+8,o[d>>2]=o[p>>2],o[d+4>>2]=o[p+4>>2],pi(d,c)|0,p=0,I=g,p|0)}function hx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return g=I,I=I+192|0,d=g+176|0,h=g,p=g+168|0,A=Jo(A,l,h)|0,A?(p=A,I=g,p|0):(o[p>>2]=o[h>>2],o[p+4>>2]=h+8,o[d>>2]=o[p>>2],o[d+4>>2]=o[p+4>>2],pi(d,c)|0,z[c>>3]=+z[c>>
153]*4058973249931477e-8,p=0,I=g,p|0)}function dx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return g=I,I=I+192|0,d=g+176|0,h=g,p=g+168|0,A=Jo(A,l,h)|0,A?(p=A,I=g,p|0):(o[p>>2]=o[h>>2],o[p+4>>2]=h+8,o[d>>2]=o[p>>2],o[d+4>>2]=o[p+4>>2],pi(d,c)|0,z[c>>3]=+z[c>>3]*4058973249931477e-8*1e6,p=0,I=g,p|0)}function an(A){return A=A|0,A>>>0>121?(A=0,A|0):(A=o[7696+(A*28|0)+16>>2]|0,A|0)}function f2(A){return A=A|0,(A|0)==4|(A|0)==117|0}function B3(A){return A=A|0,o[11120+((o[A>>2]|0)*216|0)+((o[A+4>>2]|0)*72|0)+((o[A+8>>2]|0)*24|0)+(o[A+12>>2]<<3)>>2]|0}function px(A){return A=A|0,o[11120+((o[A>>2]|0)*216|0)+((o[A+4>>2]|0)*72|0)+((o[A+8>>2]|0)*24|0)+(o[A+12>>2]<<3)+4>>2]|0}function mx(A,l){A=A|0,l=l|0,A=7696+(A*28|0)|0,o[l>>2]=o[A>>2],o[l+4>>2]=o[A+4>>2],o[l+8>>2]=o[A+8>>2],o[l+12>>2]=o[A+12>>2]}function gx(A,l){A=A|0,l=l|0;var c=0,d=0;if(l>>>0>20)return l=-1,l|0;do if((o[11120+(l*216|0)>>2]|0)!=(A|0))if((o[11120+(l*216|0)+8>>2]|0)!=(A|0))if((o[11120+(l*216|0)+16>>2]|0)!=(A|0))if((o[11120+(l*216|0)+24>>2]|0)!=(A|0))if((o[11120+(l*216|0)+32>>2]|0)!=(A|0))if((o[11120+(l*216|0)+40>>2]|0)!=(A|0))if((o[11120+(l*216|0)+48>>2]|0)!=(A|0))if((o[11120+(l*216|0)+56>>2]|0)!=(A|0))if((o[11120+(l*216|0)+64>>2]|0)!=(A|0))if((o[11120+(l*216|0)+72>>2]|0)!=(A|0))if((o[11120+(l*216|0)+80>>2]|0)!=(A|0))if((o[11120+(l*216|0)+88>>2]|0)!=(A|0))if((o[11120+(l*216|0)+96>>2]|0)!=(A|0))if((o[11120+(l*216|0)+104>>2]|0)!=(A|0))if((o[11120+(l*216|0)+112>>2]|0)!=(A|0))if((o[11120+(l*216|0)+120>>2]|0)!=(A|0))if((o[11120+(l*216|0)+128>>2]|0)!=(A|0))if((o[11120+(l*216|0)+136>>2]|0)==(A|0))A=2,c=1,d=2;else{if((o[11120+(l*216|0)+144>>2]|0)==(A|0)){A=0,c=2,d=0;break}if((o[11120+(l*216|0)+152>>2]|0)==(A|0)){A=0,c=2,d=1;break}if((o[11120+(l*216|0)+160>>2]|0)==(A|0)){A=0,c=2,d=2;break}if((o[11120+(l*216|0)+168>>2]|0)==(A|0)){A=1,c=2,d=0;break}if((o[11120+(l*216|0)+176>>2]|0)==(A|0)){A=1,c=2,d=1;break}if((o[11120+(l*216|0)+184>>2]|0)==(A|0)){A=1,c=2,d=2;break}if((o[11120+(l*216|0)+192>>2]|0)==(A|0)){A=2,c=2,d=0;break}if((o[11120+(l*216|0)+200>>2]|0)==(A|0)){A=2,c=2,d=1;break}if((o[11120+(l*216|0)+208>>2]|0)==(A|0)){A=2,c=2,d=2;break}else A=-1;return A|0}else A=2,c=1,d=1;else A=2,c=1,d=0;else A=1,c=1,d=2;else A=1,c=1,d=1;else A=1,c=1,d=0;else A=0,c=1,d=2;else A=0,c=1,d=1;else A=0,c=1,d=0;else A=2,c=0,d=2;else A=2,c=0,d=1;else A=2,c=0,d=0;else A=1,c=0,d=2;else A=1,c=0,d=1;else A=1,c=0,d=0;else A=0,c=0,d=2;else A=0,c=0,d=1;else A=0,c=0,d=0;while(0);return l=o[11120+(l*216|0)+(c*72|0)+(A*24|0)+(d<<3)+4>>2]|0,l|0}function F3(A,l){return A=A|0,l=l|0,(o[7696+(A*28|0)+20>>2]|0)==(l|0)?(l=1,l|0):(l=(o[7696+(A*28|0)+24>>2]|0)==(l|0),l|0)}function h2(A,l){return A=A|0,l=l|0,o[848+(A*28|0)+(l<<2)>>2]|0}function d2(A,l){return A=A|0,l=l|0,(o[848+(A*28|0)>>2]|0)==(l|0)?(l=0,l|0):(o[848+(A*28|0)+4>>2]|0)==(l|0)?(l=1,l|0):(o[848+(A*28|0)+8>>2]|0)==(l|0)?(l=2,l|0):(o[848+(A*28|0)+12>>2]|0)==(l|0)?(l=3,l|0):(o[848+(A*28|0)+16>>2]|0)==(l|0)?(l=4,l|0):(o[848+(A*28|0)+20>>2]|0)==(l|0)?(l=5,l|0):((o[848+(A*28|0)+24>>2]|0)==(l|0)?6:7)|0}function yx(){return 122}function vx(A){A=A|0;var l=0,c=0,d=0;l=0;do Be(l|0,0,45)|0,d=k()|0|134225919,c=A+(l<<3)|0,o[c>>2]=-1,o[c+4>>2]=d,l=l+1|0;while((l|0)!=122);return 0}function _x(A){A=A|0;var l=0,c=0,d=0;return d=+z[A+16>>3],c=+z[A+24>>3],l=d-c,+(d<c?l+6.283185307179586:l)}function xx(A){return A=A|0,+z[A+16>>3]<+z[A+24>>3]|0}function bx(A){return A=A|0,+(+z[A>>3]-+z[A+8>>3])}function D3(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;return c=+z[l>>3],!(c>=+z[A+8>>3])||!(c<=+z[A>>3])?(l=0,l|0):(d=+z[A+16>>3],c=+z[A+24>>3],h=+z[l+8>>3],l=h>=c,A=h<=d&1,d<c?l&&(A=1):l||(A=0),l=(A|0)!=0,l|0)}function p2(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;return+z[A>>3]<+z[l+8>>3]||+z[A+8>>3]>+z[l>>3]?(d=0,d|0):(p=+z[A+16>>3],c=A+24|0,M=+z[c>>3],g=p<M,d=l+16|0,T=+z[d>>3],h=l+24|0,x=+z[h>>3],v=T<x,l=M-T<x-p,A=g?v|l?1:2:0,l=v?g?1:l?2:1:0,p=+ri(p,A),p<+ri(+z[h>>3],l)||(M=+ri(+z[c>>3],A),M>+ri(+z[d>>3],l))?(v=0,v|0):(v=1,v|0))}function Tx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0;p=+z[A+16>>3],x=+z[A+24>>3],A=p<x,v=+z[l+16>>3],g=+z[l+24>>3],h=v<g,l=x-v<g-p,o[c>>2]=A?h|l?1:2:0,o[d>>2]=h?A?1:l?2:1:0}function L3(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;return+z[A>>3]<+z[l>>3]||+z[A+8>>3]>+z[l+8>>3]?(d=0,d|0):(d=A+16|0,x=+z[d>>3],p=+z[A+24>>3],g=x<p,c=l+16|0,M=+z[c>>3],h=l+24|0,T=+z[h>>3],v=M<T,l=p-M<T-x,A=g?v|l?1:2:0,l=v?g?1:l?2:1:0,p=+ri(p,A),p<=+ri(+z[h>>3],l)?(M=+ri(+z[d>>3],A),v=M>=+ri(+z[c>>3],l),v|0):(v=0,v|0))}function q3(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0;h=I,I=I+176|0,d=h,o[d>>2]=4,v=+z[l>>3],z[d+8>>3]=v,p=+z[l+16>>3],z[d+16>>3]=p,z[d+24>>3]=v,v=+z[l+24>>3],z[d+32>>3]=v,g=+z[l+8>>3],z[d+40>>3]=g,z[d+48>>3]=v,z[d+56>>3]=g,z[d+64>>3]=p,l=d+72|0,c=l+96|0;do o[l>>
152]=0,l=l+4|0;while((l|0)<(c|0));Li(A|0,d|0,168)|0,I=h}function I3(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0;q=I,I=I+288|0,M=q+264|0,N=q+96|0,T=q,v=T,x=v+96|0;do o[v>>2]=0,v=v+4|0;while((v|0)<(x|0));return l=M2(l,T)|0,l|0?(F=l,I=q,F|0):(x=T,T=o[x>>2]|0,x=o[x+4>>2]|0,Ga(T,x,M)|0,Jo(T,x,N)|0,g=+KA(M,N+8|0),z[M>>3]=+z[A>>3],x=M+8|0,z[x>>3]=+z[A+16>>3],z[N>>3]=+z[A+8>>3],T=N+8|0,z[T>>3]=+z[A+24>>3],h=+KA(M,N),X=+z[x>>3]-+z[T>>3],p=+Kt(+X),H=+z[M>>3]-+z[N>>3],d=+Kt(+H),!(X==0|H==0)&&(X=+u4(+p,+d),X=+ka(+(h*h/+uu(+(X/+uu(+p,+d)),3)/(g*(g*2.59807621135)*.8))),z[ht>>3]=X,B=~~X>>>0,F=+Kt(X)>=1?X>0?~~+c2(+Zn(X/4294967296),4294967295)>>>0:~~+ka((X-+(~~X>>>0))/4294967296)>>>0:0,(o[ht+4>>2]&2146435072|0)!=2146435072)?(N=(B|0)==0&(F|0)==0,l=c,o[l>>2]=N?1:B,o[l+4>>2]=N?0:F,l=0):l=1,F=l,I=q,F|0)}function wx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0;T=I,I=I+288|0,g=T+264|0,v=T+96|0,x=T,h=x,p=h+96|0;do o[h>>2]=0,h=h+4|0;while((h|0)<(p|0));return c=M2(c,x)|0,c|0?(d=c,I=T,d|0):(c=x,h=o[c>>2]|0,c=o[c+4>>2]|0,Ga(h,c,g)|0,Jo(h,c,v)|0,M=+KA(g,v+8|0),M=+ka(+(+KA(A,l)/(M*2))),z[ht>>3]=M,c=~~M>>>0,h=+Kt(M)>=1?M>0?~~+c2(+Zn(M/4294967296),4294967295)>>>0:~~+ka((M-+(~~M>>>0))/4294967296)>>>0:0,(o[ht+4>>2]&2146435072|0)==2146435072?(d=1,I=T,d|0):(x=(c|0)==0&(h|0)==0,o[d>>2]=x?1:c,o[d+4>>2]=x?0:h,d=0,I=T,d|0))}function Sx(A,l){A=A|0,l=+l;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;p=A+16|0,g=+z[p>>3],c=A+24|0,h=+z[c>>3],d=g-h,d=g<h?d+6.283185307179586:d,T=+z[A>>3],v=A+8|0,x=+z[v>>3],M=T-x,d=(d*l-d)*.5,l=(M*l-M)*.5,T=T+l,z[A>>3]=T>1.5707963267948966?1.5707963267948966:T,l=x-l,z[v>>3]=l<-1.5707963267948966?-1.5707963267948966:l,l=g+d,l=l>3.141592653589793?l+-6.283185307179586:l,z[p>>3]=l<-3.141592653589793?l+6.283185307179586:l,l=h-d,l=l>3.141592653589793?l+-6.283185307179586:l,z[c>>3]=l<-3.141592653589793?l+6.283185307179586:l}function Mx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0;if(Fe=I,I=I+224|0,Le=Fe,me=Fe+48|0,x=(c|0)>0|(c|0)==0&l>>>0>0,x&(c>>>0>0|(c|0)==0&l>>>0>17895697))return Ne=14,I=Fe,Ne|0;if((c|0)<0)return Ne=2,I=Fe,Ne|0;if((l|0)==0&(c|0)==0)return o[d>>2]=0,o[d+4>>2]=0,Ne=0,I=Fe,Ne|0;for(h=A,h=v2(o[h>>2]|0,o[h+4>>2]|0)|0,g=0,v=0;;){if(p=A+(g<<3)|0,Ne=p,!(nu(o[Ne>>2]|0,o[Ne+4>>2]|0)|0)){h=5,_e=159;break}if(Ne=p,Ne=(v2(o[Ne>>2]|0,o[Ne+4>>2]|0)|0)==(h|0),g=De(g|0,v|0,1,0)|0,v=k()|0,!Ne){h=12,_e=159;break}if(!((v|0)<(c|0)|(v|0)==(c|0)&g>>>0<l>>>0)){_e=8;break}}if((_e|0)==8){do if((c|0)>0|(c|0)==0&l>>>0>1){if(h=l<<3,g=An(h)|0,!g)return Ne=13,I=Fe,Ne|0;for(Li(g|0,A|0,h|0)|0,ou(g,l,8,1),h=1,p=0;ze=g+(h<<3)|0,Ne=g+(h+-1<<3)|0,Ne=(o[ze>>2]|0)==(o[Ne>>2]|0)?(o[ze+4>>2]|0)==(o[Ne+4>>2]|0):0,h=De(h|0,p|0,1,0)|0,p=k()|0,!Ne;)if(!((p|0)<(c|0)|(p|0)==(c|0)&h>>>0<l>>>0)){_e=14;break}if((_e|0)==14){Ie(g);break}return Ie(g),Ne=10,I=Fe,Ne|0}while(0);if(h=ln(l|0,c|0,6,0)|0,p=k()|0,x){g=0,v=0;do Ne=A+(v<<3)|0,Ne=((Ht(o[Ne>>2]|0,o[Ne+4>>2]|0)|0)!=0)<<31>>31,h=De(h|0,p|0,Ne|0,((Ne|0)<0)<<31>>31|0)|0,p=k()|0,v=De(v|0,g|0,1,0)|0,g=k()|0;while((g|0)<(c|0)|(g|0)==(c|0)&v>>>0<l>>>0);ee=h,Ae=p}else ee=h,Ae=p;if(se=ln(ee|0,Ae|0,10,0)|0,$=k()|0,ze=An(ee<<5)|0,!ze)return Ne=13,I=Fe,Ne|0;if(Ne=Cr(se,4)|0,!Ne)return Ie(ze),Ne=13,I=Fe,Ne|0;e:do if(x){for(oe=A,m2(o[oe>>2]|0,o[oe+4>>2]|0,Le)|0,F=ze,q=0,H=0,h=0,X=0;;){x=Le,x=(o[x>>2]|0)==0&(o[x+4>>2]|0)==0,p=x?26990:26995,g=x?5:6,v=0,x=Le+((x&1)<<3)|0,T=De(g|0,v|0,-1,-1)|0,M=k()|0,N=0,B=0;do ce=x+(N<<3)|0,be=o[ce+4>>2]|0,oe=F+(N<<5)|0,o[oe>>2]=o[ce>>2],o[oe+4>>2]=be,ve[F+(N<<5)+9>>0]=0,ve[F+(N<<5)+8>>0]=0,o[F+(N<<5)+20>>2]=F,oe=F+(N<<5)+24|0,o[oe>>2]=1,o[oe+4>>2]=0,oe=ve[p+N>>0]|0,be=De(T|0,M|0,N|0,B|0)|0,be=Gs(be|0,k()|0,g|0,v|0)|0,k()|0,be=ve[p+be>>0]|0,N=De(N|0,B|0,1,0)|0,B=k()|0,ce=ve[p+((N|0)==(g|0)&(B|0)==(v|0)?0:N)>>0]|0,oe=oe&255,o[F+(oe<<5)+16>>2]=F+((be&255)<<5),o[F+(oe<<5)+12>>2]=F+((ce&255)<<5);while(B>>>0<v>>>0|(B|0)==(v|0)&N>>>0<g>>>0);if(q=De(q|0,H|0,1,0)|0,H=k()|0,h=De(g|0,v|0,h|0,X|0)|0,X=k()|0,!((H|0)<(c|0)|(H|0)==(c|0)&q>>>0<l>>>0))break e;oe=A+(q<<3)|0,m2(o[oe>>2]|0,o[oe+4>>2]|0,Le)|0||(F=ze+(h<<5)|0)}wt(27634,26956,108,26975)}while(0);if((Ae|0)>0|(Ae|0)==0&ee>>>0>0){v=0,x=0;do{if(p=ze+(v<<5)|0,g=o[p>>2]|0,p=o[p+4>>2]|0,h=we(g|0,p|0,30)|0,p=ln(h^g|0,(k()|0)^p|0,484763065,-1084733587)|0,g=k()|0,h=we(p|0,g|0,27)|0,g=ln(h^p|0,(k()|0)^g|0,321982955,-1798288965)|0,p=k()|0,h=we(g|0,p|0,31)|0,p=Gs(h^g|0,(k()|0)^p|0,se|0,$|0)|0,g=k()|0,h=Ne+(p<<2)|0,o[h>>2]|0)do h=De(p|0,g|0,1,0)|0,p=go(h|0,k()|0,se|0,$|0)|0,g=k()|0,h=Ne+(p<<2)|0;while(o[h>>2]|0);o[h>>2]=ze+(v<<5),v=De(v|0,x|0,1,0)|0,x=k()|0}
15while((x|0)<(Ae|0)|(x|0)==(Ae|0)&v>>>0<ee>>>0);N=0,B=0;do{if(v=ze+(N<<5)|0,x=ze+(N<<5)+9|0,!(ve[x>>0]|0)){if(oe=v,U3(o[oe>>2]|0,o[oe+4>>2]|0,Le)|0){_e=39;break}M=Le,T=o[M>>2]|0,M=o[M+4>>2]|0,p=we(T|0,M|0,30)|0,p=ln(p^T|0,(k()|0)^M|0,484763065,-1084733587)|0,g=k()|0,h=we(p|0,g|0,27)|0,g=ln(h^p|0,(k()|0)^g|0,321982955,-1798288965)|0,p=k()|0,h=we(g|0,p|0,31)|0,p=Gs(h^g|0,(k()|0)^p|0,se|0,$|0)|0,g=k()|0,h=o[Ne+(p<<2)>>2]|0;e:do if(h|0){for(;oe=h,!((o[oe>>2]|0)==(T|0)&&(o[oe+4>>2]|0)==(M|0));)if(h=De(p|0,g|0,1,0)|0,p=go(h|0,k()|0,se|0,$|0)|0,g=k()|0,h=o[Ne+(p<<2)>>2]|0,!h)break e;ve[x>>0]=1,ve[h+9>>0]=1,p=h+16|0,oe=ze+(N<<5)+12|0,o[(o[oe>>2]|0)+16>>2]=o[p>>2],c=h+12|0,ce=o[ze+(N<<5)+16>>2]|0,o[ce+12>>2]=o[c>>2],o[(o[c>>2]|0)+16>>2]=ce,o[(o[p>>2]|0)+12>>2]=o[oe>>2],p=tu(v)|0,oe=tu(h)|0,h=p+24|0,c=o[h+4>>2]|0,ce=oe+24|0,be=o[ce+4>>2]|0,ce=(c|0)<(be|0)|((c|0)==(be|0)?(o[h>>2]|0)>>>0<(o[ce>>2]|0)>>>0:0),h=ce?p:oe,p=ce?oe:p,(p|0)!=(h|0)&&(be=h+24|0,oe=p+24|0,ce=oe,be=De(o[ce>>2]|0,o[ce+4>>2]|0,o[be>>2]|0,o[be+4>>2]|0)|0,ce=k()|0,o[oe>>2]=be,o[oe+4>>2]=ce,o[h+20>>2]=p)}while(0)}N=De(N|0,B|0,1,0)|0,B=k()|0}while((B|0)<(Ae|0)|(B|0)==(Ae|0)&N>>>0<ee>>>0);(_e|0)==39&&wt(27634,26956,258,27001),h=0,p=0;do ve[ze+(h<<5)+8>>0]=0,h=De(h|0,p|0,1,0)|0,p=k()|0;while((p|0)<(Ae|0)|(p|0)==(Ae|0)&h>>>0<ee>>>0);for(T=0,g=0,x=0,M=0;;){if(h=ze+(T<<5)|0,!(ve[ze+(T<<5)+8>>0]|0)&&!(ve[ze+(T<<5)+9>>0]|0)){v=h,p=o[v>>2]|0,v=o[v+4>>2]|0;do ve[h+8>>0]=1,h=o[h+12>>2]|0,oe=h;while(!((o[oe>>2]|0)==(p|0)&&(o[oe+4>>2]|0)==(v|0)));g=De(g|0,x|0,1,0)|0,v=k()|0}else v=x;if(T=De(T|0,M|0,1,0)|0,M=k()|0,(M|0)<(Ae|0)|(M|0)==(Ae|0)&T>>>0<ee>>>0)x=v;else break}h=0,p=0;do ve[ze+(h<<5)+8>>0]=0,h=De(h|0,p|0,1,0)|0,p=k()|0;while((p|0)<(Ae|0)|(p|0)==(Ae|0)&h>>>0<ee>>>0);ce=g,be=v,h=1}else ce=0,be=0,h=0;oe=An(ce*24|0)|0;e:do if(oe|0){t:do if(h){A=0,se=0,c=0,l=0;n:for(;;){if(h=ze+(A<<5)|0,!(ve[ze+(A<<5)+8>>0]|0)&&!(ve[ze+(A<<5)+9>>0]|0)){X=h,H=o[X>>2]|0,X=o[X+4>>2]|0,p=0,g=0;do p=De(p|0,g|0,2,0)|0,g=k()|0,h=o[h+12>>2]|0,$=h;while(!((o[$>>2]|0)==(H|0)&&(o[$+4>>2]|0)==(X|0)));if(q=An(p<<4)|0,!q)break;p=H,g=X,F=0,B=0,v=0,x=0;do{if(WA(p,g,me)|0){_e=69;break n}if($=o[me>>2]|0,M=$+-1|0,N=((M|0)<0)<<31>>31,($|0)>1){g=v,T=0,p=x,v=0;do $=q+(g<<4)|0,x=me+8+(T<<4)|0,o[$>>2]=o[x>>2],o[$+4>>2]=o[x+4>>2],o[$+8>>2]=o[x+8>>2],o[$+12>>2]=o[x+12>>2],g=De(g|0,p|0,1,0)|0,p=k()|0,T=De(T|0,v|0,1,0)|0,v=k()|0;while((v|0)<(N|0)|(v|0)==(N|0)&T>>>0<M>>>0);v=g,x=p}F=De(F|0,B|0,M|0,N|0)|0,B=k()|0,ve[h+8>>0]=1,h=o[h+12>>2]|0,g=h,p=o[g>>2]|0,g=o[g+4>>2]|0}while(!((p|0)==(H|0)&(g|0)==(X|0)));if(p=Eb(q,F<<4)|0,!p){_e=75;break}X=tu(h)|0,$=o[X+4>>2]|0,h=oe+(c*24|0)|0,o[h>>2]=o[X>>2],o[h+4>>2]=$,h=oe+(c*24|0)+16|0,o[h>>2]=F,o[oe+(c*24|0)+20>>2]=p,o[Le>>2]=o[h>>2],o[Le+4>>2]=o[h+4>>2],pi(Le,oe+(c*24|0)+8|0)|0,p=De(c|0,se|0,1,0)|0,h=k()|0}else p=c,h=se;if(A=De(A|0,l|0,1,0)|0,l=k()|0,(l|0)<(Ae|0)|(l|0)==(Ae|0)&A>>>0<ee>>>0)se=h,c=p;else break t}if((_e|0)==69?wt(27634,26956,351,27016):(_e|0)==75&&Ie(q),(se|0)>0|(se|0)==0&c>>>0>0)for(v=0,x=0,h=c,g=se;p=o[oe+(v*24|0)+20>>2]|0,p?(Ie(p),p=se,h=c):p=g,v=De(v|0,x|0,1,0)|0,x=k()|0,(x|0)<(p|0)|(x|0)==(p|0)&v>>>0<h>>>0;)g=p;Ie(oe);break e}while(0);ou(oe,ce,24,2);t:do if((ce|0)==0&(be|0)==0){if($=An(192)|0,$|0){if(o[$+16>>2]=0,o[$+20>>2]=0,B=$+8|0,o[B>>2]=3,h=An(48)|0,F=$+12|0,o[F>>2]=h,h|0){o[h>>2]=o[3860],o[h+4>>2]=o[3861],o[h+8>>2]=o[3862],o[h+12>>2]=o[3863],N=h+16|0,o[N>>2]=o[3864],o[N+4>>2]=o[3865],o[N+8>>2]=o[3866],o[N+12>>2]=o[3867],N=h+32|0,o[N>>2]=o[3868],o[N+4>>2]=o[3869],o[N+8>>2]=o[3870],o[N+12>>2]=o[3871],o[Le>>2]=o[B>>2],o[Le+4>>2]=o[B+4>>2],pi(Le,$)|0,o[$+40>>2]=0,o[$+44>>2]=0,N=$+32|0,o[N>>2]=3,h=An(48)|0,q=$+36|0,o[q>>2]=h;do if(!h)v=0,x=1;else{if(o[h>>2]=o[3872],o[h+4>>2]=o[3873],o[h+8>>2]=o[3874],o[h+12>>2]=o[3875],M=h+16|0,o[M>>2]=o[3876],o[M+4>>2]=o[3877],o[M+8>>2]=o[3878],o[M+12>>2]=o[3879],M=h+32|0,o[M>>2]=o[3880],o[M+4>>2]=o[3881],o[M+8>>2]=o[3882],o[M+12>>2]=o[3883],o[Le>>2]=o[N>>2],o[Le+4>>2]=o[N+4>>2],pi(Le,$+24|0)|0,o[$+64>>2]=0,o[$+68>>2]=0,M=$+56|0,o[M>>2]=3,h=An(48)|0,H=$+60|0,o[H>>2]=h,!h){v=0,x=2;break}if(o[h>>2]=o[3884],o[h+4>>2]=o[3885],o[h+8>>2]=o[3886],o[h+12>>2]=o[3887],T=h+16|0,o[T>>2]=o[3888],o[T+4>>2]=o[3889],o[T+8>>2]=o[3890],o[T+12>>2]=o[3891],T=h+32|0,o[T>>2]=o[3892],o[T+4>>2]=o[3893],o[T+8>>2]=o[3894],o[T+12>>2]=o[3895],o[Le>>2]=o[M>>2],o[Le+4>>2]=o[M+4>>2],pi(Le,$+48|0)|0,o[$+88>>2]=0,o[$+92>>2]=0,T=$+80|0,o[T>>2]=3,h=An(48)|0,X=$+84|0,o[X>>2]=h,!h){v=0,x=3;break}if(o[h>>2]=o[3896],o[h+4>>2]=o[3897],o[h+8>>2]=o[3898],o[h+12>>2]=o[3899],x=h+16|0,o[x>>2]=o[3900],o[x+4>>2]=o[3901],o[x+8>>2]=o[3902],o[x+12>>2]=o[3903],x=h+32|0,o[x>>2]=o[3904],o[x+4>>2]=o[3905],o[x+8>>2]=o[3906],o[x+12>>2]=o[3907],o[Le>>2]=o[T>>2],o[Le+4>>2]=o[T+4>>2],pi(Le,$+72|0)|0,o[$+112>>2]=0,o[$+116>>2]=0,x=$+104|0,o[x>>2]=3,h=An(48)|0,A=$+108|0,o[A>>2]=h,!h){v=0,x=4;break}if(o[h>>2]=o[3908],o[h+4>>2]=o[3909],o[h+8>>2]=o[3910],o[h+12>>2]=o[3911],v=h+16|0,o[v>>2]=o[3912],o[v+4>>
152]=o[3913],o[v+8>>2]=o[3914],o[v+12>>2]=o[3915],v=h+32|0,o[v>>2]=o[3916],o[v+4>>2]=o[3917],o[v+8>>2]=o[3918],o[v+12>>2]=o[3919],o[Le>>2]=o[x>>2],o[Le+4>>2]=o[x+4>>2],pi(Le,$+96|0)|0,o[$+136>>2]=0,o[$+140>>2]=0,v=$+128|0,o[v>>2]=3,h=An(48)|0,l=$+132|0,o[l>>2]=h,!h){v=0,x=5;break}if(o[h>>2]=o[3920],o[h+4>>2]=o[3921],o[h+8>>2]=o[3922],o[h+12>>2]=o[3923],g=h+16|0,o[g>>2]=o[3924],o[g+4>>2]=o[3925],o[g+8>>2]=o[3926],o[g+12>>2]=o[3927],g=h+32|0,o[g>>2]=o[3928],o[g+4>>2]=o[3929],o[g+8>>2]=o[3930],o[g+12>>2]=o[3931],o[Le>>2]=o[v>>2],o[Le+4>>2]=o[v+4>>2],pi(Le,$+120|0)|0,o[$+160>>2]=0,o[$+164>>2]=0,g=$+152|0,o[g>>2]=3,h=An(48)|0,c=$+156|0,o[c>>2]=h,!h){v=0,x=6;break}if(o[h>>2]=o[3932],o[h+4>>2]=o[3933],o[h+8>>2]=o[3934],o[h+12>>2]=o[3935],p=h+16|0,o[p>>2]=o[3936],o[p+4>>2]=o[3937],o[p+8>>2]=o[3938],o[p+12>>2]=o[3939],p=h+32|0,o[p>>2]=o[3940],o[p+4>>2]=o[3941],o[p+8>>2]=o[3942],o[p+12>>2]=o[3943],o[Le>>2]=o[g>>2],o[Le+4>>2]=o[g+4>>2],pi(Le,$+144|0)|0,o[$+184>>2]=0,o[$+188>>2]=0,p=$+176|0,o[p>>2]=3,h=An(48)|0,se=$+180|0,o[se>>2]=h,!h){v=0,x=7;break}if(o[h>>2]=o[3944],o[h+4>>2]=o[3945],o[h+8>>2]=o[3946],o[h+12>>2]=o[3947],me=h+16|0,o[me>>2]=o[3948],o[me+4>>2]=o[3949],o[me+8>>2]=o[3950],o[me+12>>2]=o[3951],h=h+32|0,o[h>>2]=o[3952],o[h+4>>2]=o[3953],o[h+8>>2]=o[3954],o[h+12>>2]=o[3955],o[Le>>2]=o[p>>2],o[Le+4>>2]=o[p+4>>2],pi(Le,$+168|0)|0,ou($,8,24,3),h=An(128)|0,o[d+4>>2]=h,h|0){o[d>>2]=8,o[h>>2]=o[B>>2],o[h+4>>2]=o[B+4>>2],o[h+8>>2]=o[B+8>>2],o[h+12>>2]=o[B+12>>2],_e=h+16|0,o[_e>>2]=o[N>>2],o[_e+4>>2]=o[N+4>>2],o[_e+8>>2]=o[N+8>>2],o[_e+12>>2]=o[N+12>>2],_e=h+32|0,o[_e>>2]=o[M>>2],o[_e+4>>2]=o[M+4>>2],o[_e+8>>2]=o[M+8>>2],o[_e+12>>2]=o[M+12>>2],_e=h+48|0,o[_e>>2]=o[T>>2],o[_e+4>>2]=o[T+4>>2],o[_e+8>>2]=o[T+8>>2],o[_e+12>>2]=o[T+12>>2],_e=h+64|0,o[_e>>2]=o[x>>2],o[_e+4>>2]=o[x+4>>2],o[_e+8>>2]=o[x+8>>2],o[_e+12>>2]=o[x+12>>2],_e=h+80|0,o[_e>>2]=o[v>>2],o[_e+4>>2]=o[v+4>>2],o[_e+8>>2]=o[v+8>>2],o[_e+12>>2]=o[v+12>>2],_e=h+96|0,o[_e>>2]=o[g>>2],o[_e+4>>2]=o[g+4>>2],o[_e+8>>2]=o[g+8>>2],o[_e+12>>2]=o[g+12>>2],_e=h+112|0,o[_e>>2]=o[p>>2],o[_e+4>>2]=o[p+4>>2],o[_e+8>>2]=o[p+8>>2],o[_e+12>>2]=o[p+12>>2],Ie($),_e=158;break t}h=o[F>>2]|0,h|0&&Ie(h),h=o[q>>2]|0,h|0&&Ie(h),h=o[H>>2]|0,h|0&&Ie(h),h=o[X>>2]|0,h|0&&Ie(h),h=o[A>>2]|0,h|0&&Ie(h),h=o[l>>2]|0,h|0&&Ie(h),h=o[c>>2]|0,h|0&&Ie(h),h=o[se>>2]|0,h|0&&Ie(h),Ie($);break t}while(0);h=0,g=0;do p=o[$+(h*24|0)+12>>2]|0,p|0&&Ie(p),h=De(h|0,g|0,1,0)|0,g=k()|0;while(g>>>0<v>>>0|(g|0)==(v|0)&h>>>0<x>>>0)}Ie($),_e=152}}else{if((be|0)>0|(be|0)==0&ce>>>0>0){g=0,v=0,x=0,p=0,h=0,T=0;do me=oe+(g*24|0)|0,Le=v,v=o[me>>2]|0,_e=x,x=o[me+4>>2]|0,p=De(p|0,h|0,((v|0)!=(Le|0)|(x|0)!=(_e|0))&1|0,0)|0,h=k()|0,g=De(g|0,T|0,1,0)|0,T=k()|0;while((T|0)<(be|0)|(T|0)==(be|0)&g>>>0<ce>>>0);X=p,H=h}else X=0,H=0;if(A=An(X*24|0)|0,A){n:do if((be|0)>=0){for(B=0,F=0,p=0,g=0,q=0,v=0;;){if(!((B|0)==(ce|0)&(F|0)==(be|0))&&(Le=oe+(p*24|0)|0,_e=oe+(B*24|0)|0,(o[Le>>2]|0)==(o[_e>>2]|0)?(o[Le+4>>2]|0)==(o[_e+4>>2]|0):0))h=q;else{if(M=oe+(p*24|0)|0,_e=Wn(B|0,F|0,p|0,g|0)|0,Le=k()|0,N=De(_e|0,Le|0,-1,-1)|0,g=k()|0,(Le|0)>0|(Le|0)==0&_e>>>0>1){if(h=An(N<<3)|0,!h)break;x=0,T=0;do _e=x,x=De(x|0,T|0,1,0)|0,T=k()|0,me=M+(x*24|0)+16|0,Le=o[me+4>>2]|0,_e=h+(_e<<3)|0,o[_e>>2]=o[me>>2],o[_e+4>>2]=Le;while((T|0)<(g|0)|(T|0)==(g|0)&x>>>0<N>>>0)}else h=0;Le=oe+(p*24|0)+16|0,_e=o[Le+4>>2]|0,g=A+(v*24|0)+8|0,o[g>>2]=o[Le>>2],o[g+4>>2]=_e,o[A+(v*24|0)+16>>2]=N,o[A+(v*24|0)+20>>2]=h,z[A+(v*24|0)>>3]=+z[oe+(p*24|0)+8>>3],v=De(v|0,q|0,1,0)|0,p=B,g=F,h=k()|0}if(_e=B,B=De(B|0,F|0,1,0)|0,Le=F,F=k()|0,(Le|0)<(be|0)|(Le|0)==(be|0)&_e>>>0<ce>>>0)q=h;else break n}if((q|0)>0|(q|0)==0&v>>>0>0){h=0,g=0;do p=o[A+(h*24|0)+20>>2]|0,p|0&&Ie(p),h=De(h|0,g|0,1,0)|0,g=k()|0;while((g|0)<(q|0)|(g|0)==(q|0)&h>>>0<v>>>0)}Ie(A),_e=152;break t}while(0);if(ou(A,X,24,3),h=An(X<<4)|0,g=d+4|0,o[g>>2]=h,h){o[d>>2]=X;do if((H|0)>0|(H|0)==0&X>>>0>0){if(d=A+8|0,o[h>>2]=o[d>>2],o[h+4>>2]=o[d+4>>2],o[h+8>>2]=o[d+8>>2],o[h+12>>2]=o[d+12>>2],(X|0)==1&(H|0)==0||(d=h+16|0,_e=A+32|0,o[d>>2]=o[_e>>2],o[d+4>>2]=o[_e+4>>2],o[d+8>>2]=o[_e+8>>2],o[d+12>>2]=o[_e+12>>2],!((H|0)>0|(H|0)==0&X>>>0>2)))break;h=2,p=0;do d=(o[g>>
152]|0)+(h<<4)|0,_e=A+(h*24|0)+8|0,o[d>>2]=o[_e>>2],o[d+4>>2]=o[_e+4>>2],o[d+8>>2]=o[_e+8>>2],o[d+12>>2]=o[_e+12>>2],h=De(h|0,p|0,1,0)|0,p=k()|0;while((p|0)<(H|0)|(p|0)==(H|0)&h>>>0<X>>>0)}while(0);Ie(A),_e=158;break}else{if((H|0)>0|(H|0)==0&X>>>0>0){h=0,g=0;do p=o[A+(h*24|0)+20>>2]|0,p|0&&Ie(p),h=De(h|0,g|0,1,0)|0,g=k()|0;while((g|0)<(H|0)|(g|0)==(H|0)&h>>>0<X>>>0)}Ie(A),_e=152;break}}else _e=152}while(0);if((_e|0)==158)return Ie(ze),Ie(Ne),Ie(oe),Ne=0,I=Fe,Ne|0;if((_e|0)==152&&(be|0)>0|(be|0)==0&ce>>>0>0)for(v=0,x=0,h=ce,g=be;p=o[oe+(v*24|0)+20>>2]|0,p?(Ie(p),p=be,h=ce):p=g,v=De(v|0,x|0,1,0)|0,x=k()|0,(x|0)<(p|0)|(x|0)==(p|0)&v>>>0<h>>>0;)g=p;return Ie(oe),Ie(ze),Ie(Ne),Ne=13,I=Fe,Ne|0}while(0);return Ie(ze),Ie(Ne),Ne=13,I=Fe,Ne|0}else if((_e|0)==159)return I=Fe,h|0;return 0}function Ex(A,l){A=A|0,l=l|0;var c=0,d=0;return d=A,A=o[d>>2]|0,d=o[d+4>>2]|0,c=l,l=o[c>>2]|0,c=o[c+4>>2]|0,(d>>>0<c>>>0|(d|0)==(c|0)&A>>>0<l>>>0?-1:(d>>>0>c>>>0|(d|0)==(c|0)&A>>>0>l>>>0)&1)|0}function tu(A){A=A|0;var l=0,c=0;return l=A+20|0,c=o[l>>2]|0,(c|0)==(A|0)?A|0:(c=tu(c)|0,o[l>>2]=c,c|0)}function Nx(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0;return v=A,g=o[v>>2]|0,v=o[v+4>>2]|0,p=l,h=o[p>>2]|0,p=o[p+4>>2]|0,v>>>0<p>>>0|(v|0)==(p|0)&g>>>0<h>>>0?(l=-1,l|0):v>>>0>p>>>0|(v|0)==(p|0)&g>>>0>h>>>0?(l=1,l|0):(d=+z[A+8>>3],c=+z[l+8>>3],d<c?(l=-1,l|0):(l=d>c&1,l|0))}function Rx(A,l){A=A|0,l=l|0;var c=0,d=0;return d=+z[A>>3],c=+z[l>>3],(d>c?-1:d<c&1)|0}function Cx(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0;if(N=I,I=I+64|0,M=N,v=N+56|0,!(!0&(l&2013265920|0)==134217728&(!0&(d&2013265920|0)==134217728)))return h=5,I=N,h|0;if((A|0)==(c|0)&(l|0)==(d|0))return o[h>>2]=0,h=0,I=N,h|0;if(g=we(A|0,l|0,52)|0,k()|0,g=g&15,T=we(c|0,d|0,52)|0,k()|0,(g|0)!=(T&15|0))return h=12,I=N,h|0;if(p=g+-1|0,g>>>0>1){x2(A,l,p,M)|0,x2(c,d,p,v)|0,T=M,x=o[T>>2]|0,T=o[T+4>>2]|0;e:do if((x|0)==(o[v>>2]|0)&&(T|0)==(o[v+4>>2]|0)){g=(g^15)*3|0,p=we(A|0,l|0,g|0)|0,k()|0,p=p&7,g=we(c|0,d|0,g|0)|0,k()|0,g=g&7;do if((p|0)==0|(g|0)==0)o[h>>2]=1,p=0;else if((p|0)==7)p=5;else{if((p|0)==1|(g|0)==1&&Ht(x,T)|0){p=5;break}if((o[15824+(p<<2)>>2]|0)!=(g|0)&&(o[15856+(p<<2)>>2]|0)!=(g|0))break e;o[h>>2]=1,p=0}while(0);return h=p,I=N,h|0}while(0)}p=M,g=p+56|0;do o[p>>2]=0,p=p+4|0;while((p|0)<(g|0));return E3(A,l,1,M)|0,l=M,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0))&&(l=M+8|0,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0)))&&(l=M+16|0,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0)))&&(l=M+24|0,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0)))&&(l=M+32|0,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0)))&&(l=M+40|0,!((o[l>>2]|0)==(c|0)&&(o[l+4>>2]|0)==(d|0)))?(p=M+48|0,p=((o[p>>2]|0)==(c|0)?(o[p+4>>2]|0)==(d|0):0)&1):p=1,o[h>>2]=p,h=0,I=N,h|0}function Px(A,l,c,d,h){return A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,c=eu(A,l,c,d)|0,(c|0)==7?(h=11,h|0):(d=Be(c|0,0,56)|0,l=l&-2130706433|(k()|0)|268435456,o[h>>2]=A|d,o[h+4>>2]=l,h=0,h|0)}function Bx(A,l,c){return A=A|0,l=l|0,c=c|0,!0&(l&2013265920|0)==268435456?(o[c>>2]=A,o[c+4>>2]=l&-2130706433|134217728,c=0,c|0):(c=6,c|0)}function Fx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;return h=I,I=I+16|0,d=h,o[d>>2]=0,!0&(l&2013265920|0)==268435456?(p=we(A|0,l|0,56)|0,k()|0,d=Hn(A,l&-2130706433|134217728,p&7,d,c)|0,I=h,d|0):(d=6,I=h,d|0)}function k3(A,l){A=A|0,l=l|0;var c=0;switch(c=we(A|0,l|0,56)|0,k()|0,c&7){case 0:case 7:return c=0,c|0}return c=l&-2130706433|134217728,!(!0&(l&2013265920|0)==268435456)||!0&(l&117440512|0)==16777216&(Ht(A,c)|0)!=0?(c=0,c|0):(c=nu(A,c)|0,c|0)}function Dx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return h=I,I=I+16|0,d=h,!0&(l&2013265920|0)==268435456?(p=l&-2130706433|134217728,g=c,o[g>>2]=A,o[g+4>>2]=p,o[d>>2]=0,l=we(A|0,l|0,56)|0,k()|0,d=Hn(A,p,l&7,d,c+8|0)|0,I=h,d|0):(d=6,I=h,d|0)}function m2(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0;return h=(Ht(A,l)|0)==0,l=l&-2130706433,d=c,o[d>>2]=h?A:0,o[d+4>>2]=h?l|285212672:0,d=c+8|0,o[d>>2]=A,o[d+4>>2]=l|301989888,d=c+16|0,o[d>>2]=A,o[d+4>>2]=l|318767104,d=c+24|0,o[d>>2]=A,o[d+4>>2]=l|335544320,d=c+32|0,o[d>>2]=A,o[d+4>>2]=l|352321536,c=c+40|0,o[c>>2]=A,o[c+4>>2]=l|369098752,0}function WA(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return g=I,I=I+16|0,h=g,p=l&-2130706433|134217728,!0&(l&2013265920|0)==268435456?(d=we(A|0,l|0,56)|0,k()|0,d=wb(A,p,d&7)|0,(d|0)==-1?(o[c>>2]=0,p=6,I=g,p|0):(Oa(A,p,h)|0&&wt(27634,27035,282,27050),l=we(A|0,l|0,52)|0,k()|0,l=l&15,Ht(A,p)|0?g2(h,l,d,2,c):y2(h,l,d,2,c),p=0,I=g,p|0)):(p=6,I=g,p|0)}function U3(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;return g=I,I=I+16|0,d=g+8|0,h=g,p=l&-2130706433|134217728,!0&(l&2013265920|0)==268435456?(o[d>>2]=0,l=we(A|0,l|0,56)|0,k()|0,l=Hn(A,p,l&7,d,h)|0,l|0?(c=l,I=g,c|0):(d=o[h>>2]|0,h=o[h+4>>2]|0,l=eu(d,h,A,p)|0,(l|0)==7?(c=11,I=g,c|0):(A=Be(l|0,0,56)|0,p=h&-2130706433|(k()|0)|268435456,o[c>>2]=d|A,o[c+4>>2]=p,c=0,I=g,c|0))):(c=6,I=g,c|0)}function Lx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0;o[c>>2]=0,T=+z[A>>3],M=+z[A+8>>3],x=+z[A+16>>3],h=0,p=5,d=5,A=0;do H=+z[15888+(h*24|0)>>3]-T,q=+z[15888+(h*24|0)+8>>3]-M,g=+z[15888+(h*24|0)+16>>3]-x,g=H*H+q*q+g*g,g<d&&(o[c>>2]=h,p=g,A=h,d=g),h=h+1|0;while((h|0)!=20);if(p=+fo(+(1-p*.5)),p<1e-16)x=0,g=0;else{if(ee=+z[16368+(A*24|0)>>3],$=+z[15888+(A*24|0)>>3],Ae=+z[15888+(A*24|0)+8>>3],se=+z[15888+(A*24|0)+16>>3],me=-(se+($*0+Ae*0)),g=$*me+0,H=Ae*me+0,me=se*me+1,X=+Dt(+(me*me+(g*g+H*H))),X=X>0?1/X:0,g=g*X,H=H*X,X=me*X,me=-(T*$+M*Ae+x*se),q=T+$*me,d=M+Ae*me,T=x+se*me,M=+Dt
15(+(T*T+(q*q+d*d))),M=M>0?1/M:0,q=q*M,d=d*M,M=T*M,d=+XA(ee-+XA(+Rr(+(M*(Ae*g-$*H)+(q*(se*H-Ae*X)+d*($*X-se*g))),+(X*M+(g*q+H*d))))),mi(l)|0?g=+XA(d+-.3334731722518321):g=d,d=+Ur(+p)*2.618033988749896,(l|0)>0){A=0;do d=d*2.6457513110645907,A=A+1|0;while((A|0)!=(l|0))}x=+Zt(+g)*d,g=+tn(+g)*d}l=c+4|0,F=c+12|0,o[F>>2]=0,p=+Kt(+g)*1.1547005383792515,d=+Kt(+x)+p*.5,A=~~d,h=~~p,d=d-+(A|0),p=p-+(h|0);do if(d<.5)if(d<.3333333333333333)if(o[l>>2]=A,p<(d+1)*.5){o[c+8>>2]=h;break}else{h=h+1|0,o[c+8>>2]=h;break}else if(me=1-d,h=(!(p<me)&1)+h|0,o[c+8>>2]=h,me<=p&p<d*2){A=A+1|0,o[l>>2]=A;break}else{o[l>>2]=A;break}else{if(!(d<.6666666666666666))if(A=A+1|0,o[l>>2]=A,p<d*.5){o[c+8>>2]=h;break}else{h=h+1|0,o[c+8>>2]=h;break}if(p<1-d){if(o[c+8>>2]=h,d*2+-1<p){o[l>>2]=A;break}}else h=h+1|0,o[c+8>>2]=h;A=A+1|0,o[l>>2]=A}while(0);do if(x<0)if(h&1){B=(h+1|0)/2|0,B=Wn(A|0,((A|0)<0)<<31>>31|0,B|0,((B|0)<0)<<31>>31|0)|0,A=~~(+(A|0)-((+(B>>>0)+4294967296*+(k()|0))*2+1)),o[l>>2]=A,B=l;break}else{B=(h|0)/2|0,B=Wn(A|0,((A|0)<0)<<31>>31|0,B|0,((B|0)<0)<<31>>31|0)|0,A=~~(+(A|0)-(+(B>>>0)+4294967296*+(k()|0))*2),o[l>>2]=A,B=l;break}else B=l;while(0);N=c+8|0,l=0-h|0,g<0?(c=A-((h<<1|1|0)/2|0)|0,o[B>>2]=c,o[N>>2]=l,h=l):c=A,A=h-c|0,l=0-c|0,(c|0)<0?(o[N>>2]=A,o[F>>2]=l,o[B>>2]=0,v=0):(A=h,v=c,l=0),c=v-A|0,h=l-A|0,(A|0)<0?(o[B>>2]=c,o[F>>2]=h,o[N>>2]=0,v=c,A=0):h=l,c=v-h|0,l=A-h|0,(h|0)<0?(o[B>>2]=c,o[N>>2]=l,o[F>>2]=0,h=0):(l=A,c=v),A=(l|0)<(c|0)?l:c,A=(h|0)<(A|0)?h:A,!((A|0)<=0)&&(o[B>>2]=c-A,o[N>>2]=l-A,o[F>>2]=h-A)}function qx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;d=I,I=I+16|0,h=d,g=o[A+12>>2]|0,p=+((o[A+8>>2]|0)-g|0),z[h>>3]=+((o[A+4>>2]|0)-g|0)-p*.5,z[h+8>>3]=p*.8660254037844386,QA(h,o[A>>2]|0,l,0,c),I=d}function QA(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0;if(p=+Tb(A),p<1e-16){l=15888+(l*24|0)|0,o[h>>2]=o[l>>2],o[h+4>>2]=o[l+4>>2],o[h+8>>2]=o[l+8>>2],o[h+12>>2]=o[l+12>>2],o[h+16>>2]=o[l+16>>2],o[h+20>>2]=o[l+20>>2];return}if(g=+Rr(+ +z[A+8>>3],+ +z[A>>3]),(c|0)>0){A=0;do p=p*.37796447300922725,A=A+1|0;while((A|0)!=(c|0))}v=p*.3333333333333333,d?(c=(mi(c)|0)==0,p=+S3(+((c?v:v*.37796447300922725)*.381966011250105))):(p=+S3(+(p*.381966011250105)),mi(c)|0&&(g=+XA(g+.3334731722518321))),N=+XA(+z[16368+(l*24|0)>>3]-g),v=+z[15888+(l*24|0)>>3],M=+z[15888+(l*24|0)+8>>3],H=+z[15888+(l*24|0)+16>>3],F=-(H+(v*0+M*0)),T=v*F+0,g=M*F+0,F=H*F+1,B=+Dt(+(F*F+(T*T+g*g))),B=B>0?1/B:0,T=T*B,g=g*B,B=F*B,F=+Zt(+N),N=+tn(+N),X=+Zt(+p),q=+tn(+p),x=X*v+q*(F*T+N*(H*g-M*B)),p=X*M+q*(F*g+N*(v*B-H*T)),g=X*H+q*(F*B+N*(M*T-v*g)),v=+Dt(+(g*g+(x*x+p*p))),v=v>0?1/v:0,z[h>>3]=x*v,z[h+8>>3]=p*v,z[h+16>>3]=g*v}function g2(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0,St=0,Nt=0,or=0,ct=0,Rt=0,Pr=0,kn=0,xn=0,Un=0,Cn=0,Vr=0,Jn=0,er=0,yi=0,ar=0,Lt=0,ea=0;if(Vr=I,I=I+256|0,p=Vr+240|0,St=Vr+224|0,xn=Vr,Un=Vr+208|0,Cn=Vr+192|0,Nt=Vr+168|0,or=Vr+152|0,ct=Vr+136|0,Rt=Vr+120|0,Pr=Vr+104|0,kn=Vr+80|0,o[p>>2]=l,o[St>>2]=o[A>>2],o[St+4>>2]=o[A+4>>2],o[St+8>>2]=o[A+8>>2],o[St+12>>2]=o[A+12>>2],O3(St,p,xn),o[h>>2]=0,St=d+c+((d|0)==5&1)|0,(St|0)<=(c|0)){I=Vr;return}ee=o[p>>2]|0,Ae=Un+4|0,se=Un+8|0,$=Un+12|0,me=Cn+8|0,be=c+5|0,ce=16848+(ee<<2)|0,oe=Nt+8|0,Le=16928+(ee<<2)|0,_e=or+8|0,ze=ct+8|0,Ne=Rt+8|0,Fe=Cn+8|0,F=Nt+8|0,H=Nt+16|0,q=kn+8|0,X=kn+16|0,B=c,d=0,g=0,v=0,x=0;e:for(;;){N=xn+(((B|0)%5|0)<<4)|0,o[Un>>2]=o[N>>2],o[Un+4>>2]=o[N+4>>2],o[Un+8>>2]=o[N+8>>2],o[Un+12>>2]=o[N+12>>2];do;while((Ua(Un,ee,0,1)|0)==2);if((B|0)>(c|0)&(mi(l)|0)!=0){if(N=o[Un>>2]|0,A=o[Ae>>2]|0,T=o[se>>2]|0,p=o[$>>2]|0,Jn=+(v-x|0),z[Cn>>3]=+(g-x|0)-Jn*.5,z[me>>3]=Jn*.8660254037844386,x=o[17008+(N*80|0)+(d<<2)>>2]|0,M=o[18608+(N*80|0)+(x*20|0)>>2]|0,v=o[18608+(N*80|0)+(x*20|0)+16>>2]|0,(v|0)>0){g=0,d=T;do ar=p+A|0,Lt=(ar|0)<0,T=d+A-(Lt?ar:0)|0,yi=(T|0)<0,er=p+d-(Lt?ar:0)-(yi?T:0)|0,p=(er|0)<0,A=(Lt?0:ar)-(yi?T:0)-(p?er:0)|0,d=(yi?0:T)-(p?er:0)|0,er=p?0:er,p=(d|0)<(A|0)?d:A,p=(er|0)<(p|0)?er:p,T=(p|0)>0,A=A-(T?p:0)|0,d=d-(T?p:0)|0,p=er-(T?p:0)|0,g=g+1|0;while((g|0)<(v|0))}else d=T;switch(Lt=(o[ce>>2]|0)*3|0,er=(Or(Lt,o[18608+(N*80|0)+(x*20|0)+4>>2]|0)|0)+A|0,T=(Or(Lt,o[18608+(N*80|0)+(x*20|0)+8>>2]|0)|0)+d|0,Lt=(Or(Lt,o[18608+(N*80|0)+(x*20|0)+12>>2]|0)|0)+p|0,x=(er|0)<0,T=T-(x?er:0)|0,yi=(T|0)<0,Lt=Lt+(x?0-er|0:0)+(yi?0-T|0:0)|0,ar=(Lt|0)<0,er=(x?0:er)-(yi?T:0)-(ar?Lt:0)|0,T=(yi?0:T)-(ar?Lt:0)|0,Lt=ar?0:Lt,ar=(T|0)<(er|0)?T:er,ar=(Lt|0)<(ar|0)?Lt:ar,yi=(ar|0)>0,Lt=Lt-(yi?ar:0)|0,Jn=+(T-(yi?ar:0)-Lt|0),z[Nt>>3]=+(er-(yi?ar:0)-Lt|0)-Jn*.5,z[oe>>3]=Jn*.8660254037844386,Jn=+(o[Le>>2]|0),z[or>>3]=Jn*3,z[_e>>3]=0,ea=Jn*-1.5,z[ct>>3]=ea,z[ze>>3]=Jn*2.598076211353316,z[Rt>>3]=ea,z[Ne>>3]=Jn*-2.598076211353316,o[17008+(M*80|0)+(N<<2)>>2]|0){case 1:{A=ct,d=or;break}case 3:{A=Rt,d=ct;break}case 2:{A=or,d=Rt;break}default:{A=12;break e}}e4(Cn,Nt,d,A,Pr),QA(Pr,M,ee,1,kn),Lt=o[h>>2]|0,Jn=+ho(+ +z[X>>3]),ea=+Rr(+ +z[q>>3],+ +z[kn>>3]),z[h+8+(Lt<<4)>>3]=Jn,z[h+8+(Lt<<4)+8>>3]=ea,o[h>>2]=(o[h>>2]|0)+1}if((B|0)<(be|0)&&(Lt=o[$>>2]|0,Jn=+((o[se>>2]|0)-Lt|0),z[Cn>>3]=+((o[Ae>>2]|0)-Lt|0)-Jn*.5,z[Fe>>3]=Jn*.8660254037844386,QA(Cn,o[Un>>2]|0,ee,1,Nt),Lt=o[h>>2]|0,Jn=+ho(+ +z[H>>3]),ea=+Rr(+ +z[F>>3],+ +z[Nt>>3]),z[h+8+(Lt<<4)>>3]=Jn,z[h+8+(Lt<<4)+8>>3]=ea,o[h>>2]=(o[h>>2]|0)+1),B=B+1|0,(B|0)>=(St|0)){A=3;break}else d=o[Un>>
152]|0,g=o[Ae>>2]|0,v=o[se>>2]|0,x=o[$>>2]|0}if((A|0)==3){I=Vr;return}else(A|0)==12&&wt(27073,27120,599,27130)}function O3(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;q=I,I=I+128|0,d=q+64|0,h=q,p=d,g=20208,v=p+60|0;do o[p>>2]=o[g>>2],p=p+4|0,g=g+4|0;while((p|0)<(v|0));p=h,g=20272,v=p+60|0;do o[p>>2]=o[g>>2],p=p+4|0,g=g+4|0;while((p|0)<(v|0));if(M=(mi(o[l>>2]|0)|0)==0,M=M?d:h,F=A+4|0,p=o[F>>2]|0,N=A+8|0,d=o[N>>2]|0,B=A+12|0,h=o[B>>2]|0,g=d+(p<<1)|0,o[F>>2]=g,d=h+(d<<1)|0,o[N>>2]=d,p=(h<<1)+p|0,o[B>>2]=p,h=d-g|0,v=p-g|0,(g|0)<0&&(o[N>>2]=h,o[B>>2]=v,o[F>>2]=0,d=h,g=0,p=v),v=g-d|0,h=p-d|0,(d|0)<0?(o[F>>2]=v,o[B>>2]=h,o[N>>2]=0,d=0):(h=p,v=g),g=v-h|0,p=d-h|0,(h|0)<0?(o[F>>2]=g,o[N>>2]=p,o[B>>2]=0,h=0):(p=d,g=v),d=(p|0)<(g|0)?p:g,d=(h|0)<(d|0)?h:d,(d|0)>0&&(h=h-d|0,p=p-d|0,g=g-d|0,o[F>>2]=g,o[N>>2]=p,o[B>>2]=h),x=(p<<1)+g|0,v=h+(g<<1)|0,o[F>>2]=v,o[N>>2]=x,p=(h<<1)+p|0,o[B>>2]=p,d=x-v|0,h=p-v|0,(v|0)<0?(o[N>>2]=d,o[B>>2]=h,o[F>>2]=0,v=0,p=h):d=x,g=v-d|0,h=p-d|0,(d|0)<0?(o[F>>2]=g,o[B>>2]=h,o[N>>2]=0,v=g,d=0):h=p,g=v-h|0,p=d-h|0,(h|0)<0?(o[F>>2]=g,o[N>>2]=p,o[B>>2]=0,h=0):(p=d,g=v),d=(p|0)<(g|0)?p:g,d=(h|0)<(d|0)?h:d,(d|0)>0&&(o[F>>2]=g-d,o[N>>2]=p-d,o[B>>2]=h-d),mi(o[l>>2]|0)|0&&(p=o[F>>2]|0,g=o[N>>2]|0,h=o[B>>2]|0,d=(g*3|0)+p|0,p=h+(p*3|0)|0,o[F>>2]=p,o[N>>2]=d,g=(h*3|0)+g|0,o[B>>2]=g,h=d-p|0,v=g-p|0,(p|0)<0?(o[N>>2]=h,o[B>>2]=v,o[F>>2]=0,d=h,x=0):(x=p,v=g),p=x-d|0,h=v-d|0,(d|0)<0?(o[F>>2]=p,o[B>>2]=h,o[N>>2]=0,x=p,g=0):(g=d,h=v),p=x-h|0,d=g-h|0,(h|0)<0?(o[F>>2]=p,o[N>>2]=d,o[B>>2]=0,g=d,h=0):p=x,d=(g|0)<(p|0)?g:p,d=(h|0)<(d|0)?h:d,(d|0)>0&&(o[F>>2]=p-d,o[N>>2]=g-d,o[B>>2]=h-d),o[l>>2]=(o[l>>2]|0)+1),o[c>>2]=o[A>>2],h=o[N>>2]|0,d=o[B>>2]|0,l=o[M+4>>2]|0,T=o[M+8>>2]|0,g=(o[M>>2]|0)+(o[F>>2]|0)|0,x=c+4|0,o[x>>2]=g,h=l+h|0,l=c+8|0,o[l>>2]=h,d=T+d|0,T=c+12|0,o[T>>2]=d,p=h-g|0,(g|0)<0&&(d=d-g|0,o[l>>2]=p,o[T>>2]=d,o[x>>2]=0,h=p,g=0),(h|0)<0&&(g=g-h|0,o[x>>2]=g,d=d-h|0,o[T>>2]=d,o[l>>2]=0,h=0),v=g-d|0,p=h-d|0,(d|0)<0?(o[x>>2]=v,o[l>>2]=p,o[T>>2]=0,g=v,d=0):p=h,h=(p|0)<(g|0)?p:g,h=(d|0)<(h|0)?d:h,(h|0)>0&&(o[x>>2]=g-h,o[l>>2]=p-h,o[T>>
vendor: 1,362 bytes, line 15
152]=d-h),o[c+16>>2]=o[A>>2],h=o[N>>2]|0,d=o[B>>2]|0,l=o[M+16>>2]|0,T=o[M+20>>2]|0,g=(o[M+12>>2]|0)+(o[F>>2]|0)|0,x=c+20|0,o[x>>2]=g,h=l+h|0,l=c+24|0,o[l>>2]=h,d=T+d|0,T=c+28|0,o[T>>2]=d,p=h-g|0,(g|0)<0&&(d=d-g|0,o[l>>2]=p,o[T>>2]=d,o[x>>2]=0,h=p,g=0),(h|0)<0&&(g=g-h|0,o[x>>2]=g,d=d-h|0,o[T>>2]=d,o[l>>2]=0,h=0),v=g-d|0,p=h-d|0,(d|0)<0?(o[x>>2]=v,o[l>>2]=p,o[T>>2]=0,g=v,d=0):p=h,h=(p|0)<(g|0)?p:g,h=(d|0)<(h|0)?d:h,(h|0)>0&&(o[x>>2]=g-h,o[l>>2]=p-h,o[T>>2]=d-h),o[c+32>>2]=o[A>>2],h=o[N>>2]|0,d=o[B>>2]|0,l=o[M+28>>2]|0,T=o[M+32>>2]|0,g=(o[M+24>>2]|0)+(o[F>>2]|0)|0,x=c+36|0,o[x>>2]=g,h=l+h|0,l=c+40|0,o[l>>2]=h,d=T+d|0,T=c+44|0,o[T>>2]=d,p=h-g|0,(g|0)<0&&(d=d-g|0,o[l>>2]=p,o[T>>2]=d,o[x>>2]=0,h=p,g=0),(h|0)<0&&(g=g-h|0,o[x>>2]=g,d=d-h|0,o[T>>2]=d,o[l>>2]=0,h=0),v=g-d|0,p=h-d|0,(d|0)<0?(o[x>>2]=v,o[l>>2]=p,o[T>>2]=0,g=v,d=0):p=h,h=(p|0)<(g|0)?p:g,h=(d|0)<(h|0)?d:h,(h|0)>0&&(o[x>>2]=g-h,o[l>>2]=p-h,o[T>>2]=d-h),o[c+48>>2]=o[A>>2],h=o[N>>2]|0,d=o[B>>2]|0,l=o[M+40>>2]|0,T=o[M+44>>2]|0,g=(o[M+36>>2]|0)+(o[F>>2]|0)|0,x=c+52|0,o[x>>2]=g,h=l+h|0,l=c+56|0,o[l>>2]=h,d=T+d|0,T=c+60|0,o[T>>2]=d,p=h-g|0,(g|0)<0&&(d=d-g|0,o[l>>2]=p,o[T>>2]=d,o[x>>2]=0,h=p,g=0),(h|0)<0&&(g=g-h|0,o[x>>2]=g,d=d-h|0,o[T>>2]=d,o[l>>2]=0,h=0),v=g-d|0,p=h-d|0,(d|0)<0?(o[x>>2]=v,o[l>>2]=p,o[T>>2]=0,g=v,d=0):p=h,h=(p|0)<(g|0)?p:g,h=(d|0)<(h|0)?d:h,(h|0)>0&&(o[x>>2]=g-h,o[l>>2]=p-h,o[T>>
152]=d-h),o[c+64>>2]=o[A>>2],p=o[N>>2]|0,d=o[B>>2]|0,T=o[M+52>>2]|0,x=o[M+56>>2]|0,g=(o[M+48>>2]|0)+(o[F>>2]|0)|0,l=c+68|0,o[l>>2]=g,p=T+p|0,T=c+72|0,o[T>>2]=p,d=x+d|0,x=c+76|0,o[x>>2]=d,h=p-g|0,(g|0)<0?(d=d-g|0,o[T>>2]=h,o[x>>2]=d,o[l>>2]=0,p=0):(h=p,p=g),(h|0)<0&&(p=p-h|0,o[l>>2]=p,d=d-h|0,o[x>>2]=d,o[T>>2]=0,h=0),v=p-d|0,g=h-d|0,(d|0)<0?(o[l>>2]=v,o[T>>2]=g,o[x>>2]=0,p=v,d=0):g=h,h=(g|0)<(p|0)?g:p,h=(d|0)<(h|0)?d:h,(h|0)<=0){I=q;return}o[l>>2]=p-h,o[T>>2]=g-h,o[x>>2]=d-h,I=q}function Ua(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0;if(B=o[16928+(l<<2)>>2]|0,N=(d|0)!=0,B=N?B*3|0:B,M=A+4|0,v=o[M>>2]|0,T=A+8|0,p=o[T>>2]|0,N){if(g=A+12|0,d=o[g>>2]|0,h=p+v+d|0,(h|0)==(B|0))return B=1,B|0;x=g}else x=A+12|0,h=o[x>>2]|0,d=h,h=p+v+h|0;if((h|0)<=(B|0))return B=0,B|0;do if((d|0)>0){if(h=o[A>>2]|0,(p|0)>0){h=18608+(h*80|0)+60|0,g=v;break}h=18608+(h*80|0)+40|0,c?(g=v-B|0,c=p+g|0,F=(c|0)<0,p=d+p-(F?c:0)|0,v=(p|0)<0,d=d+g-(F?c:0)-(v?p:0)|0,g=(d|0)<0,c=(F?0:c)-(v?p:0)-(g?d:0)|0,p=(v?0:p)-(g?d:0)|0,d=g?0:d,g=(p|0)<(c|0)?p:c,g=(d|0)<(g|0)?d:g,v=(g|0)>0,p=p-(v?g:0)|0,d=d-(v?g:0)|0,g=c-(v?g:0)+B|0,o[M>>2]=g,o[T>>2]=p,o[x>>2]=d):g=v}else h=18608+((o[A>>2]|0)*80|0)+20|0,g=v;while(0);if(o[A>>2]=o[h>>2],v=o[h+16>>2]|0,(v|0)>0){c=0;do F=d+g|0,q=(F|0)<0,se=q?F:0,H=p+g-se|0,X=(H|0)<0,A=X?H:0,g=d+p-se-A|0,p=(g|0)<0,d=p?0:g,g=p?g:0,p=(X?0:H)-g|0,g=(q?0:F)-A-g|0,A=(p|0)<(g|0)?p:g,A=(d|0)<(A|0)?d:A,(A|0)>0&&(g=g-A|0,p=p-A|0,d=d-A|0),c=c+1|0;while((c|0)<(v|0));o[M>>2]=g,o[T>>2]=p,o[x>>2]=d}return H=o[16848+(l<<2)>>2]|0,H=N?H*3|0:H,X=Or(H,o[h+8>>2]|0)|0,se=Or(H,o[h+12>>2]|0)|0,g=(Or(H,o[h+4>>2]|0)|0)+g|0,o[M>>2]=g,p=X+p|0,o[T>>2]=p,d=se+d|0,o[x>>2]=d,h=p-g|0,(g|0)<0?(d=d-g|0,o[T>>2]=h,o[x>>2]=d,o[M>>2]=0,p=0):(h=p,p=g),(h|0)<0?(A=p-h|0,o[M>>2]=A,d=d-h|0,o[x>>2]=d,o[T>>2]=0,g=0):(A=p,g=h),p=A-d|0,h=g-d|0,(d|0)<0?(o[M>>2]=p,o[T>>2]=h,o[x>>2]=0,d=0):(h=g,p=A),g=(h|0)<(p|0)?h:p,g=(d|0)<(g|0)?d:g,(g|0)>0&&(p=p-g|0,h=h-g|0,d=d-g|0,o[M>>2]=p,o[T>>2]=h,o[x>>2]=d),N?(se=(h+p+d|0)==(B|0)?1:2,se|0):(se=2,se|0)}function Ix(A,l){A=A|0,l=l|0;var c=0;do c=Ua(A,l,0,1)|0;while((c|0)==2);return c|0}function y2(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0,St=0,Nt=0,or=0,ct=0,Rt=0,Pr=0,kn=0,xn=0,Un=0,Cn=0;if(kn=I,I=I+272|0,p=kn+256|0,g=kn+240|0,ct=kn,Rt=kn+224|0,Pr=kn+208|0,_e=kn+184|0,ze=kn+168|0,Ne=kn+152|0,Fe=kn+136|0,St=kn+120|0,Nt=kn+96|0,o[p>>2]=l,o[g>>2]=o[A>>2],o[g+4>>2]=o[A+4>>2],o[g+8>>2]=o[A+8>>2],o[g+12>>2]=o[A+12>>2],G3(g,p,ct),o[h>>2]=0,Le=d+c+((d|0)==6&1)|0,(Le|0)<=(c|0)){I=kn;return}se=o[p>>2]|0,$=c+6|0,Ae=Pr+8|0,ee=_e+8|0,me=16928+(se<<2)|0,be=ze+8|0,ce=Ne+8|0,oe=Fe+8|0,H=o[g>>2]|0,B=Rt+4|0,F=Rt+8|0,q=Rt+12|0,X=Pr+8|0,x=_e+8|0,M=_e+16|0,T=Nt+8|0,N=Nt+16|0,g=0,v=c,d=-1;e:for(;;){if(p=(v|0)%6|0,A=ct+(p<<4)|0,o[Rt>>2]=o[A>>2],o[Rt+4>>2]=o[A+4>>2],o[Rt+8>>2]=o[A+8>>2],o[Rt+12>>2]=o[A+12>>2],A=g,g=Ua(Rt,se,0,1)|0,(v|0)>(c|0)&(mi(l)|0)!=0&&(or=o[Rt>>2]|0,(A|0)!=1&(or|0)!=(d|0))){switch(Cn=(p+5|0)%6|0,A=o[ct+(Cn<<4)+12>>2]|0,xn=+((o[ct+(Cn<<4)+8>>2]|0)-A|0),z[Pr>>3]=+((o[ct+(Cn<<4)+4>>2]|0)-A|0)-xn*.5,z[Ae>>3]=xn*.8660254037844386,A=o[ct+(p<<4)+12>>2]|0,xn=+((o[ct+(p<<4)+8>>2]|0)-A|0),z[_e>>3]=+((o[ct+(p<<4)+4>>2]|0)-A|0)-xn*.5,z[ee>>3]=xn*.8660254037844386,xn=+(o[me>>2]|0),z[ze>>3]=xn*3,z[be>>3]=0,Un=xn*-1.5,z[Ne>>3]=Un,z[ce>>3]=xn*2.598076211353316,z[Fe>>3]=Un,z[oe>>3]=xn*-2.598076211353316,o[17008+(H*80|0)+(((d|0)==(H|0)?or:d)<<2)>>2]|0){case 1:{A=Ne,d=ze;break}case 3:{A=Fe,d=Ne;break}case 2:{A=ze,d=Fe;break}default:{A=8;break e}}e4(Pr,_e,d,A,St),!(t4(Pr,St)|0)&&!(t4(_e,St)|0)&&(QA(St,H,se,1,Nt),Cn=o[h>>2]|0,xn=+ho(+ +z[N>>3]),Un=+Rr(+ +z[T>>3],+ +z[Nt>>3]),z[h+8+(Cn<<4)>>3]=xn,z[h+8+(Cn<<4)+8>>3]=Un,o[h>>2]=(o[h>>2]|0)+1)}if((v|0)<($|0)&&(Cn=o[q>>2]|0,xn=+((o[F>>2]|0)-Cn|0),z[Pr>>3]=+((o[B>>2]|0)-Cn|0)-xn*.5,z[X>>3]=xn*.8660254037844386,QA(Pr,o[Rt>>2]|0,se,1,_e),Cn=o[h>>2]|0,xn=+ho(+ +z[M>>3]),Un=+Rr(+ +z[x>>3],+ +z[_e>>3]),z[h+8+(Cn<<4)>>3]=xn,z[h+8+(Cn<<4)+8>>3]=Un,o[h>>2]=(o[h>>2]|0)+1),v=v+1|0,(v|0)>=(Le|0)){A=3;break}else d=o[Rt>>2]|0}
15if((A|0)==3){I=kn;return}else(A|0)==8&&wt(27157,27120,766,27202)}function G3(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0;H=I,I=I+160|0,d=H+80|0,h=H,p=d,g=20336,v=p+72|0;do o[p>>2]=o[g>>2],p=p+4|0,g=g+4|0;while((p|0)<(v|0));p=h,g=20416,v=p+72|0;do o[p>>2]=o[g>>2],p=p+4|0,g=g+4|0;while((p|0)<(v|0));N=(mi(o[l>>2]|0)|0)==0,N=N?d:h,q=A+4|0,p=o[q>>2]|0,B=A+8|0,d=o[B>>2]|0,F=A+12|0,h=o[F>>2]|0,g=d+(p<<1)|0,o[q>>2]=g,d=h+(d<<1)|0,o[B>>2]=d,p=(h<<1)+p|0,o[F>>2]=p,h=d-g|0,v=p-g|0,(g|0)<0&&(o[B>>2]=h,o[F>>2]=v,o[q>>2]=0,d=h,g=0,p=v),v=g-d|0,h=p-d|0,(d|0)<0?(o[q>>2]=v,o[F>>2]=h,o[B>>2]=0,d=0):(h=p,v=g),g=v-h|0,p=d-h|0,(h|0)<0?(o[q>>2]=g,o[B>>2]=p,o[F>>2]=0,h=0):(p=d,g=v),d=(p|0)<(g|0)?p:g,d=(h|0)<(d|0)?h:d,(d|0)>0&&(h=h-d|0,p=p-d|0,g=g-d|0,o[q>>2]=g,o[B>>2]=p,o[F>>2]=h),x=(p<<1)+g|0,v=h+(g<<1)|0,o[q>>2]=v,o[B>>2]=x,p=(h<<1)+p|0,o[F>>2]=p,d=x-v|0,h=p-v|0,(v|0)<0?(o[B>>2]=d,o[F>>2]=h,o[q>>2]=0,v=0,p=h):d=x,g=v-d|0,h=p-d|0,(d|0)<0?(o[q>>2]=g,o[F>>2]=h,o[B>>2]=0,v=g,d=0):h=p,g=v-h|0,p=d-h|0,(h|0)<0?(o[q>>2]=g,o[B>>2]=p,o[F>>2]=0,h=0):(p=d,g=v),d=(p|0)<(g|0)?p:g,d=(h|0)<(d|0)?h:d,(d|0)>0&&(o[q>>2]=g-d,o[B>>2]=p-d,o[F>>2]=h-d),mi(o[l>>2]|0)|0&&(p=o[q>>2]|0,g=o[B>>2]|0,h=o[F>>2]|0,d=(g*3|0)+p|0,p=h+(p*3|0)|0,o[q>>2]=p,o[B>>2]=d,g=(h*3|0)+g|0,o[F>>2]=g,h=d-p|0,v=g-p|0,(p|0)<0?(o[B>>2]=h,o[F>>2]=v,o[q>>2]=0,d=h,x=0):(x=p,v=g),p=x-d|0,h=v-d|0,(d|0)<0?(o[q>>2]=p,o[F>>2]=h,o[B>>2]=0,x=p,g=0):(g=d,h=v),p=x-h|0,d=g-h|0,(h|0)<0?(o[q>>2]=p,o[B>>2]=d,o[F>>2]=0,g=d,h=0):p=x,d=(g|0)<(p|0)?g:p,d=(h|0)<(d|0)?h:d,(d|0)>0&&(o[q>>2]=p-d,o[B>>2]=g-d,o[F>>2]=h-d),o[l>>2]=(o[l>>2]|0)+1),x=0;do o[c+(x<<4)>>2]=o[A>>2],h=o[B>>2]|0,d=o[F>>2]|0,T=o[N+(x*12|0)+4>>2]|0,M=o[N+(x*12|0)+8>>2]|0,g=(o[N+(x*12|0)>>2]|0)+(o[q>>2]|0)|0,l=c+(x<<4)+4|0,o[l>>2]=g,h=T+h|0,T=c+(x<<4)+8|0,o[T>>2]=h,d=M+d|0,M=c+(x<<4)+12|0,o[M>>2]=d,p=h-g|0,(g|0)<0&&(d=d-g|0,o[T>>2]=p,o[M>>2]=d,o[l>>2]=0,h=p,g=0),(h|0)<0&&(g=g-h|0,o[l>>2]=g,d=d-h|0,o[M>>2]=d,o[T>>2]=0,h=0),v=g-d|0,p=h-d|0,(d|0)<0?(o[l>>2]=v,o[T>>2]=p,o[M>>2]=0,g=v,d=0):p=h,h=(p|0)<(g|0)?p:g,h=(d|0)<(h|0)?d:h,(h|0)>0&&(o[l>>2]=g-h,o[T>>2]=p-h,o[M>>2]=d-h),x=x+1|0;while((x|0)!=6);I=H}function v2(A,l){return A=A|0,l=l|0,l=we(A|0,l|0,52)|0,k()|0,l&15|0}function V3(A,l){return A=A|0,l=l|0,l=we(A|0,l|0,45)|0,k()|0,l&127|0}function kx(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,(c+-1|0)>>>0>14?(d=4,d|0):(c=we(A|0,l|0,(15-c|0)*3|0)|0,k()|0,o[d>>2]=c&7,d=0,d|0)}function Ux(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0;if(A>>>0>15)return d=4,d|0;if(l>>>0>121)return d=17,d|0;g=Be(A|0,0,52)|0,h=k()|0,v=Be(l|0,0,45)|0,h=h|(k()|0)|134225919;e:do if((A|0)>=1){for(v=1,g=(ve[20496+l>>0]|0)!=0,p=-1;;){if(l=o[c+(v+-1<<2)>>2]|0,l>>>0>6){h=18,l=10;break}if(!((l|0)==0|g^1))if((l|0)==1){h=19,l=10;break}else g=0;if(T=(15-v|0)*3|0,x=Be(7,0,T|0)|0,h=h&~(k()|0),l=Be(l|0,((l|0)<0)<<31>>31|0,T|0)|0,p=l|p&~x,h=k()|0|h,(v|0)<(A|0))v=v+1|0;else break e}if((l|0)==10)return h|0}else p=-1;while(0);return T=d,o[T>>2]=p,o[T+4>>2]=h,T=0,T|0}function nu(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0;return!(!0&(l&-16777216|0)==134217728)||(d=we(A|0,l|0,52)|0,k()|0,d=d&15,c=we(A|0,l|0,45)|0,k()|0,c=c&127,c>>>0>121)?(A=0,A|0):(g=(d^15)*3|0,h=we(A|0,l|0,g|0)|0,g=Be(h|0,k()|0,g|0)|0,h=k()|0,p=Wn(-1227133514,-1171,g|0,h|0)|0,!((g&613566756&p|0)==0&(h&4681&(k()|0)|0)==0)||(g=(d*3|0)+19|0,p=Be(~A|0,~l|0,g|0)|0,g=we(p|0,k()|0,g|0)|0,!((d|0)==15|(g|0)==0&(k()|0)==0))?(g=0,g|0):!(ve[20496+c>>0]|0)||(l=l&8191,(A|0)==0&(l|0)==0)?(g=1,g|0):(g=L2(A|0,l|0)|0,k()|0,((63-g|0)%3|0|0)!=0|0))}function Ox(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0;return!0&(l&-16777216|0)==134217728&&(d=we(A|0,l|0,52)|0,k()|0,d=d&15,c=we(A|0,l|0,45)|0,k()|0,c=c&127,c>>>0<=121)&&(g=(d^15)*3|0,h=we(A|0,l|0,g|0)|0,g=Be(h|0,k()|0,g|0)|0,h=k()|0,p=Wn(-1227133514,-1171,g|0,h|0)|0,(g&613566756&p|0)==0&(h&4681&(k()|0)|0)==0)&&(g=(d*3|0)+19|0,p=Be(~A|0,~l|0,g|0)|0,g=we(p|0,k()|0,g|0)|0,(d|0)==15|(g|0)==0&(k()|0)==0)&&(!(ve[20496+c>>0]|0)||(c=l&8191,(A|0)==0&(c|0)==0)||(g=L2(A|0,c|0)|0,k()|0,(63-g|0)%3|0|0))||k3(A,l)|0?(g=1,g|0):(g=(n4(A,l)|0)!=0&1,g|0)}function _2(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0;if(h=Be(l|0,0,52)|0,p=k()|0,c=Be(c|0,0,45)|0,c=p|(k()|0)|134225919,(l|0)<1){p=-1,d=c,l=A,o[l>>
152]=p,A=A+4|0,o[A>>2]=d;return}for(p=1,h=-1;g=(15-p|0)*3|0,v=Be(7,0,g|0)|0,c=c&~(k()|0),g=Be(d|0,0,g|0)|0,h=h&~v|g,c=c|(k()|0),(p|0)!=(l|0);)p=p+1|0;v=A,g=v,o[g>>2]=h,v=v+4|0,o[v>>2]=c}function x2(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0;if(p=we(A|0,l|0,52)|0,k()|0,p=p&15,c>>>0>15)return d=4,d|0;if((p|0)<(c|0))return d=12,d|0;if((p|0)==(c|0))return o[d>>2]=A,o[d+4>>2]=l,d=0,d|0;if(h=Be(c|0,0,52)|0,h=h|A,A=k()|0|l&-15728641,(p|0)>(c|0))do l=Be(7,0,(14-c|0)*3|0)|0,c=c+1|0,h=l|h,A=k()|0|A;while((c|0)<(p|0));return o[d>>2]=h,o[d+4>>2]=A,d=0,d|0}function YA(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0;if(p=we(A|0,l|0,52)|0,k()|0,p=p&15,!((c|0)<16&(p|0)<=(c|0)))return d=4,d|0;h=c-p|0,c=we(A|0,l|0,45)|0,k()|0;e:do if(!(an(c&127)|0))c=po(7,0,h,((h|0)<0)<<31>>31)|0,h=k()|0;else{t:do if(p|0){for(c=1;g=Be(7,0,(15-c|0)*3|0)|0,!!((g&A|0)==0&((k()|0)&l|0)==0);)if(c>>>0<p>>>0)c=c+1|0;else break t;c=po(7,0,h,((h|0)<0)<<31>>31)|0,h=k()|0;break e}while(0);c=po(7,0,h,((h|0)<0)<<31>>31)|0,c=ln(c|0,k()|0,5,0)|0,c=De(c|0,k()|0,-5,-1)|0,c=mo(c|0,k()|0,6,0)|0,c=De(c|0,k()|0,1,0)|0,h=k()|0}while(0);return g=d,o[g>>2]=c,o[g+4>>2]=h,g=0,g|0}function Ht(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;if(h=we(A|0,l|0,45)|0,k()|0,!(an(h&127)|0))return h=0,h|0;h=we(A|0,l|0,52)|0,k()|0,h=h&15;e:do if(!h)c=0;else for(d=1;;){if(c=we(A|0,l|0,(15-d|0)*3|0)|0,k()|0,c=c&7,c|0)break e;if(d>>>0<h>>>0)d=d+1|0;else{c=0;break}}while(0);return h=(c|0)==0&1,h|0}function Gx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0;if(g=I,I=I+16|0,p=g,E2(p,A,l,c),l=p,A=o[l>>2]|0,l=o[l+4>>2]|0,(A|0)==0&(l|0)==0)return I=g,0;h=0,c=0;do v=d+(h<<3)|0,o[v>>2]=A,o[v+4>>2]=l,h=De(h|0,c|0,1,0)|0,c=k()|0,N2(p),v=p,A=o[v>>2]|0,l=o[v+4>>2]|0;while(!((A|0)==0&(l|0)==0));return I=g,0}function z3(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,(d|0)<(c|0)?(c=l,d=A,at(c|0),d|0):(c=Be(-1,-1,((d-c|0)*3|0)+3|0)|0,d=Be(~c|0,~(k()|0)|0,(15-d|0)*3|0)|0,c=~(k()|0)&l,d=~d&A,at(c|0),d|0)}function j3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0;return h=we(A|0,l|0,52)|0,k()|0,h=h&15,(c|0)<16&(h|0)<=(c|0)?((h|0)<(c|0)&&(h=Be(-1,-1,((c+-1-h|0)*3|0)+3|0)|0,h=Be(~h|0,~(k()|0)|0,(15-c|0)*3|0)|0,l=~(k()|0)&l,A=~h&A),h=Be(c|0,0,52)|0,c=l&-15728641|(k()|0),o[d>>2]=A|h,o[d+4>>2]=c,d=0,d|0):(d=4,d|0)}function Vx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0,Fe=0;if((c|0)==0&(d|0)==0)return Fe=0,Fe|0;if(h=A,p=o[h>>2]|0,h=o[h+4>>2]|0,!0&(h&15728640|0)==0){if(!((d|0)>0|(d|0)==0&c>>>0>0)||(Fe=l,o[Fe>>2]=p,o[Fe+4>>2]=h,(c|0)==1&(d|0)==0))return Fe=0,Fe|0;h=1,p=0;do ze=A+(h<<3)|0,Ne=o[ze+4>>2]|0,Fe=l+(h<<3)|0,o[Fe>>2]=o[ze>>2],o[Fe+4>>2]=Ne,h=De(h|0,p|0,1,0)|0,p=k()|0;while((p|0)<(d|0)|(p|0)==(d|0)&h>>>0<c>>>0);return h=0,h|0}if(_e=c<<3,Ne=An(_e)|0,!Ne)return Fe=13,Fe|0;if(Li(Ne|0,A|0,_e|0)|0,ze=Cr(c,8)|0,!ze)return Ie(Ne),Fe=13,Fe|0;e:for(;;){h=Ne,T=o[h>>2]|0,h=o[h+4>>2]|0,oe=we(T|0,h|0,52)|0,k()|0,oe=oe&15,Le=oe+-1|0,ce=(oe|0)!=0,be=(d|0)>0|(d|0)==0&c>>>0>0;t:do if(ce&be){if($=Be(Le|0,0,52)|0,Ae=k()|0,Le>>>0>15){if(!((T|0)==0&(h|0)==0)){Fe=16;break e}for(p=0,A=0;;){if(p=De(p|0,A|0,1,0)|0,A=k()|0,!((A|0)<(d|0)|(A|0)==(d|0)&p>>>0<c>>>0))break t;if(g=Ne+(p<<3)|0,me=o[g>>2]|0,g=o[g+4>>2]|0,!((me|0)==0&(g|0)==0)){h=g,Fe=16;break e}}}for(v=T,A=h,p=0,g=0;;){if(!((v|0)==0&(A|0)==0)){if(!(!0&(A&117440512|0)==0)){Fe=21;break e}if(M=we(v|0,A|0,52)|0,k()|0,M=M&15,(M|0)<(Le|0)){h=12,Fe=27;break e}if((M|0)!=(Le|0)&&(v=v|$,A=A&-15728641|Ae,M>>>0>=oe>>>0)){x=Le;do me=Be(7,0,(14-x|0)*3|0)|0,x=x+1|0,v=me|v,A=k()|0|A;while(x>>>0<M>>>0)}if(B=Gs(v|0,A|0,c|0,d|0)|0,F=k()|0,x=ze+(B<<3)|0,M=x,N=o[M>>2]|0,M=o[M+4>>2]|0,!((N|0)==0&(M|0)==0)){X=0,se=0;do{if((X|0)>(d|0)|(X|0)==(d|0)&se>>>0>c>>>0){Fe=31;break e}if((N|0)==(v|0)&(M&-117440513|0)==(A|0)){q=we(N|0,M|0,56)|0,k()|0,q=q&7,H=q+1|0,me=we(N|0,M|0,45)|0,k()|0;n:do if(!(an(me&127)|0))M=7;else{if(N=we(N|0,M|0,52)|0,k()|0,N=N&15,!N){M=6;break}for(M=1;;){if(me=Be(7,0,(15-M|0)*3|0)|0,!((me&v|0)==0&((k()|0)&A|0)==0)){M=7;break n}if(M>>>0<N>>>0)M=M+1|0;else{M=6;break}}}while(0);if((q+2|0)>>>0>M>>>0){Fe=41;break e}me=Be(H|0,0,56)|0,A=k()|0|A&-117440513,ee=x,o[ee>>2]=0,o[ee+4>>2]=0,v=me|v}else B=De(B|0,F|0,1,0)|0,B=go(B|0,k()|0,c|0,d|0)|0,F=k()|0;
15se=De(se|0,X|0,1,0)|0,X=k()|0,x=ze+(B<<3)|0,M=x,N=o[M>>2]|0,M=o[M+4>>2]|0}while(!((N|0)==0&(M|0)==0))}me=x,o[me>>2]=v,o[me+4>>2]=A}if(p=De(p|0,g|0,1,0)|0,g=k()|0,!((g|0)<(d|0)|(g|0)==(d|0)&p>>>0<c>>>0))break t;A=Ne+(p<<3)|0,v=o[A>>2]|0,A=o[A+4>>2]|0}}while(0);if(me=De(c|0,d|0,5,0)|0,ee=k()|0,ee>>>0<0|(ee|0)==0&me>>>0<11){Fe=85;break}if(me=mo(c|0,d|0,6,0)|0,k()|0,me=Cr(me,8)|0,!me){Fe=48;break}do if(be){for(H=0,A=0,q=0,X=0;;){if(M=ze+(H<<3)|0,g=M,p=o[g>>2]|0,g=o[g+4>>2]|0,(p|0)==0&(g|0)==0)ee=q;else{N=we(p|0,g|0,56)|0,k()|0,N=N&7,v=N+1|0,B=g&-117440513,ee=we(p|0,g|0,45)|0,k()|0;t:do if(an(ee&127)|0){if(F=we(p|0,g|0,52)|0,k()|0,F=F&15,F|0)for(x=1;;){if(ee=Be(7,0,(15-x|0)*3|0)|0,!((p&ee|0)==0&(B&(k()|0)|0)==0))break t;if(x>>>0<F>>>0)x=x+1|0;else break}g=Be(v|0,0,56)|0,p=g|p,g=k()|0|B,v=M,o[v>>2]=p,o[v+4>>2]=g,v=N+2|0}while(0);(v|0)==7?(ee=me+(A<<3)|0,o[ee>>2]=p,o[ee+4>>2]=g&-117440513,A=De(A|0,q|0,1,0)|0,ee=k()|0):ee=q}if(H=De(H|0,X|0,1,0)|0,X=k()|0,(X|0)<(d|0)|(X|0)==(d|0)&H>>>0<c>>>0)q=ee;else break}if(be){if(se=Le>>>0>15,$=Be(Le|0,0,52)|0,Ae=k()|0,!ce){for(p=0,x=0,v=0,g=0;(T|0)==0&(h|0)==0||(Le=l+(p<<3)|0,o[Le>>2]=T,o[Le+4>>2]=h,p=De(p|0,x|0,1,0)|0,x=k()|0),v=De(v|0,g|0,1,0)|0,g=k()|0,!!((g|0)<(d|0)|(g|0)==(d|0)&v>>>0<c>>>0);)h=Ne+(v<<3)|0,T=o[h>>2]|0,h=o[h+4>>2]|0;h=ee;break}for(p=0,x=0,g=0,v=0;;){do if(!((T|0)==0&(h|0)==0)){if(F=we(T|0,h|0,52)|0,k()|0,F=F&15,se|(F|0)<(Le|0)){Fe=80;break e}if((F|0)!=(Le|0)){if(M=T|$,N=h&-15728641|Ae,F>>>0>=oe>>>0){B=Le;do ce=Be(7,0,(14-B|0)*3|0)|0,B=B+1|0,M=ce|M,N=k()|0|N;while(B>>>0<F>>>0)}}else M=T,N=h;q=Gs(M|0,N|0,c|0,d|0)|0,B=0,F=0,X=k()|0;do{if((B|0)>(d|0)|(B|0)==(d|0)&F>>>0>c>>>0){Fe=81;break e}if(ce=ze+(q<<3)|0,H=o[ce+4>>2]|0,(H&-117440513|0)==(N|0)&&(o[ce>>2]|0)==(M|0)){Fe=65;break}ce=De(q|0,X|0,1,0)|0,q=go(ce|0,k()|0,c|0,d|0)|0,X=k()|0,F=De(F|0,B|0,1,0)|0,B=k()|0,ce=ze+(q<<3)|0}while(!((o[ce>>2]|0)==(M|0)&&(o[ce+4>>2]|0)==(N|0)));if((Fe|0)==65&&(Fe=0,!0&(H&117440512|0)==100663296))break;ce=l+(p<<3)|0,o[ce>>2]=T,o[ce+4>>2]=h,p=De(p|0,x|0,1,0)|0,x=k()|0}while(0);if(g=De(g|0,v|0,1,0)|0,v=k()|0,!((v|0)<(d|0)|(v|0)==(d|0)&g>>>0<c>>>0))break;h=Ne+(g<<3)|0,T=o[h>>2]|0,h=o[h+4>>2]|0}h=ee}else p=0,h=ee}else p=0,A=0,h=0;while(0);if(yo(ze|0,0,_e|0)|0,Li(Ne|0,me|0,A<<3|0)|0,Ie(me),(A|0)==0&(h|0)==0){Fe=89;break}else l=l+(p<<3)|0,d=h,c=A}if((Fe|0)==16)!0&(h&117440512|0)==0?(h=4,Fe=27):Fe=21;else if((Fe|0)==31)wt(27634,27225,620,27235);else{if((Fe|0)==41)return Ie(Ne),Ie(ze),Fe=10,Fe|0;if((Fe|0)==48)return Ie(Ne),Ie(ze),Fe=13,Fe|0;(Fe|0)==80?wt(27634,27225,711,27235):(Fe|0)==81?wt(27634,27225,723,27235):(Fe|0)==85&&(Li(l|0,Ne|0,c<<3|0)|0,Fe=89)}return(Fe|0)==21?(Ie(Ne),Ie(ze),Fe=5,Fe|0):(Fe|0)==27?(Ie(Ne),Ie(ze),Fe=h,Fe|0):(Fe|0)==89?(Ie(Ne),Ie(ze),Fe=0,Fe|0):0}function zx(A,l,c,d,h,p,g){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0,g=g|0;var v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0;if(H=I,I=I+16|0,q=H,!((c|0)>0|(c|0)==0&l>>>0>0))return q=0,I=H,q|0;if((g|0)>=16)return q=12,I=H,q|0;B=0,F=0,N=0,v=0;e:for(;;){if(T=A+(B<<3)|0,x=o[T>>2]|0,T=o[T+4>>2]|0,M=we(x|0,T|0,52)|0,k()|0,(M&15|0)>(g|0)){v=12,x=11;break}if(E2(q,x,T,g),M=q,T=o[M>>2]|0,M=o[M+4>>2]|0,(T|0)==0&(M|0)==0)x=N;else{x=N;do{if(!((v|0)<(p|0)|(v|0)==(p|0)&x>>>0<h>>>0)){x=10;break e}N=d+(x<<3)|0,o[N>>2]=T,o[N+4>>2]=M,x=De(x|0,v|0,1,0)|0,v=k()|0,N2(q),N=q,T=o[N>>2]|0,M=o[N+4>>2]|0}while(!((T|0)==0&(M|0)==0))}if(B=De(B|0,F|0,1,0)|0,F=k()|0,(F|0)<(c|0)|(F|0)==(c|0)&B>>>0<l>>>0)N=x;else{v=0,x=11;break}}return(x|0)==10?(q=14,I=H,q|0):(x|0)==11?(I=H,v|0):0}function jx(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0;B=I,I=I+16|0,N=B;e:do if((c|0)>0|(c|0)==0&l>>>0>0){for(T=0,g=0,p=0,M=0;;){if(x=A+(T<<3)|0,v=o[x>>2]|0,x=o[x+4>>2]|0,!((v|0)==0&(x|0)==0)&&(x=(YA(v,x,d,N)|0)==0,v=N,g=De(o[v>>2]|0,o[v+4>>2]|0,g|0,p|0)|0,p=k()|0,!x)){p=12;break}if(T=De(T|0,M|0,1,0)|0,M=k()|0,!((M|0)<(c|0)|(M|0)==(c|0)&T>>>0<l>>>0))break e}return I=B,p|0}else g=0,p=0;while(0);return o[h>>2]=g,o[h+4>>2]=p,h=0,I=B,h|0}function $x(A,l){return A=A|0,l=l|0,l=we(A|0,l|0,52)|0,k()|0,l&1|0}function Gr(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;if(h=we(A|0,l|0,52)|0,k()|0,h=h&15,!h)return h=0,h|0;for(d=1;;){if(c=we(A|0,l|0,(15-d|0)*3|0)|0,k()|0,c=c&7,c|0){d=5;break}if(d>>>0<h>>>0)d=d+1|0;else{c=0,d=5;break}}return(d|0)==5?c|0:0}function b2(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(M=we(A|0,l|0,52)|0,k()|0,M=M&15,!M)return T=l,M=A,at(T|0),M|0;for(T=1,c=0;;){switch(d=(15-T|0)*3|0,v=Be(7,0,d|0)|0,x=k()|0,p=A&~v,g=l&~x,A=we(A|0,l|0,d|0)|0,k()|0,A&7){case 1:{A=5;break}case 5:{A=4;break}case 4:{A=6;break}case 6:{A=2;break}case 2:{A=3;break}case 3:{A=1;break}default:A=A&7}d=Be(A|0,0,d|0)|0,h=k()|0,A=d|p,l=h|g;e:do if(!c)if((d&v|0)==0&(h&x|0)==0)c=0;else if(g=we(A|0,l|0,52)|0,k()|0,g=g&15,!g)c=1;else{c=1;t:for(;;){switch(x=we(A|0,l|0,(15-c|0)*3|0)|0,k()|0,x&7){case 1:break t;case 0:break;default:{c=1;break e}}if(c>>>0<g>>>0)c=c+1|0;else{c=1;break e}}for(p=1;;){switch(h=(15-p|0)*3|0,c=we(A|0,l|0,h|0)|0,k()|0,d=Be(7,0,h|0)|0,d=A&~d,l=l&~(k()|0),c&7){case 1:{A=5;break}case 5:{A=4;break}case 4:{A=6;break}case 6:{A=2;break}case 2:{A=3;break}case 3:{A=1;break}default:A=c&7}if(A=Be(A|0,0,h|0)|0,A=A|d,l=k()|0|l,p>>>0<g>>>0)p=p+1|0;else{c=1;break e}}}while(0);if(T>>>0<M>>>0)T=T+1|0;else break}return at(l|0),A|0}function Zo(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0;if(g=we(A|0,l|0,52)|0,k()|0,g=g&15,!g)return p=l,g=A,at(p|0),g|0;for(p=1;;){switch(h=(15-p|0)*3|0,c=we(A|0,l|0,h|0)|0,k()|0,d=Be(7,0,h|0)|0,d=A&~d,l=l&~(k()|0),c&7){case 1:{A=5;break}case 5:{A=4;break}case 4:{A=6;break}case 6:{A=2;break}case 2:{A=3;break}case 3:{A=1;break}default:A=c&7}if(A=Be(A|0,0,h|0)|0,A=A|d,l=k()|0|l,p>>>0<g>>>0)p=p+1|0;else break}return at(l|0),A|0}function Hx(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(M=we(A|0,l|0,52)|0,k()|0,M=M&15,!M)return T=l,M=A,at(T|0),M|0;for(T=1,c=0;;){switch(d=(15-T|0)*3|0,v=Be(7,0,d|0)|0,x=k()|0,p=A&~v,g=l&~x,A=we(A|0,l|0,d|0)|0,k()|0,A&7){case 1:{A=3;break}case 3:{A=2;break}case 2:{A=6;break}case 6:{A=4;break}case 4:{A=5;break}case 5:{A=1;break}default:A=A&7}d=Be(A|0,0,d|0)|0,h=k()|0,A=d|p,l=h|g;e:do if(!c)if((d&v|0)==0&(h&x|0)==0)c=0;else if(g=we(A|0,l|0,52)|0,k()|0,g=g&15,!g)c=1;else{c=1;t:for(;;){switch(x=we(A|0,l|0,(15-c|0)*3|0)|0,k()|0,x&7){case 1:break t;case 0:break;default:{c=1;break e}}if(c>>>0<g>>>0)c=c+1|0;else{c=1;break e}}for(p=1;;){switch(c=(15-p|0)*3|0,d=Be(7,0,c|0)|0,d=A&~d,h=l&~(k()|0),A=we(A|0,l|0,c|0)|0,k()|0,A&7){case 1:{A=3;break}case 3:{A=2;break}case 2:{A=6;break}case 6:{A=4;break}case 4:{A=5;break}case 5:{A=1;break}default:A=A&7}if(A=Be(A|0,0,c|0)|0,A=A|d,l=k()|0|h,p>>>0<g>>>0)p=p+1|0;else{c=1;break e}}}while(0);if(T>>>0<M>>>0)T=T+1|0;else break}return at(l|0),A|0}function T2(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0;if(g=we(A|0,l|0,52)|0,k()|0,g=g&15,!g)return p=l,g=A,at(p|0),g|0;for(p=1;;){switch(d=(15-p|0)*3|0,c=Be(7,0,d|0)|0,c=A&~c,h=l&~(k()|0),A=we(A|0,l|0,d|0)|0,k()|0,A&7){case 1:{A=3;break}case 3:{A=2;break}case 2:{A=6;break}case 6:{A=4;break}case 4:{A=5;break}case 5:{A=1;break}default:A=A&7}if(A=Be(A|0,0,d|0)|0,A=A|c,l=k()|0|h,p>>>0<g>>>0)p=p+1|0;else break}return at(l|0),A|0}function Wx(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0;if(ee=I,I=I+16|0,Ae=ee,Be(l|0,0,52)|0,c=k()|0|134225919,!l)return(o[A+4>>2]|0)>2||(o[A+8>>2]|0)>2||(o[A+12>>2]|0)>2?($=0,Ae=0,at($|0),I=ee,Ae|0):(Be(B3(A)|0,0,45)|0,$=k()|0|c,Ae=-1,at($|0),I=ee,Ae|0);o[Ae>>2]=o[A>>2],o[Ae+4>>2]=o[A+4>>2],o[Ae+8>>2]=o[A+8>>2],o[Ae+12>>2]=o[A+12>>2],$=Ae+4|0;e:do if((l|0)>0)for(H=Ae+8|0,X=Ae+12|0,q=l,N=o[H>>2]|0,B=o[X>>2]|0,l=-1,M=o[Ae+4>>
152]|0;;){F=q,q=q+-1|0,A=M-B|0,d=N-B|0,F&1?(p=rs(+((A*3|0)-d|0)*.14285714285714285)|0,o[$>>2]=p,A=rs(+((d<<1)+A|0)*.14285714285714285)|0,o[H>>2]=A,o[X>>2]=0,d=A-p|0,h=0-p|0,(p|0)<0?(o[H>>2]=d,o[X>>2]=h,o[$>>2]=0,A=d,g=0):(g=p,h=0),p=g-A|0,d=h-A|0,(A|0)<0?(o[$>>2]=p,o[X>>2]=d,o[H>>2]=0,g=p,p=0):(d=h,p=A),A=g-d|0,h=p-d|0,(d|0)<0?(o[$>>2]=A,o[H>>2]=h,o[X>>2]=0,p=0):(h=p,A=g,p=d),d=(h|0)<(A|0)?h:A,d=(p|0)<(d|0)?p:d,(d|0)>0&&(p=p-d|0,h=h-d|0,A=A-d|0,o[$>>2]=A,o[H>>2]=h,o[X>>2]=p),be=h+(A*3|0)|0,me=(be|0)<0,T=p+(h*3|0)-(me?be:0)|0,x=(T|0)<0,d=(p*3|0)+A-(me?be:0)-(x?T:0)|0,v=(d|0)<0,ce=v?0:d,g=(x?0:T)-(v?d:0)|0,d=(me?0:be)-(x?T:0)-(v?d:0)|0,v=(g|0)<(d|0)?g:d,v=(ce|0)<(v|0)?ce:v,T=(v|0)>0,x=T?v:0,g=g-(T?v:0)|0,v=ce-(T?v:0)|0,T=p):(v=rs(+((A<<1)+d|0)*.14285714285714285)|0,o[$>>2]=v,h=rs(+((d*3|0)-A|0)*.14285714285714285)|0,o[H>>2]=h,o[X>>2]=0,d=h-v|0,A=0-v|0,(v|0)<0?(o[H>>2]=d,o[X>>2]=A,o[$>>2]=0,h=d,v=0):A=0,g=v-h|0,d=A-h|0,(h|0)<0?(o[$>>2]=g,o[X>>2]=d,o[H>>2]=0,p=d,h=0):(p=A,g=v),A=g-p|0,d=h-p|0,(p|0)<0?(o[$>>2]=A,o[H>>2]=d,o[X>>2]=0,h=d,p=0):A=g,d=(h|0)<(A|0)?h:A,d=(p|0)<(d|0)?p:d,(d|0)>0&&(p=p-d|0,h=h-d|0,A=A-d|0,o[$>>2]=A,o[H>>2]=h,o[X>>2]=p),be=p+(A*3|0)|0,ce=(be|0)<0,T=(h*3|0)+A-(ce?be:0)|0,x=(T|0)<0,d=(p*3|0)+h-(ce?be:0)-(x?T:0)|0,v=(d|0)<0,me=v?0:d,g=(x?0:T)-(v?d:0)|0,d=(ce?0:be)-(x?T:0)-(v?d:0)|0,v=(g|0)<(d|0)?g:d,v=(me|0)<(v|0)?me:v,T=(v|0)>0,x=T?v:0,g=g-(T?v:0)|0,v=me-(T?v:0)|0,T=p),d=M+(x-d)|0,p=(d|0)<0,x=N-g-(p?d:0)|0,g=(x|0)<0,B=B-v+(p?0-d|0:0)+(g?0-x|0:0)|0,M=(B|0)<0,v=M?0:B,ce=(g?0:x)-(M?B:0)|0,B=(p?0:d)-(g?x:0)-(M?B:0)|0,M=(ce|0)<(B|0)?ce:B,M=(v|0)<(M|0)?v:M,x=(M|0)>0,B=B-(x?M:0)|0,g=(15-F|0)*3|0,d=Be(7,0,g|0)|0,d=l&~d,p=c&~(k()|0),N=(B|0)<0,be=N?B:0,ce=ce-(x?M:0)-be|0,me=(ce|0)<0,be=(me?0-ce|0:0)+(v-(x?M:0)-be)|0,c=(be|0)<0,l=c?0:be,be=c?be:0,c=(me?0:ce)-be|0,be=(N?0:B)-(me?ce:0)-be|0,ce=(c|0)<(be|0)?c:be,ce=(l|0)<(ce|0)?l:ce,ce=(ce|0)>0?ce:0,l=l-ce|0,c=c-ce|0;t:do switch(be-ce|0){case 0:switch(c|0){case 0:{l=l|0?(l|0)==1?1:7:0;break t}case 1:{l=l|0?(l|0)==1?3:7:2;break t}default:{se=36;break t}}case 1:switch(c|0){case 0:{l=l|0?(l|0)==1?5:7:4;break t}case 1:if(l){se=36;break t}else{l=6;break t}default:{se=36;break t}}default:se=36}while(0);if((se|0)==36&&(se=0,l=7),l=Be(l|0,0,g|0)|0,l=l|d,c=k()|0|p,(F|0)<=1)break e;N=h,B=T,M=A}else l=-1,A=o[$>>2]|0;while(0);e:do if((A|0)<=2&&(o[Ae+8>>2]|0)<=2&&(o[Ae+12>>2]|0)<=2){if(d=B3(Ae)|0,A=Be(d|0,0,45)|0,l=A|l,A=k()|0|c&-1040385,x=px(Ae)|0,!(an(d)|0)){if((x|0)<=0)break;for(v=0;;){g=we(l|0,A|0,52)|0,k()|0,g=g&15;t:do if(g)for(p=1;;){switch(h=(15-p|0)*3|0,c=we(l|0,A|0,h|0)|0,k()|0,d=Be(7,0,h|0)|0,l=l&~d,d=A&~(k()|0),c&7){case 1:{A=5;break}case 5:{A=4;break}case 4:{A=6;break}case 6:{A=2;break}case 2:{A=3;break}case 3:{A=1;break}default:A=c&7}if(A=Be(A|0,0,h|0)|0,l=A|l,A=k()|0|d,p>>>0<g>>>0)p=p+1|0;else break t}while(0);if(v=v+1|0,(v|0)==(x|0))break e}}g=we(l|0,A|0,52)|0,k()|0,g=g&15;t:do if(g){c=1;n:for(;;){switch(ce=we(l|0,A|0,(15-c|0)*3|0)|0,k()|0,ce&7){case 1:break n;case 0:break;default:break t}if(c>>>0<g>>>0)c=c+1|0;else break t}if(F3(d,o[Ae>>2]|0)|0)for(p=1;;){switch(c=(15-p|0)*3|0,d=Be(7,0,c|0)|0,d=l&~d,h=A&~(k()|0),A=we(l|0,A|0,c|0)|0,k()|0,A&7){case 1:{A=3;break}case 3:{A=2;break}case 2:{A=6;break}case 6:{A=4;break}case 4:{A=5;break}case 5:{A=1;break}default:A=A&7}if(l=Be(A|0,0,c|0)|0,l=l|d,A=k()|0|h,p>>>0<g>>>0)p=p+1|0;else break t}else for(p=1;;){switch(h=(15-p|0)*3|0,c=we(l|0,A|0,h|0)|0,k()|0,d=Be(7,0,h|0)|0,l=l&~d,d=A&~(k()|0),c&7){case 1:{A=5;break}case 5:{A=4;break}case 4:{A=6;break}case 6:{A=2;break}case 2:{A=3;break}case 3:{A=1;break}default:A=c&7}if(A=Be(A|0,0,h|0)|0,l=A|l,A=k()|0|d,p>>>0<g>>>0)p=p+1|0;else break t}}while(0);if((x|0)>0){c=0;do l=b2(l,A)|0,A=k()|0,c=c+1|0;while((c|0)!=(x|0))}}else l=0,A=0;while(0);return be=A,ce=l,at(be|0),I=ee,ce|0}function mi(A){return A=A|0,(A|0)%2|0|0}function w2(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0;if(M=I,I=I+64|0,v=M+24|0,x=M+48|0,T=M,l>>>0>15)return T=4,I=M,T|0;if(p=+z[A>>3],z[ht>>3]=p,(o[ht+4>>2]&2146435072|0)==2146435072||(d=+z[A+8>>3],z[ht>>3]=d,(o[ht+4>>2]&2146435072|0)==2146435072))return T=3,I=M,T|0;
15h=+Zt(+p),N=h*+Zt(+d),h=h*+tn(+d),d=+tn(+p),z[T>>3]=N,z[T+8>>3]=h,z[T+16>>3]=d,z[ht>>3]=N;do if((o[ht+4>>2]&2146435072|0)!=2146435072&&(z[ht>>3]=d,A=o[ht+4>>2]|0,z[ht>>3]=h,!((o[ht+4>>2]&2146435072|0)==2146435072|!0&(A&2146435072|0)==2146435072)))if(o[v>>2]=o[T>>2],o[v+4>>2]=o[T+4>>2],o[v+8>>2]=o[T+8>>2],o[v+12>>2]=o[T+12>>2],o[v+16>>2]=o[T+16>>2],o[v+20>>2]=o[T+20>>2],Lx(v,l,x),x=Wx(x,l)|0,T=k()|0,o[c>>2]=x,o[c+4>>2]=T,(x|0)==0&(T|0)==0)wt(27634,27225,1073,27248);else{g=0;break}else g=2;while(0);return T=g,I=M,T|0}function S2(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;if(F=c+4|0,q=we(A|0,l|0,52)|0,k()|0,q=q&15,B=we(A|0,l|0,45)|0,k()|0,d=(q|0)==0,an(B&127)|0){if(d)return q=1,q|0;d=1}else{if(d)return q=0,q|0;!(o[F>>2]|0)&&!(o[c+8>>2]|0)?d=(o[c+12>>2]|0)!=0&1:d=1}for(B=c+8|0,N=c+12|0,M=1,c=o[F>>2]|0,g=o[B>>2]|0,p=o[N>>2]|0;h=c*3|0,v=g*3|0,T=p*3|0,M&1?(x=g+h|0,o[F>>2]=x,p=p+v|0,o[B>>2]=p,h=T+c|0,o[N>>2]=h,c=p-x|0,g=h-x|0,(x|0)<0?(o[B>>2]=c,o[N>>2]=g,o[F>>2]=0,v=0,h=g):(c=p,v=x),g=v-c|0,p=h-c|0,(c|0)<0?(o[F>>2]=g,o[N>>2]=p,o[B>>2]=0,v=g,h=0):(p=h,h=c),c=v-p|0,g=h-p|0,(p|0)<0?(o[F>>2]=c,o[B>>2]=g,o[N>>2]=0,p=0):(g=h,c=v),h=(g|0)<(c|0)?g:c,h=(p|0)<(h|0)?p:h,(h|0)>0&&(p=p-h|0,g=g-h|0,c=c-h|0,o[F>>2]=c,o[B>>2]=g,o[N>>2]=p)):(x=v+c|0,v=p+h|0,o[F>>2]=v,o[B>>2]=x,h=T+g|0,o[N>>2]=h,c=x-v|0,p=h-v|0,(v|0)<0?(o[B>>2]=c,o[N>>2]=p,o[F>>2]=0,v=0,h=p):c=x,g=v-c|0,p=h-c|0,(c|0)<0?(o[F>>2]=g,o[N>>2]=p,o[B>>2]=0,v=g,h=0):(p=h,h=c),c=v-p|0,g=h-p|0,(p|0)<0?(o[F>>2]=c,o[B>>2]=g,o[N>>2]=0,p=0):(g=h,c=v),h=(g|0)<(c|0)?g:c,h=(p|0)<(h|0)?p:h,(h|0)>0&&(p=p-h|0,g=g-h|0,c=c-h|0,o[F>>2]=c,o[B>>2]=g,o[N>>2]=p)),h=we(A|0,l|0,(15-M|0)*3|0)|0,k()|0,h=h&7,(h+-1|0)>>>0<6&&(x=o[22032+(h*12|0)+4>>2]|0,T=o[22032+(h*12|0)+8>>2]|0,v=(o[22032+(h*12|0)>>2]|0)+c|0,o[F>>2]=v,g=x+g|0,o[B>>2]=g,c=T+p|0,o[N>>2]=c,p=g-v|0,h=c-v|0,(v|0)<0&&(o[B>>2]=p,o[N>>2]=h,o[F>>2]=0,v=0,c=h,g=p),h=v-g|0,p=c-g|0,(g|0)<0?(o[F>>2]=h,o[N>>2]=p,o[B>>2]=0,v=h,g=0):p=c,c=v-p|0,h=g-p|0,(p|0)<0?(o[F>>2]=c,o[B>>2]=h,o[N>>2]=0,g=h,p=0):c=v,h=(g|0)<(c|0)?g:c,h=(p|0)<(h|0)?p:h,(h|0)>0&&(p=p-h|0,g=g-h|0,c=c-h|0,o[F>>2]=c,o[B>>2]=g,o[N>>2]=p)),M>>>0<q>>>0;)M=M+1|0;return d|0}function Oa(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;if(q=I,I=I+16|0,N=q,B=we(A|0,l|0,45)|0,k()|0,B=B&127,B>>>0>121)return o[c>>2]=0,o[c+4>>2]=0,o[c+8>>2]=0,o[c+12>>2]=0,F=5,I=q,F|0;e:do if(an(B)|0&&(v=we(A|0,l|0,52)|0,k()|0,v=v&15,(v|0)!=0)){d=1;t:for(;;){switch(F=we(A|0,l|0,(15-d|0)*3|0)|0,k()|0,F&7){case 5:break t;case 0:break;default:{T=l;break e}}if(d>>>0<v>>>0)d=d+1|0;else{T=l;break e}}for(g=1,d=l;;){switch(l=(15-g|0)*3|0,h=Be(7,0,l|0)|0,h=A&~h,p=d&~(k()|0),d=we(A|0,d|0,l|0)|0,k()|0,d&7){case 1:{d=3;break}case 3:{d=2;break}case 2:{d=6;break}case 6:{d=4;break}case 4:{d=5;break}case 5:{d=1;break}default:d=d&7}if(A=Be(d|0,0,l|0)|0,A=A|h,d=k()|0|p,g>>>0<v>>>0)g=g+1|0;else{T=d;break e}}}else T=l;while(0);if(F=7696+(B*28|0)|0,o[c>>2]=o[F>>2],o[c+4>>2]=o[F+4>>2],o[c+8>>2]=o[F+8>>2],o[c+12>>2]=o[F+12>>2],!(S2(A,T,c)|0))return F=0,I=q,F|0;if(F=c+4|0,o[N>>2]=o[F>>2],o[N+4>>2]=o[F+4>>2],o[N+8>>2]=o[F+8>>2],x=we(A|0,T|0,52)|0,k()|0,M=x&15,x&1?(p=o[F>>2]|0,v=c+8|0,h=o[v>>2]|0,x=c+12|0,l=o[x>>2]|0,d=(h*3|0)+p|0,p=l+(p*3|0)|0,o[F>>2]=p,o[v>>2]=d,h=(l*3|0)+h|0,o[x>>2]=h,l=d-p|0,g=h-p|0,(p|0)<0&&(o[v>>2]=l,o[x>>2]=g,o[F>>2]=0,d=l,p=0,h=g),g=p-d|0,l=h-d|0,(d|0)<0?(o[F>>2]=g,o[x>>2]=l,o[v>>2]=0,d=0):(l=h,g=p),p=g-l|0,h=d-l|0,(l|0)<0?(o[F>>2]=p,o[v>>2]=h,o[x>>2]=0,l=0):(h=d,p=g),d=(h|0)<(p|0)?h:p,d=(l|0)<(d|0)?l:d,(d|0)>0&&(o[F>>2]=p-d,o[v>>2]=h-d,o[x>>2]=l-d),h=M+1|0):h=M,!(an(B)|0))d=0;else{e:do if(!M)d=0;else for(l=1;;){if(d=we(A|0,T|0,(15-l|0)*3|0)|0,k()|0,d=d&7,d|0)break e;if(l>>>0<M>>>0)l=l+1|0;else{d=0;break}}while(0);d=(d|0)==4&1}if(!(Ua(c,h,d,0)|0))(h|0)!=(M|0)&&(o[F>>2]=o[N>>2],o[F+4>>2]=o[N+4>>2],o[F+8>>2]=o[N+8>>2]);else{if(an(B)|0)do;while(Ua(c,h,0,0)|0);(h|0)!=(M|0)&&(v=c+12|0,A=o[v>>2]|0,d=(o[F>>2]|0)-A|0,g=c+8|0,A=(o[g>>2]|0)-A|0,l=rs(+((d<<1)+A|0)*.14285714285714285)|0,o[F>>2]=l,d=rs(+((A*3|0)-d|0)*.14285714285714285)|0,o[g>>2]=d,o[v>>2]=0,A=d-l|0,h=0-l|0,(l|0)<0?(o[g>>2]=A,o[v>>2]=h,o[F>>2]=0,d=A,l=0):h=0,p=l-d|0,A=h-d|0,(d|0)<0?(o[F>>2]=p,o[v>>2]=A,o[g>>2]=0,l=p,d=0):A=h,p=l-A|0,h=d-A|0,(A|0)<0?(o[F>>2]=p,o[g>>2]=h,o[v>>2]=0,l=p,A=0):h=d,d=(h|0)<(l|0)?h:l,d=(A|0)<(d|0)?A:d,(d|0)>0&&(o[F>>2]=l-d,o[g>>2]=h-d,o[v>>2]=A-d))}return F=0,I=q,F|0}function Ga(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0;return g=I,I=I+48|0,d=g+24|0,h=g,p=Oa(A,l,d)|0,p?(I=g,p|0):(p=we(A|0,l|0,52)|0,k()|0,qx(d,p&15,h),x=+ho(+ +z[h+16>>3]),v=+Rr(+ +z[h+8>>3],+ +z[h>>3]),z[c>>3]=x,z[c+8>>3]=v,p=0,I=g,p|0)}function Jo(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0;if(g=I,I=I+16|0,p=g,d=Oa(A,l,p)|0,d|0)return p=d,I=g,p|0;d=we(A|0,l|0,45)|0,k()|0,d=(an(d&127)|0)==0,h=we(A|0,l|0,52)|0,k()|0,h=h&15;e:do if(!d){if(h|0)for(d=1;;){if(v=Be(7,0,(15-d|0)*3|0)|0,!((v&A|0)==0&((k()|0)&l|0)==0))break e;if(d>>>0<h>>>0)d=d+1|0;else break}return g2(p,h,0,5,c),v=0,I=g,v|0}while(0);return y2(p,h,0,6,c),v=0,I=g,v|0}function Qx(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;if(h=we(A|0,l|0,45)|0,k()|0,!(an(h&127)|0))return h=2,o[c>>2]=h,0;if(h=we(A|0,l|0,52)|0,k()|0,h=h&15,!h)return h=5,o[c>>2]=h,0;for(d=1;;){if(p=Be(7,0,(15-d|0)*3|0)|0,!((p&A|0)==0&((k()|0)&l|0)==0)){d=2,A=6;break}if(d>>>0<h>>>0)d=d+1|0;else{d=5,A=6;break}}return(A|0)==6&&(o[c>>2]=d),0}function $3(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0;N=I,I=I+128|0,T=N+112|0,p=N+96|0,M=N,h=we(A|0,l|0,52)|0,k()|0,v=h&15,o[T>>2]=v,g=we(A|0,l|0,45)|0,k()|0,g=g&127;e:do if(an(g)|0){if(v|0)for(d=1;;){if(x=Be(7,0,(15-d|0)*3|0)|0,!((x&A|0)==0&((k()|0)&l|0)==0)){h=0;break e}if(d>>>0<v>>>0)d=d+1|0;else break}if(h&1)h=1;
15else return x=Be(v+1|0,0,52)|0,M=k()|0|l&-15728641,T=Be(7,0,(14-v|0)*3|0)|0,M=$3((x|A)&~T,M&~(k()|0),c)|0,I=N,M|0}else h=0;while(0);if(d=Oa(A,l,p)|0,!d){h?(O3(p,T,M),x=5):(G3(p,T,M),x=6);e:do if(an(g)|0)if(!v)A=5;else for(d=1;;){if(g=Be(7,0,(15-d|0)*3|0)|0,!((g&A|0)==0&((k()|0)&l|0)==0)){A=2;break e}if(d>>>0<v>>>0)d=d+1|0;else{A=5;break}}else A=2;while(0);yo(c|0,-1,A<<2|0)|0;e:do if(h)for(p=0;;){if(g=M+(p<<4)|0,Ix(g,o[T>>2]|0)|0,g=o[g>>2]|0,v=o[c>>2]|0,(v|0)==-1|(v|0)==(g|0))d=c;else{h=0;do{if(h=h+1|0,h>>>0>=A>>>0){d=1;break e}d=c+(h<<2)|0,v=o[d>>2]|0}while(!((v|0)==-1|(v|0)==(g|0)))}if(o[d>>2]=g,p=p+1|0,p>>>0>=x>>>0){d=0;break}}else for(p=0;;){if(g=M+(p<<4)|0,Ua(g,o[T>>2]|0,0,1)|0,g=o[g>>2]|0,v=o[c>>2]|0,(v|0)==-1|(v|0)==(g|0))d=c;else{h=0;do{if(h=h+1|0,h>>>0>=A>>>0){d=1;break e}d=c+(h<<2)|0,v=o[d>>2]|0}while(!((v|0)==-1|(v|0)==(g|0)))}if(o[d>>2]=g,p=p+1|0,p>>>0>=x>>>0){d=0;break}}while(0)}return M=d,I=N,M|0}function Yx(){return 12}function M2(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0;if(A>>>0>15)return v=4,v|0;if(Be(A|0,0,52)|0,v=k()|0|134225919,!A){c=0,d=0;do an(d)|0&&(Be(d|0,0,45)|0,g=v|(k()|0),A=l+(c<<3)|0,o[A>>2]=-1,o[A+4>>2]=g,c=c+1|0),d=d+1|0;while((d|0)!=122);return c=0,c|0}c=0,g=0;do{if(an(g)|0){for(Be(g|0,0,45)|0,d=1,h=-1,p=v|(k()|0);x=Be(7,0,(15-d|0)*3|0)|0,h=h&~x,p=p&~(k()|0),(d|0)!=(A|0);)d=d+1|0;x=l+(c<<3)|0,o[x>>2]=h,o[x+4>>2]=p,c=c+1|0}g=g+1|0}while((g|0)!=122);return c=0,c|0}function Xx(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0;if($=I,I=I+16|0,X=$,se=we(A|0,l|0,52)|0,k()|0,se=se&15,c>>>0>15)return se=4,I=$,se|0;if((se|0)<(c|0))return se=12,I=$,se|0;if((se|0)!=(c|0))if(p=Be(c|0,0,52)|0,p=p|A,v=k()|0|l&-15728641,(se|0)>(c|0)){x=c;do H=Be(7,0,(14-x|0)*3|0)|0,x=x+1|0,p=H|p,v=k()|0|v;while((x|0)<(se|0));H=p}else H=p;else H=A,v=l;q=we(H|0,v|0,45)|0,k()|0;e:do if(an(q&127)|0){if(x=we(H|0,v|0,52)|0,k()|0,x=x&15,x|0)for(p=1;;){if(q=Be(7,0,(15-p|0)*3|0)|0,!((q&H|0)==0&((k()|0)&v|0)==0)){T=33;break e}if(p>>>0<x>>>0)p=p+1|0;else break}if(q=d,o[q>>2]=0,o[q+4>>2]=0,(se|0)>(c|0)){for(q=l&-15728641,F=se;;){if(B=F,F=F+-1|0,F>>>0>15|(se|0)<(F|0)){T=19;break}if((se|0)!=(F|0))if(p=Be(F|0,0,52)|0,p=p|A,x=k()|0|q,(se|0)<(B|0))N=p;else{T=F;do N=Be(7,0,(14-T|0)*3|0)|0,T=T+1|0,p=N|p,x=k()|0|x;while((T|0)<(se|0));N=p}else N=A,x=l;if(M=we(N|0,x|0,45)|0,k()|0,!(an(M&127)|0))p=0;else{M=we(N|0,x|0,52)|0,k()|0,M=M&15;t:do if(!M)p=0;else for(T=1;;){if(p=we(N|0,x|0,(15-T|0)*3|0)|0,k()|0,p=p&7,p|0)break t;if(T>>>0<M>>>0)T=T+1|0;else{p=0;break}}while(0);p=(p|0)==0&1}if(x=we(A|0,l|0,(15-B|0)*3|0)|0,k()|0,x=x&7,(x|0)==7){h=5,T=42;break}if(p=(p|0)!=0,(x|0)==1&p){h=5,T=42;break}if(N=x+(((x|0)!=0&p)<<31>>31)|0,N|0&&(T=se-B|0,T=po(7,0,T,((T|0)<0)<<31>>31)|0,M=k()|0,p?(p=ln(T|0,M|0,5,0)|0,p=De(p|0,k()|0,-5,-1)|0,p=mo(p|0,k()|0,6,0)|0,p=De(p|0,k()|0,1,0)|0,x=k()|0):(p=T,x=M),B=N+-1|0,B=ln(T|0,M|0,B|0,((B|0)<0)<<31>>31|0)|0,B=De(p|0,x|0,B|0,k()|0)|0,N=k()|0,M=d,M=De(B|0,N|0,o[M>>2]|0,o[M+4>>2]|0)|0,N=k()|0,B=d,o[B>>2]=M,o[B+4>>2]=N),(F|0)<=(c|0)){T=37;break}}if((T|0)==19)wt(27634,27225,1407,27259);else if((T|0)==37){g=d,h=o[g+4>>2]|0,g=o[g>>2]|0;break}else if((T|0)==42)return I=$,h|0}else h=0,g=0}else T=33;while(0);e:do if((T|0)==33)if(q=d,o[q>>2]=0,o[q+4>>2]=0,(se|0)>(c|0)){for(p=se;;){if(h=we(A|0,l|0,(15-p|0)*3|0)|0,k()|0,h=h&7,(h|0)==7){h=5;break}if(g=se-p|0,g=po(7,0,g,((g|0)<0)<<31>>31)|0,h=ln(g|0,k()|0,h|0,0)|0,g=k()|0,q=d,g=De(o[q>>2]|0,o[q+4>>2]|0,h|0,g|0)|0,h=k()|0,q=d,o[q>>2]=g,o[q+4>>2]=h,p=p+-1|0,(p|0)<=(c|0))break e}return I=$,h|0}else h=0,g=0;while(0);return YA(H,v,se,X)|0&&wt(27634,27225,1367,27274),se=X,X=o[se+4>>2]|0,((h|0)>-1|(h|0)==-1&g>>>0>4294967295)&((X|0)>(h|0)|((X|0)==(h|0)?(o[se>>2]|0)>>>0>g>>>0:0))?(se=0,I=$,se|0):(wt(27634,27225,1447,27259),0)}function Kx(A,l,c,d,h,p){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0;var g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0;if(N=I,I=I+16|0,g=N,h>>>0>15)return p=4,I=N,p|0;if(v=we(c|0,d|0,52)|0,k()|0,v=v&15,(v|0)>(h|0))return p=12,I=N,p|0;if(YA(c,d,h,g)|0&&wt(27634,27225,1367,27274),M=g,T=o[M+4>>2]|0,!(((l|0)>-1|(l|0)==-1&A>>>0>4294967295)&((T|0)>(l|0)|((T|0)==(l|0)?(o[M>>2]|0)>>>0>A>>>0:0))))return p=2,I=N,p|0;M=h-v|0,h=Be(h|0,0,52)|0,x=k()|0|d&-15728641,T=p,o[T>>2]=h|c,o[T+4>>2]=x,T=we(c|0,d|0,45)|0,k()|0;
15e:do if(an(T&127)|0){if(v|0)for(g=1;;){if(T=Be(7,0,(15-g|0)*3|0)|0,!((T&c|0)==0&((k()|0)&d|0)==0))break e;if(g>>>0<v>>>0)g=g+1|0;else break}if((M|0)<1)return p=0,I=N,p|0;for(T=v^15,d=-1,x=1,g=1;;){v=M-x|0,v=po(7,0,v,((v|0)<0)<<31>>31)|0,c=k()|0;do if(g)if(g=ln(v|0,c|0,5,0)|0,g=De(g|0,k()|0,-5,-1)|0,g=mo(g|0,k()|0,6,0)|0,h=k()|0,(l|0)>(h|0)|(l|0)==(h|0)&A>>>0>g>>>0){l=De(A|0,l|0,-1,-1)|0,l=Wn(l|0,k()|0,g|0,h|0)|0,g=k()|0,B=p,q=o[B>>2]|0,B=o[B+4>>2]|0,H=(T+d|0)*3|0,F=Be(7,0,H|0)|0,B=B&~(k()|0),d=mo(l|0,g|0,v|0,c|0)|0,A=k()|0,h=De(d|0,A|0,2,0)|0,H=Be(h|0,k()|0,H|0)|0,B=k()|0|B,h=p,o[h>>2]=H|q&~F,o[h+4>>2]=B,A=ln(d|0,A|0,v|0,c|0)|0,A=Wn(l|0,g|0,A|0,k()|0)|0,g=0,l=k()|0;break}else{H=p,F=o[H>>2]|0,H=o[H+4>>2]|0,q=Be(7,0,(T+d|0)*3|0)|0,H=H&~(k()|0),g=p,o[g>>2]=F&~q,o[g+4>>2]=H,g=1;break}else F=p,h=o[F>>2]|0,F=o[F+4>>2]|0,d=(T+d|0)*3|0,B=Be(7,0,d|0)|0,F=F&~(k()|0),H=mo(A|0,l|0,v|0,c|0)|0,g=k()|0,d=Be(H|0,g|0,d|0)|0,F=k()|0|F,q=p,o[q>>2]=d|h&~B,o[q+4>>2]=F,g=ln(H|0,g|0,v|0,c|0)|0,A=Wn(A|0,l|0,g|0,k()|0)|0,g=0,l=k()|0;while(0);if((M|0)>(x|0))d=~x,x=x+1|0;else{l=0;break}}return I=N,l|0}while(0);if((M|0)<1)return H=0,I=N,H|0;for(h=v^15,g=1;;)if(q=M-g|0,q=po(7,0,q,((q|0)<0)<<31>>31)|0,H=k()|0,x=p,c=o[x>>2]|0,x=o[x+4>>2]|0,v=(h-g|0)*3|0,d=Be(7,0,v|0)|0,x=x&~(k()|0),B=mo(A|0,l|0,q|0,H|0)|0,F=k()|0,v=Be(B|0,F|0,v|0)|0,x=k()|0|x,T=p,o[T>>2]=v|c&~d,o[T+4>>2]=x,H=ln(B|0,F|0,q|0,H|0)|0,A=Wn(A|0,l|0,H|0,k()|0)|0,l=k()|0,(M|0)<=(g|0)){l=0;break}else g=g+1|0;return I=N,l|0}function E2(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0;h=we(l|0,c|0,52)|0,k()|0,h=h&15,(l|0)==0&(c|0)==0|((d|0)>15|(h|0)>(d|0))?(p=-1,l=-1,c=0,h=0):(l=z3(l,c,h+1|0,d)|0,g=(k()|0)&-15728641,c=Be(d|0,0,52)|0,c=l|c,g=g|(k()|0),l=(Ht(c,g)|0)==0,p=h,l=l?-1:d,h=g),g=A,o[g>>2]=c,o[g+4>>2]=h,o[A+8>>2]=p,o[A+12>>2]=l}function H3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0;if(h=we(A|0,l|0,52)|0,k()|0,h=h&15,p=d+8|0,o[p>>2]=h,(A|0)==0&(l|0)==0|((c|0)>15|(h|0)>(c|0))){c=d,o[c>>2]=0,o[c+4>>2]=0,o[p>>2]=-1,o[d+12>>2]=-1;return}if(A=z3(A,l,h+1|0,c)|0,p=(k()|0)&-15728641,h=Be(c|0,0,52)|0,h=A|h,p=p|(k()|0),A=d,o[A>>2]=h,o[A+4>>2]=p,A=d+12|0,Ht(h,p)|0){o[A>>2]=c;return}else{o[A>>2]=-1;return}}function N2(A){A=A|0;var l=0,c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0;if(c=A,l=o[c>>2]|0,c=o[c+4>>2]|0,!((l|0)==0&(c|0)==0)&&(d=we(l|0,c|0,52)|0,k()|0,d=d&15,v=Be(1,0,(d^15)*3|0)|0,l=De(v|0,k()|0,l|0,c|0)|0,c=k()|0,v=A,o[v>>2]=l,o[v+4>>2]=c,v=A+8|0,g=o[v>>2]|0,!((d|0)<(g|0)))){for(x=A+12|0,p=d;;){if((p|0)==(g|0)){d=5;break}if(T=(p|0)==(o[x>>2]|0),h=(15-p|0)*3|0,d=we(l|0,c|0,h|0)|0,k()|0,d=d&7,T&((d|0)==1&!0)){d=7;break}if(!((d|0)==7&!0)){d=10;break}if(T=Be(1,0,h|0)|0,l=De(l|0,c|0,T|0,k()|0)|0,c=k()|0,T=A,o[T>>2]=l,o[T+4>>2]=c,(p|0)>(g|0))p=p+-1|0;else{d=10;break}}if((d|0)==5){T=A,o[T>>2]=0,o[T+4>>2]=0,o[v>>2]=-1,o[x>>2]=-1;return}else if((d|0)==7){g=Be(1,0,h|0)|0,g=De(l|0,c|0,g|0,k()|0)|0,v=k()|0,T=A,o[T>>2]=g,o[T+4>>2]=v,o[x>>2]=p+-1;return}else if((d|0)==10)return}}function XA(A){A=+A;var l=0;return l=A<0?A+6.283185307179586:A,+(A>=6.283185307179586?l+-6.283185307179586:l)}function ri(A,l){switch(A=+A,l=l|0,l|0){case 1:{A=A<0?A+6.283185307179586:A;break}case 2:{A=A>0?A+-6.283185307179586:A;break}}return+A}function Zx(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0;return h=+z[l>>3],d=+z[A>>3],p=+tn(+((h-d)*.5)),c=+tn(+((+z[l+8>>3]-+z[A+8>>3])*.5)),c=p*p+c*(+Zt(+h)*+Zt(+d)*c),+(+Rr(+ +Dt(+c),+ +Dt(+(1-c)))*2)}function KA(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0;return h=+z[l>>3],d=+z[A>>3],p=+tn(+((h-d)*.5)),c=+tn(+((+z[l+8>>3]-+z[A+8>>3])*.5)),c=p*p+c*(+Zt(+h)*+Zt(+d)*c),+(+Rr(+ +Dt(+c),+ +Dt(+(1-c)))*2*6371.007180918475)}function Jx(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0;return h=+z[l>>3],d=+z[A>>3],p=+tn(+((h-d)*.5)),c=+tn(+((+z[l+8>>3]-+z[A+8>>3])*.5)),c=p*p+c*(+Zt(+h)*+Zt(+d)*c),+(+Rr(+ +Dt(+c),+ +Dt(+(1-c)))*2*6371.007180918475*1e3)}function W3(A,l){return A=A|0,l=l|0,A>>>0>15?(l=4,l|0):(z[l>>3]=+z[20624+(A<<3)>>3],l=0,l|0)}function eb(A,l){return A=A|0,l=l|0,A>>>0>15?(l=4,l|0):(z[l>>3]=+z[20752+(A<<3)>>3],l=0,l|0)}function tb(A,l){return A=A|0,l=l|0,A>>>0>15?(l=4,l|0):(z[l>>3]=+z[20880+(A<<3)>>3],l=0,l|0)}function nb(A,l){return A=A|0,l=l|0,A>>>0>15?(l=4,l|0):(z[l>>3]=+z[21008+(A<<3)>>3],l=0,l|0)}function ru(A,l){A=A|0,l=l|0;var c=0;return A>>>0>15?(l=4,l|0):(c=po(7,0,A,((A|0)<0)<<31>>31)|0,c=ln(c|0,k()|0,120,0)|0,A=k()|0,o[l>>2]=c|2,o[l+4>>2]=A,l=0,l|0)}function rb(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(v=I,I=I+176|0,g=v,A=WA(A,l,g)|0,A|0)return g=A,I=v,g|0;if(z[c>>3]=0,A=o[g>>2]|0,(A|0)<=1)return g=0,I=v,g|0;l=A+-1|0,A=0,d=+z[g+8>>3],h=+z[g+16>>3],p=0;do A=A+1|0,T=d,d=+z[g+8+(A<<4)>>3],M=+tn(+((d-T)*.5)),x=h,h=+z[g+8+(A<<4)+8>>3],x=+tn(+((h-x)*.5)),x=M*M+x*(+Zt(+d)*+Zt(+T)*x),p=p+ +Rr(+ +Dt(+x),+ +Dt(+(1-x)))*2;while((A|0)<(l|0));return z[c>>3]=p,g=0,I=v,g|0}function ib(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(v=I,I=I+176|0,g=v,A=WA(A,l,g)|0,A|0)return g=A,p=+z[c>>3],p=p*6371.007180918475,z[c>>3]=p,I=v,g|0;if(z[c>>3]=0,A=o[g>>2]|0,(A|0)<=1)return g=0,p=0,p=p*6371.007180918475,z[c>>3]=p,I=v,g|0;l=A+-1|0,A=0,d=+z[g+8>>3],h=+z[g+16>>3],p=0;do A=A+1|0,T=d,d=+z[g+8+(A<<4)>>3],M=+tn(+((d-T)*.5)),x=h,h=+z[g+8+(A<<4)+8>>3],x=+tn(+((h-x)*.5)),x=M*M+x*(+Zt(+T)*+Zt(+d)*x),p=p+ +Rr(+ +Dt(+x),+ +Dt(+(1-x)))*2;while((A|0)!=(l|0));return z[c>>3]=p,g=0,M=p,M=M*6371.007180918475,z[c>>3]=M,I=v,g|0}
15function sb(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(v=I,I=I+176|0,g=v,A=WA(A,l,g)|0,A|0)return g=A,p=+z[c>>3],p=p*6371.007180918475,p=p*1e3,z[c>>3]=p,I=v,g|0;if(z[c>>3]=0,A=o[g>>2]|0,(A|0)<=1)return g=0,p=0,p=p*6371.007180918475,p=p*1e3,z[c>>3]=p,I=v,g|0;l=A+-1|0,A=0,d=+z[g+8>>3],h=+z[g+16>>3],p=0;do A=A+1|0,T=d,d=+z[g+8+(A<<4)>>3],M=+tn(+((d-T)*.5)),x=h,h=+z[g+8+(A<<4)+8>>3],x=+tn(+((h-x)*.5)),x=M*M+x*(+Zt(+T)*+Zt(+d)*x),p=p+ +Rr(+ +Dt(+x),+ +Dt(+(1-x)))*2;while((A|0)!=(l|0));return z[c>>3]=p,g=0,M=p,M=M*6371.007180918475,M=M*1e3,z[c>>3]=M,I=v,g|0}function ob(A){A=A|0;var l=0,c=0,d=0,h=0,p=0,g=0,v=0;if(A)for(p=A+4|0,g=A+8|0,d=1,h=A;;){if(l=o[h>>2]|0,l|0)do{if(c=o[l>>2]|0,c|0)do v=c,c=o[c+16>>2]|0,Ie(v);while(c|0);v=l,l=o[l+8>>2]|0,Ie(v)}while(l|0);if(l=h,h=o[h+8>>2]|0,d?(o[A>>2]=0,o[p>>2]=0,o[g>>2]=0):Ie(l),h)d=0;else break}}function ab(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0;if(o[l>>2]=0,X=l+4|0,o[X>>2]=0,se=l+8|0,o[se>>2]=0,H=o[A>>2]|0,(H|0)<=0)return l=0,l|0;q=A+4|0,A=l,F=0;e:for(;;){if(F){if(c=Cr(1,12)|0,!c){c=5;break}o[A+8>>2]=c,A=c}if(x=o[q>>2]|0,T=Cr(1,12)|0,!T){A=13,c=37;break}if(B=A+4|0,d=o[B>>2]|0,o[(d|0?d+8|0:A)>>2]=T,o[B>>2]=T,d=o[x+(F<<4)>>2]|0,(d|0)<3){A=1,c=37;break}h=x+(F<<4)+4|0,p=T+4|0,c=0,g=0;do{if(v=g,g=An(24)|0,!g){A=13,c=37;break e}q2(g|0,(o[h>>2]|0)+(c<<4)|0,16)|0,o[g+16>>2]=0,v?o[v+16>>2]=g:o[T>>2]=g,o[p>>2]=g,c=c+1|0}while((c|0)<(d|0));if(N=o[x+(F<<4)+8>>2]|0,(N|0)>0){M=x+(F<<4)+12|0,x=0;do{if(d=o[M>>2]|0,c=T,T=Cr(1,12)|0,!T){A=13,c=37;break e}if(o[c+8>>2]=T,o[B>>2]=T,v=o[d+(x<<3)>>2]|0,(v|0)<3){A=1,c=37;break e}d=d+(x<<3)+4|0,h=T+4|0,c=0,p=0;do{if(g=p,p=An(24)|0,!p){A=13,c=37;break e}q2(p|0,(o[d>>2]|0)+(c<<4)|0,16)|0,o[p+16>>2]=0,g?o[g+16>>2]=p:o[T>>2]=p,o[h>>2]=p,c=c+1|0}while((c|0)<(v|0));x=x+1|0}while((x|0)<(N|0))}if(F=F+1|0,(F|0)>=(H|0)){A=0,c=50;break}}if((c|0)==5){if(!l)return l=13,l|0;for(d=1,h=l;;){if(A=o[h>>2]|0,A|0)do{if(c=o[A>>2]|0,c|0)do H=c,c=o[c+16>>2]|0,Ie(H);while(c|0);H=A,A=o[A+8>>2]|0,Ie(H)}while(A|0);if(A=h,h=o[h+8>>2]|0,d?(o[l>>2]=0,o[X>>2]=0,o[se>>2]=0):Ie(A),h)d=0;else{A=13;break}}return A|0}else if((c|0)==37){if(!l)return l=A,l|0;for(h=1,p=l;;){if(c=o[p>>2]|0,c|0)do{if(d=o[c>>2]|0,d|0)do H=d,d=o[d+16>>2]|0,Ie(H);while(d|0);H=c,c=o[c+8>>2]|0,Ie(H)}while(c|0);if(c=p,p=o[p+8>>2]|0,h?(o[l>>2]=0,o[X>>2]=0,o[se>>2]=0):Ie(c),p)h=0;else break}return A|0}else if((c|0)==50)return A|0;return 0}function ZA(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0;if(se=I,I=I+16|0,X=se,M=we(A|0,l|0,52)|0,k()|0,M=M&15,F=we(c|0,d|0,52)|0,k()|0,(M|0)!=(F&15|0))return X=12,I=se,X|0;if(x=we(A|0,l|0,45)|0,k()|0,x=x&127,T=we(c|0,d|0,45)|0,k()|0,T=T&127,x>>>0>121|T>>>0>121)return X=5,I=se,X|0;if(F=(x|0)!=(T|0),F){if(g=d2(x,T)|0,(g|0)==7)return X=1,I=se,X|0;v=d2(T,x)|0,(v|0)==7?wt(27291,27315,164,27325):(H=g,p=v)}else H=0,p=0;N=an(x)|0,B=an(T)|0,o[X>>2]=0,o[X+4>>2]=0,o[X+8>>2]=0,o[X+12>>2]=0;do if(H){T=o[4272+(x*28|0)+(H<<2)>>2]|0,g=(T|0)>0;e:do if(B)if(g)for(x=0,v=c,g=d;;){switch(v=Hx(v,g)|0,g=k()|0,p|0){case 5:case 1:{p=3;break}case 3:{p=2;break}case 2:{p=6;break}case 6:{p=4;break}case 4:{p=5;break}}if(x=x+1|0,(x|0)==(T|0)){T=p,x=v,v=g;break e}}else T=p,x=c,v=d;else if(g)for(x=0,v=c,g=d;;){switch(v=T2(v,g)|0,g=k()|0,p|0){case 1:{p=3;break}case 3:{p=2;break}case 2:{p=6;break}case 6:{p=4;break}case 4:{p=5;break}case 5:{p=1;break}}if(x=x+1|0,(x|0)==(T|0)){T=p,x=v,v=g;break e}}else T=p,x=c,v=d;while(0);if(S2(x,v,X)|0,F||wt(27340,27315,194,27325),g=(N|0)!=0,p=(B|0)!=0,g&p&&wt(27367,27315,195,27325),g){if(p=Gr(A,l)|0,(p|0)==7){p=5;break}if(ve[21968+(p*7|0)+H>>0]|0){p=1;break}B=o[21136+(p*28|0)+(H<<2)>>2]|0,F=B}else if(p){if(p=Gr(x,v)|0,(p|0)==7){p=5;break}if(ve[21968+(p*7|0)+T>>0]|0){p=1;break}F=0,B=o[21136+(T*28|0)+(p<<2)>>2]|0}else F=0,B=0;if((F|B|0)>=0){if((B|0)>0){c=X+4|0,d=X+8|0,N=X+12|0,T=0,v=o[c>>2]|0,g=o[d>>2]|0,p=o[N>>2]|0;do q=g+v|0,l=(q|0)<0,$=l?q:0,g=p+g-$|0,A=(g|0)<0,x=A?g:0,v=p+v-$-x|0,$=(v|0)<0,p=$?0:v,v=$?v:0,g=(A?0:g)-v|0,v=(l?0:q)-x-v|0,x=(g|0)<(v|0)?g:v,x=(p|0)<(x|0)?p:x,(x|0)>0&&(v=v-x|0,g=g-x|0,p=p-x|0),T=T+1|0;while((T|0)!=(B|0));o[c>>2]=v,o[d>>2]=g,o[N>>2]=p}if((H+-1|0)>>>0<6?(p=o[22032+(H*12|0)>>2]|0,v=o[22032+(H*12|0)+4>>2]|0,$=o[22032+(H*12|0)+8>>2]|0,g=(v|0)<(p|0)?v:p,g=($|0)<(g|0)?$:g,g=(g|0)>0?g:0,p=p-g|0,v=v-g|0,g=$-g|0):(p=0,v=0,g=0),M)for(;;
15)if(x=p*3|0,T=v*3|0,c=g*3|0,mi(M)|0?(l=x+v|0,A=(l|0)<0,$=T+g-(A?l:0)|0,q=($|0)<0,v=p+c-(A?l:0)-(q?$:0)|0,g=(v|0)<0,H=g?0:v,x=(q?0:$)-(g?v:0)|0,v=(A?0:l)-(q?$:0)-(g?v:0)|0,g=(x|0)<(v|0)?x:v,g=(H|0)<(g|0)?H:g,$=(g|0)>0,p=$?g:0,x=x-($?g:0)|0,g=H-($?g:0)|0):(q=x+g|0,l=(q|0)<0,$=T+p-(l?q:0)|0,p=($|0)<0,v=c+v-(l?q:0)-(p?$:0)|0,g=(v|0)<0,H=g?0:v,x=(p?0:$)-(g?v:0)|0,v=(l?0:q)-(p?$:0)-(g?v:0)|0,g=(x|0)<(v|0)?x:v,g=(H|0)<(g|0)?H:g,$=(g|0)>0,p=$?g:0,x=x-($?g:0)|0,g=H-($?g:0)|0),p=v-p|0,(M|0)>1)M=M+-1|0,v=x;else{v=x;break}if((F|0)>0){x=0;do l=p+v|0,A=(l|0)<0,$=v+g-(A?l:0)|0,q=($|0)<0,H=p+g-(A?l:0)-(q?$:0)|0,p=(H|0)<0,g=p?0:H,v=(q?0:$)-(p?H:0)|0,H=(A?0:l)-(q?$:0)-(p?H:0)|0,p=(v|0)<(H|0)?v:H,p=(g|0)<(p|0)?g:p,$=(p|0)>0,g=g-($?p:0)|0,v=v-($?p:0)|0,p=H-($?p:0)|0,x=x+1|0;while((x|0)!=(F|0))}c=X+4|0,M=X+8|0,H=o[M>>2]|0,d=X+12|0,$=o[d>>2]|0,x=(o[c>>2]|0)+p|0,o[c>>2]=x,v=H+v|0,o[M>>2]=v,p=$+g|0,o[d>>2]=p,g=v-x|0,(x|0)<0?(p=p-x|0,o[M>>2]=g,o[d>>2]=p,o[c>>2]=0,v=0):(g=v,v=x),(g|0)<0&&(v=v-g|0,o[c>>2]=v,p=p-g|0,o[d>>2]=p,o[M>>2]=0,g=0),T=v-p|0,x=g-p|0,(p|0)<0?(o[c>>2]=T,o[M>>2]=x,o[d>>2]=0,v=T,p=0):x=g,g=(x|0)<(v|0)?x:v,g=(p|0)<(g|0)?p:g,(g|0)>0&&(o[c>>2]=v-g,o[M>>2]=x-g,o[d>>2]=p-g),q=77}else p=5}else if(S2(c,d,X)|0,(N|0)!=0&(B|0)!=0)if((T|0)!=(x|0)&&wt(27398,27315,264,27325),g=Gr(A,l)|0,p=Gr(c,d)|0,(g|0)==7|(p|0)==7)p=5;else if(ve[21968+(g*7|0)+p>>0]|0)p=1;else if(c=o[21136+(g*28|0)+(p<<2)>>2]|0,(c|0)>0){M=X+4|0,d=X+8|0,N=X+12|0,T=0,v=o[M>>2]|0,g=o[d>>2]|0,p=o[N>>2]|0;do H=g+v|0,q=(H|0)<0,A=q?H:0,g=p+g-A|0,l=(g|0)<0,x=l?g:0,v=p+v-A-x|0,A=(v|0)<0,p=A?0:v,v=A?v:0,g=(l?0:g)-v|0,v=(q?0:H)-x-v|0,x=(g|0)<(v|0)?g:v,x=(p|0)<(x|0)?p:x,(x|0)>0&&(v=v-x|0,g=g-x|0,p=p-x|0),T=T+1|0;while((T|0)!=(c|0));o[M>>2]=v,o[d>>2]=g,o[N>>2]=p,q=77}else q=77;else q=77;while(0);return(q|0)==77&&(p=X+4|0,o[h>>2]=o[p>>2],o[h+4>>2]=o[p+4>>2],o[h+8>>2]=o[p+8>>2],p=0),$=p,I=se,$|0}function Q3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0;if(p=we(A|0,l|0,52)|0,k()|0,p=p&15,ee=we(A|0,l|0,45)|0,k()|0,ee=ee&127,ee>>>0>121)return d=5,d|0;if(X=an(ee)|0,Be(p|0,0,52)|0,v=k()|0|134225919,g=d,o[g>>2]=-1,o[g+4>>2]=v,g=o[c>>2]|0,v=o[c+4>>2]|0,c=o[c+8>>2]|0,!p){l=(g|0)<0,se=l?g:0,Ae=v-se|0,X=(Ae|0)<0,se=(X?0-Ae|0:0)+(c-se)|0,c=(se|0)<0,h=c?0:se,se=c?se:0,c=(X?0:Ae)-se|0,se=(l?0:g)-(X?Ae:0)-se|0,Ae=(c|0)<(se|0)?c:se,Ae=(h|0)<(Ae|0)?h:Ae,Ae=(Ae|0)>0?Ae:0,h=h-Ae|0,c=c-Ae|0;e:do switch(se-Ae|0){case 0:switch(c|0){case 0:if(h){h=(h|0)==1?1:7,$=11;break e}else{h=0;break e}case 1:if(h){h=(h|0)==1?3:7,$=11;break e}else{h=2;break e}default:return d=1,d|0}case 1:switch(c|0){case 0:if(h){h=(h|0)==1?5:7,$=11;break e}else{h=4;break e}case 1:{if(h)h=1;else{h=6;break e}return h|0}default:return d=1,d|0}default:return d=1,d|0}while(0);return($|0)==11&&(h|0)==7||(h=h2(ee,h)|0,(h|0)==127)?(d=1,d|0):(Ae=Be(h|0,0,45)|0,ee=k()|0,$=d,ee=o[$+4>>2]&-1040385|ee,o[d>>2]=o[$>>2]|Ae,o[d+4>>2]=ee,d=0,d|0)}for(;;){if(H=p,p=p+-1|0,q=g-c|0,F=v-c|0,x=q>>>0>715827881|F>>>0>715827881,mi(H)|0){if(x){if(M=(q|0)>0,N=2147483647-q|0,B=-2147483648-q|0,M?(N|0)<(q|0):(B|0)>(q|0)){h=1,$=107;break}if(oe=q<<1,M?(2147483647-oe|0)<(q|0):(-2147483648-oe|0)>(q|0)){h=1,$=107;break}if((F|0)>0?(2147483647-F|0)<(F|0):(-2147483648-F|0)>(F|0)){h=1,$=107;break}if(x=q*3|0,T=F<<1,(M?(N|0)<(T|0):(B|0)>(T|0))||((q|0)>-1?(x|-2147483648|0)>=(F|0):(x^-2147483648|0)<(F|0))){h=1,$=107;break}}else x=q*3|0,T=F<<1;if(N=rs(+(x-F|0)*.14285714285714285)|0,M=rs(+(T+q|0)*.14285714285714285)|0,T=(M|0)<(N|0),x=T?N:M,T=T?M:N,(T|0)<0){if((T|0)==-2147483648||((x|0)>0?(2147483647-x|0)<(T|0):(-2147483648-x|0)>(T|0))){$=24;break}if((x|0)>-1?(x|-2147483648|0)>=(T|0):(x^-2147483648|0)<(T|0)){$=24;break}}B=(N|0)<0,F=M-(B?N:0)|0,be=(F|0)<0,me=(B?0-N|0:0)-(be?F:0)|0,q=(me|0)<0,B=(B?0:N)-(be?F:0)-(q?me:0)|0,F=(be?0:F)-(q?me:0)|0,me=q?0:me,q=(F|0)<(B|0)?F:B,q=(me|0)<(q|0)?me:q,be=(q|0)>0,B=B-(be?q:0)|0,F=F-(be?q:0)|0,q=me-(be?q:0)|0,be=(B*3|0)+F|0,me=(be|0)<0,oe=(F*3|0)+q-(me?be:0)|0,x=(oe|0)<0,N=(q*3|0)+B-(me?be:0)-(x?oe:0)|0,M=(N|0)<0,ce=M?0:N,T=(x?0:oe)-(M?N:0)|0,N=(me?0:be)-(x?oe:0)-(M?N:0)|0,M=(T|0)<(N|0)?T:N,M=(ce|0)<(M|0)?ce:M,oe=(M|0)>0,x=oe?M:0,T=T-(oe?M:0)|0,M=ce-(oe?M:0)|0}else{if(x){if(T=(q|0)>0,T?(2147483647-q|0)<(q|0):(-2147483648-q|0)>(q|0)){h=1,$=107;break}if(x=q<<1,M=(F|0)>0,M?(2147483647-F|0)<(F|0):(-2147483648-F|0)>(F|0)){h=1,$=107;break}if(B=F<<1,M?(2147483647-B|0)<(F|0):(-2147483648-B|0)>(F|0)){h=1,$=107;break}if(T?(2147483647-x|0)<(F|0):(-2147483648-x|0)>(F|0)){h=1,$=107;break}if(T=F*3|0,(F|0)>-1?(T|-2147483648|0)>=(q|0):(T^-2147483648|0)<(q|0)){h=1,$=107;break}}else x=q<<1,T=F*3|0;if(N=rs(+(x+F|0)*.14285714285714285)|0,M=rs(+(T-q|0)*.14285714285714285)|0,T=(M|0)<(N|0),x=T?N:M,T=T?M:N,(T|0)<0){if((T|0)==-2147483648||((x|0)>0?(2147483647-x|0)<(T|0):(-2147483648-x|0)>(T|0))){$=36;break}if((x|0)>-1?(x|-2147483648|0)>=(T|0):(x^-2147483648|0)<(T|0)){$=36;break}}B=(N|0)<0,F=M-(B?N:0)|0,ce=(F|0)<0,oe=(B?0-N|0:0)-(ce?F:0)|0,q=(oe|0)<0,B=(B?0:N)-(ce?F:0)-(q?oe:0)|0,F=(ce?0:F)-(q?oe:0)|0,oe=q?0:oe,q=(F|0)<(B|0)?F:B,q=(oe|0)<(q|0)?oe:q,ce=(q|0)>0,B=B-(ce?q:0)|0,F=F-(ce?q:0)|0,q=oe-(ce?q:0)|0,ce=(B*3|0)+q|0,oe=(ce|0)<0,me=(F*3|0)+B-(oe?ce:0)|0,x=(me|0)<0,N=(q*3|0)+F-(oe?ce:0)-(x?me:0)|0,M=(N|0)<0,be=M?0:N,T=(x?0:me)-(M?N:0)|0,N=(oe?0:ce)-(x?me:0)-(M?N:0)|0,M=(T|0)<(N|0)?T:N,M=(be|0)<(M|0)?be:M,me=(M|0)>0,x=me?M:0,T=T-(me?M:0)|0,M=be-(me?M:0)|0}x=g+(x-N)|0,ce=(x|0)<0,T=v-T-(ce?x:0)|0,N=(T|0)<0,me=c-M+(ce?0-x|0:0)+(N?0-T|0:0)|0,g=(me|0)<0,M=g?0:me,oe
15=(N?0:T)-(g?me:0)|0,me=(ce?0:x)-(N?T:0)-(g?me:0)|0,g=(oe|0)<(me|0)?oe:me,g=(M|0)<(g|0)?M:g,c=(g|0)>0,me=me-(c?g:0)|0,T=d,N=o[T>>2]|0,T=o[T+4>>2]|0,v=(15-H|0)*3|0,x=Be(7,0,v|0)|0,x=N&~x,T=T&~(k()|0),N=(me|0)<0,ce=N?me:0,oe=oe-(c?g:0)-ce|0,be=(oe|0)<0,ce=(be?0-oe|0:0)+(M-(c?g:0)-ce)|0,g=(ce|0)<0,c=g?0:ce,ce=g?ce:0,g=(be?0:oe)-ce|0,ce=(N?0:me)-(be?oe:0)-ce|0,oe=(g|0)<(ce|0)?g:ce,oe=(c|0)<(oe|0)?c:oe,oe=(oe|0)>0?oe:0,c=c-oe|0,g=g-oe|0;e:do switch(ce-oe|0){case 0:switch(g|0){case 0:{c=c|0?(c|0)==1?1:7:0;break e}case 1:{c=c|0?(c|0)==1?3:7:2;break e}default:{$=45;break e}}case 1:switch(g|0){case 0:{c=c|0?(c|0)==1?5:7:4;break e}case 1:if(c){$=45;break e}else{c=6;break e}default:{$=45;break e}}default:$=45}while(0);if(($|0)==45&&($=0,c=7),be=Be(c|0,0,v|0)|0,ce=k()|0|T,oe=d,o[oe>>2]=be|x,o[oe+4>>2]=ce,(H|0)<=1){$=47;break}else g=B,v=F,c=q}if(($|0)==24)wt(27634,27425,416,27447);else if(($|0)==36)wt(27634,27425,464,27461);else if(($|0)==47){if((B|0)>1|(F|0)>1|(q|0)>1)return oe=1,oe|0;me=(B|0)<0,ce=me?B:0,oe=F-ce|0,be=(oe|0)<0,ce=(be?0-oe|0:0)+(q-ce)|0,p=(ce|
150)<0,c=p?0:ce,ce=p?ce:0,p=(be?0:oe)-ce|0,ce=(me?0:B)-(be?oe:0)-ce|0,oe=(p|0)<(ce|0)?p:ce,oe=(c|0)<(oe|0)?c:oe,oe=(oe|0)>0?oe:0,c=c-oe|0,p=p-oe|0;e:do switch(ce-oe|0){case 0:switch(p|0){case 0:{p=c|0?(c|0)==1?1:7:0;break e}case 1:{p=c|0?(c|0)==1?3:7:2;break e}default:{$=55;break e}}case 1:switch(p|0){case 0:{p=c|0?(c|0)==1?5:7:4;break e}case 1:if(c){$=55;break e}else{p=6;break e}default:{$=55;break e}}default:$=55}while(0);($|0)==55&&(p=7),v=h2(ee,p)|0,(v|0)==127?T=0:T=an(v)|0;e:do if(p){if(X){if(c=Gr(A,l)|0,(c|0)==7)return oe=5,oe|0;g=o[21344+(c*28|0)+(p<<2)>>2]|0;t:do if((g|0)>0)for(c=p,p=0;;){switch(c|0){case 1:{c=5;break}case 5:{c=4;break}case 4:{c=6;break}case 6:{c=2;break}case 2:{c=3;break}case 3:{c=1;break}}if(p=p+1|0,(p|0)==(g|0))break t}else c=p;while(0);if((c|0)==1)return oe=9,oe|0;p=h2(ee,c)|0,(p|0)==127&&wt(27476,27315,415,27506),an(p)|0?wt(27521,27315,416,27506):(h=p,Ae=g,se=c)}else h=v,Ae=0,se=p;if(x=o[4272+(ee*28|0)+(se<<2)>>2]|0,(x|0)<=-1&&wt(27552,27315,423,27506),!T){if((Ae|0)<0)return oe=5,oe|0;if(Ae|0){g=d,c=0,p=o[g>>2]|0,g=o[g+4>>2]|0;do p=Zo(p,g)|0,g=k()|0,oe=d,o[oe>>2]=p,o[oe+4>>2]=g,c=c+1|0;while((c|0)<(Ae|0))}if((x|0)<=0){$=104;break}for(g=d,c=0,p=o[g>>2]|0,g=o[g+4>>2]|0;;)if(p=Zo(p,g)|0,g=k()|0,oe=d,o[oe>>2]=p,o[oe+4>>2]=g,c=c+1|0,(c|0)==(x|0)){$=104;break e}}if(v=d2(h,ee)|0,(v|0)==7&&wt(27291,27315,432,27506),c=d,p=o[c>>2]|0,c=o[c+4>>2]|0,(x|0)>0){g=0;do p=Zo(p,c)|0,c=k()|0,oe=d,o[oe>>2]=p,o[oe+4>>2]=c,g=g+1|0;while((g|0)!=(x|0))}if(c=Gr(p,c)|0,(c|0)==7&&wt(27634,27315,444,27506),p=f2(h)|0,p=o[(p?21760:21552)+(v*28|0)+(c<<2)>>2]|0,(p|0)<0&&wt(27634,27315,458,27506),!p)$=104;else{v=d,c=0,g=o[v>>2]|0,v=o[v+4>>2]|0;do g=b2(g,v)|0,v=k()|0,oe=d,o[oe>>2]=g,o[oe+4>>2]=v,c=c+1|0;while((c|0)<(p|0));$=104}}else if((X|0)!=0&(T|0)!=0){if(h=Gr(A,l)|0,c=d,c=Gr(o[c>>2]|0,o[c+4>>2]|0)|0,(h|0)==7|(c|0)==7||(c=o[21344+(h*28|0)+(c<<2)>>2]|0,(c|0)<0))return oe=5,oe|0;if(!c)h=v,$=105;else{g=d,h=0,p=o[g>>2]|0,g=o[g+4>>2]|0;do p=Zo(p,g)|0,g=k()|0,oe=d,o[oe>>2]=p,o[oe+4>>2]=g,h=h+1|0;while((h|0)<(c|0));h=v,$=104}}else h=v,$=104;while(0);return($|0)==104&&T&&($=105),($|0)==105&&(oe=d,(Gr(o[oe>>2]|0,o[oe+4>>2]|0)|0)==1)?(oe=9,oe|0):(ce=d,me=o[ce>>2]|0,ce=o[ce+4>>2]&-1040385,be=Be(h|0,0,45)|0,ce=ce|(k()|0),oe=d,o[oe>>2]=me|be,o[oe+4>>2]=ce,oe=0,oe|0)}else if(($|0)==107)return h|0;return 0}function Ab(A,l,c,d,h,p){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0;var g=0,v=0;return v=I,I=I+16|0,g=v,h|0?(g=15,I=v,g|0):(A=ZA(A,l,c,d,g)|0,A||(h=o[g+4>>2]|0,A=o[g+8>>2]|0,o[p>>2]=(o[g>>2]|0)-A,o[p+4>>2]=h-A,A=0),g=A,I=v,g|0)}function lb(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0;return N=I,I=I+16|0,M=N,d|0?(M=15,I=N,M|0):(v=o[c>>2]|0,g=o[c+4>>2]|0,o[M>>2]=v,x=M+4|0,o[x>>2]=g,T=M+8|0,o[T>>2]=0,c=(g|0)<(v|0),d=c?v:g,c=c?g:v,(c|0)<0?!((c|0)==-2147483648||((d|0)>0?(2147483647-d|0)<(c|0):(-2147483648-d|0)>(c|0)))&&!((d|0)>-1?(d|-2147483648|0)>=(c|0):(d^-2147483648|0)<(c|0))?p=5:d=1:p=5,(p|0)==5&&(d=g-v|0,p=0-v|0,(v|0)<0?(o[x>>2]=d,o[T>>2]=p,o[M>>2]=0,v=0):(d=g,p=0),g=v-d|0,c=p-d|0,(d|0)<0?(o[M>>2]=g,o[T>>2]=c,o[x>>2]=0,v=g,d=0):c=p,g=v-c|0,p=d-c|0,(c|0)<0?(o[M>>2]=g,o[x>>2]=p,o[T>>2]=0,c=0):(p=d,g=v),d=(p|0)<(g|0)?p:g,d=(c|0)<(d|0)?c:d,(d|0)>0&&(o[M>>2]=g-d,o[x>>2]=p-d,o[T>>2]=c-d),d=Q3(A,l,M,h)|0),M=d,I=N,M|0)}function R2(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0;return x=I,I=I+32|0,g=x+12|0,v=x,p=ZA(A,l,A,l,g)|0,p|0?(v=p,I=x,v|0):(A=ZA(A,l,c,d,v)|0,A|0?(v=A,I=x,v|0):(A=(o[g>>2]|0)-(o[v>>2]|0)|0,T=(A|0)<0,d=T?0-A|0:0,c=d+((o[g+4>>2]|0)-(o[v+4>>2]|0))|0,l=(c|0)<0,d=(o[g+8>>2]|0)-(o[v+8>>2]|0)+d+(l?0-c|0:0)|0,p=(d|0)<0,g=p?0:d,d=p?d:0,p=(l?0:c)-d|0,d=(T?0:A)-(l?c:0)-d|0,v=(p|0)<(d|0)?p:d,v=(g|0)<(v|0)?g:v,v=(v|0)>0?v:0,g=g-v|0,p=p-v|0,v=d-v|0,v=(v|0)>-1?v:0-v|0,p=(p|0)>-1?p:0-p|0,g=(g|0)>-1?g:0-g|0,g=(p|0)>(g|0)?p:g,g=(v|0)>(g|0)?v:g,v=h,o[v>>2]=g,o[v+4>>2]=((g|0)<0)<<31>>31,v=0,I=x,v|0))}function ub(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0;return g=I,I=I+16|0,p=g,A=R2(A,l,c,d,p)|0,A|0?(p=A,I=g,p|0):(c=p,c=De(o[c>>2]|0,o[c+4>>2]|0,1,0)|0,d=k()|0,p=h,o[p>>2]=c,o[p+4>>2]=d,p=0,I=g,p|0)}function cb(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0;return x=I,I=I+16|0,p=x,g=R2(A,l,c,d,p)|0,g|0?(h=g,I=x,h|0):(g=p,p=o[g>>
152]|0,g=o[g+4>>2]|0,(p|0)==0&(g|0)==0?(o[h>>2]=A,o[h+4>>2]=l,h=0,I=x,h|0):(v=Y3(A,l,c,d,p,g,h,0,0,1,0)|0,v?(h=(Y3(c,d,A,l,p,g,h,p,g,-1,-1)|0)==0,h=h?0:v,I=x,h|0):(h=0,I=x,h|0)))}function Y3(A,l,c,d,h,p,g,v,x,T,M){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0,g=g|0,v=v|0,x=x|0,T=T|0,M=M|0;var N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0,Le=0,_e=0,ze=0,Ne=0;if(ze=I,I=I+48|0,N=ze+24|0,B=ze+12|0,_e=ze,o[N>>2]=0,o[N+4>>2]=0,o[N+8>>2]=0,o[B>>2]=0,o[B+4>>2]=0,o[B+8>>2]=0,ZA(A,l,A,l,N)|0&&wt(27634,27315,696,27575),ZA(A,l,c,d,B)|0&&wt(27634,27315,701,27575),H=N+8|0,d=o[H>>2]|0,c=d-(o[N>>2]|0)|0,o[N>>2]=c,Le=N+4|0,d=(o[Le>>2]|0)-d|0,o[Le>>2]=d,Le=d+c|0,N=0-Le|0,o[H>>2]=N,H=B+8|0,$=o[H>>2]|0,se=$-(o[B>>2]|0)|0,o[B>>2]=se,oe=B+4|0,$=(o[oe>>2]|0)-$|0,o[oe>>2]=$,oe=$+se|0,o[H>>2]=0-oe,ce=1/(+(h>>>0)+4294967296*+(p|0)),me=ce*+(se-c|0),be=ce*+($-d|0),ce=ce*+(Le-oe|0),o[_e>>2]=c,oe=_e+4|0,o[oe>>2]=d,Le=_e+8|0,o[Le>>2]=N,(p|0)<0)return T=0,I=ze,T|0;for(ee=+(c|0),Ae=+(d|0),X=+(N|0),se=0,$=0;;){if(q=+(se>>>0)+4294967296*+($|0),Ne=me*q+ee,F=be*q+Ae,q=ce*q+X,d=~~+cu(+Ne),N=~~+cu(+F),c=~~+cu(+q),Ne=+Kt(+(+(d|0)-Ne)),F=+Kt(+(+(N|0)-F)),q=+Kt(+(+(c|0)-q)),Ne>F&Ne>q?(B=c+N|0,d=0-B|0):(B=0-d|0,F>q&&(N=B-c|0)),o[oe>>2]=N,o[_e>>2]=B,o[Le>>2]=0,c=d+N|0,(d|0)>0?(o[oe>>2]=c,o[Le>>2]=d,o[_e>>2]=0,B=0):(c=N,d=0),(c|0)<0?(N=B-c|0,o[_e>>2]=N,d=d-c|0,o[Le>>2]=d,o[oe>>2]=0,B=N-d|0,c=0-d|0,(d|0)<0?(o[_e>>2]=B,o[oe>>2]=c,o[Le>>2]=0,H=c,d=0):(H=0,B=N)):H=c,c=(H|0)<(B|0)?H:B,c=(d|0)<(c|0)?d:c,(c|0)>0&&(o[_e>>2]=B-c,o[oe>>2]=H-c,o[Le>>2]=d-c),c=ln(se|0,$|0,T|0,M|0)|0,c=De(c|0,k()|0,v|0,x|0)|0,k()|0,c=Q3(A,l,_e,g+(c<<3)|0)|0,c|0){d=20;break}if(H=se,se=De(se|0,$|0,1,0)|0,B=$,$=k()|0,!((B|0)<(p|0)|(B|0)==(p|0)&H>>>0<h>>>0)){c=0,d=20;break}}return(d|0)==20?(I=ze,c|0):0}function po(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0;if((c|0)==0&(d|0)==0)return h=0,p=1,at(h|0),p|0;p=A,h=l,A=1,l=0;do g=(c&1|0)==0&!0,A=ln((g?1:p)|0,(g?0:h)|0,A|0,l|0)|0,l=k()|0,c=l4(c|0,d|0,1)|0,d=k()|0,p=ln(p|0,h|0,p|0,h|0)|0,h=k()|0;while(!((c|0)==0&(d|0)==0));return at(l|0),A|0}function C2(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0;v=I,I=I+16|0,p=v,g=we(A|0,l|0,52)|0,k()|0,g=g&15;do if(g){if(h=Ga(A,l,p)|0,!h){T=+z[p>>3],x=1/+Zt(+T),M=+z[26032+(g<<3)>>3],z[c>>3]=T+M,z[c+8>>3]=T-M,T=+z[p+8>>3],x=M*x,z[c+16>>3]=x+T,z[c+24>>3]=T-x;break}return g=h,I=v,g|0}else{if(h=we(A|0,l|0,45)|0,k()|0,h=h&127,h>>>0>121)return g=5,I=v,g|0;p=22128+(h<<5)|0,o[c>>2]=o[p>>2],o[c+4>>2]=o[p+4>>2],o[c+8>>2]=o[p+8>>2],o[c+12>>2]=o[p+12>>2],o[c+16>>2]=o[p+16>>2],o[c+20>>2]=o[p+20>>2],o[c+24>>2]=o[p+24>>2],o[c+28>>2]=o[p+28>>2];break}while(0);return Sx(c,d?1.4:1.1),d=26160+(g<<3)|0,(o[d>>2]|0)==(A|0)&&(o[d+4>>2]|0)==(l|0)&&(z[c>>3]=1.5707963267948966),g=26288+(g<<3)|0,(o[g>>2]|0)==(A|0)&&(o[g+4>>2]|0)==(l|0)&&(z[c+8>>3]=-1.5707963267948966),+z[c>>3]!=1.5707963267948966&&+z[c+8>>3]!=-1.5707963267948966?(g=0,I=v,g|0):(z[c+16>>3]=3.141592653589793,z[c+24>>3]=-3.141592653589793,g=0,I=v,g|0)}function fb(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0;T=I,I=I+48|0,g=T+32|0,p=T+40|0,v=T,_2(g,0,0,0),x=o[g>>2]|0,g=o[g+4>>2]|0;do if(c>>>0<=15){if(h=e0(d)|0,h|0){d=v,o[d>>2]=0,o[d+4>>2]=0,o[v+8>>2]=h,o[v+12>>2]=-1,d=v+16|0,x=v+29|0,o[d>>2]=0,o[d+4>>2]=0,o[d+8>>2]=0,ve[d+12>>0]=0,ve[x>>0]=ve[p>>0]|0,ve[x+1>>0]=ve[p+1>>0]|0,ve[x+2>>0]=ve[p+2>>0]|0;break}if(h=Cr((o[l+8>>2]|0)+1|0,32)|0,h){P2(l,h),M=v,o[M>>2]=x,o[M+4>>2]=g,o[v+8>>2]=0,o[v+12>>2]=c,o[v+16>>2]=d,o[v+20>>2]=l,o[v+24>>2]=h,ve[v+28>>0]=0,x=v+29|0,ve[x>>0]=ve[p>>0]|0,ve[x+1>>0]=ve[p+1>>0]|0,ve[x+2>>0]=ve[p+2>>0]|0;break}else{d=v,o[d>>2]=0,o[d+4>>2]=0,o[v+8>>2]=13,o[v+12>>2]=-1,d=v+16|0,x=v+29|0,o[d>>2]=0,o[d+4>>2]=0,o[d+8>>2]=0,ve[d+12>>0]=0,ve[x>>0]=ve[p>>0]|0,ve[x+1>>0]=ve[p+1>>0]|0,ve[x+2>>0]=ve[p+2>>0]|0;break}}else x=v,o[x>>2]=0,o[x+4>>2]=0,o[v+8>>2]=4,o[v+12>>2]=-1,x=v+16|0,M=v+29|0,o[x>>2]=0,o[x+4>>2]=0,o[x+8>>2]=0,ve[x+12>>0]=0,ve[M>>0]=ve[p>>0]|0,ve[M+1>>0]=ve[p+1>>0]|0,ve[M+2>>0]=ve[p+2>>0]|0;while(0);iu(v),o[A>>2]=o[v>>2],o[A+4>>2]=o[v+4>>2],o[A+8>>2]=o[v+8>>2],o[A+12>>2]=o[v+12>>2],o[A+16>>2]=o[v+16>>2],o[A+20>>2]=o[v+20>>2],o[A+24>>2]=o[v+24>>2],o[A+28>>2]=o[v+28>>2],I=T}function iu(A){A=A|0;var l=0,c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0;if(ee=I,I=I+336|0,F=ee+168|0,q=ee,d=A,c=o[d>>2]|0,d=o[d+4>>2]|0,(c|0)==0&(d|0)==0){I=ee;return}if(l=A+28|0,ve[l>>0]|0?(c=X3(c,d)|0,d=k()|0):ve[l>>0]=1,Ae=A+20|0,!(o[o[Ae>>2]>>2]|0)){l=A+24|0,c=o[l>>2]|0,c|0&&Ie(c),$=A,o[$>>2]=0,o[$+4>>2]=0,o[A+8>>2]=0,o[Ae>>2]=0,o[A+12>>2]=-1,o[A+16>>2]=0,o[l>>2]=0,I=ee;return}$=A+16|0,l=o[$>>2]|0,h=l&15;e:do if((c|0)==0&(d|0)==0)se=A+24|0;else{H=A+12|0,N=(h|0)==3,M=l&255,x=(h|1|0)==3,B=A+24|0,T=(h+-1|0)>>>0<3,g=(h|2|0)==3,v=q+8|0;t:for(;;){if(p=we(c|0,d|0,52)|0,k()|0,p=p&15,(p|0)==(o[H>>2]|0)){switch(M&15){case 0:case 2:case 3:{if(h=Ga(c,d,F)|0,h|0){X=15;break t}if(B2(o[Ae>>2]|0,o[B>>2]|0,F)|0){X=19;break t}break}}if(x&&(h=o[(o[Ae>>2]|0)+4>>2]|0,o[F>>2]=o[h>>2],o[F+4>>2]=o[h+4>>2],o[F+8>>2]=o[h+8>>2],o[F+12>>2]=o[h+12>>2],D3(26896,F)|0)){if(w2(o[(o[Ae>>2]|0)+4>>2]|0,p,q)|0){X=25;break}if(h=q,(o[h>>2]|0)==(c|0)&&(o[h+4>>2]|0)==(d|0)){X=29;break}}if(T){if(h=Jo(c,d,F)|0,h|0){X=32;break}if(C2(c,d,q,0)|0){X=36;break}if(g&&Z3(o[Ae>>2]|0,o[B>>2]|0,F,q)|0){X=42;break}if(x&&J3(o[Ae>>2]|0,o[B>>2]|0,F,q)|0){X=42;break}}if(N){if(l=C2(c,d,F,1)|0,h=o[B>>2]|0,l|0){X=45;break}
15if(p2(h,F)|0){if(q3(q,F),L3(F,o[B>>2]|0)|0){X=53;break}if(B2(o[Ae>>2]|0,o[B>>2]|0,v)|0){X=53;break}if(J3(o[Ae>>2]|0,o[B>>2]|0,q,F)|0){X=53;break}}}}do if((p|0)<(o[H>>2]|0)){if(l=C2(c,d,F,1)|0,h=o[B>>2]|0,l|0){X=58;break t}if(!(p2(h,F)|0)){X=73;break}if(L3(o[B>>2]|0,F)|0&&(q3(q,F),Z3(o[Ae>>2]|0,o[B>>2]|0,q,F)|0)){X=65;break t}if(c=j3(c,d,p+1|0,q)|0,c|0){X=67;break t}d=q,c=o[d>>2]|0,d=o[d+4>>2]|0}else X=73;while(0);if((X|0)==73&&(X=0,c=X3(c,d)|0,d=k()|0),(c|0)==0&(d|0)==0){se=B;break e}}switch(X|0){case 15:{l=o[B>>2]|0,l|0&&Ie(l),X=A,o[X>>2]=0,o[X+4>>2]=0,o[Ae>>2]=0,o[H>>2]=-1,o[$>>2]=0,o[B>>2]=0,o[A+8>>2]=h,X=20;break}case 19:{o[A>>2]=c,o[A+4>>2]=d,X=20;break}case 25:{wt(27634,27600,470,27611);break}case 29:{o[A>>2]=c,o[A+4>>2]=d,I=ee;return}case 32:{l=o[B>>2]|0,l|0&&Ie(l),se=A,o[se>>2]=0,o[se+4>>2]=0,o[Ae>>2]=0,o[H>>2]=-1,o[$>>2]=0,o[B>>2]=0,o[A+8>>2]=h,I=ee;return}case 36:{wt(27634,27600,493,27611);break}case 42:{o[A>>2]=c,o[A+4>>2]=d,I=ee;return}case 45:{h|0&&Ie(h),X=A,o[X>>2]=0,o[X+4>>2]=0,o[Ae>>2]=0,o[H>>2]=-1,o[$>>2]=0,o[B>>2]=0,o[A+8>>2]=l,X=55;break}case 53:{o[A>>2]=c,o[A+4>>2]=d,X=55;break}case 58:{h|0&&Ie(h),X=A,o[X>>2]=0,o[X+4>>2]=0,o[Ae>>2]=0,o[H>>2]=-1,o[$>>2]=0,o[B>>2]=0,o[A+8>>2]=l,X=71;break}case 65:{o[A>>2]=c,o[A+4>>2]=d,X=71;break}case 67:{l=o[B>>2]|0,l|0&&Ie(l),se=A,o[se>>2]=0,o[se+4>>2]=0,o[Ae>>2]=0,o[H>>2]=-1,o[$>>2]=0,o[B>>2]=0,o[A+8>>2]=c,I=ee;return}}if((X|0)==20){I=ee;return}else if((X|0)==55){I=ee;return}else if((X|0)==71){I=ee;return}}while(0);l=o[se>>2]|0,l|0&&Ie(l),X=A,o[X>>2]=0,o[X+4>>2]=0,o[A+8>>2]=0,o[Ae>>2]=0,o[A+12>>2]=-1,o[$>>2]=0,o[se>>2]=0,I=ee}function X3(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0;N=I,I=I+16|0,M=N,d=we(A|0,l|0,52)|0,k()|0,d=d&15,c=we(A|0,l|0,45)|0,k()|0;do if(d){for(;c=Be(d+4095|0,0,52)|0,h=k()|0|l&-15728641,p=(15-d|0)*3|0,g=Be(7,0,p|0)|0,v=k()|0,c=c|A|g,h=h|v,x=we(A|0,l|0,p|0)|0,k()|0,x=x&7,d=d+-1|0,!(x>>>0<6);)if(d)l=h,A=c;else{T=4;break}if((T|0)==4){c=we(c|0,h|0,45)|0,k()|0;break}return M=(x|0)==0&(Ht(c,h)|0)!=0,M=Be((M?2:1)+x|0,0,p|0)|0,T=k()|0|l&~v,M=M|A&~g,at(T|0),I=N,M|0}while(0);return c=c&127,c>>>0>120?(T=0,M=0,at(T|0),I=N,M|0):(_2(M,0,c+1|0,0),T=o[M+4>>2]|0,M=o[M>>2]|0,at(T|0),I=N,M|0)}function hb(A,l,c,d,h,p){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0;var g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0;X=I,I=I+160|0,N=X+80|0,v=X+64|0,B=X+112|0,H=X,fb(N,A,l,c),T=N,E2(v,o[T>>2]|0,o[T+4>>2]|0,l),T=v,x=o[T>>2]|0,T=o[T+4>>
152]|0,g=o[N+8>>2]|0,F=B+4|0,o[F>>2]=o[N>>2],o[F+4>>2]=o[N+4>>2],o[F+8>>2]=o[N+8>>2],o[F+12>>2]=o[N+12>>2],o[F+16>>2]=o[N+16>>2],o[F+20>>2]=o[N+20>>2],o[F+24>>2]=o[N+24>>2],o[F+28>>2]=o[N+28>>2],F=H,o[F>>2]=x,o[F+4>>2]=T,F=H+8|0,o[F>>2]=g,A=H+12|0,l=B,c=A+36|0;do o[A>>2]=o[l>>2],A=A+4|0,l=l+4|0;while((A|0)<(c|0));if(B=H+48|0,o[B>>2]=o[v>>2],o[B+4>>2]=o[v+4>>2],o[B+8>>2]=o[v+8>>2],o[B+12>>2]=o[v+12>>2],(x|0)==0&(T|0)==0)return H=g,I=X,H|0;c=H+16|0,M=H+24|0,N=H+28|0,g=0,v=0,l=x,A=T;do{if(!((g|0)<(h|0)|(g|0)==(h|0)&v>>>0<d>>>0)){q=4;break}if(T=v,v=De(v|0,g|0,1,0)|0,g=k()|0,T=p+(T<<3)|0,o[T>>2]=l,o[T+4>>2]=A,N2(B),A=B,l=o[A>>2]|0,A=o[A+4>>2]|0,(l|0)==0&(A|0)==0){if(iu(c),l=c,A=o[l>>2]|0,l=o[l+4>>2]|0,(A|0)==0&(l|0)==0){q=10;break}H3(A,l,o[N>>2]|0,B),A=B,l=o[A>>2]|0,A=o[A+4>>2]|0}T=H,o[T>>2]=l,o[T+4>>2]=A}while(!((l|0)==0&(A|0)==0));return(q|0)==4?(A=H+40|0,l=o[A>>2]|0,l|0&&Ie(l),q=H+16|0,o[q>>2]=0,o[q+4>>2]=0,o[M>>2]=0,o[H+36>>2]=0,o[N>>2]=-1,o[H+32>>2]=0,o[A>>2]=0,H3(0,0,0,B),o[H>>2]=0,o[H+4>>2]=0,o[F>>2]=0,H=14,I=X,H|0):((q|0)==10&&(o[H>>2]=0,o[H+4>>2]=0,o[F>>2]=o[M>>2]),H=o[F>>2]|0,I=X,H|0)}function db(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0;if(N=I,I=I+48|0,x=N+32|0,v=N+40|0,T=N,!(o[A>>2]|0))return M=d,o[M>>2]=0,o[M+4>>2]=0,M=0,I=N,M|0;_2(x,0,0,0),g=x,h=o[g>>2]|0,g=o[g+4>>2]|0;do if(l>>>0>15)M=T,o[M>>2]=0,o[M+4>>2]=0,o[T+8>>2]=4,o[T+12>>2]=-1,M=T+16|0,c=T+29|0,o[M>>2]=0,o[M+4>>2]=0,o[M+8>>2]=0,ve[M+12>>0]=0,ve[c>>0]=ve[v>>0]|0,ve[c+1>>0]=ve[v+1>>0]|0,ve[c+2>>0]=ve[v+2>>0]|0,c=4,M=9;else{if(c=e0(c)|0,c|0){x=T,o[x>>2]=0,o[x+4>>2]=0,o[T+8>>2]=c,o[T+12>>2]=-1,x=T+16|0,M=T+29|0,o[x>>2]=0,o[x+4>>2]=0,o[x+8>>2]=0,ve[x+12>>0]=0,ve[M>>0]=ve[v>>0]|0,ve[M+1>>0]=ve[v+1>>0]|0,ve[M+2>>0]=ve[v+2>>0]|0,M=9;break}if(c=Cr((o[A+8>>2]|0)+1|0,32)|0,!c){M=T,o[M>>2]=0,o[M+4>>2]=0,o[T+8>>2]=13,o[T+12>>2]=-1,M=T+16|0,c=T+29|0,o[M>>2]=0,o[M+4>>2]=0,o[M+8>>2]=0,ve[M+12>>0]=0,ve[c>>0]=ve[v>>0]|0,ve[c+1>>0]=ve[v+1>>0]|0,ve[c+2>>0]=ve[v+2>>0]|0,c=13,M=9;break}P2(A,c),F=T,o[F>>2]=h,o[F+4>>2]=g,g=T+8|0,o[g>>2]=0,o[T+12>>2]=l,o[T+20>>2]=A,o[T+24>>2]=c,ve[T+28>>0]=0,h=T+29|0,ve[h>>0]=ve[v>>0]|0,ve[h+1>>0]=ve[v+1>>0]|0,ve[h+2>>0]=ve[v+2>>0]|0,o[T+16>>2]=3,B=+bx(c),B=B*+_x(c),p=+Kt(+ +z[c>>3]),p=B/+Zt(+ +uu(+p,+ +Kt(+ +z[c+8>>3])))*6371.007180918475*6371.007180918475,h=T+12|0,c=o[h>>2]|0;e:do if((c|0)>0)do{if(W3(c+-1|0,x)|0,!(p/+z[x>>3]>10))break e;F=o[h>>2]|0,c=F+-1|0,o[h>>2]=c}while((F|0)>1);while(0);if(iu(T),h=d,o[h>>2]=0,o[h+4>>2]=0,h=T,c=o[h>>2]|0,h=o[h+4>>2]|0,!((c|0)==0&(h|0)==0))do YA(c,h,l,x)|0,v=x,A=d,v=De(o[A>>2]|0,o[A+4>>2]|0,o[v>>2]|0,o[v+4>>2]|0)|0,A=k()|0,F=d,o[F>>2]=v,o[F+4>>2]=A,iu(T),F=T,c=o[F>>2]|0,h=o[F+4>>2]|0;while(!((c|0)==0&(h|0)==0));c=o[g>>2]|0}while(0);return F=c,I=N,F|0}function JA(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0;if(!(D3(l,c)|0)||(l=xx(l)|0,d=+z[c>>3],h=+z[c+8>>3],h=l&h<0?h+6.283185307179586:h,B=o[A>>2]|0,(B|0)<=0))return B=0,B|0;if(N=o[A+4>>2]|0,l){l=0,M=h,c=-1,A=0;e:for(;;){for(T=A;g=+z[N+(T<<4)>>3],h=+z[N+(T<<4)+8>>3],A=(c+2|0)%(B|0)|0,p=+z[N+(A<<4)>>3],v=+z[N+(A<<4)+8>>3],g>p?(x=g,g=v):(x=p,p=g,g=h,h=v),d=d==p|d==x?d+2220446049250313e-31:d,!!(d<p|d>x);)if(c=T+1|0,(c|0)>=(B|0)){c=22;break e}else A=T,T=c,c=A;if(v=g<0?g+6.283185307179586:g,g=h<0?h+6.283185307179586:h,M=v==M|g==M?M+-2220446049250313e-31:M,x=v+(g-v)*((d-p)/(x-p)),(x<0?x+6.283185307179586:x)>M&&(l=l^1),A=T+1|0,(A|0)>=(B|0)){c=22;break}else c=T}if((c|0)==22)return l|0}else{l=0,M=h,c=-1,A=0;e:for(;;){for(T=A;g=+z[N+(T<<4)>>3],h=+z[N+(T<<4)+8>>3],A=(c+2|0)%(B|0)|0,p=+z[N+(A<<4)>>3],v=+z[N+(A<<4)+8>>3],g>p?(x=g,g=v):(x=p,p=g,g=h,h=v),d=d==p|d==x?d+2220446049250313e-31:d,!!(d<p|d>x);)if(c=T+1|0,(c|0)>=(B|0)){c=22;break e}else A=T,T=c,c=A;if(M=g==M|h==M?M+-2220446049250313e-31:M,g+(h-g)*((d-p)/(x-p))>M&&(l=l^1),A=T+1|0,(A|0)>=(B|0)){c=22;break}else c=T}if((c|0)==22)return l|0}return 0}function K3(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0;if(q=o[A>>2]|0,!q){o[l>>
152]=0,o[l+4>>2]=0,o[l+8>>2]=0,o[l+12>>2]=0,o[l+16>>2]=0,o[l+20>>2]=0,o[l+24>>2]=0,o[l+28>>2]=0;return}if(H=l+8|0,z[H>>3]=17976931348623157e292,X=l+24|0,z[X>>3]=17976931348623157e292,z[l>>3]=-17976931348623157e292,se=l+16|0,z[se>>3]=-17976931348623157e292,!((q|0)<=0)){for(B=o[A+4>>2]|0,T=17976931348623157e292,M=-17976931348623157e292,N=0,A=-1,p=17976931348623157e292,g=17976931348623157e292,x=-17976931348623157e292,d=-17976931348623157e292,F=0;c=+z[B+(F<<4)>>3],v=+z[B+(F<<4)+8>>3],A=A+2|0,h=+z[B+(((A|0)==(q|0)?0:A)<<4)+8>>3],c<p&&(z[H>>3]=c,p=c),v<g&&(z[X>>3]=v,g=v),c>x?z[l>>3]=c:c=x,v>d&&(z[se>>3]=v,d=v),T=v>0&v<T?v:T,M=v<0&v>M?v:M,N=N|+Kt(+(v-h))>3.141592653589793,A=F+1|0,(A|0)!=(q|0);)$=F,x=c,F=A,A=$;N&&(z[se>>3]=M,z[X>>3]=T)}}function e0(A){return A=A|0,(A>>>0<4?0:15)|0}function P2(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0;if(q=o[A>>2]|0,q){if(H=l+8|0,z[H>>3]=17976931348623157e292,X=l+24|0,z[X>>3]=17976931348623157e292,z[l>>3]=-17976931348623157e292,se=l+16|0,z[se>>3]=-17976931348623157e292,(q|0)>0){for(h=o[A+4>>2]|0,B=17976931348623157e292,F=-17976931348623157e292,d=0,c=-1,x=17976931348623157e292,T=17976931348623157e292,N=-17976931348623157e292,g=-17976931348623157e292,$=0;p=+z[h+($<<4)>>3],M=+z[h+($<<4)+8>>3],be=c+2|0,v=+z[h+(((be|0)==(q|0)?0:be)<<4)+8>>3],p<x&&(z[H>>3]=p,x=p),M<T&&(z[X>>3]=M,T=M),p>N?z[l>>3]=p:p=N,M>g&&(z[se>>3]=M,g=M),B=M>0&M<B?M:B,F=M<0&M>F?M:F,d=d|+Kt(+(M-v))>3.141592653589793,c=$+1|0,(c|0)!=(q|0);)be=$,N=p,$=c,c=be;d&&(z[se>>3]=F,z[X>>3]=B)}}else o[l>>2]=0,o[l+4>>2]=0,o[l+8>>2]=0,o[l+12>>2]=0,o[l+16>>2]=0,o[l+20>>2]=0,o[l+24>>2]=0,o[l+28>>2]=0;if(be=A+8|0,c=o[be>>2]|0,!((c|0)<=0)){me=A+12|0,ee=0;do if(h=o[me>>2]|0,d=ee,ee=ee+1|0,X=l+(ee<<5)|0,se=o[h+(d<<3)>>2]|0,se){if($=l+(ee<<5)+8|0,z[$>>3]=17976931348623157e292,A=l+(ee<<5)+24|0,z[A>>3]=17976931348623157e292,z[X>>3]=-17976931348623157e292,Ae=l+(ee<<5)+16|0,z[Ae>>3]=-17976931348623157e292,(se|0)>0){for(q=o[h+(d<<3)+4>>2]|0,B=17976931348623157e292,F=-17976931348623157e292,h=0,d=-1,H=0,x=17976931348623157e292,T=17976931348623157e292,M=-17976931348623157e292,g=-17976931348623157e292;p=+z[q+(H<<4)>>3],N=+z[q+(H<<4)+8>>3],d=d+2|0,v=+z[q+(((d|0)==(se|0)?0:d)<<4)+8>>3],p<x&&(z[$>>3]=p,x=p),N<T&&(z[A>>3]=N,T=N),p>M?z[X>>3]=p:p=M,N>g&&(z[Ae>>3]=N,g=N),B=N>0&N<B?N:B,F=N<0&N>F?N:F,h=h|+Kt(+(N-v))>3.141592653589793,d=H+1|0,(d|0)!=(se|0);)ce=H,H=d,M=p,d=ce;h&&(z[Ae>>3]=F,z[A>>3]=B)}}else o[X>>2]=0,o[X+4>>2]=0,o[X+8>>2]=0,o[X+12>>2]=0,o[X+16>>2]=0,o[X+20>>2]=0,o[X+24>>2]=0,o[X+28>>2]=0,c=o[be>>2]|0;while((ee|0)<(c|0))}}function B2(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;if(!(JA(A,l,c)|0))return h=0,h|0;if(h=A+8|0,(o[h>>2]|0)<=0)return h=1,h|0;for(d=A+12|0,A=0;;){if(p=A,A=A+1|0,JA((o[d>>2]|0)+(p<<3)|0,l+(A<<5)|0,c)|0){A=0,d=6;break}if((A|0)>=(o[h>>2]|0)){A=1,d=6;break}}return(d|0)==6?A|0:0}function Z3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(T=I,I=I+16|0,v=T,g=c+8|0,!(JA(A,l,g)|0))return x=0,I=T,x|0;x=A+8|0;e:do if((o[x>>2]|0)>0){for(p=A+12|0,h=0;;){if(M=h,h=h+1|0,JA((o[p>>2]|0)+(M<<3)|0,l+(h<<5)|0,g)|0){h=0;break}if((h|0)>=(o[x>>2]|0))break e}return I=T,h|0}while(0);if(su(A,l,c,d)|0)return M=0,I=T,M|0;o[v>>2]=o[c>>2],o[v+4>>2]=g,h=o[x>>2]|0;e:do if((h|0)>0)for(A=A+12|0,g=0,p=h;;){if(h=o[A>>2]|0,(o[h+(g<<3)>>2]|0)>0){if(JA(v,d,o[h+(g<<3)+4>>2]|0)|0){h=0;break e}if(h=g+1|0,su((o[A>>2]|0)+(g<<3)|0,l+(h<<5)|0,c,d)|0){h=0;break e}p=o[x>>2]|0}else h=g+1|0;if((h|0)<(p|0))g=h;else{h=1;break}}else h=1;while(0);return M=h,I=T,M|0}function su(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0,be=0,ce=0,oe=0;if(be=I,I=I+176|0,$=be+172|0,h=be+168|0,Ae=be,!(p2(l,d)|0))return A=0,I=be,A|0;if(Tx(l,d,$,h),Li(Ae|0,c|0,168)|0,(o[c>>2]|0)>0){l=0;do ce=Ae+8+(l<<4)+8|0,se=+ri(+z[ce>>3],o[h>>2]|0),z[ce>>3]=se,l=l+1|0;while((l|0)<(o[c>>2]|0))}H=+z[d>>3],X=+z[d+8>>3],se=+ri(+z[d+16>>3],o[h>>2]|0),F=+ri(+z[d+24>>3],o[h>>2]|0);e:do if((o[A>>2]|0)>0){if(d=A+4|0,h=o[Ae>>2]|0,(h|0)<=0){for(l=0;;)if(l=l+1|0,(l|0)>=(o[A>>2]|0)){l=0;break e}}for(c=0;;){if(l=o[d>>2]|0,B=+z[l+(c<<4)>>3],q=+ri(+z[l+(c<<4)+8>>3],o[$>>2]|0),l=o[d>>2]|0,c=c+1|0,ce=(c|0)%(o[A>>
152]|0)|0,p=+z[l+(ce<<4)>>3],g=+ri(+z[l+(ce<<4)+8>>3],o[$>>2]|0),!(B>=H)|!(p>=H)&&!(B<=X)|!(p<=X)&&!(q<=F)|!(g<=F)&&!(q>=se)|!(g>=se)){N=p-B,T=g-q,l=0;do if(oe=l,l=l+1|0,ce=(l|0)==(h|0)?0:l,p=+z[Ae+8+(oe<<4)+8>>3],g=+z[Ae+8+(ce<<4)+8>>3]-p,v=+z[Ae+8+(oe<<4)>>3],x=+z[Ae+8+(ce<<4)>>3]-v,M=N*g-T*x,M!=0&&(ee=q-p,me=B-v,x=(ee*x-g*me)/M,!(x<0|x>1))&&(M=(N*ee-T*me)/M,M>=0&M<=1)){l=1;break e}while((l|0)<(h|0))}if((c|0)>=(o[A>>2]|0)){l=0;break}}}else l=0;while(0);return oe=l,I=be,oe|0}function J3(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0;if(su(A,l,c,d)|0)return p=1,p|0;if(p=A+8|0,(o[p>>2]|0)<=0)return p=0,p|0;for(h=A+12|0,A=0;;){if(g=A,A=A+1|0,su((o[h>>2]|0)+(g<<3)|0,l+(A<<5)|0,c,d)|0){A=1,h=6;break}if((A|0)>=(o[p>>2]|0)){A=0,h=6;break}}return(h|0)==6?A|0:0}function pb(){return 8}function mb(){return 16}function gb(){return 168}function yb(){return 8}function vb(){return 16}function _b(){return 12}function xb(){return 8}function bb(A){return A=A|0,+(+((o[A>>2]|0)>>>0)+4294967296*+(o[A+4>>2]|0))}function Tb(A){A=A|0;var l=0,c=0;return c=+z[A>>3],l=+z[A+8>>3],+ +Dt(+(c*c+l*l))}function e4(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0;T=+z[A>>3],x=+z[l>>3]-T,v=+z[A+8>>3],g=+z[l+8>>3]-v,N=+z[c>>3],p=+z[d>>3]-N,B=+z[c+8>>3],M=+z[d+8>>3]-B,p=(p*(v-B)-(T-N)*M)/(x*M-g*p),z[h>>3]=T+x*p,z[h+8>>3]=v+g*p}function t4(A,l){return A=A|0,l=l|0,+Kt(+(+z[A>>3]-+z[l>>3]))<11920928955078125e-23?(l=+Kt(+(+z[A+8>>3]-+z[l+8>>3]))<11920928955078125e-23,l|0):(l=0,l|0)}function wb(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;if(p=I,I=I+16|0,h=p,d=Ht(A,l)|0,(c+-1|0)>>>0>5||(d=(d|0)!=0,(c|0)==1&d))return h=-1,I=p,h|0;do if(t0(A,l,h)|0)d=-1;else if(d){d=((o[26416+(c<<2)>>2]|0)+5-(o[h>>2]|0)|0)%5|0;break}else{d=((o[26448+(c<<2)>>2]|0)+6-(o[h>>2]|0)|0)%6|0;break}while(0);return h=d,I=p,h|0}function t0(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0;if(M=I,I=I+32|0,v=M+16|0,x=M,d=Oa(A,l,v)|0,d|0)return c=d,I=M,c|0;p=V3(A,l)|0,T=Gr(A,l)|0,mx(p,x),d=gx(p,o[v>>2]|0)|0;do if(an(p)|0){do switch(p|0){case 4:{h=0;break}case 14:{h=1;break}case 24:{h=2;break}case 38:{h=3;break}case 49:{h=4;break}case 58:{h=5;break}case 63:{h=6;break}case 72:{h=7;break}case 83:{h=8;break}case 97:{h=9;break}case 107:{h=10;break}case 117:{h=11;break}default:wt(27634,27636,75,27645)}while(0);if(g=o[26480+(h*24|0)+8>>2]|0,l=o[26480+(h*24|0)+16>>2]|0,A=o[v>>2]|0,(A|0)!=(o[x>>2]|0)&&(x=f2(p)|0,A=o[v>>2]|0,x|(A|0)==(l|0)&&(d=(d+1|0)%6|0)),(T|0)==3&(A|0)==(l|0)){d=(d+5|0)%6|0;break}(T|0)==5&(A|0)==(g|0)&&(d=(d+1|0)%6|0)}while(0);return o[c>>2]=d,c=0,I=M,c|0}function gi(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0;if(Ae=I,I=I+32|0,$=Ae+24|0,X=Ae+20|0,q=Ae+8|0,F=Ae+16|0,B=Ae,x=(Ht(A,l)|0)==0,x=x?6:5,M=we(A|0,l|0,52)|0,k()|0,M=M&15,x>>>0<=c>>>0)return d=2,I=Ae,d|0;N=(M|0)==0,!N&&(H=Be(7,0,(M^15)*3|0)|0,(H&A|0)==0&((k()|0)&l|0)==0)?h=c:p=4;e:do if((p|0)==4){if(h=(Ht(A,l)|0)!=0,((h?4:5)|0)<(c|0)||t0(A,l,$)|0||(p=(o[$>>2]|0)+c|0,h?h=26768+(((p|0)%5|0)<<2)|0:h=26800+(((p|0)%6|0)<<2)|0,H=o[h>>2]|0,(H|0)==7))return d=1,I=Ae,d|0;o[X>>2]=0,h=Hn(A,l,H,X,q)|0;do if(!h){if(v=q,T=o[v>>2]|0,v=o[v+4>>2]|0,g=v>>>0<l>>>0|(v|0)==(l|0)&T>>>0<A>>>0,p=g?T:A,g=g?v:l,!N&&(N=Be(7,0,(M^15)*3|0)|0,(T&N|0)==0&(v&(k()|0)|0)==0))h=c;else{if(v=(c+-1+x|0)%(x|0)|0,h=Ht(A,l)|0,(v|0)<0&&wt(27634,27636,248,27661),x=(h|0)!=0,((x?4:5)|0)<(v|0)&&wt(27634,27636,248,27661),t0(A,l,$)|0&&wt(27634,27636,248,27661),h=(o[$>>2]|0)+v|0,x?h=26768+(((h|0)%5|0)<<2)|0:h=26800+(((h|0)%6|0)<<2)|0,v=o[h>>2]|0,(v|0)==7&&wt(27634,27636,248,27661),o[F>>2]=0,h=Hn(A,l,v,F,B)|0,h|0)break;T=B,x=o[T>>2]|0,T=o[T+4>>2]|0;do if(T>>>0<g>>>0|(T|0)==(g|0)&x>>>0<p>>>0){if(Ht(x,T)|0?p=eu(x,T,A,l)|0:p=o[26864+((((o[F>>2]|0)+(o[26832+(v<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,h=Ht(x,T)|0,(p+-1|0)>>>0>5){h=-1,p=x,g=T;break}if(h=(h|0)!=0,(p|0)==1&h){h=-1,p=x,g=T;break}do if(t0(x,T,$)|0)h=-1;else if(h){h=((o[26416+(p<<2)>>2]|0)+5-(o[$>>2]|0)|0)%5|0;break}else{h=((o[26448+(p<<2)>>2]|0)+6-(o[$>>2]|0)|0)%6|0;break}while(0);p=x,g=T}else h=c;while(0);v=q,T=o[v>>2]|0,v=o[v+4>>2]|0}if((p|0)==(T|0)&(g|0)==(v|0)){if(x=(Ht(T,v)|0)!=0,x?A=eu(T,v,A,l)|0:A=o[26864+((((o[X>>2]|0)+(o[26832+(H<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,h=Ht(T,v)|0,(A+-1|0)>>>0<=5&&(se=(h|0)!=0,!((A|0)==1&se)))do if(t0(T,v,$)|0)h=-1;else if(se){h=((o[26416+(A<<2)>>2]|0)+5-(o[$>>2]|0)|0)%5|0;break}else{h=((o[26448+(A<<2)>>2]|0)+6-(o[$>>2]|0)|0)%6|0;break}while(0);else h=-1;h=h+1|0,h=(h|0)==6|x&(h|0)==5?0:h}l=g,A=p;break e}while(0);return d=h,I=Ae,d|0}while(0);return se=Be(h|0,0,56)|0,$=k()|0|l&-2130706433|536870912,o[d>>2]=se|A,o[d+4>>2]=$,d=0,I=Ae,d|0}function Sb(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;return p=(Ht(A,l)|0)==0,d=gi(A,l,0,c)|0,h=(d|0)==0,p?!h||(d=gi(A,l,1,c+8|0)|0,d|0)||(d=gi(A,l,2,c+16|0)|0,d|0)||(d=gi(A,l,3,c+24|0)|0,d|0)||(d=gi(A,l,4,c+32|0)|0,d)?(p=d,p|0):gi(A,l,5,
15c+40|0)|0:!h||(d=gi(A,l,1,c+8|0)|0,d|0)||(d=gi(A,l,2,c+16|0)|0,d|0)||(d=gi(A,l,3,c+24|0)|0,d|0)||(d=gi(A,l,4,c+32|0)|0,d|0)?(p=d,p|0):(p=c+40|0,o[p>>2]=0,o[p+4>>2]=0,p=0,p|0)}function Mb(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0,x=0;return x=I,I=I+192|0,h=x,p=x+168|0,g=we(A|0,l|0,56)|0,k()|0,g=g&7,v=l&-2130706433|134217728,d=Oa(A,v,p)|0,d|0?(v=d,I=x,v|0):(l=we(A|0,l|0,52)|0,k()|0,l=l&15,Ht(A,v)|0?g2(p,l,g,1,h):y2(p,l,g,1,h),v=h+8|0,o[c>>2]=o[v>>2],o[c+4>>2]=o[v+4>>2],o[c+8>>2]=o[v+8>>2],o[c+12>>2]=o[v+12>>2],v=0,I=x,v|0)}function n4(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0;return h=I,I=I+16|0,c=h,!(!0&(l&2013265920|0)==536870912)||(d=l&-2130706433|134217728,!(nu(A,d)|0))?(d=0,I=h,d|0):(p=we(A|0,l|0,56)|0,k()|0,p=(gi(A,d,p&7,c)|0)==0,d=c,d=p&((o[d>>2]|0)==(A|0)?(o[d+4>>2]|0)==(l|0):0)&1,I=h,d|0)}function r4(){return 27680}function ou(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0;N=I,I=I+208|0,x=N,T=N+192|0,g=Or(c,l)|0,v=T,o[v>>2]=1,o[v+4>>2]=0;e:do if(g|0){for(v=0-c|0,o[x+4>>2]=c,o[x>>2]=c,h=2,l=c,p=c;l=l+c+p|0,o[x+(h<<2)>>2]=l,l>>>0<g>>>0;)B=p,h=h+1|0,p=l,l=B;if(p=A+g+v|0,p>>>0>A>>>0){g=p,h=1,l=1;do{do if((l&3|0)!=3)if(l=h+-1|0,(o[x+(l<<2)>>2]|0)>>>0<(g-A|0)>>>0?F2(A,c,d,h,x):Au(A,c,d,T,h,0,x),(h|0)==1){lu(T,1),h=0;break}else{lu(T,l),h=1;break}else F2(A,c,d,h,x),au(T,2),h=h+2|0;while(0);l=o[T>>2]|1,o[T>>2]=l,A=A+c|0}while(A>>>0<p>>>0)}else h=1,l=1;for(Au(A,c,d,T,h,0,x),p=T+4|0;;){if((h|0)==1&(l|0)==1)if(o[p>>2]|0)M=19;else break e;else(h|0)<2?M=19:(lu(T,2),B=h+-2|0,o[T>>2]=o[T>>2]^7,au(T,1),Au(A+(0-(o[x+(B<<2)>>2]|0))+v|0,c,d,T,h+-1|0,1,x),lu(T,1),l=o[T>>2]|1,o[T>>2]=l,A=A+v|0,Au(A,c,d,T,B,1,x),h=B);(M|0)==19&&(M=0,l=i4(T)|0,au(T,l),A=A+v|0,h=l+h|0,l=o[T>>2]|0)}}while(0);I=N}function F2(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0;N=I,I=I+240|0,M=N,o[M>>2]=A;e:do if((d|0)>1)for(T=0-l|0,v=A,p=d,d=1,g=A;;){if(v=v+T|0,x=p+-2|0,A=v+(0-(o[h+(x<<2)>>2]|0))|0,(_o[c&3](g,A)|0)>-1&&(_o[c&3](g,v)|0)>-1||(g=M+(d<<2)|0,(_o[c&3](A,v)|0)>-1?(o[g>>2]=A,p=p+-1|0):(o[g>>2]=v,A=v,p=x),d=d+1|0,(p|0)<=1))break e;v=A,g=o[M>>2]|0}else d=1;while(0);o4(l,M,d),I=N}function au(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;h=A+4|0,l>>>0>31?(d=o[h>>2]|0,o[A>>2]=d,o[h>>2]=0,l=l+-32|0,c=0):(c=o[h>>2]|0,d=o[A>>2]|0),o[A>>2]=c<<32-l|d>>>l,o[h>>2]=c>>>l}function Au(A,l,c,d,h,p,g){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0,p=p|0,g=g|0;var v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;F=I,I=I+240|0,N=F+232|0,B=F,q=o[d>>2]|0,o[N>>2]=q,x=o[d+4>>2]|0,T=N+4|0,o[T>>2]=x,o[B>>2]=A;e:do if((q|0)!=1|(x|0)!=0&&(M=0-l|0,v=A+(0-(o[g+(h<<2)>>2]|0))|0,(_o[c&3](v,A)|0)>=1))for(d=1,p=(p|0)==0,x=v;;){if(p&(h|0)>1){if(p=A+M|0,v=o[g+(h+-2<<2)>>2]|0,(_o[c&3](p,x)|0)>-1){v=10;break e}if((_o[c&3](p+(0-v)|0,x)|0)>-1){v=10;break e}}if(p=d+1|0,o[B+(d<<2)>>2]=x,q=i4(N)|0,au(N,q),h=q+h|0,!((o[N>>2]|0)!=1|(o[T>>2]|0)!=0)){d=p,A=x,v=10;break e}if(A=x+(0-(o[g+(h<<2)>>2]|0))|0,(_o[c&3](A,o[B>>2]|0)|0)<1){A=x,d=p,p=0,v=9;break}else q=x,d=p,p=1,x=A,A=q}else d=1,v=9;while(0);(v|0)==9&&!(p|0)&&(v=10),(v|0)==10&&(o4(l,B,d),F2(A,l,c,h,g)),I=F}function lu(A,l){A=A|0,l=l|0;var c=0,d=0,h=0;h=A+4|0,l>>>0>31?(d=o[A>>2]|0,o[h>>2]=d,o[A>>2]=0,l=l+-32|0,c=0):(c=o[A>>2]|0,d=o[h>>2]|0),o[h>>2]=c>>>(32-l|0)|d<<l,o[A>>2]=c<<l}function i4(A){A=A|0;var l=0;return l=s4((o[A>>2]|0)+-1|0)|0,l?l|0:(l=s4(o[A+4>>2]|0)|0,(l|0?l+32|0:0)|0)}function s4(A){A=A|0;var l=0;if(A)if(A&1)A=0;else for(l=A,A=0;A=A+1|0,!(l&2);)l=l>>>1;else A=32;return A|0}function o4(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0,v=0;g=I,I=I+256|0,d=g;e:do if((c|0)>=2&&(p=l+(c<<2)|0,o[p>>2]=d,A|0))for(;;){h=A>>>0<256?A:256,Li(d|0,o[l>>2]|0,h|0)|0,d=0;do v=l+(d<<2)|0,d=d+1|0,Li(o[v>>2]|0,o[l+(d<<2)>>2]|0,h|0)|0,o[v>>2]=(o[v>>2]|0)+h;while((d|0)!=(c|0));if(A=A-h|0,!A)break e;d=o[p>>2]|0}while(0);I=g}function rs(A){return A=+A,~~+c4(+A)|0}function An(A){A=A|0;var l=0,c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0,H=0,X=0,se=0,$=0,Ae=0,ee=0,me=0;me=I,I=I+16|0,B=me;do if(A>>>0<245){if(T=A>>>0<11?16:A+11&-8,A=T>>>3,N=o[6921]|0,c=N>>>A,c&3|0)return l=(c&1^1)+A|0,A=27724+(l<<1<<2)|0,c=A+8|0,d=o[c>>2]|0,h=d+8|0,p=o[h>>2]|0,(p|0)==(A|0)?o[6921]=N&~(1<<l):(o[p+12>>2]=A,o[c>>2]=p),ee=l<<3,o[d+4>>2]=ee|3,ee=d+ee+4|0,o[ee>>2]=o[ee>>2]|1,ee=h,I=me,ee|0;if(M=o[6923]|0,T>>>0>M>>>0){if(c|0)return l=2<<A,l=c<<A&(l|0-l),l=(l&0-l)+-1|0,v=l>>>12&16,l=l>>>v,c=l>>>5&8,l=l>>>c,p=l>>>2&4,l=l>>>p,A=l>>>1&2,l=l>>>A,d=l>>>1&1,d=(c|v|p|A|d)+(l>>>d)|0,l=27724+(d<<1<<2)|0,A=l+8|0,p=o[A>>2]|0,v=p+8|0,c=o[v>>2]|0,(c|0)==(l|0)?(A=N&~(1<<d),o[6921]=A):(o[c+12>>2]=l,o[A>>2]=c,A=N),ee=d<<3,g=ee-T|0,o[p+4>>2]=T|3,h=p+T|0,o[h+4>>2]=g|1,o[p+ee>>2]=g,M|0&&(d=o[6926]|0,l=M>>>3,c=27724+(l<<1<<2)|0,l=1<<l,A&l?(A=c+8|0,l=o[A>>2]|0):(o[6921]=A|l,l=c,A=c+8|0),o[A>>2]=d,o[l+12>>2]=d,o[d+8>>2]=l,o[d+12>>2]=c),o[6923]=g,o[6926]=h,ee=v,I=me,ee|0;if(p=o[6922]|0,p){for(c=(p&0-p)+-1|0,h=c>>>12&16,c=c>>>h,d=c>>>5&8,c=c>>>d,g=c>>>2&4,c=c>>>g,v=c>>>1&2,c=c>>>v,x=c>>>
151&1,x=o[27988+((d|h|g|v|x)+(c>>>x)<<2)>>2]|0,c=x,v=x,x=(o[x+4>>2]&-8)-T|0;A=o[c+16>>2]|0,!(!A&&(A=o[c+20>>2]|0,!A));)g=(o[A+4>>2]&-8)-T|0,h=g>>>0<x>>>0,c=A,v=h?A:v,x=h?g:x;if(g=v+T|0,g>>>0>v>>>0){h=o[v+24>>2]|0,l=o[v+12>>2]|0;do if((l|0)==(v|0)){if(A=v+20|0,l=o[A>>2]|0,!l&&(A=v+16|0,l=o[A>>2]|0,!l)){c=0;break}for(;;)if(d=l+20|0,c=o[d>>2]|0,c)l=c,A=d;else if(d=l+16|0,c=o[d>>2]|0,c)l=c,A=d;else break;o[A>>2]=0,c=l}else c=o[v+8>>2]|0,o[c+12>>2]=l,o[l+8>>2]=c,c=l;while(0);do if(h|0){if(l=o[v+28>>2]|0,A=27988+(l<<2)|0,(v|0)==(o[A>>2]|0)){if(o[A>>2]=c,!c){o[6922]=p&~(1<<l);break}}else if(ee=h+16|0,o[((o[ee>>2]|0)==(v|0)?ee:h+20|0)>>2]=c,!c)break;o[c+24>>2]=h,l=o[v+16>>2]|0,l|0&&(o[c+16>>2]=l,o[l+24>>2]=c),l=o[v+20>>2]|0,l|0&&(o[c+20>>2]=l,o[l+24>>2]=c)}while(0);return x>>>0<16?(ee=x+T|0,o[v+4>>2]=ee|3,ee=v+ee+4|0,o[ee>>2]=o[ee>>2]|1):(o[v+4>>2]=T|3,o[g+4>>2]=x|1,o[g+x>>2]=x,M|0&&(d=o[6926]|0,l=M>>>3,c=27724+(l<<1<<2)|0,l=1<<l,l&N?(A=c+8|0,l=o[A>>2]|0):(o[6921]=l|N,l=c,A=c+8|0),o[A>>2]=d,o[l+12>>2]=d,o[d+8>>2]=l,o[d+12>>2]=c),o[6923]=x,o[6926]=g),ee=v+8|0,I=me,ee|0}else N=T}else N=T}else N=T}else if(A>>>0<=4294967231)if(A=A+11|0,T=A&-8,d=o[6922]|0,d){h=0-T|0,A=A>>>8,A?T>>>0>16777215?x=31:(N=(A+1048320|0)>>>16&8,H=A<<N,v=(H+520192|0)>>>16&4,H=H<<v,x=(H+245760|0)>>>16&2,x=14-(v|N|x)+(H<<x>>>15)|0,x=T>>>(x+7|0)&1|x<<1):x=0,c=o[27988+(x<<2)>>2]|0;e:do if(!c)c=0,A=0,H=61;else for(A=0,v=T<<((x|0)==31?0:25-(x>>>1)|0),p=0;;){if(g=(o[c+4>>2]&-8)-T|0,g>>>0<h>>>0)if(g)A=c,h=g;else{A=c,h=0,H=65;break e}if(H=o[c+20>>2]|0,c=o[c+16+(v>>>31<<2)>>2]|0,p=(H|0)==0|(H|0)==(c|0)?p:H,c)v=v<<1;else{c=p,H=61;break}}while(0);if((H|0)==61){if((c|0)==0&(A|0)==0){if(A=2<<x,A=(A|0-A)&d,!A){N=T;break}N=(A&0-A)+-1|0,g=N>>>12&16,N=N>>>g,p=N>>>5&8,N=N>>>p,v=N>>>2&4,N=N>>>v,x=N>>>1&2,N=N>>>x,c=N>>>1&1,A=0,c=o[27988+((p|g|v|x|c)+(N>>>c)<<2)>>2]|0}c?H=65:(v=A,g=h)}if((H|0)==65)for(p=c;;)if(N=(o[p+4>>2]&-8)-T|0,c=N>>>0<h>>>0,h=c?N:h,A=c?p:A,c=o[p+16>>2]|0,c||(c=o[p+20>>2]|0),c)p=c;else{v=A,g=h;break}if(v|0&&g>>>0<((o[6923]|0)-T|0)>>>0&&(M=v+T|0,M>>>0>v>>>0)){p=o[v+24>>2]|0,l=o[v+12>>2]|0;do if((l|0)==(v|0)){if(A=v+20|0,l=o[A>>2]|0,!l&&(A=v+16|0,l=o[A>>2]|0,!l)){l=0;break}for(;;)if(h=l+20|0,c=o[h>>2]|0,c)l=c,A=h;else if(h=l+16|0,c=o[h>>2]|0,c)l=c,A=h;else break;o[A>>2]=0}else ee=o[v+8>>2]|0,o[ee+12>>2]=l,o[l+8>>2]=ee;while(0);do if(p){if(A=o[v+28>>2]|0,c=27988+(A<<2)|0,(v|0)==(o[c>>2]|0)){if(o[c>>2]=l,!l){d=d&~(1<<A),o[6922]=d;break}}else if(ee=p+16|0,o[((o[ee>>2]|0)==(v|0)?ee:p+20|0)>>2]=l,!l)break;o[l+24>>2]=p,A=o[v+16>>2]|0,A|0&&(o[l+16>>2]=A,o[A+24>>2]=l),A=o[v+20>>2]|0,A&&(o[l+20>>2]=A,o[A+24>>2]=l)}while(0);e:do if(g>>>0<16)ee=g+T|0,o[v+4>>2]=ee|3,ee=v+ee+4|0,o[ee>>2]=o[ee>>2]|1;else{if(o[v+4>>2]=T|3,o[M+4>>2]=g|1,o[M+g>>2]=g,l=g>>>3,g>>>0<256){c=27724+(l<<1<<2)|0,A=o[6921]|0,l=1<<l,A&l?(A=c+8|0,l=o[A>>2]|0):(o[6921]=A|l,l=c,A=c+8|0),o[A>>2]=M,o[l+12>>2]=M,o[M+8>>2]=l,o[M+12>>2]=c;break}if(l=g>>>8,l?g>>>0>16777215?c=31:(Ae=(l+1048320|0)>>>16&8,ee=l<<Ae,$=(ee+520192|0)>>>16&4,ee=ee<<$,c=(ee+245760|0)>>>16&2,c=14-($|Ae|c)+(ee<<c>>>15)|0,c=g>>>(c+7|0)&1|c<<1):c=0,l=27988+(c<<2)|0,o[M+28>>2]=c,A=M+16|0,o[A+4>>2]=0,o[A>>2]=0,A=1<<c,!(d&A)){o[6922]=d|A,o[l>>2]=M,o[M+24>>2]=l,o[M+12>>2]=M,o[M+8>>2]=M;break}l=o[l>>2]|0;t:do if((o[l+4>>2]&-8|0)!=(g|0)){for(d=g<<((c|0)==31?0:25-(c>>>1)|0);c=l+16+(d>>>31<<2)|0,A=o[c>>2]|0,!!A;)if((o[A+4>>2]&-8|0)==(g|0)){l=A;break t}else d=d<<1,l=A;o[c>>2]=M,o[M+24>>2]=l,o[M+12>>2]=M,o[M+8>>2]=M;break e}while(0);Ae=l+8|0,ee=o[Ae>>2]|0,o[ee+12>>2]=M,o[Ae>>2]=M,o[M+8>>2]=ee,o[M+12>>2]=l,o[M+24>>2]=0}while(0);return ee=v+8|0,I=me,ee|0}else N=T}else N=T;else N=-1;while(0);if(c=o[6923]|0,c>>>0>=N>>>0)return l=c-N|0,A=o[6926]|0,l>>>0>15?(ee=A+N|0,o[6926]=ee,o[6923]=l,o[ee+4>>2]=l|1,o[A+c>>2]=l,o[A+4>>2]=N|3):(o[6923]=0,o[6926]=0,o[A+4>>2]=c|3,ee=A+c+4|0,o[ee>>2]=o[ee>>2]|1),ee=A+8|0,I=me,ee|0;if(g=o[6924]|0,g>>>0>N>>>0)return $=g-N|0,o[6924]=$,ee=o[6927]|0,Ae=ee+N|0,o[6927]=Ae,o[Ae+4>>2]=$|1,o[ee+4>>2]=N|3,ee=ee+8|0,I=me,ee|0;if(o[7039]|0?A=o[7041]|0:(o[7041]=4096,o[7040]=4096,o[7042]=-1,o[7043]=-1,o[7044]=0,o[7032]=0,o[7039]=B&-16^1431655768,A=4096),v=N+48|0,x=N+47|0,p=A+x|0,h=0-A|0,T=p&h,T>>>0<=N>>>0||(A=o[7031]|0,A|0&&(M=o[7029]|0,B=M+T|0,B>>>0<=M>>>0|B>>>0>A>>>0)))return ee=0,I=me,ee|0;e:do if(o[7032]&4)l=0,H=143;else{c=o[6927]|0;t:do if(c){for(d=28132;B=o[d>>2]|0,!(B>>>0<=c>>>0&&(B+(o[d+4>>2]|0)|0)>>>0>c>>>0);)if(A=o[d+8>>2]|0,A)d=A;else{H=128;break t}if(l=p-g&h,l>>>0<2147483647)if(A=vo(l|0)|0,(A|0)==((o[d>>2]|0)+(o[d+4>>2]|0)|0)){if((A|0)!=-1){g=l,p=A,H=145;break e}}else d=A,H=136;else l=0}else H=128;while(0);do if((H|0)==128)if(c=vo(0)|0,(c|0)!=-1&&(l=c,F=o[7040]|0,q=F+-1|0,l=(q&l|0?(q+l&0-F)-l|0:0)+T|0,F=o[7029]|0,q=l+F|0,l>>>0>N>>>0&l>>>0<2147483647)){if(B=o[7031]|0,B|0&&q>>>0<=F>>>0|q>>
15>0>B>>>0){l=0;break}if(A=vo(l|0)|0,(A|0)==(c|0)){g=l,p=c,H=145;break e}else d=A,H=136}else l=0;while(0);do if((H|0)==136){if(c=0-l|0,!(v>>>0>l>>>0&(l>>>0<2147483647&(d|0)!=-1)))if((d|0)==-1){l=0;break}else{g=l,p=d,H=145;break e}if(A=o[7041]|0,A=x-l+A&0-A,A>>>0>=2147483647){g=l,p=d,H=145;break e}if((vo(A|0)|0)==-1){vo(c|0)|0,l=0;break}else{g=A+l|0,p=d,H=145;break e}}while(0);o[7032]=o[7032]|4,H=143}while(0);if((H|0)==143&&T>>>0<2147483647&&($=vo(T|0)|0,q=vo(0)|0,X=q-$|0,se=X>>>0>(N+40|0)>>>0,!(($|0)==-1|se^1|$>>>0<q>>>0&(($|0)!=-1&(q|0)!=-1)^1))&&(g=se?X:l,p=$,H=145),(H|0)==145){l=(o[7029]|0)+g|0,o[7029]=l,l>>>0>(o[7030]|0)>>>0&&(o[7030]=l),x=o[6927]|0;e:do if(x){for(l=28132;;){if(A=o[l>>2]|0,c=o[l+4>>2]|0,(p|0)==(A+c|0)){H=154;break}if(d=o[l+8>>2]|0,d)l=d;else break}if((H|0)==154&&(Ae=l+4|0,(o[l+12>>2]&8|0)==0)&&p>>>0>x>>>0&A>>>0<=x>>>0){o[Ae>>2]=c+g,ee=(o[6924]|0)+g|0,$=x+8|0,$=$&7|0?0-$&7:0,Ae=x+$|0,$=ee-$|0,o[6927]=Ae,o[6924]=$,o[Ae+4>>2]=$|1,o[x+ee+4>>2]=40,o[6928]=o[7043];break}for(p>>>0<(o[6925]|0)>>>0&&(o[6925]=p),c=p+g|0,l=28132;;){if((o[l>>2]|0)==(c|0)){H=162;break}if(A=o[l+8>>2]|0,A)l=A;else break}if((H|0)==162&&!(o[l+12>>2]&8|0)){o[l>>2]=p,M=l+4|0,o[M>>2]=(o[M>>2]|0)+g,M=p+8|0,M=p+(M&7|0?0-M&7:0)|0,l=c+8|0,l=c+(l&7|0?0-l&7:0)|0,T=M+N|0,v=l-M-N|0,o[M+4>>2]=N|3;t:do if((x|0)==(l|0))ee=(o[6924]|0)+v|0,o[6924]=ee,o[6927]=T,o[T+4>>2]=ee|1;else{if((o[6926]|0)==(l|0)){ee=(o[6923]|0)+v|0,o[6923]=ee,o[6926]=T,o[T+4>>2]=ee|1,o[T+ee>>2]=ee;break}if(A=o[l+4>>2]|0,(A&3|0)==1){g=A&-8,d=A>>>3;n:do if(A>>>0<256)if(A=o[l+8>>2]|0,c=o[l+12>>2]|0,(c|0)==(A|0)){o[6921]=o[6921]&~(1<<d);break}else{o[A+12>>2]=c,o[c+8>>2]=A;break}else{p=o[l+24>>2]|0,A=o[l+12>>2]|0;do if((A|0)==(l|0)){if(c=l+16|0,d=c+4|0,A=o[d>>2]|0,A)c=d;else if(A=o[c>>2]|0,!A){A=0;break}for(;;)if(h=A+20|0,d=o[h>>2]|0,d)A=d,c=h;else if(h=A+16|0,d=o[h>>2]|0,d)A=d,c=h;else break;o[c>>2]=0}else ee=o[l+8>>2]|0,o[ee+12>>2]=A,o[A+8>>2]=ee;while(0);if(!p)break;c=o[l+28>>2]|0,d=27988+(c<<2)|0;do if((o[d>>2]|0)!=(l|0)){if(ee=p+16|0,o[((o[ee>>2]|0)==(l|0)?ee:p+20|0)>>2]=A,!A)break n}else{if(o[d>>2]=A,A|0)break;o[6922]=o[6922]&~(1<<c);break n}while(0);if(o[A+24>>2]=p,c=l+16|0,d=o[c>>2]|0,d|0&&(o[A+16>>2]=d,o[d+24>>2]=A),c=o[c+4>>2]|0,!c)break;o[A+20>>2]=c,o[c+24>>2]=A}while(0);l=l+g|0,h=g+v|0}else h=v;if(l=l+4|0,o[l>>2]=o[l>>2]&-2,o[T+4>>2]=h|1,o[T+h>>2]=h,l=h>>>3,h>>>0<256){c=27724+(l<<1<<2)|0,A=o[6921]|0,l=1<<l,A&l?(A=c+8|0,l=o[A>>2]|0):(o[6921]=A|l,l=c,A=c+8|0),o[A>>2]=T,o[l+12>>2]=T,o[T+8>>2]=l,o[T+12>>2]=c;break}l=h>>>8;do if(!l)d=0;else{if(h>>>0>16777215){d=31;break}Ae=(l+1048320|0)>>>16&8,ee=l<<Ae,$=(ee+520192|0)>>>16&4,ee=ee<<$,d=(ee+245760|0)>>>16&2,d=14-($|Ae|d)+(ee<<d>>>15)|0,d=h>>>(d+7|0)&1|d<<1}while(0);if(l=27988+(d<<2)|0,o[T+28>>2]=d,A=T+16|0,o[A+4>>2]=0,o[A>>2]=0,A=o[6922]|0,c=1<<d,!(A&c)){o[6922]=A|c,o[l>>2]=T,o[T+24>>2]=l,o[T+12>>2]=T,o[T+8>>2]=T;break}l=o[l>>2]|0;n:do if((o[l+4>>2]&-8|0)!=(h|0)){for(d=h<<((d|0)==31?0:25-(d>>>1)|0);c=l+16+(d>>>31<<2)|0,A=o[c>>2]|0,!!A;)if((o[A+4>>2]&-8|0)==(h|0)){l=A;break n}else d=d<<1,l=A;o[c>>2]=T,o[T+24>>2]=l,o[T+12>>2]=T,o[T+8>>2]=T;break t}while(0);Ae=l+8|0,ee=o[Ae>>2]|0,o[ee+12>>2]=T,o[Ae>>2]=T,o[T+8>>2]=ee,o[T+12>>2]=l,o[T+24>>2]=0}while(0);return ee=M+8|0,I=me,ee|0}for(l=28132;A=o[l>>2]|0,!(A>>>0<=x>>>0&&(ee=A+(o[l+4>>2]|0)|0,ee>>>0>x>>>0));)l=o[l+8>>2]|0;h=ee+-47|0,A=h+8|0,A=h+(A&7|0?0-A&7:0)|0,h=x+16|0,A=A>>>0<h>>>0?x:A,l=A+8|0,c=g+-40|0,$=p+8|0,$=$&7|0?0-$&7:0,Ae=p+$|0,$=c-$|0,o[6927]=Ae,o[6924]=$,o[Ae+4>>2]=$|1,o[p+c+4>>2]=40,o[6928]=o[7043],c=A+4|0,o[c>>2]=27,o[l>>2]=o[7033],o[l+4>>2]=o[7034],o[l+8>>2]=o[7035],o[l+12>>2]=o[7036],o[7033]=p,o[7034]=g,o[7036]=0,o[7035]=l,l=A+24|0;do Ae=l,l=l+4|0,o[l>>2]=7;while((Ae+8|0)>>>0<ee>>>0);if((A|0)!=(x|0)){if(p=A-x|0,o[c>>2]=o[c>>2]&-2,o[x+4>>2]=p|1,o[A>>2]=p,l=p>>>3,p>>>0<256){c=27724+(l<<1<<2)|0,A=o[6921]|0,l=1<<l,A&l?(A=c+8|0,l=o[A>>2]|0):(o[6921]=A|l,l=c,A=c+8|0),o[A>>2]=x,o[l+12>>2]=x,o[x+8>>2]=l,o[x+12>>2]=c;break}if(l=p>>>8,l?p>>>0>16777215?d=31:(Ae=(l+1048320|0)>>>16&8,ee=l<<Ae,$=(ee+520192|0)>>>16&4,ee=ee<<$,d=(ee+245760|0)>>>16&2,d=14-($|Ae|d)+(ee<<d>>>15)|0,d=p>>>(d+7|0)&1|d<<1):d=0,c=27988+(d<<2)|0,o[x+28>>2]=d,o[x+20>>2]=0,o[h>>2]=0,l=o[6922]|0,A=1<<d,!(l&A)){o[6922]=l|A,o[c>>2]=x,o[x+24>>2]=c,o[x+12>>2]=x,o[x+8>>2]=x;break}l=o[c>>2]|0;t:do if((o[l+4>>2]&-8|0)!=(p|0)){for(d=p<<((d|0)==31?0:25-(d>>>1)|0);c=l+16+(d>>>31<<2)|0,A=o[c>>2]|0,!!A;)if((o[A+4>>2]&-8|0)==(p|0)){l=A;break t}else d=d<<1,l=A;o[c>>2]=x,o[x+24>>2]=l,o[x+12>>2]=x,o[x+8>>2]=x;break e}while(0);Ae=l+8|0,ee=o[Ae>>2]|0,o[ee+12>>2]=x,o[Ae>>2]=x,o[x+8>>2]=ee,o[x+12>>2]=l,o[x+24>>2]=0}}else ee=o[6925]|0,(ee|0)==0|p>>>0<ee>>>0&&(o[6925]=p),o[7033]=p,o[7034]=g,o[7036]=0,o[6930]=o[7039],o[6929]=-1,o[6934]=27724,o[6933]=27724,o[6936]=27732,o[6935]=27
15732,o[6938]=27740,o[6937]=27740,o[6940]=27748,o[6939]=27748,o[6942]=27756,o[6941]=27756,o[6944]=27764,o[6943]=27764,o[6946]=27772,o[6945]=27772,o[6948]=27780,o[6947]=27780,o[6950]=27788,o[6949]=27788,o[6952]=27796,o[6951]=27796,o[6954]=27804,o[6953]=27804,o[6956]=27812,o[6955]=27812,o[6958]=27820,o[6957]=27820,o[6960]=27828,o[6959]=27828,o[6962]=27836,o[6961]=27836,o[6964]=27844,o[6963]=27844,o[6966]=27852,o[6965]=27852,o[6968]=27860,o[6967]=27860,o[6970]=27868,o[6969]=27868,o[6972]=27876,o[6971]=27876,o[6974]=27884,o[6973]=27884,o[6976]=27892,o[6975]=27892,o[6978]=27900,o[6977]=27900,o[6980]=27908,o[6979]=27908,o[6982]=27916,o[6981]=27916,o[6984]=27924,o[6983]=27924,o[6986]=27932,o[6985]=27932,o[6988]=27940,o[6987]=27940,o[6990]=27948,o[6989]=27948,o[6992]=27956,o[6991]=27956,o[6994]=27964,o[6993]=27964,o[6996]=27972,o[6995]=27972,ee=g+-40|0,$=p+8|0,$=$&7|0?0-$&7:0,Ae=p+$|0,$=ee-$|0,o[6927]=Ae,o[6924]=$,o[Ae+4>>2]=$|1,o[p+ee+4>>2]=40,o[6928]=o[7043];while(0);if(l=o[6924]|0,l>>>0>N>>>0)return $=l-N|0,o[6924]=$,ee=o[6927]|0,Ae=ee+N|0,o[6927]=Ae,o[Ae+4>>2]=$|1,o[ee+4>>2]=N|3,ee=ee+8|0,I=me,ee|0}return ee=r4()|0,o[ee>>2]=12,ee=0,I=me,ee|0}function Ie(A){A=A|0;var l=0,c=0,d=0,h=0,p=0,g=0,v=0,x=0;if(A){c=A+-8|0,h=o[6925]|0,A=o[A+-4>>2]|0,l=A&-8,x=c+l|0;do if(A&1)v=c,g=c;else{if(d=o[c>>2]|0,!(A&3)||(g=c+(0-d)|0,p=d+l|0,g>>>0<h>>>0))return;if((o[6926]|0)==(g|0)){if(A=x+4|0,l=o[A>>2]|0,(l&3|0)!=3){v=g,l=p;break}o[6923]=p,o[A>>2]=l&-2,o[g+4>>2]=p|1,o[g+p>>2]=p;return}if(c=d>>>3,d>>>0<256)if(A=o[g+8>>2]|0,l=o[g+12>>2]|0,(l|0)==(A|0)){o[6921]=o[6921]&~(1<<c),v=g,l=p;break}else{o[A+12>>2]=l,o[l+8>>2]=A,v=g,l=p;break}h=o[g+24>>2]|0,A=o[g+12>>2]|0;do if((A|0)==(g|0)){if(l=g+16|0,c=l+4|0,A=o[c>>2]|0,A)l=c;else if(A=o[l>>2]|0,!A){A=0;break}for(;;)if(d=A+20|0,c=o[d>>2]|0,c)A=c,l=d;else if(d=A+16|0,c=o[d>>2]|0,c)A=c,l=d;else break;o[l>>2]=0}else v=o[g+8>>2]|0,o[v+12>>2]=A,o[A+8>>2]=v;while(0);if(h){if(l=o[g+28>>2]|0,c=27988+(l<<2)|0,(o[c>>2]|0)==(g|0)){if(o[c>>2]=A,!A){o[6922]=o[6922]&~(1<<l),v=g,l=p;break}}else if(v=h+16|0,o[((o[v>>2]|0)==(g|0)?v:h+20|0)>>2]=A,!A){v=g,l=p;break}o[A+24>>2]=h,l=g+16|0,c=o[l>>2]|0,c|0&&(o[A+16>>2]=c,o[c+24>>2]=A),l=o[l+4>>2]|0,l?(o[A+20>>2]=l,o[l+24>>2]=A,v=g,l=p):(v=g,l=p)}else v=g,l=p}while(0);if(!(g>>>0>=x>>>0)&&(A=x+4|0,d=o[A>>2]|0,!!(d&1))){if(d&2)o[A>>2]=d&-2,o[v+4>>2]=l|1,o[g+l>>2]=l,h=l;else{if((o[6927]|0)==(x|0)){if(x=(o[6924]|0)+l|0,o[6924]=x,o[6927]=v,o[v+4>>2]=x|1,(v|0)!=(o[6926]|0))return;o[6926]=0,o[6923]=0;return}if((o[6926]|0)==(x|0)){x=(o[6923]|0)+l|0,o[6923]=x,o[6926]=g,o[v+4>>2]=x|1,o[g+x>>2]=x;return}h=(d&-8)+l|0,c=d>>>3;do if(d>>>0<256)if(l=o[x+8>>2]|0,A=o[x+12>>2]|0,(A|0)==(l|0)){o[6921]=o[6921]&~(1<<c);break}else{o[l+12>>2]=A,o[A+8>>2]=l;break}else{p=o[x+24>>2]|0,A=o[x+12>>2]|0;do if((A|0)==(x|0)){if(l=x+16|0,c=l+4|0,A=o[c>>2]|0,A)l=c;else if(A=o[l>>2]|0,!A){c=0;break}for(;;)if(d=A+20|0,c=o[d>>2]|0,c)A=c,l=d;else if(d=A+16|0,c=o[d>>2]|0,c)A=c,l=d;else break;o[l>>2]=0,c=A}else c=o[x+8>>2]|0,o[c+12>>2]=A,o[A+8>>2]=c,c=A;while(0);if(p|0){if(A=o[x+28>>2]|0,l=27988+(A<<2)|0,(o[l>>2]|0)==(x|0)){if(o[l>>2]=c,!c){o[6922]=o[6922]&~(1<<A);break}}else if(d=p+16|0,o[((o[d>>2]|0)==(x|0)?d:p+20|0)>>2]=c,!c)break;o[c+24>>2]=p,A=x+16|0,l=o[A>>2]|0,l|0&&(o[c+16>>2]=l,o[l+24>>2]=c),A=o[A+4>>2]|0,A|0&&(o[c+20>>2]=A,o[A+24>>2]=c)}}while(0);if(o[v+4>>2]=h|1,o[g+h>>2]=h,(v|0)==(o[6926]|0)){o[6923]=h;return}}if(A=h>>>3,h>>>0<256){c=27724+(A<<1<<2)|0,l=o[6921]|0,A=1<<A,l&A?(l=c+8|0,A=o[l>>2]|0):(o[6921]=l|A,A=c,l=c+8|0),o[l>>2]=v,o[A+12>>2]=v,o[v+8>>2]=A,o[v+12>>2]=c;return}A=h>>>8,A?h>>>0>16777215?d=31:(g=(A+1048320|0)>>>16&8,x=A<<g,p=(x+520192|0)>>>16&4,x=x<<p,d=(x+245760|0)>>>16&2,d=14-(p|g|d)+(x<<d>>>15)|0,d=h>>>(d+7|0)&1|d<<1):d=0,A=27988+(d<<2)|0,o[v+28>>2]=d,o[v+20>>2]=0,o[v+16>>2]=0,l=o[6922]|0,c=1<<d;e:do if(!(l&c))o[6922]=l|c,o[A>>2]=v,o[v+24>>2]=A,o[v+12>>2]=v,o[v+8>>2]=v;else{A=o[A>>2]|0;t:do if((o[A+4>>2]&-8|0)!=(h|0)){for(d=h<<((d|0)==31?0:25-(d>>>1)|0);c=A+16+(d>>>31<<2)|0,l=o[c>>2]|0,!!l;)if((o[l+4>>2]&-8|0)==(h|0)){A=l;break t}else d=d<<1,A=l;o[c>>2]=v,o[v+24>>2]=A,o[v+12>>2]=v,o[v+8>>2]=v;break e}while(0);g=A+8|0,x=o[g>>2]|0,o[x+12>>2]=v,o[g>>2]=v,o[v+8>>2]=x,o[v+12>>2]=A,o[v+24>>2]=0}while(0);if(x=(o[6929]|0)+-1|0,o[6929]=x,!(x|0)){for(A=28140;A=o[A>>2]|0,A;)A=A+8|0;o[6929]=-1}}}}function Cr(A,l){A=A|0,l=l|0;var c=0;return A?(c=Or(l,A)|0,(l|A)>>>0>65535&&(c=((c>>>0)/(A>>>0)|0|0)==(l|0)?c:-1)):c=0,A=An(c)|0,!A||!(o[A+-4>>2]&3)||yo(A|0,0,c|0)|0,A|0}function Eb(A,l){A=A|0,l=l|0;var c=0,d=0;return A?l>>>0>4294967231?(l=r4()|0,o[l>>2]=12,l=0,l|0):(c=Nb(A+-8|0,l>>>0<11?16:l+11&-8)|0,c|0?(l=c+8|0,l|0):(c=An(l)|0,c?(d=o[A+-4>>2]|0,d=(d&-8)-(d&3|0?4:8)|0,Li(c|0,A|0,(d>>>0<l>>>0?d:l)|0)|0,Ie(A),l=c,l|0):(l=0,l|0))):(l=An(l)|0,l|0)}function Nb(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0,x=0,T=0,M=0,N=0;if(M=A+4|0,N=o[M>>2]|0,c=N&-8,v=A+c|0,!(N&3))return l>>>0<256?(A=0,A|0):(c>>>0>=(l+4|0)>>>0&&(c-l|0)>>>0<=o[7041]<<1>>>0||(A=0),A|0);if(c>>>0>=l>>>0)return c=c-l|0,c>>>0<=15||(T=A+l|0,o[M>>2]=N&1|l|2,o[T+4>>2]=c|3,N=v+4|0,o[N>>2]=o[N>>2]|1,a4(T,c)),A|0;if((o[6927]|0)==(v|0))return T=(o[6924]|0)+c|0,c=T-l|0,d=A+l|0,T>>>0<=l>>>0?(A=0,A|0):(o[M>>2]=N&1|l|2,o[d+4>>2]=c|1,o[6927]=d,o[6924]=c,A|0);if((o[6926]|0)==(v|0))return d=(o[6923]|0)+c|0,d>>>0<l>>>0?(A=0,A|0):(c=d-l|0,c>>>0>15?(T=A+l|0,d=A+d|0,o[M>>2]=N&1|l|2,o[T+4>>2]=c|1,o[d>>2]=c,d=d+4|0,o[d>>2]=o[d>>2]&-2,d=T):(o[M>>2]=N&1|d|2,d=A+d+4|0,o[d>>2]=o[d>>2]|1,d=0,c=0),o[6923]=c,o[6926]=d,A|0);if(d=o[v+4>>2]|0,d&2|0||(x=(d&-8)+c|0,x>>>0<l>>>0))return A=0,A|0;T=x-l|0,h=d>>>3;do if(d>>>0<256)if(d=o[v+8>>2]|0,c=o[v+12>>2]|0,(c|0)==(d|0)){o[6921]=o[6921]&~(1<<h);break}else{o[d+12>>2]=c,o[c+8>>2]=d;break}else{g=o[v+24>>2]|0,c=o[v+12>>2]|0;do if((c|0)==(v|0)){if(d=v+16|0,h=d+4|0,c=o[h>>2]|0,c)d=h;else if(c=o[d>>2]|0,!c){h=0;break}for(;;)if(p=c+20|0,h=o[p>>2]|0,h)c=h,d=p;else if(p=c+16|0,h=o[p>>2]|0,h)c=h,d=p;else break;o[d>>2]=0,h=c}else h=o[v+8>>2]|0,o[h+12>>2]=c,o[c+8>>2]=h,h=c;while(0);if(g|0){if(c=o[v+28>>2]|0,d=27988+(c<<2)|0,(o[d>>2]|0)==(v|0)){if(o[d>>2]=h,!h){o[6922]=o[6922]&~(1<<c);break}}else if(p=g+16|0,o[((o[p>>2]|0)==(v|0)?p:g+20|0)>>2]=h,!h)break;o[h+24>>2]=g,c=v+16|0,d=o[c>>2]|0,d|0&&(o[h+16>>2]=d,o[d+24>>2]=h),c=o[c+4>>2]|0,c|0&&(o[h+20>>2]=c,o[c+24>>2]=h)}}while(0);return T>>>0<16?(o[M>>2]=N&1|x|2,N=A+x+4|0,o[N>>2]=o[N>>2]|1,A|0):(v=A+l|0,o[M>>2]=N&1|l|2,o[v+4>>2]=T|3,N=A+x+4|0,o[N>>2]=o[N>>2]|1,a4(v,T),A|0)}function a4(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0,g=0,v=0;v=A+l|0,c=o[A+4>>2]|0;do if(c&1)g=A;else{if(h=o[A>>
152]|0,!(c&3))return;if(g=A+(0-h)|0,l=h+l|0,(o[6926]|0)==(g|0)){if(A=v+4|0,c=o[A>>2]|0,(c&3|0)!=3)break;o[6923]=l,o[A>>2]=c&-2,o[g+4>>2]=l|1,o[v>>2]=l;return}if(d=h>>>3,h>>>0<256)if(A=o[g+8>>2]|0,c=o[g+12>>2]|0,(c|0)==(A|0)){o[6921]=o[6921]&~(1<<d);break}else{o[A+12>>2]=c,o[c+8>>2]=A;break}p=o[g+24>>2]|0,A=o[g+12>>2]|0;do if((A|0)==(g|0)){if(c=g+16|0,d=c+4|0,A=o[d>>2]|0,A)c=d;else if(A=o[c>>2]|0,!A){A=0;break}for(;;)if(h=A+20|0,d=o[h>>2]|0,d)A=d,c=h;else if(h=A+16|0,d=o[h>>2]|0,d)A=d,c=h;else break;o[c>>2]=0}else h=o[g+8>>2]|0,o[h+12>>2]=A,o[A+8>>2]=h;while(0);if(p){if(c=o[g+28>>2]|0,d=27988+(c<<2)|0,(o[d>>2]|0)==(g|0)){if(o[d>>2]=A,!A){o[6922]=o[6922]&~(1<<c);break}}else if(h=p+16|0,o[((o[h>>2]|0)==(g|0)?h:p+20|0)>>2]=A,!A)break;o[A+24>>2]=p,c=g+16|0,d=o[c>>2]|0,d|0&&(o[A+16>>2]=d,o[d+24>>2]=A),c=o[c+4>>2]|0,c&&(o[A+20>>2]=c,o[c+24>>2]=A)}}while(0);if(A=v+4|0,d=o[A>>2]|0,d&2)o[A>>2]=d&-2,o[g+4>>2]=l|1,o[g+l>>2]=l,h=l;else{if((o[6927]|0)==(v|0)){if(v=(o[6924]|0)+l|0,o[6924]=v,o[6927]=g,o[g+4>>2]=v|1,(g|0)!=(o[6926]|0))return;o[6926]=0,o[6923]=0;return}if((o[6926]|0)==(v|0)){v=(o[6923]|0)+l|0,o[6923]=v,o[6926]=g,o[g+4>>2]=v|1,o[g+v>>2]=v;return}h=(d&-8)+l|0,c=d>>>3;do if(d>>>0<256)if(A=o[v+8>>2]|0,l=o[v+12>>2]|0,(l|0)==(A|0)){o[6921]=o[6921]&~(1<<c);break}else{o[A+12>>2]=l,o[l+8>>2]=A;break}else{p=o[v+24>>2]|0,l=o[v+12>>2]|0;do if((l|0)==(v|0)){if(A=v+16|0,c=A+4|0,l=o[c>>2]|0,l)A=c;else if(l=o[A>>2]|0,!l){c=0;break}for(;;)if(d=l+20|0,c=o[d>>2]|0,c)l=c,A=d;else if(d=l+16|0,c=o[d>>2]|0,c)l=c,A=d;else break;o[A>>2]=0,c=l}else c=o[v+8>>2]|0,o[c+12>>2]=l,o[l+8>>2]=c,c=l;while(0);if(p|0){if(l=o[v+28>>2]|0,A=27988+(l<<2)|0,(o[A>>2]|0)==(v|0)){if(o[A>>2]=c,!c){o[6922]=o[6922]&~(1<<l);break}}else if(d=p+16|0,o[((o[d>>2]|0)==(v|0)?d:p+20|0)>>2]=c,!c)break;o[c+24>>2]=p,l=v+16|0,A=o[l>>2]|0,A|0&&(o[c+16>>2]=A,o[A+24>>2]=c),l=o[l+4>>2]|0,l|0&&(o[c+20>>2]=l,o[l+24>>2]=c)}}while(0);if(o[g+4>>2]=h|1,o[g+h>>2]=h,(g|0)==(o[6926]|0)){o[6923]=h;return}}if(l=h>>>3,h>>>0<256){c=27724+(l<<1<<2)|0,A=o[6921]|0,l=1<<l,A&l?(A=c+8|0,l=o[A>>2]|0):(o[6921]=A|l,l=c,A=c+8|0),o[A>>2]=g,o[l+12>>2]=g,o[g+8>>2]=l,o[g+12>>2]=c;return}if(l=h>>>8,l?h>>>0>16777215?d=31:(p=(l+1048320|0)>>>16&8,v=l<<p,c=(v+520192|0)>>>16&4,v=v<<c,d=(v+245760|0)>>>16&2,d=14-(c|p|d)+(v<<d>>>15)|0,d=h>>>(d+7|0)&1|d<<1):d=0,l=27988+(d<<2)|0,o[g+28>>2]=d,o[g+20>>2]=0,o[g+16>>2]=0,A=o[6922]|0,c=1<<d,!(A&c)){o[6922]=A|c,o[l>>2]=g,o[g+24>>2]=l,o[g+12>>2]=g,o[g+8>>2]=g;return}l=o[l>>2]|0;e:do if((o[l+4>>2]&-8|0)!=(h|0)){for(d=h<<((d|0)==31?0:25-(d>>>1)|0);c=l+16+(d>>>31<<2)|0,A=o[c>>2]|0,!!A;)if((o[A+4>>2]&-8|0)==(h|0)){l=A;break e}else d=d<<1,l=A;o[c>>2]=g,o[g+24>>2]=l,o[g+12>>2]=g,o[g+8>>2]=g;return}while(0);p=l+8|0,v=o[p>>2]|0,o[v+12>>2]=g,o[p>>2]=g,o[g+8>>2]=v,o[g+12>>2]=l,o[g+24>>2]=0}function De(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,c=A+c>>>0,at(l+d+(c>>>0<A>>>0|0)>>>0|0),c|0|0}function Wn(A,l,c,d){return A=A|0,l=l|0,c=c|0,d=d|0,d=l-d-(c>>>0>A>>>0|0)>>>0,at(d|0),A-c>>>0|0|0}function A4(A){return A=A|0,(A?31-(Os(A^A-1)|0)|0:32)|0}function D2(A,l,c,d,h){A=A|0,l=l|0,c=c|0,d=d|0,h=h|0;var p=0,g=0,v=0,x=0,T=0,M=0,N=0,B=0,F=0,q=0;if(M=A,x=l,T=x,g=c,B=d,v=B,!T)return p=(h|0)!=0,v?p?(o[h>>2]=A|0,o[h+4>>2]=l&0,B=0,h=0,at(B|0),h|0):(B=0,h=0,at(B|0),h|0):(p&&(o[h>>2]=(M>>>0)%(g>>>0),o[h+4>>2]=0),B=0,h=(M>>>0)/(g>>>0)>>>0,at(B|0),h|0);p=(v|0)==0;do if(g){if(!p){if(p=(Os(v|0)|0)-(Os(T|0)|0)|0,p>>>0<=31){N=p+1|0,v=31-p|0,l=p-31>>31,g=N,A=M>>>(N>>>0)&l|T<<v,l=T>>>(N>>>0)&l,p=0,v=M<<v;break}return h?(o[h>>2]=A|0,o[h+4>>2]=x|l&0,B=0,h=0,at(B|0),h|0):(B=0,h=0,at(B|0),h|0)}if(p=g-1|0,p&g|0){v=(Os(g|0)|0)+33-(Os(T|0)|0)|0,q=64-v|0,N=32-v|0,x=N>>31,F=v-32|0,l=F>>31,g=v,A=N-1>>31&T>>>(F>>>0)|(T<<N|M>>>(v>>>0))&l,l=l&T>>>(v>>>0),p=M<<q&x,v=(T<<q|M>>>(F>>>0))&x|M<<N&v-33>>31;break}return h|0&&(o[h>>2]=p&M,o[h+4>>2]=0),(g|0)==1?(F=x|l&0,q=A|0|0,at(F|0),q|0):(q=A4(g|0)|0,F=T>>>(q>>>0)|0,q=T<<32-q|M>>>(q>>>0)|0,at(F|0),q|0)}else{if(p)return h|0&&(o[h>>2]=(T>>>0)%(g>>>0),o[h+4>>2]=0),F=0,q=(T>>>0)/(g>>>0)>>>0,at(F|0),q|0;if(!M)return h|0&&(o[h>>2]=0,o[h+4>>2]=(T>>>0)%(v>>>0)),F=0,q=(T>>>0)/(v>>>0)>>>0,at(F|0),q|0;if(p=v-1|0,!(p&v))return h|0&&(o[h>>2]=A|0,o[h+4>>2]=p&T|l&0),F=0,q=T>>>((A4(v|0)|0)>>>0),at(F|0),q|0;if(p=(Os(v|0)|0)-(Os(T|0)|0)|0,p>>>0<=30){l=p+1|0,v=31-p|0,g=l,A=T<<v|M>>>(l>>>0),l=T>>>(l>>>0),p=0,v=M<<v;break}return h?(o[h>>2]=A|0,o[h+4>>2]=x|l&0,F=0,q=0,at(F|0),q|0):(F=0,q=0,at(F|0),q|0)}while(0);if(!g)T=v,x=0,v=0;else{N=c|0|0,M=B|d&0,T=De(N|0,M|0,-1,-1)|0,c=k()|0,x=v,v=0;do d=x,x=p>>>31|x<<1,p=v|p<<1,d=A<<1|d>>>31|0,B=A>>>31|l<<1|0,Wn(T|0,c|0,d|0,B|0)|0,q=k()|0,F=q>>31|((q|0)<0?-1:0)<<1,v=F&1,A=Wn(d|0,B|0,F&N|0,(((q|0)<0?-1:0)>>31|((q|0)<0?-1:0)<<1)&M|0)|0,l=k()|0,g=g-1|0;while(g|0);T=x,x=0}return g=0,h|0&&(o[h>>2]=A,o[h+4>>2]=l),F=(p|0)>>>31|(T|g)<<1|(g<<1|p>>>31)&0|x,q=(p<<1|0)&-2|v,at(F|0),q|0}function mo(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0;return T=l>>31|((l|0)<0?-1:0)<<1,x=((l|0)<0?-1:0)>>31|((l|0)<0?-1:0)<<1,p=d>>31|((d|0)<0?-1:0)<<1,h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1,v=Wn(T^A|0,x^l|0,T|0,x|0)|0,g=k()|0,A=p^T,l=h^x,Wn((D2(v,g,Wn(p^c|0,h^d|0,p|0,h|0)|0,k()|0,0)|0)^A|0,(k()|0)^l|0,A|0,l|0)|0}function Rb(A,l){A=A|0,l=l|0;var c=0,d=0,h=0,p=0;return p=A&65535,h=l&65535,c=Or(h,p)|0,d=A>>>16,A=(c>>>16)+(Or(h,d)|0)|0,h=l>>>16,l=Or(h,p)|0,at((A>>>16)+(Or(h,d)|0)+(((A&65535)+l|0)>>>16)|0),A+l<<16|c&65535|0|0}function ln(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0;return h=A,p=c,c=Rb(h,p)|0,A=k()|0,at((Or(l,p)|0)+(Or(d,h)|0)+A|A&0|0),c|0|0|0}function go(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0,g=0,v=0,x=0,T=0;return h=I,I=I+16|0,v=h|0,g=l>>31|((l|0)<0?-1:0)<<1,p=((l|0)<0?-1:0)>>31|((l|0)<0?-1:0)<<1,T=d>>31|((d|0)<0?-1:0)<<1,x=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1,A=Wn(g^A|0,p^l|0,g|0,p|0)|0,l=k()|0,D2(A,l,Wn(T^c|0,x^d|0,T|0,x|0)|0,k()|0,v)|0,d=Wn(o[v>>2]^g|0,o[v+4>>2]^p|0,g|0,p|0)|0,c=k()|0,I=h,at(c|0),d|0}function Gs(A,l,c,d){A=A|0,l=l|0,c=c|0,d=d|0;var h=0,p=0;return p=I,I=I+16|0,h=p|0,D2(A,l,c,d,h)|0,I=p,at(o[h+4>>2]|0),o[h>>2]|0|0}function l4(A,l,c){return A=A|0,l=l|0,c=c|0,(c|0)<32?(at(l>>c|0),A>>>c|(l&(1<<c)-1)<<32-c):(at(((l|0)<0?-1:0)|0),l>>c-32|0)}function we(A,l,c){return A=A|0,l=l|0,c=c|0,(c|0)<32?(at(l>>>c|0),A>>>c|(l&(1<<c)-1)<<32-c):(at(0),l>>>c-32|0)}function Be(A,l,c){return A=A|0,l=l|0,c=c|0,(c|0)<32?(at(l<<c|(A&(1<<c)-1<<32-c)>>>32-c|0),A<<c):(at(A<<c-32|0),0)}function L2(A,l,c){return A=A|0,l=l|0,l=Os(l)|0,(l|0)==32&&(l=l+(Os(A)|0)|0),at(0),l|0}function u4(A,l){return A=+A,l=+l,A!=A?+l:l!=l?+A:+Y_(+A,+l)}function uu(A,l){return A=+A,l=+l,A!=A?+l:l!=l?+A:+c2(+A,+l)}function cu(A){return A=+A,A>=0?+Zn(A+.5):+ka(A-.5)}function Li(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0;if((c|0)>=8192)return Z_(A|0,l|0,c|0)|0,A|0;if(p=A|0,h=A+c|0,(A&3)==(l&3)){for(;A&3;){if(!c)return p|0;ve[A>>0]=ve[l>>0]|0,A=A+1|0,l=l+1|0,c=c-1|0}for(c=h&-4|0,d=c-64|0;(A|0)<=(d|0);)o[A>>2]=o[l>>2],o[A+4>>2]=o[l+4>>2],o[A+8>>2]=o[l+8>>2],o[A+12>>2]=o[l+12>>2],o[A+16>>2]=o[l+16>>2],o[A+20>>2]=o[l+20>>2],o[A+24>>2]=o[l+24>>2],o[A+28>>2]=o[l+28>>2],o[A+32>>2]=o[l+32>>2],o[A+36>>2]=o[l+36>>2],o[A+40>>2]=o[l+40>>2],o[A+44>>2]=o[l+44>>2],o[A+48>>2]=o[l+48>>2],o[A+52>>2]=o[l+52>>2],o[A+56>>2]=o[l+56>>2],o[A+60>>2]=o[l+60>>2],A=A+64|0,l=l+64|0;for(;(A|0)<(c|0);)o[A>>2]=o[l>>2],A=A+4|0,l=l+4|0}else for(c=h-4|0;(A|0)<(c|0);)ve[A>>0]=ve[l>>0]|0,ve[A+1>>0]=ve[l+1>>0]|0,ve[A+2>>0]=ve[l+2>>0]|0,ve[A+3>>0]=ve[l+3>>0]|0,A=A+4|0,l=l+4|0;for(;(A|0)<(h|0);)ve[A>>0]=ve[l>>0]|0,A=A+1|0,l=l+1|0;return p|0}function q2(A,l,c){A=A|0,l=l|0,c=c|0;var d=0;if((l|0)<(A|0)&(A|0)<(l+c|0)){for(d=A,l=l+c|0,A=A+c|0;(c|0)>0;)A=A-1|0,l=l-1|0,c=c-1|0,ve[A>>0]=ve[l>>0]|0;A=d}else Li(A,l,c)|0;return A|0}function yo(A,l,c){A=A|0,l=l|0,c=c|0;var d=0,h=0,p=0,g=0;if(p=A+c|0,l=l&255,(c|0)>
15=67){for(;A&3;)ve[A>>0]=l,A=A+1|0;for(d=p&-4|0,g=l|l<<8|l<<16|l<<24,h=d-64|0;(A|0)<=(h|0);)o[A>>2]=g,o[A+4>>2]=g,o[A+8>>2]=g,o[A+12>>2]=g,o[A+16>>2]=g,o[A+20>>2]=g,o[A+24>>2]=g,o[A+28>>2]=g,o[A+32>>2]=g,o[A+36>>2]=g,o[A+40>>2]=g,o[A+44>>2]=g,o[A+48>>2]=g,o[A+52>>2]=g,o[A+56>>2]=g,o[A+60>>2]=g,A=A+64|0;for(;(A|0)<(d|0);)o[A>>2]=g,A=A+4|0}for(;(A|0)<(p|0);)ve[A>>0]=l,A=A+1|0;return p-c|0}function c4(A){return A=+A,A>=0?+Zn(A+.5):+ka(A-.5)}function vo(A){A=A|0;var l=0,c=0,d=0;return d=K_()|0,c=o[Gt>>2]|0,l=c+A|0,(A|0)>0&(l|0)<(c|0)|(l|0)<0?(ex(l|0)|0,M3(12),-1):(l|0)>(d|0)&&!(J_(l|0)|0)?(M3(12),-1):(o[Gt>>2]=l,c|0)}function Cb(A,l,c){return A=A|0,l=l|0,c=c|0,_o[A&3](l|0,c|0)|0}function Pb(A,l){return X_(0),0}var _o=[Pb,Ex,Nx,Rx];return{___divdi3:mo,___muldi3:ln,___remdi3:go,___uremdi3:Gs,_areNeighborCells:Cx,_bitshift64Ashr:l4,_bitshift64Lshr:we,_bitshift64Shl:Be,_calloc:Cr,_cellAreaKm2:hx,_cellAreaM2:dx,_cellAreaRads2:fx,_cellToBoundary:Jo,_cellToCenterChild:j3,_cellToChildPos:Xx,_cellToChildren:Gx,_cellToChildrenSize:YA,_cellToLatLng:Ga,_cellToLocalIj:Ab,_cellToParent:x2,_cellToVertex:gi,_cellToVertexes:Sb,_cellsToDirectedEdge:Px,_cellsToLinkedMultiPolygon:cx,_childPosToCell:Kx,_compactCells:Vx,_constructCell:Ux,_destroyLinkedMultiPolygon:ob,_directedEdgeToBoundary:WA,_directedEdgeToCells:Dx,_edgeLengthKm:ib,_edgeLengthM:sb,_edgeLengthRads:rb,_emscripten_replace_memory:tx,_free:Ie,_getBaseCellNumber:V3,_getDirectedEdgeDestination:Fx,_getDirectedEdgeOrigin:Bx,_getHexagonAreaAvgKm2:W3,_getHexagonAreaAvgM2:eb,_getHexagonEdgeLengthAvgKm:tb,_getHexagonEdgeLengthAvgM:nb,_getIcosahedronFaces:$3,_getIndexDigit:kx,_getNumCells:ru,_getPentagons:M2,_getRes0Cells:vx,_getResolution:v2,_greatCircleDistanceKm:KA,_greatCircleDistanceM:Jx,_greatCircleDistanceRads:Zx,_gridDisk:E3,_gridDiskDistances:N3,_gridDistance:R2,_gridPathCells:cb,_gridPathCellsSize:ub,_gridRing:ax,_gridRingUnsafe:C3,_i64Add:De,_i64Subtract:Wn,_isPentagon:Ht,_isResClassIII:$x,_isValidCell:nu,_isValidDirectedEdge:k3,_isValidIndex:Ox,_isValidVertex:n4,_latLngToCell:w2,_llvm_ctlz_i64:L2,_llvm_maxnum_f64:u4,_llvm_minnum_f64:uu,_llvm_round_f64:cu,_localIjToCell:lb,_malloc:An,_maxFaceCount:Qx,_maxGridDiskSize:ox,_maxPolygonToCellsSize:lx,_maxPolygonToCellsSizeExperimental:db,_memcpy:Li,_memmove:q2,_memset:yo,_originToDirectedEdges:m2,_pentagonCount:Yx,_polygonToCells:ux,_polygonToCellsExperimental:hb,_readInt64AsDoubleFromPointer:bb,_res0CellCount:yx,_reverseDirectedEdge:U3,_round:c4,_sbrk:vo,_sizeOfCellBoundary:gb,_sizeOfCoordIJ:xb,_sizeOfGeoLoop:yb,_sizeOfGeoPolygon:vb,_sizeOfH3Index:pb,_sizeOfLatLng:mb,_sizeOfLinkedGeoPolygon:_b,_uncompactCells:zx,_uncompactCellsSize:jx,_vertexToLatLng:Mb,dynCall_iii:Cb,establishStackSpace:sx,stackAlloc:nx,stackRestore:ix,stackSave:rx}}(Fi,ts,K);e.___divdi3=Pe.___divdi3,e.___muldi3=Pe.___muldi3,e.___remdi3=Pe.___remdi3,e.___uremdi3=Pe.___uremdi3,e._areNeighborCells=Pe._areNeighborCells,e._bitshift64Ashr=Pe._bitshift64Ashr,e._bitshift64Lshr=Pe._bitshift64Lshr,e._bitshift64Shl=Pe._bitshift64Shl,e._calloc=Pe._calloc,e._cellAreaKm2=Pe._cellAreaKm2,e._cellAreaM2=Pe._cellAreaM2,e._cellAreaRads2=Pe._cellAreaRads2,e._cellToBoundary=Pe._cellToBoundary,e._cellToCenterChild=Pe._cellToCenterChild,e._cellToChildPos=Pe._cellToChildPos,e._cellToChildren=Pe._cellToChildren,e._cellToChildrenSize=Pe._cellToChildrenSize,e._cellToLatLng=Pe._cellToLatLng,e._cellToLocalIj=Pe._cellToLocalIj,e._cellToParent=Pe._cellToParent,e._cellToVertex=Pe._cellToVertex,e._cellToVertexes=Pe._cellToVertexes,e._cellsToDirectedEdge=Pe._cellsToDirectedEdge,e._cellsToLinkedMultiPolygon=Pe._cellsToLinkedMultiPolygon,e._childPosToCell=Pe._childPosToCell,e._compactCells=Pe._compactCells,e._constructCell=Pe._constructCell,e._destroyLinkedMultiPolygon=Pe._destroyLinkedMultiPolygon,e._directedEdgeToBoundary=Pe._directedEdgeToBoundary,e._directedEdgeToCells=Pe._directedEdgeToCells,e._edgeLengthKm=Pe._edgeLengthKm,e._edgeLengthM=Pe._edgeLengthM,e._edgeLengthRads=Pe._edgeLengthRads;var Zl=e._emscripten_replace_memory=Pe._emscripten_replace_memory;e._free=Pe._free,e._getBaseCellNumber=Pe._getBaseCellNumber,e._getDirectedEdgeDestination=Pe._getDirectedEdgeDestination,e._getDirectedEdgeOrigin=Pe._getDirectedEdgeOrigin,e._getHexagonAreaAvgKm2=Pe._getHexagonAreaAvgKm2,e._getHexagonAreaAvgM2=Pe._getHexagonAreaAvgM2,e._getHexagonEdgeLengthAvgKm=Pe._getHexagonEdgeLengthAvgKm,e._getHexagonEdgeLengthAvgM=Pe._getHexagonEdgeLengthAvgM,e._getIcosahedronFaces=Pe._getIcosahedronFaces,e._getIndexDigit=Pe._getIndexDigit,e._getNumCells=Pe._getNumCells,e._getPentagons=Pe._getPentagons,e._getRes0Cells=Pe._getRes0Cells,e._getResolution=Pe._getResolution,e._greatCircleDistanceKm=Pe._greatCircleDistanceKm,e._greatCircleDistanceM=Pe._greatCircleDistanceM,e._greatCircleDistanceRads=Pe._greatCircleDistanceRads,e._gridDisk=Pe._gridDisk,e._gridDiskDistances=Pe._gridDiskDistances,e._gridDistance=Pe._gridDistance,e._gridPathCells=Pe._gridPathCells,e._gridPathCellsSize=Pe._gridPathCellsSize,e._gridRing=Pe._gridRing,e._gridRingUnsafe=Pe._gridRingUnsafe,e._i64Add=Pe._i64Add,e._i64Subtract=Pe._i64Subtract,e._isPentagon=Pe._isPentagon,e._isResClassIII=Pe._isResClassIII,e._isValidCell=Pe._isValidCell,e._isValidDirectedEdge=Pe._isValidDirectedEdge,e._isValidIndex=Pe._isValidIndex,e._isValidVertex=Pe._isValidVertex,e._latLngToCell=Pe._latLngToCell,e._llvm_ctlz_i64=Pe._llvm_ctlz_i64,e._llvm_maxnum_f64=Pe._llvm_maxnum_f64,e._llvm_minnum_f64=Pe._llvm_minnum_f64,e._llvm_round_f64=Pe._llvm_round_f64,e._localIjToCell=Pe._localIjToCell,e._malloc=Pe._malloc,e._maxFaceCount=Pe._maxFaceCount,e._maxGridDiskSize=Pe._maxGridDiskSize,e._maxPolygonToCellsSize=Pe._maxPolygonToCellsSize,e._maxPolygonToCellsSizeExperimental=Pe._maxPolygonToCellsSizeExperimental,e._memcpy=Pe._memcpy,e._memmove=Pe._memmove,e._memset=Pe._memset,e._originToDirectedEdges=Pe._originToDirectedEdges,e._pentagonCount=Pe._pentagonCount,e._polygonToCells=Pe._polygonToCells,e._polygonToCellsExperimental=Pe._polygonToCellsExperimental,e._readInt64AsDoubleFromPointer=Pe._readInt64AsDoubleFromPointer,e._res0CellCount=Pe._res0CellCount,e._reverseDirectedEdge=Pe._reverseDirectedEdge,e._round=Pe._round,e._sbrk=Pe._sbrk,e._sizeOfCellBoundary=Pe._sizeOfCellBoundary,e._sizeOfCoordIJ=Pe._sizeOfCoordIJ,e._sizeOfGeoLoop=Pe._sizeOfGeoLoop,e._sizeOfGeoPolygon=Pe._sizeOfGeoPolygon,e._sizeOfH3Index=Pe._sizeOfH3Index,e._sizeOfLatLng=Pe._sizeOfLatLng,e._sizeOfLinkedGeoPolygon=Pe._sizeOfLinkedGeoPolygon,e._uncompactCells=Pe._uncompactCells,e._uncompactCellsSize=Pe._uncompactCellsSize,e._vertexToLatLng=Pe._vertexToLatLng,e.establishStackSpace=Pe.establishStackSpace;var di=e.stackAlloc=Pe.stackAlloc,Di=e.stackRestore=Pe.stackRestore,Yo=e.stackSave=Pe.stackSave;if(e.dynCall_iii=Pe.dynCall_iii,e.asm=Pe,e.cwrap=D,e.setValue=w,e.getValue=S,yr){ni(yr)||(yr=s(yr));{qs();var Us=function(de){de.byteLength&&(de=new Uint8Array(de)),ne.set(de,b),e.memoryInitializerRequest&&delete e.memoryInitializerRequest.response,uo()},co=function(){a(yr,Us,function(){throw"could not load memory initializer "+yr})},Xo=_n(yr);if(Xo)Us(Xo.buffer);else if(e.memoryInitializerRequest){var w3=function(){var de=e.memoryInitializerRequest,Me=de.response;if(de.status!==200&&de.status!==0){var Oe=_n(e.memoryInitializerRequestURL);if(Oe)Me=Oe.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+de.status+", retrying "+yr),co();return}}Us(Me)};e.memoryInitializerRequest.response?setTimeout(w3,0):e.memoryInitializerRequest.addEventListener("load",
15w3)}else co()}}var Jl;$n=function de(){Jl||u2(),Jl||($n=de)};function u2(de){if(In>0||(Tt(),In>0))return;function Me(){Jl||(Jl=!0,!E&&(Xt(),sn(),e.onRuntimeInitialized&&e.onRuntimeInitialized(),Ut()))}e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),Me()},1)):Me()}e.run=u2;function Ko(de){throw e.onAbort&&e.onAbort(de),de+="",u(de),f(de),E=!0,"abort("+de+"). Build with -s ASSERTIONS=1 for more info."}if(e.abort=Ko,e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return u2(),r}(typeof Mt=="object"?Mt:{}),tt="number",Je=tt,Xa=tt,nt=tt,rt=tt,tr=tt,$e=tt,nP=[["sizeOfH3Index",tt],["sizeOfLatLng",tt],["sizeOfCellBoundary",tt],["sizeOfGeoLoop",tt],["sizeOfGeoPolygon",tt],["sizeOfLinkedGeoPolygon",tt],["sizeOfCoordIJ",tt],["readInt64AsDoubleFromPointer",tt],["isValidCell",Xa,[nt,rt]],["isValidIndex",Xa,[nt,rt]],["latLngToCell",Je,[tt,tt,tr,$e]],["cellToLatLng",Je,[nt,rt,$e]],["cellToBoundary",Je,[nt,rt,$e]],["maxGridDiskSize",Je,[tt,$e]],["gridDisk",Je,[nt,rt,tt,$e]],["gridDiskDistances",Je,[nt,rt,tt,$e,$e]],["gridRing",Je,[nt,rt,tt,$e]],["gridRingUnsafe",Je,[nt,rt,tt,$e]],["maxPolygonToCellsSize",Je,[$e,tr,tt,$e]],["polygonToCells",Je,[$e,tr,tt,$e]],["maxPolygonToCellsSizeExperimental",Je,[$e,tr,tt,$e]],["polygonToCellsExperimental",Je,[$e,tr,tt,tt,tt,$e]],["cellsToLinkedMultiPolygon",Je,[$e,tt,$e]],["destroyLinkedMultiPolygon",null,[$e]],["compactCells",Je,[$e,$e,tt,tt]],["uncompactCells",Je,[$e,tt,tt,$e,tt,tr]],["uncompactCellsSize",Je,[$e,tt,tt,tr,$e]],["isPentagon",Xa,[nt,rt]],["isResClassIII",Xa,[nt,rt]],["getBaseCellNumber",tt,[nt,rt]],["getResolution",tt,[nt,rt]],["getIndexDigit",tt,[nt,rt,tt]],["constructCell",Je,[tt,tt,$e,$e]],["maxFaceCount",Je,[nt,rt,$e]],["getIcosahedronFaces",Je,[nt,rt,$e]],["cellToParent",Je,[nt,rt,tr,$e]],["cellToChildren",Je,[nt,rt,tr,$e]],["cellToCenterChild",Je,[nt,rt,tr,$e]],["cellToChildrenSize",Je,[nt,rt,tr,$e]],["cellToChildPos",Je,[nt,rt,tr,$e]],["childPosToCell",Je,[tt,tt,nt,rt,tr,$e]],["areNeighborCells",Je,[nt,rt,nt,rt,$e]],["cellsToDirectedEdge",Je,[nt,rt,nt,rt,$e]],["getDirectedEdgeOrigin",Je,[nt,rt,$e]],["getDirectedEdgeDestination",Je,[nt,rt,$e]],["isValidDirectedEdge",Xa,[nt,rt]],["directedEdgeToCells",Je,[nt,rt,$e]],["originToDirectedEdges",Je,[nt,rt,$e]],["directedEdgeToBoundary",Je,[nt,rt,$e]],["reverseDirectedEdge",Je,[nt,rt,$e]],["gridDistance",Je,[nt,rt,nt,rt,$e]],["gridPathCells",Je,[nt,rt,nt,rt,$e]],["gridPathCellsSize",Je,[nt,rt,nt,rt,$e]],["cellToLocalIj",Je,[nt,rt,nt,rt,tt,$e]],["localIjToCell",Je,[nt,rt,$e,tt,$e]],["getHexagonAreaAvgM2",Je,[tr,$e]],["getHexagonAreaAvgKm2",Je,[tr,$e]],["getHexagonEdgeLengthAvgM",Je,[tr,$e]],["getHexagonEdgeLengthAvgKm",Je,[tr,$e]],["greatCircleDistanceM",tt,[$e,$e]],["greatCircleDistanceKm",tt,[$e,$e]],["greatCircleDistanceRads",tt,[$e,$e]],["cellAreaM2",Je,[nt,rt,$e]],["cellAreaKm2",Je,[nt,rt,$e]],["cellAreaRads2",Je,[nt,rt,$e]],["edgeLengthM",Je,[nt,rt,$e]],["edgeLengthKm",Je,[nt,rt,$e]],["edgeLengthRads",Je,[nt,rt,$e]],["getNumCells",Je,[tr,$e]],["getRes0Cells",Je,[$e]],["res0CellCount",tt],["getPentagons",Je,[tt,$e]],["pentagonCount",tt],["cellToVertex",Je,[nt,rt,tt,$e]],["cellToVertexes",Je,[nt,rt,$e]],["vertexToLatLng",Je,[nt,rt,$e]],["isValidVertex",Xa,[nt,rt]]],rP=0,iP=1,sP=2,oP=3,Dg=4,aP=5,AP=6,lP=7,uP=8,cP=9,fP=10,hP=11,dP=12,pP=13,mP=14,gP=15,yP=16,vP=17,_P=18,xP=19,qn={};qn[rP]="Success";qn[iP]="The operation failed but a more specific error is not available";qn[sP]="Argument was outside of acceptable range";qn[oP]="Latitude or longitude arguments were outside of acceptable range";qn[Dg]="Resolution argument was outside of acceptable range";qn[aP]="Cell argument was not valid";qn[AP]="Directed edge argument was not valid";qn[lP]="Undirected edge argument was not valid";qn[uP]="Vertex argument was not valid";qn[cP]="Pentagon distortion was encountered";qn[fP]="Duplicate input";qn[hP]="Cell arguments were not neighbors";qn[dP]="Cell arguments had incompatible resolutions";qn[pP]="Memory allocation failed";qn[mP]="Bounds of provided memory were insufficient";
15qn[gP]="Mode or flags argument was not valid";qn[yP]="Index argument was not valid";qn[vP]="Base cell number was outside of acceptable range";qn[_P]="Child indexing digits invalid";qn[xP]="Child indexing digits refer to a deleted subsequence";var bP=1e3,Lg=1001,qg=1002,Fc={};Fc[bP]="Unknown unit";Fc[Lg]="Array length out of bounds";Fc[qg]="Got unexpected null value for H3 index";var TP="Unknown error";function Ig(r,e,t){var n=t&&"value"in t,i=new Error((r[e]||TP)+" (code: "+e+(n?", value: "+t.value:"")+")");return i.code=e,i}function kg(r,e){var t=arguments.length===2?{value:e}:{};return Ig(qn,r,t)}function Ug(r,e){var t=arguments.length===2?{value:e}:{};return Ig(Fc,r,t)}function Al(r){if(r!==0)throw kg(r)}var Xr={};nP.forEach(function(e){Xr[e[0]]=Mt.cwrap.apply(Mt,e)});var gA=16,ll=4,LA=8,wP=8,ac=Xr.sizeOfH3Index(),ip=Xr.sizeOfLatLng(),SP=Xr.sizeOfCellBoundary(),MP=Xr.sizeOfGeoPolygon(),k0=Xr.sizeOfGeoLoop();Xr.sizeOfLinkedGeoPolygon();Xr.sizeOfCoordIJ();function EP(r){if(typeof r!="number"||r<0||r>15||Math.floor(r)!==r)throw kg(Dg,r);return r}function NP(r){if(!r)throw Ug(qg);return r}var RP=Math.pow(2,32)-1;function CP(r){if(r>RP)throw Ug(Lg,r);return r}var PP=/[^0-9a-fA-F]/;function Og(r){if(Array.isArray(r)&&r.length===2&&Number.isInteger(r[0])&&Number.isInteger(r[1]))return r;if(typeof r!="string"||PP.test(r))return[0,0];var e=parseInt(r.substring(0,r.length-8),gA),t=parseInt(r.substring(r.length-8),gA);return[t,e]}function X5(r){if(r>=0)return r.toString(gA);r=r&2147483647;var e=Gg(8,r.toString(gA)),t=(parseInt(e[0],gA)+8).toString(gA);return e=t+e.substring(1),e}function BP(r,e){return X5(e)+Gg(8,X5(r))}function Gg(r,e){for(var t=r-e.length,n="",i=0;i<t;i++)n+="0";return n=n+e,n}function K5(r,e,t){for(var n=r.length,i=Mt._calloc(n,ip),s=t?1:0,a=t?0:1,u=0;u<n*2;u+=2)Mt.HEAPF64.set([r[u/2][s],r[u/2][a]].map(Hg),i/LA+u);return Mt.HEAPU32.set([n,i],e/ll),e}function FP(r,e){var t=r.length-1,n=Mt._calloc(MP),i=0,s=i+k0,a=s+ll;K5(r[0],n+i,e);var u;if(t>0){u=Mt._calloc(t,k0);for(var f=0;f<t;f++)K5(r[f+1],u+k0*f,e)}return Mt.setValue(n+s,t,"i32"),Mt.setValue(n+a,u,"i32"),n}function DP(r){var e=0,t=e+k0,n=t+ll,i=ll;Mt._free(Mt.getValue(r+e+i,"i8*"));var s=Mt.getValue(r+t,"i32");if(s>0){for(var a=Mt.getValue(r+n,"i32"),u=0;u<s;u++)Mt._free(Mt.getValue(a+k0*u+i,"i8*"));Mt._free(a)}Mt._free(r)}function Vg(r,e){e===void 0&&(e=0);var t=Mt.getValue(r+ac*e,"i32"),n=Mt.getValue(r+ac*e+ll,"i32");return n?BP(t,n):null}function LP(r){return Xr.readInt64AsDoubleFromPointer(r)}function qP(r,e){for(var t=[],n=0;n<e;n++){var i=Vg(r,n);i!==null&&t.push(i)}return t}function Ac(r){return OP(Mt.getValue(r,"double"))}function zg(r){return[Ac(r),Ac(r+LA)]}function IP(r){return[Ac(r+LA),Ac(r)]}function kP(r,e,t){for(var n=Mt.getValue(r,"i32"),i=r+LA,s=[],a=e?IP:zg,u=0;u<n*2;u+=2)s.push(a(i+LA*u));return t&&s.push(s[0]),s}function UP(r,e,t){var n=Mt._malloc(ip);Mt.HEAPF64.set([r,e].map(Hg),n/LA);var i=Mt._malloc(ac);try{return Al(Xr.latLngToCell(n,t,i)),NP(Vg(i))}finally{Mt._free(i),Mt._free(n)}}function jg(r){var e=Mt._malloc(ip),t=Og(r),n=t[0],i=t[1];try{return Al(Xr.cellToLatLng(n,i,e)),zg(e)}finally{Mt._free(e)}}function $g(r,e){var t=Mt._malloc(SP),n=Og(r),i=n[0],s=n[1];try{return Al(Xr.cellToBoundary(i,s,t)),kP(t,e,e)}finally{Mt._free(t)}}function Z5(r,e,t){if(EP(e),t=!!t,r.length===0||r[0].length===0)return[];var n=typeof r[0][0]=="number"?[r]:r,i=FP(n,t),s=Mt._malloc(wP);try{Al(Xr.maxPolygonToCellsSize(i,e,0,s));var a=CP(LP(s)),u=Mt._calloc(a,ac);try{return Al(Xr.polygonToCells(i,e,0,u)),qP(u,a)}finally{Mt._free(u)}}finally{Mt._free(s),DP(i)}}function Hg(r){return r*Math.PI/180}function OP(r){return r*180/Math.PI}function GP(r){return r=Math.max(0,Math.min(1,r)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+r*(1172.33-r*(10793.56-r*(33300.12-r*(38394.49-r*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+r*(557.33+r*(1225.33-r*(3574.96-r*(1073.77+r*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+r*(3211.1-r*(15327.97-r*(27814-r*(22569.18-r*6838.66)))))))+")"}/** 16 * @license 17 * Copyright 2010-2025 Three.js Authors 18 * SPDX-License-Identifier: MIT 19 */const VP=["alphaMap","alphaTest","anisotropy","anisotropyMap","anisotropyRotation","aoMap","attenuationColor","attenuationDistance","bumpMap","clearcoat","clearcoatMap","clearcoatNormalMap","clearcoatNormalScale","clearcoatRoughness","color","dispersion","displacementMap","emissive","emissiveMap","envMap","gradientMap","ior","iridescence","iridescenceIOR","iridescenceMap","iridescenceThicknessMap","lightMap","map","matcap","metalness","metalnessMap","normalMap","normalScale","opacity","roughness","roughnessMap","sheen","sheenColor","sheenColorMap","sheenRoughnessMap","shininess","specular","specularColor","specularColorMap","specularIntensity","specularIntensityMap","specularMap","thickness","transmission","transmissionMap"];class zP{constructor(e){this.renderObjects=new WeakMap,this.hasNode=this.containsNode(e),this.hasAnimation=e.object.isSkinnedMesh===!0,this.refreshUniforms=VP,this.renderId=0}firstInitialization(e){return this.renderObjects.has(e)===!1?(this.getRenderObjectData(e),!0):!1}getRenderObjectData(e){let t=this.renderObjects.get(e);if(t===void 0){const{geometry:n,material:i,object:s}=e;if(t={material:this.getMaterialData(i),geometry:{id:n.id,attributes:this.getAttributesData(n.attributes),indexVersion:n.index?n.index.version:null,drawRange:{start:n.drawRange.start,count:n.drawRange.count}},worldMatrix:s.matrixWorld.clone()},s.center&&(t.center=s.center.clone()),s.morphTargetInfluences&&(t.morphTargetInfluences=s.morphTargetInfluences.slice()),e.bundle!==null&&(t.version=e.bundle.version),t.material.transmission>0){const{width:a,height:u}=e.context;t.bufferWidth=a,t.bufferHeight=u}this.renderObjects.set(e,t)}return t}getAttributesData(e){const t={};for(const n in e){const i=e[n];t[n]={version:i.version}}return t}containsNode(e){const t=e.material;for(const n in t)if(t[n]&&t[n].isNode)return!0;return e.renderer.nodes.modelViewMatrix!==null||e.renderer.nodes.modelNormalViewMatrix!==null}getMaterialData(e){const t={};for(const n of this.refreshUniforms){const i=e[n];i!=null&&(typeof i=="object"&&i.clone!==void 0?i.isTexture===!0?t[n]={id:i.id,version:i.version}:t[n]=i.clone():t[n]=i)}return t}equals(e){const{object:t,material:n,geometry:i}=e,s=this.getRenderObjectData(e);if(s.worldMatrix.equals(t.matrixWorld)!==!0)return s.worldMatrix.copy(t.matrixWorld),!1;const a=s.material;for(const E in a){const R=a[E],P=n[E];if(R.equals!==void 0){if(R.equals(P)===!1)return R.copy(P),!1}else if(P.isTexture===!0){if(R.id!==P.id||R.version!==P.version)return R.id=P.id,R.version=P.version,!1}else if(R!==P)return a[E]=P,!1}if(a.transmission>0){const{width:E,height:R}=e.context;if(s.bufferWidth!==E||s.bufferHeight!==R)return s.bufferWidth=E,s.bufferHeight=R,!1}const u=s.geometry,f=i.attributes,m=u.attributes,y=Object.keys(m),_=Object.keys(f);if(u.id!==i.id)return u.id=i.id,!1;if(y.length!==_.length)return s.geometry.attributes=this.getAttributesData(f),!1;for(const E of y){const R=m[E],P=f[E];if(P===void 0)return delete m[E],!1;if(R.version!==P.version)return R.version=P.version,!1}const b=i.index,w=u.indexVersion,S=b?b.version:null;if(w!==S)return u.indexVersion=S,!1;if(u.drawRange.start!==i.drawRange.start||u.drawRange.count!==i.drawRange.count)return u.drawRange.start=i.drawRange.start,u.drawRange.count=i.drawRange.count,!1;if(s.morphTargetInfluences){let E=!1;for(let R=0;R<s.morphTargetInfluences.length;R++)s.morphTargetInfluences[R]!==t.morphTargetInfluences[R]&&(E=!0);if(E)return!0}return s.center&&s.center.equals(t.center)===!1?(s.center.copy(t.center),
19!0):(e.bundle!==null&&(s.version=e.bundle.version),!0)}needsRefresh(e,t){if(this.hasNode||this.hasAnimation||this.firstInitialization(e))return!0;const{renderId:n}=t;if(this.renderId!==n)return this.renderId=n,!0;const i=e.object.static===!0,s=e.bundle!==null&&e.bundle.static===!0&&this.getRenderObjectData(e).version===e.bundle.version;return i||s?!1:this.equals(e)!==!0}}function ul(r,e=0){let t=3735928559^e,n=1103547991^e;if(r instanceof Array)for(let i=0,s;i<r.length;i++)s=r[i],t=Math.imul(t^s,2654435761),n=Math.imul(n^s,1597334677);else for(let i=0,s;i<r.length;i++)s=r.charCodeAt(i),t=Math.imul(t^s,2654435761),n=Math.imul(n^s,1597334677);return t=Math.imul(t^t>>>16,2246822507),t^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}const Wg=r=>ul(r),Dc=r=>ul(r),cl=(...r)=>ul(r);function Qg(r,e=!1){const t=[];r.isNode===!0&&(t.push(r.id),r=r.getSelf());for(const{property:n,childNode:i}of lc(r))t.push(ul(n.slice(0,-4)),i.getCacheKey(e));return ul(t)}function*lc(r,e=!1){for(const t in r){if(t.startsWith("_")===!0)continue;const n=r[t];if(Array.isArray(n)===!0)for(let i=0;i<n.length;i++){const s=n[i];s&&(s.isNode===!0||e&&typeof s.toJSON=="function")&&(yield{property:t,index:i,childNode:s})}else if(n&&n.isNode===!0)yield{property:t,childNode:n};else if(typeof n=="object")for(const i in n){const s=n[i];s&&(s.isNode===!0||e&&typeof s.toJSON=="function")&&(yield{property:t,index:i,childNode:s})}}}const jP=new Map([[1,"float"],[2,"vec2"],[3,"vec3"],[4,"vec4"],[9,"mat3"],[16,"mat4"]]),J5=new WeakMap;function Yg(r){return jP.get(r)}function uc(r){if(/[iu]?vec\d/.test(r))return r.startsWith("ivec")?Int32Array:r.startsWith("uvec")?Uint32Array:Float32Array;if(/mat\d/.test(r)||/float/.test(r))return Float32Array;if(/uint/.test(r))return Uint32Array;if(/int/.test(r))return Int32Array;throw new Error(`THREE.NodeUtils: Unsupported type: ${r}`)}function sp(r){if(/float|int|uint/.test(r))return 1;if(/vec2/.test(r))return 2;if(/vec3/.test(r))return 3;if(/vec4/.test(r)||/mat2/.test(r))return 4;if(/mat3/.test(r))return 9;if(/mat4/.test(r))return 16;console.error("THREE.TSL: Unsupported type:",r)}function Do(r){if(r==null)return null;const e=typeof r;return r.isNode===!0?"node":e==="number"?"float":e==="boolean"?"bool":e==="string"?"string":e==="function"?"shader":r.isVector2===!0?"vec2":r.isVector3===!0?"vec3":r.isVector4===!0?"vec4":r.isMatrix2===!0?"mat2":r.isMatrix3===!0?"mat3":r.isMatrix4===!0?"mat4":r.isColor===!0?"color":r instanceof ArrayBuffer?"ArrayBuffer":null}function Xg(r,...e){const t=r?r.slice(-4):void 0;return e.length===1&&(t==="vec2"?e=[e[0],e[0]]:t==="vec3"?e=[e[0],e[0],e[0]]:t==="vec4"&&(e=[e[0],e[0],e[0],e[0]])),r==="color"?new Yn(...e):t==="vec2"?new Wt(...e):t==="vec3"?new ke(...e):t==="vec4"?new Qt(...e):t==="mat2"?new h7(...e):t==="mat3"?new Rl(...e):t==="mat4"?new Bn(...e):r==="bool"?e[0]||!1:r==="float"||r==="int"||r==="uint"?e[0]||0:r==="string"?e[0]||"":r==="ArrayBuffer"?Jg(e[0]):null}function Kg(r){let e=J5.get(r);return e===void 0&&(e={},J5.set(r,e)),e}function Zg(r){let e="";const t=new Uint8Array(r);for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function Jg(r){return Uint8Array.from(atob(r),e=>e.charCodeAt(0)).buffer}const Zh={VERTEX:"vertex",FRAGMENT:"fragment"},lt={NONE:"none",FRAME:"frame",RENDER:"render",OBJECT:"object"},$P={BOOLEAN:"bool",INTEGER:"int",FLOAT:"float",VECTOR2:"vec2",VECTOR3:"vec3",VECTOR4:"vec4",MATRIX2:"mat2",MATRIX3:"mat3",MATRIX4:"mat4"},Tr={READ_ONLY:"readOnly",WRITE_ONLY:"writeOnly",READ_WRITE:"readWrite"},e8=["fragment","vertex"],Jh=["setup","analyze","generate"],ed=[...e8,"compute"],Pa=["x","y","z","w"];let HP=0;class Ke extends Ed{static get type(){return"Node"}constructor(e=null){super(),this.nodeType=e,this.updateType=lt.NONE,this.updateBeforeType=lt.NONE,this.updateAfterType=lt.NONE,this.uuid=Nd.generateUUID(),this.version=0,this.global=!1,this.isNode=!0,this._cacheKey=null,this._cacheKeyVersion=0,Object.defineProperty(this,"id",{value:HP++})}set needsUpdate(e){e===!0&&this.version++}get type(){return this.constructor.type}onUpdate(e,t){return this.updateType=t,this.update=e.bind(this.getSelf()),this}onFrameUpdate(e){return this.onUpdate(e,lt.FRAME)}
19onRenderUpdate(e){return this.onUpdate(e,lt.RENDER)}onObjectUpdate(e){return this.onUpdate(e,lt.OBJECT)}onReference(e){return this.updateReference=e.bind(this.getSelf()),this}getSelf(){return this.self||this}updateReference(){return this}isGlobal(){return this.global}*getChildren(){for(const{childNode:e}of lc(this))yield e}dispose(){this.dispatchEvent({type:"dispose"})}traverse(e){e(this);for(const t of this.getChildren())t.traverse(e)}getCacheKey(e=!1){return e=e||this.version!==this._cacheKeyVersion,(e===!0||this._cacheKey===null)&&(this._cacheKey=cl(Qg(this,e),this.customCacheKey()),this._cacheKeyVersion=this.version),this._cacheKey}customCacheKey(){return 0}getScope(){return this}getHash(){return this.uuid}getUpdateType(){return this.updateType}getUpdateBeforeType(){return this.updateBeforeType}getUpdateAfterType(){return this.updateAfterType}getElementType(e){const t=this.getNodeType(e);return e.getElementType(t)}getMemberType(){return"void"}getNodeType(e){const t=e.getNodeProperties(this);return t.outputNode?t.outputNode.getNodeType(e):this.nodeType}getShared(e){const t=this.getHash(e);return e.getNodeFromHash(t)||this}setup(e){const t=e.getNodeProperties(this);let n=0;for(const i of this.getChildren())t["node"+n++]=i;return t.outputNode||null}analyze(e){if(e.increaseUsage(this)===1){const n=e.getNodeProperties(this);for(const i of Object.values(n))i&&i.isNode===!0&&i.build(e)}}generate(e,t){const{outputNode:n}=e.getNodeProperties(this);if(n&&n.isNode===!0)return n.build(e,t)}updateBefore(){console.warn("Abstract function.")}updateAfter(){console.warn("Abstract function.")}update(){console.warn("Abstract function.")}build(e,t=null){const n=this.getShared(e);if(this!==n)return n.build(e,t);e.addNode(this),e.addChain(this);let i=null;const s=e.getBuildStage();if(s==="setup"){this.updateReference(e);const a=e.getNodeProperties(this);if(a.initialized!==!0){a.initialized=!0;const u=this.setup(e),f=u&&u.isNode===!0;for(const m of Object.values(a))m&&m.isNode===!0&&m.build(e);f&&u.build(e),a.outputNode=u}}else if(s==="analyze")this.analyze(e);else if(s==="generate")if(this.generate.length===1){const u=this.getNodeType(e),f=e.getDataFromNode(this);i=f.snippet,i===void 0?(i=this.generate(e)||"",f.snippet=i):f.flowCodes!==void 0&&e.context.nodeBlock!==void 0&&e.addFlowCodeHierarchy(this,e.context.nodeBlock),i=e.format(i,u,t)}else i=this.generate(e,t)||"";return e.removeChain(this),e.addSequentialNode(this),i}getSerializeChildren(){return lc(this)}serialize(e){const t=this.getSerializeChildren(),n={};for(const{property:i,index:s,childNode:a}of t)s!==void 0?(n[i]===void 0&&(n[i]=Number.isInteger(s)?[]:{}),n[i][s]=a.toJSON(e.meta).uuid):n[i]=a.toJSON(e.meta).uuid;Object.keys(n).length>0&&(e.inputNodes=n)}deserialize(e){if(e.inputNodes!==void 0){const t=e.meta.nodes;for(const n in e.inputNodes)if(Array.isArray(e.inputNodes[n])){const i=[];for(const s of e.inputNodes[n])i.push(t[s]);this[n]=i}else if(typeof e.inputNodes[n]=="object"){const i={};for(const s in e.inputNodes[n]){const a=e.inputNodes[n][s];i[s]=t[a]}this[n]=i}else{const i=e.inputNodes[n];this[n]=t[i]}}}toJSON(e){const{uuid:t,type:n}=this,i=e===void 0||typeof e=="string";i&&(e={textures:{},images:{},nodes:{}});let s=e.nodes[t];s===void 0&&(s={uuid:t,type:n,meta:e,metadata:{version:4.6,type:"Node",generator:"Node.toJSON"}},i!==!0&&(e.nodes[s.uuid]=s),this.serialize(s),delete s.meta);function a(u){const f=[];for(const m in u){const y=u[m];delete y.metadata,f.push(y)}return f}if(i){const u=a(e.textures),f=a(e.images),m=a(e.nodes);u.length>0&&(s.textures=u),f.length>0&&(s.images=f),m.length>0&&(s.nodes=m)}return s}}class Ba extends Ke{static get type(){return"ArrayElementNode"}constructor(e,t){super(),this.node=e,this.indexNode=t,this.isArrayElementNode=!0}getNodeType(e){return this.node.getElementType(e)}generate(e){const t=this.node.build(e),n=this.indexNode.build(e,"uint");return`${t}[ ${n} ]`}}class t8 extends Ke{static get type(){return"ConvertNode"}constructor(e,t){super(),this.node=e,this.convertTo=t}getNodeType(e){const t=this.node.getNodeType(e);let n=null;for(const i of this.convertTo.split("|"))(n===null||e.getTypeLength(t)===e.getTypeLength(i))&&(n=i);return n}serialize(e){super.serialize(e),e.convertTo=this.convertTo}deserialize(e){super.deserialize(e),this.convertTo=e.convertTo}generate(e,t){const n=this.node,i=this.getNodeType(e),s=n.build(e,i);return e.format(s,i,t)}}class Rn extends Ke{static get type(){return"TempNode"}constructor(e=null){super(e),this.isTempNode=!0}hasDependencies(e){return e.getDataFromNode(this).usageCount>1}build(e,t){if(e.getBuildStage()==="generate"){const i=e.getVectorType(this.getNodeType(e,t)),s=e.getDataFromNode(this);if(s.propertyName!==void 0)return e.format(s.propertyName,i,t);if(i!=="void"&&t!=="void"&&this.hasDependencies(e)){const a=super.build(e,i),u=e.getVarFromNode(this,null,i),f=e.getPropertyName(u);return e.addLineFlowCode(`${f} = ${a}`,this),s.snippet=a,s.propertyName=f,e.format(s.propertyName,i,t)}}return super.build(e,t)}}class WP extends Rn{static get type(){return"JoinNode"}constructor(e=[],t=null){super(t),this.nodes=e}
19getNodeType(e){return this.nodeType!==null?e.getVectorType(this.nodeType):e.getTypeFromLength(this.nodes.reduce((t,n)=>t+e.getTypeLength(n.getNodeType(e)),0))}generate(e,t){const n=this.getNodeType(e),i=this.nodes,s=e.getComponentType(n),a=[];for(const f of i){let m=f.build(e);const y=e.getComponentType(f.getNodeType(e));y!==s&&(m=e.format(m,y,s)),a.push(m)}const u=`${e.getType(n)}( ${a.join(", ")} )`;return e.format(u,n,t)}}const QP=Pa.join("");class td extends Ke{static get type(){return"SplitNode"}constructor(e,t="x"){super(),this.node=e,this.components=t,this.isSplitNode=!0}getVectorLength(){let e=this.components.length;for(const t of this.components)e=Math.max(Pa.indexOf(t)+1,e);return e}getComponentType(e){return e.getComponentType(this.node.getNodeType(e))}getNodeType(e){return e.getTypeFromLength(this.components.length,this.getComponentType(e))}generate(e,t){const n=this.node,i=e.getTypeLength(n.getNodeType(e));let s=null;if(i>1){let a=null;this.getVectorLength()>=i&&(a=e.getTypeFromLength(this.getVectorLength(),this.getComponentType(e)));const f=n.build(e,a);this.components.length===i&&this.components===QP.slice(0,this.components.length)?s=e.format(f,a,t):s=e.format(`${f}.${this.components}`,this.getNodeType(e),t)}else s=n.build(e,t);return s}serialize(e){super.serialize(e),e.components=this.components}deserialize(e){super.deserialize(e),this.components=e.components}}class YP extends Rn{static get type(){return"SetNode"}constructor(e,t,n){super(),this.sourceNode=e,this.components=t,this.targetNode=n}getNodeType(e){return this.sourceNode.getNodeType(e)}generate(e){const{sourceNode:t,components:n,targetNode:i}=this,s=this.getNodeType(e),a=e.getComponentType(i.getNodeType(e)),u=e.getTypeFromLength(n.length,a),f=i.build(e,u),m=t.build(e,s),y=e.getTypeLength(s),_=[];for(let b=0;b<y;b++){const w=Pa[b];w===n[0]?(_.push(f),b+=n.length-1):_.push(m+"."+w)}return`${e.getType(s)}( ${_.join(", ")} )`}}class XP extends Rn{static get type(){return"FlipNode"}constructor(e,t){super(),this.sourceNode=e,this.components=t}getNodeType(e){return this.sourceNode.getNodeType(e)}generate(e){const{components:t,sourceNode:n}=this,i=this.getNodeType(e),s=n.build(e),a=e.getVarFromNode(this),u=e.getPropertyName(a);e.addLineFlowCode(u+" = "+s,this);const f=e.getTypeLength(i),m=[];let y=0;for(let _=0;_<f;_++){const b=Pa[_];b===t[y]?(m.push("1.0 - "+(u+"."+b)),y++):m.push(u+"."+b)}return`${e.getType(i)}( ${m.join(", ")} )`}}class op extends Ke{static get type(){return"InputNode"}constructor(e,t=null){super(t),this.isInputNode=!0,this.value=e,this.precision=null}getNodeType(){return this.nodeType===null?Do(this.value):this.nodeType}getInputType(e){return this.getNodeType(e)}setPrecision(e){return this.precision=e,this}serialize(e){super.serialize(e),e.value=this.value,this.value&&this.value.toArray&&(e.value=this.value.toArray()),e.valueType=Do(this.value),e.nodeType=this.nodeType,e.valueType==="ArrayBuffer"&&(e.value=Zg(e.value)),e.precision=this.precision}deserialize(e){super.deserialize(e),this.nodeType=e.nodeType,this.value=Array.isArray(e.value)?Xg(e.valueType,...e.value):e.value,this.precision=e.precision||null,this.value&&this.value.fromArray&&(this.value=this.value.fromArray(e.value))}generate(){console.warn("Abstract function.")}}const e6=/float|u?int/;class Zi extends op{static get type(){return"ConstNode"}constructor(e,t=null){super(e,t),this.isConstNode=!0}generateConst(e){return e.generateConst(this.getNodeType(e),this.value)}generate(e,t){const n=this.getNodeType(e);return e6.test(n)&&e6.test(t)?e.generateConst(t,this.value):e.format(this.generateConst(e),n,t)}}class KP extends Ke{static get type(){return"MemberNode"}constructor(e,t){super(),this.node=e,this.property=t,this.isMemberNode=!0}getNodeType(e){return this.node.getMemberType(e,this.property)}generate(e){return this.node.build(e)+"."+this.property}}let qA=null;const yA=new Map;function ye(r,e){if(yA.has(r)){console.warn(`Redefinition of method chaining ${r}`);return}if(typeof e!="function")throw new Error(`Node element ${r} is not a function`);yA.set(r,e)}const n8=r=>r.replace(/r|s/g,"x").replace(/g|t/g,"y").replace(/b|p/g,"z").replace(/a|q/g,"w"),t6=r=>n8(r).split("").sort().join(""),r8={setup(r,e){const t=e.shift();return r(Fl(t),...e)},get(r,e,t){if(typeof e=="string"&&r[e]===void 0){if(r.isStackNode!==!0&&e==="assign")return(...n)=>(qA.assign(t,...n),t);if(yA.has(e)){const n=yA.get(e);return r.isStackNode?(...i)=>t.add(n(...i)):(...i)=>n(t,...i)}else{if(e==="self")return r;if(e.endsWith("Assign")&&yA.has(e.slice(0,e.length-6))){const n=yA.get(e.slice(0,e.length-6));return r.isStackNode?(...i)=>t.assign(i[0],n(...i)):(...i)=>t.assign(n(t,...i))}else{if(/^[xyzwrgbastpq]{1,4}$/.test(e)===!0)return e=n8(e),Te(new td(t,e));if(/^set[XYZWRGBASTPQ]{1,4}$/.test(e)===!0)return e=t6(e.slice(3).toLowerCase()),n=>Te(new YP(r,e,n));if(/^flip[XYZWRGBASTPQ]{1,4}$/.test(e)===!0)return e=t6(e.slice(4).toLowerCase()),()=>
19Te(new XP(Te(r),e));if(e==="width"||e==="height"||e==="depth")return e==="width"?e="x":e==="height"?e="y":e==="depth"&&(e="z"),Te(new td(r,e));if(/^\d+$/.test(e)===!0)return Te(new Ba(t,new Zi(Number(e),"uint")));if(/^get$/.test(e)===!0)return n=>Te(new KP(t,n))}}}return Reflect.get(r,e,t)},set(r,e,t,n){return typeof e=="string"&&r[e]===void 0&&(/^[xyzwrgbastpq]{1,4}$/.test(e)===!0||e==="width"||e==="height"||e==="depth"||/^\d+$/.test(e)===!0)?(n[e].assign(t),!0):Reflect.set(r,e,t,n)}},J2=new WeakMap,n6=new WeakMap,ZP=function(r,e=null){const t=Do(r);if(t==="node"){let n=J2.get(r);return n===void 0&&(n=new Proxy(r,r8),J2.set(r,n),J2.set(n,n)),n}else{if(e===null&&(t==="float"||t==="boolean")||t&&t!=="shader"&&t!=="string")return Te(nd(r,e));if(t==="shader")return le(r)}return r},JP=function(r,e=null){for(const t in r)r[t]=Te(r[t],e);return r},eB=function(r,e=null){const t=r.length;for(let n=0;n<t;n++)r[n]=Te(r[n],e);return r},tB=function(r,e=null,t=null,n=null){const i=s=>Te(n!==null?Object.assign(s,n):s);return e===null?(...s)=>i(new r(...ba(s))):t!==null?(t=Te(t),(...s)=>i(new r(e,...ba(s),t))):(...s)=>i(new r(e,...ba(s)))},nB=function(r,...e){return Te(new r(...ba(e)))};class rB extends Ke{constructor(e,t){super(),this.shaderNode=e,this.inputNodes=t}getNodeType(e){return this.shaderNode.nodeType||this.getOutputNode(e).getNodeType(e)}getMemberType(e,t){return this.getOutputNode(e).getMemberType(e,t)}call(e){const{shaderNode:t,inputNodes:n}=this,i=e.getNodeProperties(t);if(i.onceOutput)return i.onceOutput;let s=null;if(t.layout){let a=n6.get(e.constructor);a===void 0&&(a=new WeakMap,n6.set(e.constructor,a));let u=a.get(t);u===void 0&&(u=Te(e.buildFunctionNode(t)),a.set(t,u)),e.currentFunctionNode!==null&&e.currentFunctionNode.includes.push(u),s=Te(u.call(n))}else{const a=t.jsFunc,u=n!==null||a.length>1?a(n||[],e):a(e);s=Te(u)}return t.once&&(i.onceOutput=s),s}getOutputNode(e){const t=e.getNodeProperties(this);return t.outputNode===null&&(t.outputNode=this.setupOutput(e)),t.outputNode}setup(e){return this.getOutputNode(e)}setupOutput(e){return e.addStack(),e.stack.outputNode=this.call(e),e.removeStack()}generate(e,t){return this.getOutputNode(e).build(e,t)}}class iB extends Ke{constructor(e,t){super(t),this.jsFunc=e,this.layout=null,this.global=!0,this.once=!1}setLayout(e){return this.layout=e,this}call(e=null){return Fl(e),Te(new rB(this,e))}setup(){return this.call()}}const sB=[!1,!0],oB=[0,1,2,3],aB=[-1,-2],i8=[.5,1.5,1/3,1e-6,1e6,Math.PI,Math.PI*2,1/Math.PI,2/Math.PI,1/(Math.PI*2),Math.PI/2],ap=new Map;for(const r of sB)ap.set(r,new Zi(r));const Ap=new Map;for(const r of oB)Ap.set(r,new Zi(r,"uint"));const lp=new Map([...Ap].map(r=>new Zi(r.value,"int")));for(const r of aB)lp.set(r,new Zi(r,"int"));const Lc=new Map([...lp].map(r=>new Zi(r.value)));for(const r of i8)Lc.set(r,new Zi(r));for(const r of i8)Lc.set(-r,new Zi(-r));const qc={bool:ap,uint:Ap,ints:lp,float:Lc},r6=new Map([...ap,...Lc]),nd=(r,e)=>r6.has(r)?r6.get(r):r.isNode===!0?r:new Zi(r,e),AB=r=>{try{return r.getNodeType()}catch{return}},jn=function(r,e=null){return(...t)=>{if((t.length===0||!["bool","float","int","uint"].includes(r)&&t.every(i=>typeof i!="object"))&&(t=[Xg(r,...t)]),t.length===1&&e!==null&&e.has(t[0]))return Te(e.get(t[0]));if(t.length===1){const i=nd(t[0],r);return AB(i)===r?Te(i):Te(new t8(i,r))}const n=t.map(i=>nd(i));return Te(new WP(n,r))}},fl=r=>typeof r=="object"&&r!==null?r.value:r,s8=r=>r!=null?r.nodeType||r.convertTo||(typeof r=="string"?r:null):null;function U0(r,e){return new Proxy(new iB(r,e),r8)}const Te=(r,e=null)=>ZP(r,e),Fl=(r,e=null)=>new JP(r,e),ba=(r,e=null)=>new eB(r,e),xe=(...r)=>new tB(...r),Ue=(...r)=>new nB(...r),le=(r,e)=>{const t=new U0(r,e),n=(...i)=>{let s;return Fl(i),i[0]&&i[0].isNode?s=[...i]:s=i[0],t.call(s)};return n.shaderNode=t,n.setLayout=i=>(t.setLayout(i),n),n.once=()=>(t.once=!0,n),n},lB=(...r)=>(console.warn("TSL.ShaderNode: tslFn() has been renamed to Fn()."),le(...r));ye("toGlobal",r=>(r.global=!0,r));const hl=r=>{qA=r},up=()=>qA,mt=(...r)=>qA.If(...r);function o8(r){return qA&&qA.add(r),r}ye("append",o8);
19const a8=new jn("color"),W=new jn("float",qc.float),te=new jn("int",qc.ints),Ve=new jn("uint",qc.uint),oo=new jn("bool",qc.bool),Ee=new jn("vec2"),Qn=new jn("ivec2"),A8=new jn("uvec2"),l8=new jn("bvec2"),ie=new jn("vec3"),u8=new jn("ivec3"),zA=new jn("uvec3"),cp=new jn("bvec3"),We=new jn("vec4"),c8=new jn("ivec4"),f8=new jn("uvec4"),h8=new jn("bvec4"),Ic=new jn("mat2"),Sr=new jn("mat3"),Ta=new jn("mat4"),uB=(r="")=>Te(new Zi(r,"string")),cB=r=>Te(new Zi(r,"ArrayBuffer"));ye("toColor",a8);ye("toFloat",W);ye("toInt",te);ye("toUint",Ve);ye("toBool",oo);ye("toVec2",Ee);ye("toIVec2",Qn);ye("toUVec2",A8);ye("toBVec2",l8);ye("toVec3",ie);ye("toIVec3",u8);ye("toUVec3",zA);ye("toBVec3",cp);ye("toVec4",We);ye("toIVec4",c8);ye("toUVec4",f8);ye("toBVec4",h8);ye("toMat2",Ic);ye("toMat3",Sr);ye("toMat4",Ta);const d8=xe(Ba),p8=(r,e)=>Te(new t8(Te(r),e)),fB=(r,e)=>Te(new td(Te(r),e));ye("element",d8);ye("convert",p8);class i6 extends Rn{static get type(){return"ArrayNode"}constructor(e,t,n=null){super(e),this.count=t,this.values=n,this.isArrayNode=!0}getNodeType(e){return this.nodeType===null&&(this.nodeType=this.values[0].getNodeType(e)),this.nodeType}getElementType(e){return this.getNodeType(e)}generate(e){const t=this.getNodeType(e);return e.generateArray(t,this.count,this.values)}}const m8=(...r)=>{let e;if(r.length===1){const t=r[0];e=new i6(null,t.length,t)}else{const t=r[0],n=r[1];e=new i6(t,n)}return Te(e)};ye("toArray",(r,e)=>m8(Array(e).fill(r)));class g8 extends Ke{static get type(){return"UniformGroupNode"}constructor(e,t=!1,n=1){super("string"),this.name=e,this.shared=t,this.order=n,this.isUniformGroup=!0}serialize(e){super.serialize(e),e.name=this.name,e.version=this.version,e.shared=this.shared}deserialize(e){super.deserialize(e),this.name=e.name,this.version=e.version,this.shared=e.shared}}const y8=r=>new g8(r),kc=(r,e=0)=>new g8(r,!0,e),v8=kc("frame"),Ze=kc("render"),fp=y8("object");class Dl extends op{static get type(){return"UniformNode"}constructor(e,t=null){super(e,t),this.isUniformNode=!0,this.name="",this.groupNode=fp}label(e){return this.name=e,this}setGroup(e){return this.groupNode=e,this}getGroup(){return this.groupNode}getUniformHash(e){return this.getHash(e)}
19onUpdate(e,t){const n=this.getSelf();return e=e.bind(n),super.onUpdate(i=>{const s=e(i,n);s!==void 0&&(this.value=s)},t)}generate(e,t){const n=this.getNodeType(e),i=this.getUniformHash(e);let s=e.getNodeFromHash(i);s===void 0&&(e.setHashNode(this,i),s=this);const a=s.getInputType(e),u=e.getUniformFromNode(s,a,e.shaderStage,this.name||e.context.label),f=e.getPropertyName(u);return e.context.label!==void 0&&delete e.context.label,e.format(f,n,t)}}const Ye=(r,e)=>{const t=s8(e||r),n=r&&r.isNode===!0?r.node&&r.node.value||r.value:r;return Te(new Dl(n,t))};class kt extends Ke{static get type(){return"PropertyNode"}constructor(e,t=null,n=!1){super(e),this.name=t,this.varying=n,this.isPropertyNode=!0}getHash(e){return this.name||super.getHash(e)}isGlobal(){return!0}generate(e){let t;return this.varying===!0?(t=e.getVaryingFromNode(this,this.name),t.needsInterpolation=!0):t=e.getVarFromNode(this,this.name),e.getPropertyName(t)}}const _8=(r,e)=>Te(new kt(r,e)),dl=(r,e)=>Te(new kt(r,e,!0)),Ft=Ue(kt,"vec4","DiffuseColor"),rd=Ue(kt,"vec3","EmissiveColor"),hs=Ue(kt,"float","Roughness"),pl=Ue(kt,"float","Metalness"),cc=Ue(kt,"float","Clearcoat"),ml=Ue(kt,"float","ClearcoatRoughness"),ga=Ue(kt,"vec3","Sheen"),Uc=Ue(kt,"float","SheenRoughness"),Oc=Ue(kt,"float","Iridescence"),hp=Ue(kt,"float","IridescenceIOR"),dp=Ue(kt,"float","IridescenceThickness"),fc=Ue(kt,"float","AlphaT"),No=Ue(kt,"float","Anisotropy"),O0=Ue(kt,"vec3","AnisotropyT"),wa=Ue(kt,"vec3","AnisotropyB"),zr=Ue(kt,"color","SpecularColor"),gl=Ue(kt,"float","SpecularF90"),hc=Ue(kt,"float","Shininess"),yl=Ue(kt,"vec4","Output"),f1=Ue(kt,"float","dashSize"),id=Ue(kt,"float","gapSize"),hB=Ue(kt,"float","pointWidth"),G0=Ue(kt,"float","IOR"),dc=Ue(kt,"float","Transmission"),pp=Ue(kt,"float","Thickness"),mp=Ue(kt,"float","AttenuationDistance"),gp=Ue(kt,"color","AttenuationColor"),yp=Ue(kt,"float","Dispersion");class dB extends Rn{static get type(){return"AssignNode"}constructor(e,t){super(),this.targetNode=e,this.sourceNode=t}hasDependencies(){return!1}getNodeType(e,t){return t!=="void"?this.targetNode.getNodeType(e):"void"}needsSplitAssign(e){const{targetNode:t}=this;if(e.isAvailable("swizzleAssign")===!1&&t.isSplitNode&&t.components.length>1){const n=e.getTypeLength(t.node.getNodeType(e));return Pa.join("").slice(0,n)!==t.components}return!1}generate(e,t){const{targetNode:n,sourceNode:i}=this,s=this.needsSplitAssign(e),a=n.getNodeType(e),u=n.context({assign:!0}).build(e),f=i.build(e,a),m=i.getNodeType(e),y=e.getDataFromNode(this);let _;if(y.initialized===!0)t!=="void"&&(_=u);else if(s){const b=e.getVarFromNode(this,null,a),w=e.getPropertyName(b);e.addLineFlowCode(`${w} = ${f}`,this);const S=n.node.context({assign:!0}).build(e);for(let E=0;E<n.components.length;E++){const R=n.components[E];e.addLineFlowCode(`${S}.${R} = ${w}[ ${E} ]`,this)}t!=="void"&&(_=u)}else _=`${u} = ${f}`,(t==="void"||m==="void")&&(e.addLineFlowCode(_,this),t!=="void"&&(_=u));return y.initialized=!0,e.format(_,a,t)}}const x8=xe(dB);ye("assign",x8);class pB extends Rn{static get type(){return"FunctionCallNode"}constructor(e=null,t={}){super(),this.functionNode=e,this.parameters=t}setParameters(e){return this.parameters=e,this}getParameters(){return this.parameters}getNodeType(e){return this.functionNode.getNodeType(e)}generate(e){const t=[],n=this.functionNode,i=n.getInputs(e),s=this.parameters,a=(f,m)=>{const y=m.type,_=y==="pointer";let b;return _?b="&"+f.build(e):b=f.build(e,y),b};if(Array.isArray(s))for(let f=0;f<s.length;f++)t.push(a(s[f],i[f]));else for(const f of i){const m=s[f.name];if(m!==void 0)t.push(a(m,f));else throw new Error(`FunctionCallNode: Input '${f.name}' not found in FunctionNode.`)}return`${n.build(e,"property")}( ${t.join(", ")} )`}}const b8=(r,...e)=>(e=e.length>1||e[0]&&e[0].isNode===!0?ba(e):Fl(e[0]),Te(new pB(Te(r),e)));ye("call",b8);class mn extends Rn{static get type(){return"OperatorNode"}constructor(e,t,n,...i){if(super(),i.length>0){let s=new mn(e,t,n);for(let a=0;a<i.length-1;a++)s=new mn(e,s,i[a]);t=s,n=i[i.length-1]}this.op=e,this.aNode=t,this.bNode=n,this.isOperatorNode=!0}getNodeType(e,t){const n=this.op,i=this.aNode,s=this.bNode,a=i.getNodeType(e),u=typeof s<"u"?s.getNodeType(e):null;if(a==="void"||u==="void")return"void";if(n==="%")return a;
19if(n==="~"||n==="&"||n==="|"||n==="^"||n===">>"||n==="<<")return e.getIntegerType(a);if(n==="!"||n==="=="||n==="&&"||n==="||"||n==="^^")return"bool";if(n==="<"||n===">"||n==="<="||n===">="){const f=t?e.getTypeLength(t):Math.max(e.getTypeLength(a),e.getTypeLength(u));return f>1?`bvec${f}`:"bool"}else{if(e.isMatrix(a)){if(u==="float")return a;if(e.isVector(u))return e.getVectorFromMatrix(a);if(e.isMatrix(u))return a}else if(e.isMatrix(u)){if(a==="float")return u;if(e.isVector(a))return e.getVectorFromMatrix(u)}return e.getTypeLength(u)>e.getTypeLength(a)?u:a}}generate(e,t){const n=this.op,i=this.aNode,s=this.bNode,a=this.getNodeType(e,t);let u=null,f=null;a!=="void"?(u=i.getNodeType(e),f=typeof s<"u"?s.getNodeType(e):null,n==="<"||n===">"||n==="<="||n===">="||n==="=="?e.isVector(u)?f=u:u!==f&&(u=f="float"):n===">>"||n==="<<"?(u=a,f=e.changeComponentType(f,"uint")):e.isMatrix(u)?f==="float"?f="float":e.isVector(f)?f=e.getVectorFromMatrix(u):e.isMatrix(f)||(u=f=a):e.isMatrix(f)?u==="float"?u="float":e.isVector(u)?u=e.getVectorFromMatrix(f):u=f=a:u=f=a):u=f=a;const m=i.build(e,u),y=typeof s<"u"?s.build(e,f):null,_=e.getTypeLength(t),b=e.getFunctionOperator(n);if(t!=="void")return n==="<"&&_>1?e.useComparisonMethod?e.format(`${e.getMethod("lessThan",t)}( ${m}, ${y} )`,a,t):e.format(`( ${m} < ${y} )`,a,t):n==="<="&&_>1?e.useComparisonMethod?e.format(`${e.getMethod("lessThanEqual",t)}( ${m}, ${y} )`,a,t):e.format(`( ${m} <= ${y} )`,a,t):n===">"&&_>1?e.useComparisonMethod?e.format(`${e.getMethod("greaterThan",t)}( ${m}, ${y} )`,a,t):e.format(`( ${m} > ${y} )`,a,t):n===">="&&_>1?e.useComparisonMethod?e.format(`${e.getMethod("greaterThanEqual",t)}( ${m}, ${y} )`,a,t):e.format(`( ${m} >= ${y} )`,a,t):n==="!"||n==="~"?e.format(`(${n}${m})`,u,t):b?e.format(`${b}( ${m}, ${y} )`,a,t):e.isMatrix(u)&&f==="float"?e.format(`( ${y} ${n} ${m} )`,a,t):u==="float"&&e.isMatrix(f)?e.format(`${m} ${n} ${y}`,a,t):e.format(`( ${m} ${n} ${y} )`,a,t);if(u!=="void")return b?e.format(`${b}( ${m}, ${y} )`,a,t):e.isMatrix(u)&&f==="float"?e.format(`${y} ${n} ${m}`,a,t):e.format(`${m} ${n} ${y}`,a,t)}serialize(e){super.serialize(e),e.op=this.op}deserialize(e){super.deserialize(e),this.op=e.op}}const Dn=xe(mn,"+"),Et=xe(mn,"-"),ut=xe(mn,"*"),Ki=xe(mn,"/"),vp=xe(mn,"%"),T8=xe(mn,"=="),w8=xe(mn,"!="),S8=xe(mn,"<"),_p=xe(mn,">"),M8=xe(mn,"<="),E8=xe(mn,">="),N8=xe(mn,"&&"),R8=xe(mn,"||"),C8=xe(mn,"!"),P8=xe(mn,"^^"),B8=xe(mn,"&"),F8=xe(mn,"~"),D8=xe(mn,"|"),L8=xe(mn,"^"),q8=xe(mn,"<<"),I8=xe(mn,">>");ye("add",Dn);ye("sub",Et);ye("mul",ut);ye("div",Ki);ye("modInt",vp);ye("equal",T8);ye("notEqual",w8);ye("lessThan",S8);ye("greaterThan",_p);ye("lessThanEqual",M8);ye("greaterThanEqual",E8);ye("and",N8);ye("or",R8);ye("not",C8);ye("xor",P8);ye("bitAnd",B8);ye("bitNot",F8);ye("bitOr",D8);ye("bitXor",L8);ye("shiftLeft",q8);ye("shiftRight",I8);const k8=(...r)=>(console.warn("TSL.OperatorNode: .remainder() has been renamed to .modInt()."),vp(...r));ye("remainder",k8);class ue extends Rn{static get type(){return"MathNode"}constructor(e,t,n=null,i=null){super(),this.method=e,this.aNode=t,this.bNode=n,this.cNode=i,this.isMathNode=!0}getInputType(e){const t=this.aNode.getNodeType(e),n=this.bNode?this.bNode.getNodeType(e):null,i=this.cNode?this.cNode.getNodeType(e):null,s=e.isMatrix(t)?0:e.getTypeLength(t),a=e.isMatrix(n)?0:e.getTypeLength(n),u=e.isMatrix(i)?0:e.getTypeLength(i);return s>a&&s>u?t:a>u?n:u>s?i:t}getNodeType(e){const t=this.method;return t===ue.LENGTH||t===ue.DISTANCE||t===ue.DOT?"float":t===ue.CROSS?"vec3":t===ue.ALL?"bool":t===ue.EQUALS?e.changeComponentType(this.aNode.getNodeType(e),"bool"):t===ue.MOD?this.aNode.getNodeType(e):this.getInputType(e)}generate(e,t){let n=this.method;const i=this.getNodeType(e),s=this.getInputType(e),a=this.aNode,u=this.bNode,f=this.cNode,m=e.renderer.coordinateSystem;if(n===ue.TRANSFORM_DIRECTION){let y=a,_=u;e.isMatrix(y.getNodeType(e))?_=We(ie(_),0):y=We(ie(y),0);const b=ut(y,_).xyz;return ao(b).build(e,t)}else{if(n===ue.NEGATE)return e.format("( - "+a.build(e,s)+" )",i,t);if(n===ue.ONE_MINUS)return Et(1,a).build(e,t);if(n===ue.RECIPROCAL)return Ki(1,a).build(e,t);if(n===ue.DIFFERENCE)return rn(Et(a,u)).build(e,t);{const y=[];return n===ue.CROSS||n===ue.MOD?y.push(a.build(e,i),u.build(e,i)):m===H0&&n===ue.STEP?y.push(a.build(e,e.getTypeLength(a.getNodeType(e))===1?"float":s),u.build(e,s)):m===H0&&(n===ue.MIN||n===ue.MAX)||n===ue.MOD?y.push(a.build(e,s),u.build(e,e.getTypeLength(u.getNodeType(e))===1?"float":s)):n===ue.REFRACT?y.push(a.build(e,s),u.build(e,s),f.build(e,"float")):n===ue.MIX?y.push(a.build(e,s),u.build(e,s),f.build(e,e.getTypeLength(f.getNodeType(e))===1?"float":s)):(m===VA&&n===ue.ATAN&&u!==null&&(n="atan2"),y.push(a.build(e,s)),u!==null&&y.push(u.build(e,s)),f!==null&&y.push(f.build(e,s))),e.format(`${e.getMethod(n,i)}( ${y.join(", ")} )`,i,t)}}}serialize(e){super.serialize(e),e.method=this.method}deserialize(e){super.deserialize(e),this.method=e.method}}ue.ALL="all";ue.ANY="any";ue.RADIANS="radians";ue.DEGREES="degrees";ue.EXP="exp";ue.EXP2="exp2";ue.LOG="log";ue.LOG2="log2";ue.SQRT="sqrt";ue.INVERSE_SQRT="inversesqrt";ue.FLOOR="floor";ue.CEIL="ceil";ue.NORMALIZE="normalize";ue.FRACT="fract";ue.SIN="sin";ue.COS="cos";ue.TAN="tan";ue.ASIN="asin";ue.ACOS="acos";ue.ATAN="atan";ue.ABS="abs";ue.SIGN="sign";ue.LENGTH="length";ue.NEGATE="negate";ue.ONE_MINUS="oneMinus";ue.DFDX="dFdx";ue.DFDY="dFdy";ue.ROUND="round";ue.RECIPROCAL="reciprocal";ue.TRUNC="trunc";ue.FWIDTH="fwidth";ue.TRANSPOSE="transpose";ue.BITCAST="bitcast";ue.EQUALS="equals";ue.MIN="min";ue.MAX="max";ue.MOD="mod";ue.STEP="step";ue.REFLECT="reflect";ue.DISTANCE="distance";ue.DIFFERENCE="difference";ue.DOT="dot";ue.CROSS="cross";ue.POW="pow";ue.TRANSFORM_DIRECTION="transformDirection";ue.MIX="mix";ue.CLAMP="clamp";ue.REFRACT="refract";ue.SMOOTHSTEP="smoothstep";ue.FACEFORWARD="faceforward";const U8=W(1e-6),mB=W(1e6),pc=W(Math.PI),gB=W(Math.PI*2),xp=xe(ue,ue.ALL),O8=xe(ue,ue.ANY),G8=xe(ue,ue.RADIANS),V8=xe(ue,ue.DEGREES),bp=xe(ue,ue.EXP),IA=xe(ue,ue.EXP2),Gc=xe(ue,ue.LOG),vs=xe(ue,ue.LOG2),Ds=xe(ue,ue.SQRT),Tp=xe(ue,ue.INVERSE_SQRT),_s=xe(ue,ue.FLOOR),Vc=xe(ue,ue.CEIL),ao=xe(ue,ue.NORMALIZE),lo=xe(ue,ue.FRACT),ci=xe(ue,ue.SIN),$s=xe(ue,ue.COS),z8=xe(ue,ue.TAN),j8=xe(ue,ue.ASIN),$8=xe(ue,ue.ACOS),wp=xe(ue,ue.ATAN),rn=xe(ue,ue.ABS),vl=xe(ue,ue.SIGN),Zs=xe(ue,ue.LENGTH),H8=xe(ue,ue.NEGATE),W8=xe(ue,ue.ONE_MINUS),Sp=xe(ue,ue.DFDX),Mp=xe(ue,ue.DFDY),Q8=xe(ue,ue.ROUND),Y8=xe(ue,ue.RECIPROCAL),Ep=xe(ue,ue.TRUNC),X8=xe(ue,ue.FWIDTH),K8=xe(ue,ue.TRANSPOSE),yB=xe(ue,ue.BITCAST),Z8=xe(ue,ue.EQUALS),Kr=xe(ue,ue.MIN),Nn=xe(ue,ue.MAX),Np=xe(ue,ue.MOD),zc=xe(ue,ue.STEP),J8=xe(ue,ue.REFLECT),e9=xe(ue,ue.DISTANCE),t9=xe(ue,ue.DIFFERENCE),Ho=xe(ue,ue.DOT),jc=xe(ue,ue.CROSS),Hi=xe(ue,ue.POW),Rp=xe(ue,ue.POW,2),n9=xe(ue,ue.POW,3),r9=xe(ue,ue.POW,4),i9=xe(ue,ue.TRANSFORM_DIRECTION),s9=r=>ut(vl(r),Hi(rn(r),1/3)),Cp=r=>Ho(r,r),qt=xe(ue,ue.MIX),Ts=(r,e=0,t=1)=>Te(new ue(ue.CLAMP,Te(r),Te(e),Te(t))),o9=r=>Ts(r),Pp=xe(ue,ue.REFRACT),ws=xe(ue,ue.SMOOTHSTEP),Bp=xe(ue,ue.FACEFORWARD),a9=le(([r])=>{const n=43758.5453,i=Ho(r.xy,Ee(12.9898,78.233)),s=Np(i,pc);return lo(ci(s).mul(n))}),A9=(r,e,t)=>qt(e,t,r),l9=(r,e,t)=>ws(e,t,r),u9=(r,e)=>(console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'),wp(r,e)),vB=Bp,_B=Tp;ye("all",xp);ye("any",O8);ye("equals",Z8);ye("radians",G8);ye("degrees",V8);ye("exp",bp);ye("exp2",IA);ye("log",Gc);ye("log2",vs);ye("sqrt",Ds);ye("inverseSqrt",Tp);ye("floor",_s);ye("ceil",Vc);ye("normalize",ao);ye("fract",lo);ye("sin",ci);ye("cos",$s);ye("tan",z8);ye("asin",j8);ye("acos",$8);ye("atan",wp);ye("abs",rn);ye("sign",vl);ye("length",Zs);ye("lengthSq",Cp);ye("negate",H8);ye("oneMinus",W8);ye("dFdx",Sp);ye("dFdy",Mp);ye("round",Q8);ye("reciprocal",Y8);ye("trunc",Ep);ye("fwidth",X8);ye("atan2",u9);ye("min",Kr);ye("max",Nn);ye("mod",Np);ye("step",zc);ye("reflect",J8);ye("distance",e9);ye("dot",Ho);ye("cross",jc);ye("pow",Hi);ye("pow2",Rp);ye("pow3",n9);ye("pow4",r9);ye("transformDirection",i9);ye("mix",A9);ye("clamp",Ts);ye("refract",Pp);ye("smoothstep",l9);ye("faceForward",Bp);ye("difference",t9);ye("saturate",o9);ye("cbrt",s9);ye("transpose",K8);ye("rand",a9);class xB extends Ke{static get type(){return"ConditionalNode"}constructor(e,t,n=null){super(),this.condNode=e,this.ifNode=t,this.elseNode=n}
19getNodeType(e){const{ifNode:t,elseNode:n}=e.getNodeProperties(this);if(t===void 0)return this.setup(e),this.getNodeType(e);const i=t.getNodeType(e);if(n!==null){const s=n.getNodeType(e);if(e.getTypeLength(s)>e.getTypeLength(i))return s}return i}setup(e){const t=this.condNode.cache(),n=this.ifNode.cache(),i=this.elseNode?this.elseNode.cache():null,s=e.context.nodeBlock;e.getDataFromNode(n).parentNodeBlock=s,i!==null&&(e.getDataFromNode(i).parentNodeBlock=s);const a=e.getNodeProperties(this);a.condNode=t,a.ifNode=n.context({nodeBlock:n}),a.elseNode=i?i.context({nodeBlock:i}):null}generate(e,t){const n=this.getNodeType(e),i=e.getDataFromNode(this);if(i.nodeProperty!==void 0)return i.nodeProperty;const{condNode:s,ifNode:a,elseNode:u}=e.getNodeProperties(this),f=t!=="void",m=f?_8(n).build(e):"";i.nodeProperty=m;const y=s.build(e,"bool");e.addFlowCode(` 20${e.tab}if ( ${y} ) { 21 22`).addFlowTab();let _=a.build(e,n);if(_&&(f?_=m+" = "+_+";":_="return "+_+";"),e.removeFlowTab().addFlowCode(e.tab+" "+_+` 23 24`+e.tab+"}"),u!==null){e.addFlowCode(` else { 25 26`).addFlowTab();let b=u.build(e,n);b&&(f?b=m+" = "+b+";":b="return "+b+";"),e.removeFlowTab().addFlowCode(e.tab+" "+b+` 27 28`+e.tab+`} 29 30`)}else e.addFlowCode(` 31 32`);return e.format(m,n,t)}}const dr=xe(xB);ye("select",dr);const c9=(...r)=>(console.warn("TSL.ConditionalNode: cond() has been renamed to select()."),dr(...r));ye("cond",c9);class f9 extends Ke{static get type(){return"ContextNode"}constructor(e,t={}){super(),this.isContextNode=!0,this.node=e,this.value=t}getScope(){return this.node.getScope()}getNodeType(e){return this.node.getNodeType(e)}analyze(e){this.node.build(e)}setup(e){const t=e.getContext();e.setContext({...e.context,...this.value});const n=this.node.build(e);return e.setContext(t),n}generate(e,t){const n=e.getContext();e.setContext({...e.context,...this.value});const i=this.node.build(e,t);return e.setContext(n),i}}const $c=xe(f9),h9=(r,e)=>$c(r,{label:e});ye("context",$c);ye("label",h9);class h1 extends Ke{static get type(){return"VarNode"}constructor(e,t=null,n=!1){super(),this.node=e,this.name=t,this.global=!0,this.isVarNode=!0,this.readOnly=n}getHash(e){return this.name||super.getHash(e)}getMemberType(e,t){return this.node.getMemberType(e,t)}getElementType(e){return this.node.getElementType(e)}getNodeType(e){return this.node.getNodeType(e)}generate(e){const{node:t,name:n,readOnly:i}=this,{renderer:s}=e,a=s.backend.isWebGPUBackend===!0;let u=!1,f=!1;i&&(u=e.isDeterministic(t),f=a?i:u);const m=e.getVectorType(this.getNodeType(e)),y=t.build(e,m),_=e.getVarFromNode(this,n,m,void 0,f),b=e.getPropertyName(_);let w=b;if(f)if(a)w=u?`const ${b}`:`let ${b}`;else{const S=e.getArrayCount(t);w=`const ${e.getVar(_.type,b,S)}`}return e.addLineFlowCode(`${w} = ${y}`,this),b}}const Fp=xe(h1),d9=(r,e=null)=>Fp(r,e).append(),p9=(r,e=null)=>Fp(r,e,!0).append();ye("toVar",d9);ye("toConst",p9);const m9=r=>(console.warn('TSL: "temp( node )" is deprecated. Use "Var( node )" or "node.toVar()" instead.'),Fp(r));ye("temp",m9);class bB extends Ke{static get type(){return"VaryingNode"}constructor(e,t=null){super(),this.node=e,this.name=t,this.isVaryingNode=!0}isGlobal(){return!0}getHash(e){return this.name||super.getHash(e)}getNodeType(e){return this.node.getNodeType(e)}setupVarying(e){const t=e.getNodeProperties(this);let n=t.varying;if(n===void 0){const i=this.name,s=this.getNodeType(e);t.varying=n=e.getVaryingFromNode(this,i,s),t.node=this.node}return n.needsInterpolation||(n.needsInterpolation=e.shaderStage==="fragment"),n}setup(e){this.setupVarying(e)}analyze(e){return this.setupVarying(e),this.node.analyze(e)}generate(e){const t=e.getNodeProperties(this),n=this.setupVarying(e),i=e.shaderStage==="fragment"&&t.reassignPosition===!0&&e.context.needsPositionReassign;if(t.propertyName===void 0||i){const s=this.getNodeType(e),a=e.getPropertyName(n,Zh.VERTEX);e.flowNodeFromShaderStage(Zh.VERTEX,this.node,s,a),t.propertyName=a,i?t.reassignPosition=!1:t.reassignPosition===void 0&&e.context.isPositionNodeInput&&(t.reassignPosition=!0)}return e.getPropertyName(n)}}const Er=xe(bB),g9=r=>Er(r);ye("toVarying",Er);ye("toVertexStage",g9);ye("varying",(...r)=>(console.warn("TSL.VaryingNode: .varying() has been renamed to .toVarying()."),Er(...r)));ye("vertexStage",(...r)=>(console.warn("TSL.VaryingNode: .vertexStage() has been renamed to .toVertexStage()."),Er(...r)));const y9=le(([r])=>{const e=r.mul(.9478672986).add(.0521327014).pow(2.4),t=r.mul(.0773993808),n=r.lessThanEqual(.04045);return qt(e,t,n)}
32).setLayout({name:"sRGBTransferEOTF",type:"vec3",inputs:[{name:"color",type:"vec3"}]}),v9=le(([r])=>{const e=r.pow(.41666).mul(1.055).sub(.055),t=r.mul(12.92),n=r.lessThanEqual(.0031308);return qt(e,t,n)}).setLayout({name:"sRGBTransferOETF",type:"vec3",inputs:[{name:"color",type:"vec3"}]}),Ll="WorkingColorSpace",Dp="OutputColorSpace";class ql extends Rn{static get type(){return"ColorSpaceNode"}constructor(e,t,n){super("vec4"),this.colorNode=e,this.source=t,this.target=n}resolveColorSpace(e,t){return t===Ll?us.workingColorSpace:t===Dp?e.context.outputColorSpace||e.renderer.outputColorSpace:t}setup(e){const{colorNode:t}=this,n=this.resolveColorSpace(e,this.source),i=this.resolveColorSpace(e,this.target);let s=t;return us.enabled===!1||n===i||!n||!i||(us.getTransfer(n)===T4&&(s=We(y9(s.rgb),s.a)),us.getPrimaries(n)!==us.getPrimaries(i)&&(s=We(Sr(us._getMatrix(new Rl,n,i)).mul(s.rgb),s.a)),us.getTransfer(i)===T4&&(s=We(v9(s.rgb),s.a))),s}}const _9=r=>Te(new ql(Te(r),Ll,Dp)),x9=r=>Te(new ql(Te(r),Dp,Ll)),b9=(r,e)=>Te(new ql(Te(r),Ll,e)),Lp=(r,e)=>Te(new ql(Te(r),e,Ll)),TB=(r,e,t)=>Te(new ql(Te(r),e,t));ye("toOutputColorSpace",_9);ye("toWorkingColorSpace",x9);ye("workingToColorSpace",b9);ye("colorSpaceToWorking",Lp);let wB=class extends Ba{static get type(){return"ReferenceElementNode"}constructor(e,t){super(e,t),this.referenceNode=e,this.isReferenceElementNode=!0}getNodeType(){return this.referenceNode.uniformType}generate(e){const t=super.generate(e),n=this.referenceNode.getNodeType(),i=this.getNodeType();return e.format(t,n,i)}};class T9 extends Ke{static get type(){return"ReferenceBaseNode"}constructor(e,t,n=null,i=null){super(),this.property=e,this.uniformType=t,this.object=n,this.count=i,this.properties=e.split("."),this.reference=n,this.node=null,this.group=null,this.updateType=lt.OBJECT}setGroup(e){return this.group=e,this}element(e){return Te(new wB(this,Te(e)))}setNodeType(e){const t=Ye(null,e).getSelf();this.group!==null&&t.setGroup(this.group),this.node=t}getNodeType(e){return this.node===null&&(this.updateReference(e),this.updateValue()),this.node.getNodeType(e)}getValueFromReference(e=this.reference){const{properties:t}=this;let n=e[t[0]];for(let i=1;i<t.length;i++)n=n[t[i]];return n}updateReference(e){return this.reference=this.object!==null?this.object:e.object,this.reference}setup(){return this.updateValue(),this.node}update(){this.updateValue()}updateValue(){this.node===null&&this.setNodeType(this.uniformType);const e=this.getValueFromReference();Array.isArray(e)?this.node.array=e:this.node.value=e}}const SB=(r,e,t)=>Te(new T9(r,e,t));class MB extends T9{static get type(){return"RendererReferenceNode"}constructor(e,t,n=null){super(e,t,n),this.renderer=n,this.setGroup(Ze)}updateReference(e){return this.reference=this.renderer!==null?this.renderer:e.renderer,this.reference}}const w9=(r,e,t=null)=>Te(new MB(r,e,t));class EB extends Rn{static get type(){return"ToneMappingNode"}constructor(e,t=M9,n=null){super("vec3"),this.toneMapping=e,this.exposureNode=t,this.colorNode=n}customCacheKey(){return cl(this.toneMapping)}setup(e){const t=this.colorNode||e.context.color,n=this.toneMapping;if(n===bA)return t;let i=null;const s=e.renderer.library.getToneMappingFunction(n);return s!==null?i=We(s(t.rgb,this.exposureNode),t.a):(console.error("ToneMappingNode: Unsupported Tone Mapping configuration.",n),i=t),i}}const S9=(r,e,t)=>Te(new EB(r,Te(e),Te(t))),M9=w9("toneMappingExposure","float");ye("toneMapping",(r,e,t)=>S9(e,t,r));class NB extends op{static get type(){return"BufferAttributeNode"}constructor(e,t=null,n=0,i=0){super(e,t),this.isBufferNode=!0,this.bufferType=t,this.bufferStride=n,this.bufferOffset=i,this.usage=hT,this.instanced=!1,this.attribute=null,this.global=!0,e&&e.isBufferAttribute===!0&&(this.attribute=e,this.usage=e.usage,this.instanced=e.isInstancedBufferAttribute)}getHash(e){if(this.bufferStride===0&&this.bufferOffset===0){let t=e.globalCache.getData(this.value);return t===void 0&&(t={node:this},e.globalCache.setData(this.value,t)),t.node.uuid}return this.uuid}getNodeType(e){return this.bufferType===null&&(this.bufferType=e.getTypeFromAttribute(this.attribute)),this.bufferType}setup(e){if(this.attribute!==null)return;const t=this.getNodeType(e),n=this.value,i=e.getTypeLength(t),s=this.bufferStride||i,a=this.bufferOffset,u=n.isInterleavedBuffer===!0?n:new Fm(n,s),f=new Fo(u,i,a);u.setUsage(this.usage),this.attribute=f,this.attribute.isInstancedBufferAttribute=this.instanced}generate(e){const t=this.getNodeType(e),n=e.getBufferAttributeFromNode(this,t),i=e.getPropertyName(n);let s=null;return e.shaderStage==="vertex"||e.shaderStage==="compute"?(this.name=i,s=i):s=Er(this).build(e,t),s}getInputType(){return"bufferAttribute"}setUsage(e){return this.usage=e,this.attribute&&this.attribute.isBufferAttribute===!0&&(this.attribute.usage=e),this}setInstanced(e){return this.instanced=e,this}}const Il=(r,e=null,t=0,n=0)=>Te(new NB(r,e,t,n)),E9=(r,e=null,t=0,n=0)=>Il(r,e,t,n).setUsage(cA),mc=(r,e=null,t=0,n=0)=>Il(r,e,t,n).setInstanced(!0),sd=(r,e=null,t=0,n=0)=>E9(r,e,t,n).setInstanced(!0);ye("toAttribute",r=>Il(r.value));class RB extends Ke{static get type(){return"ComputeNode"}constructor(e,t,n=[64]){super("void"),this.isComputeNode=!0,this.computeNode=e,this.count=t,this.workgroupSize=n,this.dispatchCount=0,this.version=1,this.name="",this.updateBeforeType=lt.OBJECT,this.onInitFunction=null,this.updateDispatchCount()}dispose(){this.dispatchEvent({type:"dispose"})}label(e){return this.name=e,this}updateDispatchCount(){const{count:e,workgroupSize:t}=this;let n=t[0];for(let i=1;i<t.length;i++)n*=t[i];this.dispatchCount=Math.ceil(e/n)}onInit(e){return this.onInitFunction=e,this}updateBefore({renderer:e}){e.compute(this)}generate(e){const{shaderStage:t}=e;if(t==="compute"){const n=this.computeNode.build(e,"void");n!==""&&e.addLineFlowCode(n,this)}}}const N9=(r,e,t)=>Te(new RB(Te(r),e,t));ye("compute",N9);class CB extends Ke{static get type(){return"CacheNode"}constructor(e,t=!0){super(),this.node=e,this.parent=t,this.isCacheNo
32de=!0}getNodeType(e){const t=e.getCache(),n=e.getCacheFromNode(this,this.parent);e.setCache(n);const i=this.node.getNodeType(e);return e.setCache(t),i}build(e,...t){const n=e.getCache(),i=e.getCacheFromNode(this,this.parent);e.setCache(i);const s=this.node.build(e,...t);return e.setCache(n),s}}const V0=(r,e)=>Te(new CB(Te(r),e));ye("cache",V0);class PB extends Ke{static get type(){return"BypassNode"}constructor(e,t){super(),this.isBypassNode=!0,this.outputNode=e,this.callNode=t}getNodeType(e){return this.outputNode.getNodeType(e)}generate(e){const t=this.callNode.build(e,"void");return t!==""&&e.addLineFlowCode(t,this),this.outputNode.build(e)}}const R9=xe(PB);ye("bypass",R9);class C9 extends Ke{static get type(){return"RemapNode"}constructor(e,t,n,i=W(0),s=W(1)){super(),this.node=e,this.inLowNode=t,this.inHighNode=n,this.outLowNode=i,this.outHighNode=s,this.doClamp=!0}setup(){const{node:e,inLowNode:t,inHighNode:n,outLowNode:i,outHighNode:s,doClamp:a}=this;let u=e.sub(t).div(n.sub(t));return a===!0&&(u=u.clamp()),u.mul(s.sub(i)).add(i)}}const P9=xe(C9,null,null,{doClamp:!1}),B9=xe(C9);ye("remap",P9);ye("remapClamp",B9);class d1 extends Ke{static get type(){return"ExpressionNode"}constructor(e="",t="void"){super(t),this.snippet=e}generate(e,t){const n=this.getNodeType(e),i=this.snippet;if(n==="void")e.addLineFlowCode(i,this);else return e.format(`( ${i} )`,n,t)}}const Vo=xe(d1),F9=r=>(r?dr(r,Vo("discard")):Vo("discard")).append(),BB=()=>Vo("return").append();ye("discard",F9);class FB extends Rn{static get type(){return"RenderOutputNode"}constructor(e,t,n){super("vec4"),this.colorNode=e,this.toneMapping=t,this.outputColorSpace=n,this.isRenderOutputNode=!0}setup({context:e}){let t=this.colorNode||e.color;const n=(this.toneMapping!==null?this.toneMapping:e.toneMapping)||bA,i=(this.outputColorSpace!==null?this.outputColorSpace:e.outputColorSpace)||W0;return n!==bA&&(t=t.toneMapping(n)),i!==W0&&i!==us.workingColorSpace&&(t=t.workingToColorSpace(i)),t}}const D9=(r,e=null,t=null)=>Te(new FB(Te(r),e,t));ye("renderOutput",D9);function DB(r){console.warn("THREE.TSLBase: AddNodeElement has been removed in favor of tree-shaking. Trying add",r)}class L9 extends Ke{static get type(){return"AttributeNode"}constructor(e,t=null){super(t),this.global=!0,this._attributeName=e}getHash(e){return this.getAttributeName(e)}getNodeType(e){let t=this.nodeType;if(t===null){const n=this.getAttributeName(e);if(e.hasGeometryAttribute(n)){const i=e.geometry.getAttribute(n);t=e.getTypeFromAttribute(i)}else t="float"}return t}setAttributeName(e){return this._attributeName=e,this}getAttributeName(){return this._attributeName}generate(e){const t=this.getAttributeName(e),n=this.getNodeType(e);if(e.hasGeometryAttribute(t)===!0){const s=e.geometry.getAttribute(t),a=e.getTypeFromAttribute(s),u=e.getAttribute(t,a);return e.shaderStage==="vertex"?e.format(u.name,a,n):Er(this).build(e,n)}else return console.warn(`AttributeNode: Vertex attribute "${t}" not found on geometry.`),e.generateConst(n)}serialize(e){super.serialize(e),e.global=this.global,e._attributeName=this._attributeName}deserialize(e){super.deserialize(e),this.global=e.global,this._attributeName=e._attributeName}}const Ss=(r,e)=>Te(new L9(r,e)),dn=(r=0)=>Ss("uv"+(r>0?r:""),"vec2");class LB extends Ke{static get type(){return"TextureSizeNode"}constructor(e,t=null){super("uvec2"),this.isTextureSizeNode=!0,this.textureNode=e,this.levelNode=t}generate(e,t){const n=this.textureNode.build(e,"property"),i=this.levelNode===null?"0":this.levelNode.build(e,"int");return e.format(`${e.getMethod("textureDimensions")}( ${n}, ${i} )`,this.getNodeType(e),t)}}const ko=xe(LB);class qB extends Dl{static get type(){return"MaxMipLevelNode"}constructor(e){super(0),this._textureNode=e,this.updateType=lt.FRAME}get textureNode(){return this._textureNode}get texture(){return this._textureNode.value}update(){const e=this.texture,t=e.images,n=t&&t.length>0?t[0]&&t[0].image||t[0]:e.image;if(n&&n.width!==void 0){const{width:i,height:s}=n;this.value=Math.log2(Math.max(i,s))}}}const q9=xe(qB);class Ms extends Dl{static get type(){return"TextureNode"}constructor(e,t=null,n=null,i=null){super(e),this.isTextureNode=!0,this.uvNode=t,this.levelNode=n,this.biasNode=i,this.compareNode=null,this.depthNode=null,this.gradNode=null,this.sampler=!0,this.updateMatrix=!1,this.updateType=lt.NONE,this.referenceNode=null,this._value=e,this._matrixUniform=null,this.setUpdateMatrix(t===null)}set value(e){this.referenceNode?this.referenceNode.value=e:this._value=e}get value(){return this.referenceNode?this.referenceNode.value:this._value}getUniformHash(){return this.value.uuid}getNodeType(){return this.value.isDepthTexture===!0?"float":this.value.type===fr?"uvec4":this.value.type===Fr?"ivec4":"vec4"}getInputType(){return"texture"}getDefaultUV(){return dn(this.value.channel)}updateReference(){return this.value}getTransformedUV(e){return this._matrixUniform===null&&(this._matrixUniform=Ye(this.value.matrix)),this._matrixUniform.mul(ie(e,1)).xy}setUpdateMatrix(e){return this.updateMatrix=e,this.updateType=e?lt.RENDER:lt.NONE,this}setupUV(e,t){const n=this.value;return e.isFlipY()&&(n.image instanceof ImageBitmap&&n.flipY===!0||n.isRenderTargetTexture===!0||n.isFramebufferTexture===!0||n.isDepthTexture===!0)&&(this.sampler?t=t.flipY():t=t.setY(te(ko(this,this.levelNode).y).sub(t.y).sub(1))),t}setup(e){const t=e.getNodeProperties(this);t.referenceNode=this.referenceNode;const n=this.value;if(!n||n.isTexture!==!0)throw new Error("THREE.TSL: `texture( value )` function expects a valid instance of THREE.Texture().");let i=this.uvNode;(i===null||e.context.forceUVContext===!0)&&e.context.getUV&&(i=e.context.getUV(this)),i||(i=this.getDefaultUV()),this.updateMatrix===!0&&(i=this.getTransformedUV(i)),i=this.setupUV(e,i);let s=this.levelNode;s===null&&e.context.getTextureLevel&&(s=e.context.getTextureLevel(this)),t.uvNode=i,t.levelNode=s,t.biasNode=this.biasNode,t.compareNode=this.compareNode,t.gradNode=this.gradNode,t.depthNode=this.depthNode}generateUV(e,t){return t.build(e,this.sampler===!0?"vec2":"ivec2")}generateSnippet(e,t,n,i,s,a,u,f){const m=this.value;let y;return i?y=e.generateTextureLevel(m,t,n,i,a):s?y=e.generateTextureBias(m,t,n,s,a):f?y=e.generateTextureGrad(m,t,n,f,a):u?y=e.generateTextureCompare(m,t,n,u,a):this.sampler===!1?y=e.generateTextureLoad(m,t,n,a):y=e.generateTexture(m,t,n,a),y}generate(e,t){const n=this.value,i=e.getNodeProperties(this),s=super.generate(e,"property");if(t==="sampler")return s+"_sampler";if(e.isReference(t))return s;{const a=e.getDataFromNode(this);let u=a.propertyName;if(u===void 0){const{uvNode:y,levelNode:_,biasNode:b,compareNode:w,depthNode:S,gradNode:E}=i,R=this.generateUV(e,y),P=_?_.build(e,"float"):null,L=b?b.build(e,"float"):null,D=S?S.build(e,"int"):null,O=w?w.build(e,"float"):null,G=E?[E[0].build(e,"vec2"),E[1].build(e,"vec2")]:null,U=e.getVarFromNode(this);u=e.getPropertyName(U);const j=this.generateSnippet(e,s,R,P,L,D,O,G);e.addLineFlowCode(`${u} = ${j}`,this),a.snippet=j,a.propertyName=u}let f=u;const m=this.getNodeType(e);return e.needsToWorkingColorSpace(n)&&(f=Lp(Vo(f,m),n.colorSpace).setup(e).build(e,m)),e.format(f,m,t)}}setSampler(e){return this.sampler=e,this}getSampler(){return this.sampler}uv(e){return console.warn("THREE.TextureNode: .uv() has been renamed. Use .sample() instead."),this.sample(e)}sample(e){const t=this.clone();return t.uvNode=Te(e),t.referenceNode=this.getSelf(),Te(t)}blur(e){const t=this.clone();return t.biasNode=Te(e).mul(q9(t)),t.referenceNode=this.getSelf(),Te(t)}level(e){const t=this.clone();return t.levelNode=Te(e),t.referenceNode=this.getSelf(),Te(t)}size(e){return ko(this,e)}bias(e){const t=this.clone();return t.biasNode=Te(e),t.referenceNode=this.getSelf(),Te(t)}compare(e){const t=this.clone();return t.compareNode=Te(e),t.referenceNode=this.getSelf(),Te(t)}grad(e,t){const n=this.clone();return n.gradNode=[Te(e),Te(t)],n.referenceNode=this.getSelf(),Te(n)}depth(e){const t=this.clone();return t.depthNode=Te(e),t.referenceNode=this.getSelf(),Te(t)}serialize(e){super.serialize(e),e.value=this.value.toJSON(e.meta).uuid,e.sampler=this.sampler,e.updateMatrix=this.updateMatrix,e.updateType=this.updateType}deserialize(e){super.deserialize(e),this.value=e.meta.textures[e.value],this.sampler=e.sampler,this.updateMatrix=e.updateMatrix,this.updateType=e.updateType}update(){const e=this.value,t=this._matrixUniform;t!==null&&(t.value=e.matrix),e.matrixAutoUpdate===!0&&e.updateMatrix()}clone(){const e=new this.constructor(this.value,this.uvNode,this.levelNode,this.biasNode);return e.sampler=this.sampler,e}}const xt=xe(Ms),Tn=(...r)=>xt(...r).setSampler(!1),IB=r=>(r.isNode===!0?r:xt(r)).convert("sampler");class qp extends Dl{static get type(){return"BufferNode"}constructor(e,t,n=0){super(e,t),this.isBufferNode=!0,this.bufferType=t,this.bufferCount=n}getElementType(e){return this.getNodeType(e)}getInputType(){return"buffer"}}const kl=(r,e,t)=>Te(new qp(r,e,t));class kB extends Ba{static get type(){return"UniformArrayElementNode"}constructor(e,t){super(e,t),this.isArrayBufferElementNode=!0}generate(e){const t=super.generate(e),n=this.getNodeType(),i=this.node.getPaddedType();return e.format(t,i,n)}}class I9 extends qp{static get type(){return"UniformArrayNode"}constructor(e,t=null){super(null),this.array=e,this.elementType=t===null?Do(e[0]):t,this.paddedType=this.getPaddedType(),this.updateType=lt.RENDER,this.isArrayBufferNode=!0}getNodeType(){return this.paddedType}getElementType(){return this.elementType}getPaddedType(){const e=this.elementType;let t="vec4";return e==="mat2"?t="mat2":/mat/.test(e)===!0?t="mat4":e.charAt(0)==="i"?t="ivec4":e.charAt(0)==="u"&&(t="uvec4"),t}update(){const{array:e,value:t}=this,n=this.elementType;if(n==="float"||n==="int"||n==="uint")for(let i=0;i<e.length;i++){const s=i*4;
32t[s]=e[i]}else if(n==="color")for(let i=0;i<e.length;i++){const s=i*4,a=e[i];t[s]=a.r,t[s+1]=a.g,t[s+2]=a.b||0}else if(n==="mat2")for(let i=0;i<e.length;i++){const s=i*4,a=e[i];t[s]=a.elements[0],t[s+1]=a.elements[1],t[s+2]=a.elements[2],t[s+3]=a.elements[3]}else if(n==="mat3")for(let i=0;i<e.length;i++){const s=i*16,a=e[i];t[s]=a.elements[0],t[s+1]=a.elements[1],t[s+2]=a.elements[2],t[s+4]=a.elements[3],t[s+5]=a.elements[4],t[s+6]=a.elements[5],t[s+8]=a.elements[6],t[s+9]=a.elements[7],t[s+10]=a.elements[8],t[s+15]=1}else if(n==="mat4")for(let i=0;i<e.length;i++){const s=i*16,a=e[i];for(let u=0;u<a.elements.length;u++)t[s+u]=a.elements[u]}else for(let i=0;i<e.length;i++){const s=i*4,a=e[i];t[s]=a.x,t[s+1]=a.y,t[s+2]=a.z||0,t[s+3]=a.w||0}}setup(e){const t=this.array.length,n=this.elementType;let i=Float32Array;const s=this.paddedType,a=e.getTypeLength(s);return n.charAt(0)==="i"&&(i=Int32Array),n.charAt(0)==="u"&&(i=Uint32Array),this.value=new i(t*a),this.bufferCount=t,this.bufferType=s,super.setup(e)}element(e){return Te(new kB(this,Te(e)))}}const zi=(r,e)=>Te(new I9(r,e)),UB=(r,e)=>(console.warn("TSL.UniformArrayNode: uniforms() has been renamed to uniformArray()."),Te(new I9(r,e))),Ip=Ye(0,"uint").setGroup(kc("cameraIndex")).toVarying("v_cameraIndex"),Co=Ye("float").label("cameraNear").setGroup(Ze).onRenderUpdate(({camera:r})=>r.near),Po=Ye("float").label("cameraFar").setGroup(Ze).onRenderUpdate(({camera:r})=>r.far),Fa=le(({camera:r})=>{let e;if(r.isArrayCamera&&r.cameras.length>0){const t=[];for(const i of r.cameras)t.push(i.projectionMatrix);e=zi(t).setGroup(Ze).label("cameraProjectionMatrices").element(Ip).toVar("cameraProjectionMatrix")}else e=Ye("mat4").label("cameraProjectionMatrix").setGroup(Ze).onRenderUpdate(({camera:t})=>t.projectionMatrix);return e}).once()(),OB=Ye("mat4").label("cameraProjectionMatrixInverse").setGroup(Ze).onRenderUpdate(({camera:r})=>r.projectionMatrixInverse),Jr=le(({camera:r})=>{let e;if(r.isArrayCamera&&r.cameras.length>0){const t=[];for(const i of r.cameras)t.push(i.matrixWorldInverse);e=zi(t).setGroup(Ze).label("cameraViewMatrices").element(Ip).toVar("cameraViewMatrix")}else e=Ye("mat4").label("cameraViewMatrix").setGroup(Ze).onRenderUpdate(({camera:t})=>t.matrixWorldInverse);return e}).once()(),GB=Ye("mat4").label("cameraWorldMatrix").setGroup(Ze).onRenderUpdate(({camera:r})=>r.matrixWorld),VB=Ye("mat3").label("cameraNormalMatrix").setGroup(Ze).onRenderUpdate(({camera:r})=>r.normalMatrix),k9=Ye(new ke).label("cameraPosition").setGroup(Ze).onRenderUpdate(({camera:r},e)=>e.value.setFromMatrixPosition(r.matrixWorld));class Bt extends Ke{static get type(){return"Object3DNode"}constructor(e,t=null){super(),this.scope=e,this.object3d=t,this.updateType=lt.OBJECT,this._uniformNode=new Dl(null)}getNodeType(){const e=this.scope;if(e===Bt.WORLD_MATRIX)return"mat4";if(e===Bt.POSITION||e===Bt.VIEW_POSITION||e===Bt.DIRECTION||e===Bt.SCALE)return"vec3"}update(e){const t=this.object3d,n=this._uniformNode,i=this.scope;if(i===Bt.WORLD_MATRIX)n.value=t.matrixWorld;else if(i===Bt.POSITION)n.value=n.value||new ke,n.value.setFromMatrixPosition(t.matrixWorld);else if(i===Bt.SCALE)n.value=n.value||new ke,n.value.setFromMatrixScale(t.matrixWorld);else if(i===Bt.DIRECTION)n.value=n.value||new ke,t.getWorldDirection(n.value);else if(i===Bt.VIEW_POSITION){const s=e.camera;n.value=n.value||new ke,n.value.setFromMatrixPosition(t.matrixWorld),n.value.applyMatrix4(s.matrixWorldInverse)}}generate(e){const t=this.scope;return t===Bt.WORLD_MATRIX?this._uniformNode.nodeType="mat4":(t===Bt.POSITION||t===Bt.VIEW_POSITION||t===Bt.DIRECTION||t===Bt.SCALE)&&(this._uniformNode.nodeType="vec3"),this._uniformNode.build(e)}serialize(e){super.serialize(e),e.scope=this.scope}deserialize(e){super.deserialize(e),this.scope=e.scope}}Bt.WORLD_MATRIX="worldMatrix";Bt.POSITION="position";Bt.SCALE="scale";Bt.VIEW_POSITION="viewPosition";Bt.DIRECTION="direction";const zB=xe(Bt,Bt.DIRECTION),jB=xe(Bt,Bt.WORLD_MATRIX),U9=xe(Bt,Bt.POSITION),$B=xe(Bt,Bt.SCALE),HB=xe(Bt,Bt.VIEW_POSITION);class Es extends Bt{static get type(){return"ModelNode"}constructor(e){super(e)}update(e){this.object3d=e.object,super.update(e)}}const WB=Ue(Es,Es.DIRECTION),Si=Ue(Es,Es.WORLD_MATRIX),QB=Ue(Es,Es.POSITION),YB=Ue(Es,Es.SCALE),XB=Ue(Es,Es.VIEW_POSITION),O9=Ye(new Rl).onObjectUpdate(({object:r},e)=>e.value.getNormalMatrix(r.matrixWorld)),KB=Ye(new Bn).onObjectUpdate(({object:r},e)=>e.value.copy(r.matrixWorld).invert()),Da=le(r=>r.renderer.nodes.modelViewMatrix||G9).once()().toVar("modelViewMatrix"),G9=Jr.mul(Si),ZB=le(r=>
32(r.context.isHighPrecisionModelViewMatrix=!0,Ye("mat4").onObjectUpdate(({object:e,camera:t})=>e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse,e.matrixWorld)))).once()().toVar("highpModelViewMatrix"),JB=le(r=>{const e=r.context.isHighPrecisionModelViewMatrix;return Ye("mat3").onObjectUpdate(({object:t,camera:n})=>(e!==!0&&t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix)))}).once()().toVar("highpModelNormalViewMatrix"),Ul=Ss("position","vec3"),yn=Ul.toVarying("positionLocal"),gc=Ul.toVarying("positionPrevious"),Js=Si.mul(yn).xyz.toVarying("v_positionWorld").context({needsPositionReassign:!0}),kp=yn.transformDirection(Si).toVarying("v_positionWorldDirection").normalize().toVar("positionWorldDirection").context({needsPositionReassign:!0}),En=le(r=>r.context.setupPositionView(),"vec3").once()().toVarying("v_positionView").context({needsPositionReassign:!0}),un=En.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");class eF extends Ke{static get type(){return"FrontFacingNode"}constructor(){super("bool"),this.isFrontFacingNode=!0}generate(e){const{renderer:t,material:n}=e;return t.coordinateSystem===H0&&n.side===Xi?"false":e.getFrontFacing()}}const V9=Ue(eF),Ol=W(V9).mul(2).sub(1),Hc=Ss("normal","vec3"),Zr=le(r=>r.geometry.hasAttribute("normal")===!1?(console.warn('TSL.NormalNode: Vertex attribute "normal" not found on geometry.'),ie(0,1,0)):Hc,"vec3").once()().toVar("normalLocal"),z9=En.dFdx().cross(En.dFdy()).normalize().toVar("normalFlat"),Ri=le(r=>{let e;return r.material.flatShading===!0?e=z9:e=Er(Up(Zr),"v_normalView").normalize(),e},"vec3").once()().toVar("normalView"),Wc=Er(Ri.transformDirection(Jr),"v_normalWorld").normalize().toVar("normalWorld"),Mn=le(r=>r.context.setupNormal().context({getUV:null}),"vec3").once()().mul(Ol).toVar("transformedNormalView"),Qc=Mn.transformDirection(Jr).toVar("transformedNormalWorld"),vA=le(r=>r.context.setupClearcoatNormal().context({getUV:null}),"vec3").once()().mul(Ol).toVar("transformedClearcoatNormalView"),j9=le(([r,e=Si])=>{const t=Sr(e),n=r.div(ie(t[0].dot(t[0]),t[1].dot(t[1]),t[2].dot(t[2])));return t.mul(n).xyz}),Up=le(([r],e)=>{const t=e.renderer.nodes.modelNormalViewMatrix;if(t!==null)return t.transformDirection(r);const n=O9.mul(r);return Jr.transformDirection(n)}),$9=Ye(0).onReference(({material:r})=>r).onRenderUpdate(({material:r})=>r.refractionRatio),H9=un.negate().reflect(Mn),W9=un.negate().refract(Mn,$9),Q9=H9.transformDirection(Jr).toVar("reflectVector"),Y9=W9.transformDirection(Jr).toVar("reflectVector");class tF extends Ms{static get type(){return"CubeTextureNode"}constructor(e,t=null,n=null,i=null){super(e,t,n,i),this.isCubeTextureNode=!0}getInputType(){return"cubeTexture"}getDefaultUV(){const e=this.value;return e.mapping===NA?Q9:e.mapping===RA?Y9:(console.error('THREE.CubeTextureNode: Mapping "%s" not supported.',e.mapping),ie(0,0,0))}setUpdateMatrix(){}setupUV(e,t){const n=this.value;return e.renderer.coordinateSystem===VA||!n.isRenderTargetTexture?ie(t.x.negate(),t.yz):t}generateUV(e,t){return t.build(e,"vec3")}}const kA=xe(tF);class nF extends Ba{static get type(){return"ReferenceElementNode"}constructor(e,t){super(e,t),this.referenceNode=e,this.isReferenceElementNode=!0}getNodeType(){return this.referenceNode.uniformType}generate(e){const t=super.generate(e),n=this.referenceNode.getNodeType(),i=this.getNodeType();return e.format(t,n,i)}}class Yc extends Ke{static get type(){return"ReferenceNode"}constructor(e,t,n=null,i=null){super(),this.property=e,this.uniformType=t,this.object=n,this.count=i,this.properties=e.split("."),this.reference=n,this.node=null,this.group=null,this.name=null,this.updateType=lt.OBJECT}element(e){return Te(new nF(this,Te(e)))}setGroup(e){return this.group=e,this}label(e){return this.name=e,this}setNodeType(e){let t=null;this.count!==null?t=kl(null,e,this.count):Array.isArray(this.getValueFromReference())?t=zi(null,e):e==="texture"?t=xt(null):e==="cubeTexture"?t=kA(null):t=Ye(null,e),this.group!==null&&t.setGroup(this.group),this.name!==null&&t.label(this.name),this.node=t.getSelf()}getNodeType(e){return this.node===null&&(this.updateReference(e),this.updateV
32alue()),this.node.getNodeType(e)}getValueFromReference(e=this.reference){const{properties:t}=this;let n=e[t[0]];for(let i=1;i<t.length;i++)n=n[t[i]];return n}updateReference(e){return this.reference=this.object!==null?this.object:e.object,this.reference}setup(){return this.updateValue(),this.node}update(){this.updateValue()}updateValue(){this.node===null&&this.setNodeType(this.uniformType);const e=this.getValueFromReference();Array.isArray(e)?this.node.array=e:this.node.value=e}}const zt=(r,e,t)=>Te(new Yc(r,e,t)),od=(r,e,t,n)=>Te(new Yc(r,e,n,t));class rF extends Yc{static get type(){return"MaterialReferenceNode"}constructor(e,t,n=null){super(e,t,n),this.material=n,this.isMaterialReferenceNode=!0}updateReference(e){return this.reference=this.material!==null?this.material:e.material,this.reference}}const Qs=(r,e,t=null)=>Te(new rF(r,e,t)),Xc=le(r=>(r.geometry.hasAttribute("tangent")===!1&&r.geometry.computeTangents(),Ss("tangent","vec4")))(),Gl=Xc.xyz.toVar("tangentLocal"),Vl=Da.mul(We(Gl,0)).xyz.toVarying("v_tangentView").normalize().toVar("tangentView"),X9=Vl.transformDirection(Jr).toVarying("v_tangentWorld").normalize().toVar("tangentWorld"),Op=Vl.toVar("transformedTangentView"),iF=Op.transformDirection(Jr).normalize().toVar("transformedTangentWorld"),zl=r=>r.mul(Xc.w).xyz,sF=Er(zl(Hc.cross(Xc)),"v_bitangentGeometry").normalize().toVar("bitangentGeometry"),oF=Er(zl(Zr.cross(Gl)),"v_bitangentLocal").normalize().toVar("bitangentLocal"),K9=Er(zl(Ri.cross(Vl)),"v_bitangentView").normalize().toVar("bitangentView"),aF=Er(zl(Wc.cross(X9)),"v_bitangentWorld").normalize().toVar("bitangentWorld"),Z9=zl(Mn.cross(Op)).normalize().toVar("transformedBitangentView"),AF=Z9.transformDirection(Jr).normalize().toVar("transformedBitangentWorld"),ya=Sr(Vl,K9,Ri),J9=un.mul(ya),lF=(r,e)=>r.sub(J9.mul(e)),ey=(()=>{let r=wa.cross(un);return r=r.cross(wa).normalize(),r=qt(r,Mn,No.mul(hs.oneMinus()).oneMinus().pow2().pow2()).normalize(),r})(),uF=le(r=>{const{eye_pos:e,surf_norm:t,mapN:n,uv:i}=r,s=e.dFdx(),a=e.dFdy(),u=i.dFdx(),f=i.dFdy(),m=t,y=a.cross(m),_=m.cross(s),b=y.mul(u.x).add(_.mul(f.x)),w=y.mul(u.y).add(_.mul(f.y)),S=b.dot(b).max(w.dot(w)),E=Ol.mul(S.inverseSqrt());return Dn(b.mul(n.x,E),w.mul(n.y,E),m.mul(n.z)).normalize()});class cF extends Rn{static get type(){return"NormalMapNode"}constructor(e,t=null){super("vec3"),this.node=e,this.scaleNode=t,this.normalMapType=w4}setup(e){const{normalMapType:t,scaleNode:n}=this;let i=this.node.mul(2).sub(1);n!==null&&(i=ie(i.xy.mul(n),i.z));let s=null;return t===dT?s=Up(i):t===w4&&(e.hasGeometryAttribute("tangent")===!0?s=ya.mul(i).normalize():s=uF({eye_pos:En,surf_norm:Ri,mapN:i,uv:dn()})),s}}const ad=xe(cF),fF=le(({textureNode:r,bumpScale:e})=>{const t=i=>r.cache().context({getUV:s=>i(s.uvNode||dn()),forceUVContext:!0}),n=W(t(i=>i));return Ee(W(t(i=>i.add(i.dFdx()))).sub(n),W(t(i=>i.add(i.dFdy()))).sub(n)).mul(e)}),hF=le(r=>{const{surf_pos:e,surf_norm:t,dHdxy:n}=r,i=e.dFdx().normalize(),s=e.dFdy().normalize(),a=t,u=s.cross(a),f=a.cross(i),m=i.dot(u).mul(Ol),y=m.sign().mul(n.x.mul(u).add(n.y.mul(f)));return m.abs().mul(t).sub(y).normalize()});class dF extends Rn{static get type(){return"BumpMapNode"}constructor(e,t=null){super("vec3"),this.textureNode=e,this.scaleNode=t}setup(){const e=this.scaleNode!==null?this.scaleNode:1,t=fF({textureNode:this.textureNode,bumpScale:e});return hF({surf_pos:En,surf_norm:Ri,dHdxy:t})}}const ty=xe(dF),s6=new Map;class ge extends Ke{static get type(){return"MaterialNode"}constructor(e){super(),this.scope=e}getCache(e,t){let n=s6.get(e);return n===void 0&&(n=Qs(e,t),s6.set(e,n)),n}getFloat(e){return this.getCache(e,"float")}getColor(e){return this.getCache(e,"color")}getTexture(e){return this.getCache(e==="map"?"map":e+"Map","texture")}setup(e){const t=e.context.material,n=this.scope;let i=null;if(n===ge.COLOR){const s=t.color!==void 0?this.getColor(n):ie();t.map&&t.map.isTexture===!0?i=s.mul(this.getTexture("map")):i=s}else if(n===ge.OPACITY){const s=this.getFloat(n);t.alphaMap&&t.alphaMap.isTexture===!0?i=s.mul(this.getTexture("alpha")):i=s}else if(n===ge.SPECULAR_STRENGTH)t.specularMap&&t.specularMap.isTexture===!0?i=this.getTexture("specular").r:i=W(1);else if(n===ge.SPECULAR_INTENSITY){const s=this.getFloat(n);t.specularIntensityMap&&t.specularIntensityMap.isTexture===!0?i=s.mul(this.getTexture(n).a):i=s}else if(n===ge.SPECULAR_COLOR){const s=this.getColor(n);t.specularColorMap&&t.specularColorMap.isTexture===!0?i=s.mul(this.getTexture(n).rgb):i=s}else if(n===ge.ROUGHNESS){const s=this.getFloat(n);t.roughnessMap&&t.roughnessMap.isTexture===!0?i=s.mul(this.getTexture(n).g):i=s}else if(n===ge.METALNESS){const s=this.getFloat(n);t.metalnessMap&&t.metalnessMap.isTexture===!0?i=s.mul(this.getTexture(n).b):i=s}else if(n===ge.EMISSIVE){const s=this.getFloat("emissiveIntensity"),a=this.getColor(n).mul(s);t.emissiveMap&&t.emissiveMap.isTexture===!0?i=a.mul(this.getTexture(n)):i=a}else if(n===ge.NORMAL)t.normalMap?(i=ad(this.getTexture("normal"),this.getCache("normalScale","vec2")),i.normalMapType=t.normalMapType):t.bumpMap?i=ty(this.getTexture("bump").r,this.getFloat("bumpScale")):i=Ri;else if(n===ge.CLEARCOAT){const s=this.getFloat(n);t.clearcoatMap&&t.clearcoatMap.isTexture===!0?i=s.mul(this.getTexture(n).r):i=s}else if(n===ge.CLEARCOAT_ROUGHNESS){const s=this.getFloat(n);t.clearcoatRoughnessMap&&t.clearcoatRoughnessMap.isTexture===!0?i=s.mul(this.getTexture(n).r):i=s}else if(n===ge.CLEARCOAT_NORMAL)t.clearcoatNormalMap?i=ad(this.getTexture(n),this.getCache(n+"Scale","vec2")):i=Ri;else if(n===ge.SHEEN){const s=this.getColor("sheenColor").mul(this.getFloat("sheen"));t.sheenColorMap&&t.sheenColorMap.isTexture===!0?i=s.mul(this.getTexture("sheenColor").rgb):i=s}else if(n===ge.SHEEN_ROUGHNESS){const s=this.getFloat(n);t.sheenRoughnessMap&&t.sheenRoughnessMap.isTexture===!0?i=s.mul(this.getTexture(n).a):i=s,i=i.clamp(.07,1)}else if(n===ge.ANISOTROPY)if(t.anisotropyMap&&t.anisotropyMap.isTexture===!0){const s=this.getTexture(n);i=Ic(lA.x,lA.y,lA.y.negate(),lA.x).mul(s.rg.mul(2).sub(Ee(1)).normalize().mul(s.b))}else i=lA;else if(n===ge.IRIDESCENCE_THICKNESS){const s=zt("1","float",t.iridescenceThicknessRange);
32if(t.iridescenceThicknessMap){const a=zt("0","float",t.iridescenceThicknessRange);i=s.sub(a).mul(this.getTexture(n).g).add(a)}else i=s}else if(n===ge.TRANSMISSION){const s=this.getFloat(n);t.transmissionMap?i=s.mul(this.getTexture(n).r):i=s}else if(n===ge.THICKNESS){const s=this.getFloat(n);t.thicknessMap?i=s.mul(this.getTexture(n).g):i=s}else if(n===ge.IOR)i=this.getFloat(n);else if(n===ge.LIGHT_MAP)i=this.getTexture(n).rgb.mul(this.getFloat("lightMapIntensity"));else if(n===ge.AO)i=this.getTexture(n).r.sub(1).mul(this.getFloat("aoMapIntensity")).add(1);else{const s=this.getNodeType(e);i=this.getCache(n,s)}return i}}ge.ALPHA_TEST="alphaTest";ge.COLOR="color";ge.OPACITY="opacity";ge.SHININESS="shininess";ge.SPECULAR="specular";ge.SPECULAR_STRENGTH="specularStrength";ge.SPECULAR_INTENSITY="specularIntensity";ge.SPECULAR_COLOR="specularColor";ge.REFLECTIVITY="reflectivity";ge.ROUGHNESS="roughness";ge.METALNESS="metalness";ge.NORMAL="normal";ge.CLEARCOAT="clearcoat";ge.CLEARCOAT_ROUGHNESS="clearcoatRoughness";ge.CLEARCOAT_NORMAL="clearcoatNormal";ge.EMISSIVE="emissive";ge.ROTATION="rotation";ge.SHEEN="sheen";ge.SHEEN_ROUGHNESS="sheenRoughness";ge.ANISOTROPY="anisotropy";ge.IRIDESCENCE="iridescence";
32ge.IRIDESCENCE_IOR="iridescenceIOR";ge.IRIDESCENCE_THICKNESS="iridescenceThickness";ge.IOR="ior";ge.TRANSMISSION="transmission";ge.THICKNESS="thickness";ge.ATTENUATION_DISTANCE="attenuationDistance";ge.ATTENUATION_COLOR="attenuationColor";ge.LINE_SCALE="scale";ge.LINE_DASH_SIZE="dashSize";ge.LINE_GAP_SIZE="gapSize";ge.LINE_WIDTH="linewidth";ge.LINE_DASH_OFFSET="dashOffset";ge.POINT_SIZE="size";ge.DISPERSION="dispersion";ge.LIGHT_MAP="light";ge.AO="ao";const ny=Ue(ge,ge.ALPHA_TEST),ry=Ue(ge,ge.COLOR),iy=Ue(ge,ge.SHININESS),sy=Ue(ge,ge.EMISSIVE),Gp=Ue(ge,ge.OPACITY),oy=Ue(ge,ge.SPECULAR),Ad=Ue(ge,ge.SPECULAR_INTENSITY),ay=Ue(ge,ge.SPECULAR_COLOR),z0=Ue(ge,ge.SPECULAR_STRENGTH),p1=Ue(ge,ge.REFLECTIVITY),Ay=Ue(ge,ge.ROUGHNESS),ly=Ue(ge,ge.METALNESS),uy=Ue(ge,ge.NORMAL),cy=Ue(ge,ge.CLEARCOAT),fy=Ue(ge,ge.CLEARCOAT_ROUGHNESS),hy=Ue(ge,ge.CLEARCOAT_NORMAL),dy=Ue(ge,ge.ROTATION),py=Ue(ge,ge.SHEEN),my=Ue(ge,ge.SHEEN_ROUGHNESS),gy=Ue(ge,ge.ANISOTROPY),yy=Ue(ge,ge.IRIDESCENCE),vy=Ue(ge,ge.IRIDESCENCE_IOR),_y=Ue(ge,ge.IRIDESCENCE_THICKNESS),xy=Ue(ge,ge.TRANSMISSION),by=Ue(ge,ge.THICKNESS),Ty=Ue(ge,ge.IOR),wy=Ue(ge,ge.ATTENUATION_DISTANCE),Sy=Ue(ge,ge.ATTENUATION_COLOR),My=Ue(ge,ge.LINE_SCALE),Ey=Ue(ge,ge.LINE_DASH_SIZE),Ny=Ue(ge,ge.LINE_GAP_SIZE),pF=Ue(ge,ge.LINE_WIDTH),Ry=Ue(ge,ge.LINE_DASH_OFFSET),Cy=Ue(ge,ge.POINT_SIZE),Py=Ue(ge,ge.DISPERSION),Vp=Ue(ge,ge.LIGHT_MAP),By=Ue(ge,ge.AO),lA=Ye(new Wt).onReference(function(r){return r.material}).onRenderUpdate(function({material:r}){this.value.set(r.anisotropy*Math.cos(r.anisotropyRotation),r.anisotropy*Math.sin(r.anisotropyRotation))}),zp=le(r=>r.context.setupModelViewProjection(),"vec4").once()().toVarying("v_modelViewProjection");class cn extends Ke{static get type(){return"IndexNode"}constructor(e){super("uint"),this.scope=e,this.isIndexNode=!0}generate(e){const t=this.getNodeType(e),n=this.scope;let i;if(n===cn.VERTEX)i=e.getVertexIndex();else if(n===cn.INSTANCE)i=e.getInstanceIndex();else if(n===cn.DRAW)i=e.getDrawIndex();else if(n===cn.INVOCATION_LOCAL)i=e.getInvocationLocalIndex();else if(n===cn.INVOCATION_SUBGROUP)i=e.getInvocationSubgroupIndex();else if(n===cn.SUBGROUP)i=e.getSubgroupIndex();else throw new Error("THREE.IndexNode: Unknown scope: "+n);let s;return e.shaderStage==="vertex"||e.shaderStage==="compute"?s=i:s=Er(this).build(e,t),s}}cn.VERTEX="vertex";cn.INSTANCE="instance";cn.SUBGROUP="subgroup";cn.INVOCATION_LOCAL="invocationLocal";cn.INVOCATION_SUBGROUP="invocationSubgroup";cn.DRAW="draw";const Fy=Ue(cn,cn.VERTEX),jl=Ue(cn,cn.INSTANCE),mF=Ue(cn,cn.SUBGROUP),gF=Ue(cn,cn.INVOCATION_SUBGROUP),yF=Ue(cn,cn.INVOCATION_LOCAL),Dy=Ue(cn,cn.DRAW);class Ly extends Ke{static get type(){return"InstanceNode"}constructor(e,t,n){super("void"),this.count=e,this.instanceMatrix=t,this.instanceColor=n,this.instanceMatrixNode=null,this.instanceColorNode=null,this.updateType=lt.FRAME,this.buffer=null,this.bufferColor=null}setup(e){const{count:t,instanceMatrix:n,instanceColor:i}=this;let{instanceMatrixNode:s,instanceColorNode:a}=this;if(s===null){if(t<=1e3)s=kl(n.array,"mat4",Math.max(t,1)).element(jl);else{const f=new w1(n.array,16,1);this.buffer=f;const m=n.usage===cA?sd:mc,y=[m(f,"vec4",16,0),m(f,"vec4",16,4),m(f,"vec4",16,8),m(f,"vec4",16,12)];s=Ta(...y)}this.instanceMatrixNode=s}if(i&&a===null){const f=new Tl(i.array,3),m=i.usage===cA?sd:mc;this.bufferColor=f,a=ie(m(f,"vec3",3,0)),this.instanceColorNode=a}const u=s.mul(yn).xyz;if(yn.assign(u),e.hasGeometryAttribute("normal")){const f=j9(Zr,s);Zr.assign(f)}this.instanceColorNode!==null&&dl("vec3","vInstanceColor").assign(this.instanceColorNode)}update(){this.instanceMatrix.usage!==cA&&this.buffer!==null&&this.instanceMatrix.version!==this.buffer.version&&(this.buffer.version=this.instanceMatrix.version),this.instanceColor&&this.instanceColor.usage!==cA&&this.bufferColor!==null&&this.instanceColor.version!==this.bufferColor.version&&(this.bufferColor.version=this.instanceColor.version)}}const vF=xe(Ly);class _F extends Ly{static get type(){return"InstancedMeshNode"}constructor(e){const{count:t,instanceMatrix:n,instanceColor:i}=e;super(t,n,i),this.instancedMesh=e}}const qy=xe(_F);class xF extends Ke{static get type(){return"BatchNode"}constructor(e){super("void"),this.batchMesh=e,this.batchingIdNode=null}setup(e){this.batchingIdNode===null&&(e.getDrawIndex()===null?this.batchingIdNode=jl:this.batchingIdNode=Dy);const n=le(([S])=>{const E=te(ko(Tn(this.batchMesh._indirectTexture),0)),R=te(S).modInt(E),P=te(S).div(E);return Tn(this.batchMesh._indirectTexture,Qn(R,P)).x}).setLayout({name:"getIndirectIndex",type:"uint",inputs:[{name:"id",type:"int"}]})(te(this.batchingIdNode)),i=this.batchMesh._matricesTexture,s=ko(Tn(i),0),a=W(n).mul(4).toInt().toVar(),u=a.modInt(s),f=a.div(te(s)),m=Ta(Tn(i,Qn(u,f)),Tn(i,Qn(u.add(1),f)),Tn(i,Qn(u.add(2),f)),Tn(i,Qn(u.add(3),f))),y=this.batchMesh._colorsTexture;if(y!==null){const E=le(([R])=>{const P=ko(Tn(y),0).x,L=R,D=L.modInt(P),O=L.div(P);return Tn(y,Qn(D,O)).rgb}
32).setLayout({name:"getBatchingColor",type:"vec3",inputs:[{name:"id",type:"int"}]})(n);dl("vec3","vBatchColor").assign(E)}const _=Sr(m);yn.assign(m.mul(yn));const b=Zr.div(ie(_[0].dot(_[0]),_[1].dot(_[1]),_[2].dot(_[2]))),w=_.mul(b).xyz;Zr.assign(w),e.hasGeometryAttribute("tangent")&&Gl.mulAssign(_)}}const Iy=xe(xF),o6=new WeakMap;class ky extends Ke{static get type(){return"SkinningNode"}constructor(e,t=!1){super("void"),this.skinnedMesh=e,this.useReference=t,this.updateType=lt.OBJECT,this.skinIndexNode=Ss("skinIndex","uvec4"),this.skinWeightNode=Ss("skinWeight","vec4");let n,i,s;t?(n=zt("bindMatrix","mat4"),i=zt("bindMatrixInverse","mat4"),s=od("skeleton.boneMatrices","mat4",e.skeleton.bones.length)):(n=Ye(e.bindMatrix,"mat4"),i=Ye(e.bindMatrixInverse,"mat4"),s=kl(e.skeleton.boneMatrices,"mat4",e.skeleton.bones.length)),this.bindMatrixNode=n,this.bindMatrixInverseNode=i,this.boneMatricesNode=s,this.previousBoneMatricesNode=null}getSkinnedPosition(e=this.boneMatricesNode,t=yn){const{skinIndexNode:n,skinWeightNode:i,bindMatrixNode:s,bindMatrixInverseNode:a}=this,u=e.element(n.x),f=e.element(n.y),m=e.element(n.z),y=e.element(n.w),_=s.mul(t),b=Dn(u.mul(i.x).mul(_),f.mul(i.y).mul(_),m.mul(i.z).mul(_),y.mul(i.w).mul(_));return a.mul(b).xyz}getSkinnedNormal(e=this.boneMatricesNode,t=Zr){const{skinIndexNode:n,skinWeightNode:i,bindMatrixNode:s,bindMatrixInverseNode:a}=this,u=e.element(n.x),f=e.element(n.y),m=e.element(n.z),y=e.element(n.w);let _=Dn(i.x.mul(u),i.y.mul(f),i.z.mul(m),i.w.mul(y));return _=a.mul(_).mul(s),_.transformDirection(t).xyz}getPreviousSkinnedPosition(e){const t=e.object;return this.previousBoneMatricesNode===null&&(t.skeleton.previousBoneMatrices=new Float32Array(t.skeleton.boneMatrices),this.previousBoneMatricesNode=od("skeleton.previousBoneMatrices","mat4",t.skeleton.bones.length)),this.getSkinnedPosition(this.previousBoneMatricesNode,gc)}needsPreviousBoneMatrices(e){const t=e.renderer.getMRT();return t&&t.has("velocity")||Kg(e.object).useVelocity===!0}setup(e){this.needsPreviousBoneMatrices(e)&&gc.assign(this.getPreviousSkinnedPosition(e));const t=this.getSkinnedPosition();if(yn.assign(t),e.hasGeometryAttribute("normal")){const n=this.getSkinnedNormal();Zr.assign(n),e.hasGeometryAttribute("tangent")&&Gl.assign(n)}}generate(e,t){if(t!=="void")return yn.build(e,t)}update(e){const n=(this.useReference?e.object:this.skinnedMesh).skeleton;o6.get(n)!==e.frameId&&(o6.set(n,e.frameId),this.previousBoneMatricesNode!==null&&n.previousBoneMatrices.set(n.boneMatrices),n.update())}}const bF=r=>Te(new ky(r)),Uy=r=>Te(new ky(r,!0));class TF extends Ke{static get type(){return"LoopNode"}constructor(e=[]){super(),this.params=e}getVarName(e){return String.fromCharCode("i".charCodeAt(0)+e)}getProperties(e){const t=e.getNodeProperties(this);if(t.stackNode!==void 0)return t;const n={};for(let s=0,a=this.params.length-1;s<a;s++){const u=this.params[s],f=u.isNode!==!0&&u.name||this.getVarName(s),m=u.isNode!==!0&&u.type||"int";n[f]=Vo(f,m)}const i=e.addStack();return t.returnsNode=this.params[this.params.length-1](n,i,e),t.stackNode=i,e.removeStack(),t}getNodeType(e){const{returnsNode:t}=this.getProperties(e);return t?t.getNodeType(e):"void"}setup(e){this.getProperties(e)}generate(e){const t=this.getProperties(e),n=this.params,i=t.stackNode;for(let u=0,f=n.length-1;u<f;u++){const m=n[u];let y=null,_=null,b=null,w=null,S=null,E=null;m.isNode?(w="int",b=this.getVarName(u),y="0",_=m.build(e,w),S="<"):(w=m.type||"int",b=m.name||this.getVarName(u),y=m.start,_=m.end,S=m.condition,E=m.update,typeof y=="number"?y=e.generateConst(w,y):y&&y.isNode&&(y=y.build(e,w)),typeof _=="number"?_=e.generateConst(w,_):_&&_.isNode&&(_=_.build(e,w)),y!==void 0&&_===void 0?(y=y+" - 1",_="0",S=">="):_!==void 0&&y===void 0&&(y="0",S="<"),S===void 0&&(Number(y)>Number(_)?S=">=":S="<"));const R={start:y,end:_,condition:S},P=R.start,L=R.end;let D="",O="",G="";E||(w==="int"||w==="uint"?S.includes("<")?E="++":E="--":S.includes("<")?E="+= 1.":E="-= 1."),D+=e.getVar(w,b)+" = "+P,O+=b+" "+S+" "+L,G+=b+" "+E;const U=`for ( ${D}; ${O}; ${G} )`;e.addFlowCode((u===0?` 33`:"")+e.tab+U+` { 34 35`).addFlowTab()}const s=i.build(e,"void"),a=t.returnsNode?t.returnsNode.build(e):"";e.removeFlowTab().addFlowCode(` 36`+e.tab+s);for(let u=0,f=this.params.length-1;u<f;u++)e.addFlowCode((u===0?"":e.tab)+`} 37 38`).removeFlowTab();return e.addFlowTab(),a}}const It=(...r)=>Te(new TF(ba(r,"int"))).append(),wF=()=>Vo("continue").append(),Oy=()=>Vo("break").append(),SF=(...r)=>(console.warn("TSL.LoopNode: loop() has been renamed to Loop()."),It(...r)),ef=new WeakMap,ii=new Qt,a6=le(({bufferMap:r,influence:e,stride:t,width:n,depth:i,offset:s})=>{const a=te(Fy).mul(t).add(s),u=a.div(n),f=a.sub(u.mul(n));return Tn(r,Qn(f,u)).depth(i).mul(e)}
38);function MF(r){const e=r.morphAttributes.position!==void 0,t=r.morphAttributes.normal!==void 0,n=r.morphAttributes.color!==void 0,i=r.morphAttributes.position||r.morphAttributes.normal||r.morphAttributes.color,s=i!==void 0?i.length:0;let a=ef.get(r);if(a===void 0||a.count!==s){let P=function(){E.dispose(),ef.delete(r),r.removeEventListener("dispose",P)};a!==void 0&&a.texture.dispose();const u=r.morphAttributes.position||[],f=r.morphAttributes.normal||[],m=r.morphAttributes.color||[];let y=0;e===!0&&(y=1),t===!0&&(y=2),n===!0&&(y=3);let _=r.attributes.position.count*y,b=1;const w=4096;_>w&&(b=Math.ceil(_/w),_=w);const S=new Float32Array(_*b*4*s),E=new ZT(S,_,b,s);E.type=wi,E.needsUpdate=!0;const R=y*4;for(let L=0;L<s;L++){const D=u[L],O=f[L],G=m[L],U=_*b*4*L;for(let j=0;j<D.count;j++){const V=j*R;e===!0&&(ii.fromBufferAttribute(D,j),S[U+V+0]=ii.x,S[U+V+1]=ii.y,S[U+V+2]=ii.z,S[U+V+3]=0),t===!0&&(ii.fromBufferAttribute(O,j),S[U+V+4]=ii.x,S[U+V+5]=ii.y,S[U+V+6]=ii.z,S[U+V+7]=0),n===!0&&(ii.fromBufferAttribute(G,j),S[U+V+8]=ii.x,S[U+V+9]=ii.y,S[U+V+10]=ii.z,S[U+V+11]=G.itemSize===4?ii.w:1)}}a={count:s,texture:E,stride:y,size:new Wt(_,b)},ef.set(r,a),r.addEventListener("dispose",P)}return a}class EF extends Ke{static get type(){return"MorphNode"}constructor(e){super("void"),this.mesh=e,this.morphBaseInfluence=Ye(1),this.updateType=lt.OBJECT}setup(e){const{geometry:t}=e,n=t.morphAttributes.position!==void 0,i=t.hasAttribute("normal")&&t.morphAttributes.normal!==void 0,s=t.morphAttributes.position||t.morphAttributes.normal||t.morphAttributes.color,a=s!==void 0?s.length:0,{texture:u,stride:f,size:m}=MF(t);n===!0&&yn.mulAssign(this.morphBaseInfluence),i===!0&&Zr.mulAssign(this.morphBaseInfluence);const y=te(m.width);It(a,({i:_})=>{const b=W(0).toVar();this.mesh.count>1&&this.mesh.morphTexture!==null&&this.mesh.morphTexture!==void 0?b.assign(Tn(this.mesh.morphTexture,Qn(te(_).add(1),te(jl))).r):b.assign(zt("morphTargetInfluences","float").element(_).toVar()),n===!0&&yn.addAssign(a6({bufferMap:u,influence:b,stride:f,width:y,depth:_,offset:te(0)})),i===!0&&Zr.addAssign(a6({bufferMap:u,influence:b,stride:f,width:y,depth:_,offset:te(1)}))})}update(){const e=this.morphBaseInfluence;this.mesh.geometry.morphTargetsRelative?e.value=1:e.value=1-this.mesh.morphTargetInfluences.reduce((t,n)=>t+n,0)}}const Gy=xe(EF);class jA extends Ke{static get type(){return"LightingNode"}constructor(){super("vec3"),this.isLightingNode=!0}}class NF extends jA{static get type(){return"AONode"}constructor(e=null){super(),this.aoNode=e}setup(e){e.context.ambientOcclusion.mulAssign(this.aoNode)}}class RF extends f9{static get type(){return"LightingContextNode"}constructor(e,t=null,n=null,i=null){super(e),this.lightingModel=t,this.backdropNode=n,this.backdropAlphaNode=i,this._value=null}getContext(){const{backdropNode:e,backdropAlphaNode:t}=this,n=ie().toVar("directDiffuse"),i=ie().toVar("directSpecular"),s=ie().toVar("indirectDiffuse"),a=ie().toVar("indirectSpecular"),u={directDiffuse:n,directSpecular:i,indirectDiffuse:s,indirectSpecular:a};return{radiance:ie().toVar("radiance"),irradiance:ie().toVar("irradiance"),iblIrradiance:ie().toVar("iblIrradiance"),ambientOcclusion:W(1).toVar("ambientOcclusion"),reflectedLight:u,backdrop:e,backdropAlpha:t}}setup(e){return this.value=this._value||(this._value=this.getContext()),this.value.lightingModel=this.lightingModel||e.context.lightingModel,super.setup(e)}}const Vy=xe(RF);class CF extends jA{static get type(){return"IrradianceNode"}constructor(e){super(),this.node=e}setup(e){e.context.irradiance.addAssign(this.node)}}let c0,f0;class Gn extends Ke{static get type(){return"ScreenNode"}constructor(e){super(),this.scope=e,this.isViewportNode=!0}getNodeType(){return this.scope===Gn.VIEWPORT?"vec4":"vec2"}getUpdateType(){let e=lt.NONE;return(this.scope===Gn.SIZE||this.scope===Gn.VIEWPORT)&&(e=lt.RENDER),this.updateType=e,e}update({renderer:e}){const t=e.getRenderTarget();this.scope===Gn.VIEWPORT?t!==null?f0.copy(t.viewport):(e.getViewport(f0),f0.multiplyScalar(e.getPixelRatio())):t!==null?(c0.width=t.width,c0.height=t.height):e.getDrawingBufferSize(c0)}setup(){const e=this.scope;let t=null;return e===Gn.SIZE?t=Ye(c0||(c0=new Wt)):e===Gn.VIEWPORT?t=Ye(f0||(f0=new Qt)):t=Ee($l.div(_l)),t}generate(e){if(this.scope===Gn.COORDINATE){let t=e.getFragCoord();if(e.isFlipY()){const n=e.getNodeProperties(_l).outputNode.build(e);t=`${e.getType("vec2")}( ${t}.x, ${n}.y - ${t}.y )`}return t}return super.generate(e)}}Gn.COORDINATE="coordinate";Gn.VIEWPORT="viewport";Gn.SIZE="size";Gn.UV="uv";const Ns=Ue(Gn,Gn.UV),_l=Ue(Gn,Gn.SIZE),$l=Ue(Gn,Gn.COORDINATE),MA=Ue(Gn,Gn.VIEWPORT),zy=MA.zw,jy=$l.sub(MA.xy),PF=jy.div(zy),BF=le(()=>(console.warn('TSL.ViewportNode: "viewportResolution" is deprecated. Use "screenSize" instead.'),_l),"vec2").once()(),FF=le(()=>(console.warn('TSL.ViewportNode: "viewportTopLeft" is deprecated. Use "screenUV" instead.'),Ns),"vec2").once()(),DF=le(()=>(console.warn('TSL.ViewportNode: "viewportBottomLeft" is deprecated. Use "screenUV.flipY()" instead.'),Ns.flipY()),"vec2").once()(),h0=new Wt;class Kc extends Ms{static get type(){return"ViewportTextureNode"}constructor(e=Ns,t=null,n=null){n===null&&(n=new d7,n.minFilter=_a),super(n,e,t),this.generateMipmaps=!1,this.isOutputTextureNode=!0,this.updateBeforeType=lt.FRAME}updateBefore(e){const t=e.renderer;t.getDrawingBufferSize(h0);const n=this.value;(n.image.width!==h0.width||n.image.height!==h0.height)&&(n.image.width=h0.width,n.image.height=h0.height,n.needsUpdate=!0);const i=n.generateMipmaps;n.generateMipmaps=this.generateMipmaps,t.copyFramebufferToTexture(n),n.generateMipmaps=i}clone(){const e=new this.constructor(this.uvNode,this.levelNode,this.value);return e.generateMipmaps=this.generateMipmaps,e}}
38const LF=xe(Kc),jp=xe(Kc,null,null,{generateMipmaps:!0});let tf=null;class qF extends Kc{static get type(){return"ViewportDepthTextureNode"}constructor(e=Ns,t=null){tf===null&&(tf=new $o),super(e,t,tf)}}const $p=xe(qF);class Qr extends Ke{static get type(){return"ViewportDepthNode"}constructor(e,t=null){super("float"),this.scope=e,this.valueNode=t,this.isViewportDepthNode=!0}generate(e){const{scope:t}=this;return t===Qr.DEPTH_BASE?e.getFragDepth():super.generate(e)}setup({camera:e}){const{scope:t}=this,n=this.valueNode;let i=null;if(t===Qr.DEPTH_BASE)n!==null&&(i=Hy().assign(n));else if(t===Qr.DEPTH)e.isPerspectiveCamera?i=$y(En.z,Co,Po):i=EA(En.z,Co,Po);else if(t===Qr.LINEAR_DEPTH)if(n!==null)if(e.isPerspectiveCamera){const s=Hp(n,Co,Po);i=EA(s,Co,Po)}else i=n;else i=EA(En.z,Co,Po);return i}}Qr.DEPTH_BASE="depthBase";Qr.DEPTH="depth";Qr.LINEAR_DEPTH="linearDepth";const EA=(r,e,t)=>r.add(e).div(e.sub(t)),IF=(r,e,t)=>e.sub(t).mul(r).sub(e),$y=(r,e,t)=>e.add(r).mul(t).div(t.sub(e).mul(r)),Hp=(r,e,t)=>e.mul(t).div(t.sub(e).mul(r).sub(t)),Wp=(r,e,t)=>{e=e.max(1e-6).toVar();const n=vs(r.negate().div(e)),i=vs(t.div(e));return n.div(i)},kF=(r,e,t)=>{const n=r.mul(Gc(t.div(e)));return W(Math.E).pow(n).mul(e).negate()},Hy=xe(Qr,Qr.DEPTH_BASE),Qp=Ue(Qr,Qr.DEPTH),yc=xe(Qr,Qr.LINEAR_DEPTH),UF=yc($p());Qp.assign=r=>Hy(r);class OF extends Ke{constructor(e){super("float"),this.name=e,this.isBuiltinNode=!0}generate(){return this.name}}const GF=xe(OF);class Ei extends Ke{static get type(){return"ClippingNode"}constructor(e=Ei.DEFAULT){super(),this.scope=e}setup(e){super.setup(e);const t=e.clippingContext,{intersectionPlanes:n,unionPlanes:i}=t;return this.hardwareClipping=e.material.hardwareClipping,this.scope===Ei.ALPHA_TO_COVERAGE?this.setupAlphaToCoverage(n,i):this.scope===Ei.HARDWARE?this.setupHardwareClipping(i,e):this.setupDefault(n,i)}setupAlphaToCoverage(e,t){return le(()=>{const n=W().toVar("distanceToPlane"),i=W().toVar("distanceToGradient"),s=W(1).toVar("clipOpacity"),a=t.length;if(this.hardwareClipping===!1&&a>0){const f=zi(t);It(a,({i:m})=>{const y=f.element(m);n.assign(En.dot(y.xyz).negate().add(y.w)),i.assign(n.fwidth().div(2)),s.mulAssign(ws(i.negate(),i,n))})}const u=e.length;if(u>0){const f=zi(e),m=W(1).toVar("intersectionClipOpacity");It(u,({i:y})=>{const _=f.element(y);n.assign(En.dot(_.xyz).negate().add(_.w)),i.assign(n.fwidth().div(2)),m.mulAssign(ws(i.negate(),i,n).oneMinus())}),s.mulAssign(m.oneMinus())}Ft.a.mulAssign(s),Ft.a.equal(0).discard()})()}setupDefault(e,t){return le(()=>{const n=t.length;if(this.hardwareClipping===!1&&n>0){const s=zi(t);It(n,({i:a})=>{const u=s.element(a);En.dot(u.xyz).greaterThan(u.w).discard()})}const i=e.length;if(i>0){const s=zi(e),a=oo(!0).toVar("clipped");It(i,({i:u})=>{const f=s.element(u);a.assign(En.dot(f.xyz).greaterThan(f.w).and(a))}),a.discard()}})()}setupHardwareClipping(e,t){const n=e.length;return t.enableHardwareClipping(n),le(()=>{const i=zi(e),s=GF(t.getClipDistance());It(n,({i:a})=>{const u=i.element(a),f=En.dot(u.xyz).sub(u.w).negate();
38s.element(a).assign(f)})})()}}Ei.ALPHA_TO_COVERAGE="alphaToCoverage";Ei.DEFAULT="default";Ei.HARDWARE="hardware";const VF=()=>Te(new Ei),zF=()=>Te(new Ei(Ei.ALPHA_TO_COVERAGE)),jF=()=>Te(new Ei(Ei.HARDWARE)),$F=.05,A6=le(([r])=>lo(ut(1e4,ci(ut(17,r.x).add(ut(.1,r.y)))).mul(Dn(.1,rn(ci(ut(13,r.y).add(r.x))))))),l6=le(([r])=>A6(Ee(A6(r.xy),r.z))),HF=le(([r])=>{const e=Nn(Zs(Sp(r.xyz)),Zs(Mp(r.xyz))),t=W(1).div(W($F).mul(e)).toVar("pixScale"),n=Ee(IA(_s(vs(t))),IA(Vc(vs(t)))),i=Ee(l6(_s(n.x.mul(r.xyz))),l6(_s(n.y.mul(r.xyz)))),s=lo(vs(t)),a=Dn(ut(s.oneMinus(),i.x),ut(s,i.y)),u=Kr(s,s.oneMinus()),f=ie(a.mul(a).div(ut(2,u).mul(Et(1,u))),a.sub(ut(.5,u)).div(Et(1,u)),Et(1,Et(1,a).mul(Et(1,a)).div(ut(2,u).mul(Et(1,u))))),m=a.lessThan(u.oneMinus()).select(a.lessThan(u).select(f.x,f.y),f.z);return Ts(m,1e-6,1)}).setLayout({name:"getAlphaHashThreshold",type:"float",inputs:[{name:"position",type:"vec3"}]});class Ln extends d4{static get type(){return"NodeMaterial"}get type(){return this.constructor.type}set type(e){}constructor(){super(),this.isNodeMaterial=!0,this.fog=!0,this.lights=!1,this.hardwareClipping=!1,this.lightsNode=null,this.envNode=null,this.aoNode=null,this.colorNode=null,this.normalNode=null,this.opacityNode=null,this.backdropNode=null,this.backdropAlphaNode=null,this.alphaTestNode=null,this.positionNode=null,this.geometryNode=null,this.depthNode=null,this.shadowPositionNode=null,this.receivedShadowNode=null,this.castShadowNode=null,this.outputNode=null,this.mrtNode=null,this.fragmentNode=null,this.vertexNode=null}customProgramCacheKey(){return this.type+Qg(this)}build(e){this.setup(e)}setupObserver(e){return new zP(e)}setup(e){e.context.setupNormal=()=>this.setupNormal(e),e.context.setupPositionView=()=>this.setupPositionView(e),e.context.setupModelViewProjection=()=>this.setupModelViewProjection(e);const t=e.renderer,n=t.getRenderTarget();e.addStack();const i=this.vertexNode||this.setupVertex(e);e.stack.outputNode=i,this.setupHardwareClipping(e),this.geometryNode!==null&&(e.stack.outputNode=e.stack.outputNode.bypass(this.geometryNode)),e.addFlow("vertex",e.removeStack()),e.addStack();let s;const a=this.setupClipping(e);if((this.depthWrite===!0||this.depthTest===!0)&&(n!==null?n.depthBuffer===!0&&this.setupDepth(e):t.depth===!0&&this.setupDepth(e)),this.fragmentNode===null){this.setupDiffuseColor(e),this.setupVariants(e);const u=this.setupLighting(e);a!==null&&e.stack.add(a);const f=We(u,Ft.a).max(0);if(s=this.setupOutput(e,f),yl.assign(s),this.outputNode!==null&&(s=this.outputNode),n!==null){const m=t.getMRT(),y=this.mrtNode;m!==null?(s=m,y!==null&&(s=m.merge(y))):y!==null&&(s=y)}}else{let u=this.fragmentNode;u.isOutputStructNode!==!0&&(u=We(u)),s=this.setupOutput(e,u)}e.stack.outputNode=s,e.addFlow("fragment",e.removeStack()),e.observer=this.setupObserver(e)}setupClipping(e){if(e.clippingContext===null)return null;const{unionPlanes:t,intersectionPlanes:n}=e.clippingContext;let i=null;if(t.length>0||n.length>0){const s=e.renderer.samples;this.alphaToCoverage&&s>1?i=zF():e.stack.add(VF())}return i}setupHardwareClipping(e){if(this.hardwareClipping=!1,e.clippingContext===null)return;const t=e.clippingContext.unionPlanes.length;t>0&&t<=8&&e.isAvailable("clipDistance")&&(e.stack.add(jF()),this.hardwareClipping=!0)}setupDepth(e){const{renderer:t,camera:n}=e;let i=this.depthNode;if(i===null){const s=t.getMRT();s&&s.has("depth")?i=s.get("depth"):t.logarithmicDepthBuffer===!0&&(n.isPerspectiveCamera?i=Wp(En.z,Co,Po):i=EA(En.z,Co,Po))}i!==null&&Qp.assign(i).append()}setupPositionView(){return Da.mul(yn).xyz}setupModelViewProjection(){return Fa.mul(En)}setupVertex(e){return e.addStack(),this.setupPosition(e),e.context.vertex=e.removeStack(),zp}setupPosition(e){const{object:t,geometry:n}=e;if((n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color)&&Gy(t).append(),t.isSkinnedMesh===!0&&Uy(t).append(),this.displacementMap){const i=Qs("displacementMap","texture"),s=Qs("displacementScale","float"),a=Qs("displacementBias","float");yn.addAssign(Zr.normalize().mul(i.x.mul(s).add(a)))}return t.isBatchedMesh&&Iy(t).append(),t.isInstancedMesh&&t.instanceMatrix&&t.instanceMatrix.isInstancedBufferAttribute===!0&&qy(t).append(),this.positionNode!==null&&yn.assign(this.positionNode.context({isPositionNodeInput:!0})),yn}setupDiffuseColor({object:e,geometry:t}){let n=this.colorNode?We(this.colorNode):ry;this.vertexColors===!0&&t.hasAttribute("color")&&(n=We(n.xyz.mul(Ss("color","vec3")),n.a)),e.instanceColor&&(n=dl("vec3","vInstanceColor").mul(n)),e.isBatchedMesh&&e._colorsTexture&&(n=dl("vec3","vBatchColor").mul(n)),Ft.assign(n);const i=this.opacityNode?W(this.opacityNode):Gp;if(Ft.a.assign(Ft.a.mul(i)),this.alphaTestNode!==null||this.alphaTest>0){const s=this.alphaTestNode!==null?W(this.alphaTestNode):ny;Ft.a.lessThanEqual(s).discard()}this.alphaHash===!0&&Ft.a.lessThan(HF(yn)).discard(),this.transparent===!1&&this.blending===qo&&this.alphaToCoverage===!1&&Ft.a.assign(1)}setupVariants(){}setupOutgoingLight(){return this.lights===!0?ie(0):Ft.rgb}setupNormal(){return this.normalNode?ie(this.normalNode):uy}setupEnvironment(){let e=null;return this.envNode?e=this.envNode:this.envMap&&(e=this.envMap.isCubeTexture?Qs("envMap","cubeTexture"):Qs("envMap","texture")),e}setupLightMap(e){let t=null;return e.material.lightMap&&(t=new CF(Vp)),t}setupLights(e){const t=[],n=this.setupEnvironment(e);n&&n.isLightingNode&&t.push(n);const i=this.setupLightMap(e);if(i&&i.isLightingNode&&t.push(i),this.aoNode!==null||e.material.aoMap){const a=this.aoNode!==null?this.aoNode:By;t.push(new NF(a))}let s=this.lightsNode||e.lightsNode;return t.length>0&&(s=e.renderer.lighting.createNode([...s.getLights(),...t])),s}setupLightingModel(){}setupLighting(e){const{material:t}=e,{backdropNode:n,backdropAlphaNode:i,emissiveNode:s}=this,u=this.lights===!0||this.lightsNode!==null?this.setupLights(e):null;let f=this.setupOutgoingLight(e);if(u&&u.getScope().hasLights){const m=this.setupLightingModel(e);f=Vy(u,m,n,i)}else n!==null&&(f=ie(i!==null?qt(f,n,i):n));return(s&&s.isNode===!0||t.emissive&&t.emissive.isColor===!0)&&(rd.assign(ie(s||sy)),f=f.add(rd)),f}setupOutput(e,t){if(this.fog===!0){const n=e.fogNode;n&&(yl.assign(t),t=We(n))}return t}setDefaultValues(e){for(const n in e){const i=e[n];this[n]===void 0&&(this[n]=i,i&&i.clone&&(this[n]=i.clone()))}const t=Object.getOwnPropertyDescriptors(e.constructor.prototype);for(const n in t)Object.getOwnPropertyDescriptor(this.constructor.prototype,n)===void 0&&t[n].get!==void 0&&Object.defineProperty(this.constructor.prototype,n,t[n])}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{},nodes:{}});const n=d4.prototype.toJSON.call(this,e),i=lc(this);n.inputNodes={};for(const{property:a,childNode:u}of i)n.inputNodes[a]=u.toJSON(e).uuid;function s(a){const u=[];for(const f in a){const m=a[f];delete m.metadata,u.push(m)}return u}if(t){const a=s(e.textures),u=s(e.images),f=s(e.nodes);a.length>0&&(n.textures=a),u.length>0&&(n.images=u),f.length>0&&(n.nodes=f)}return n}copy(e){return this.lightsNode=e.lightsNode,this.envNode=e.envNode,this.colorNode=e.colorNode,this.normalNode=e.normalNode,this.opacityNode=e.opacityNode,this.backdropNode=e.backdropNode,this.backdropAlphaNode=e.backdropAlphaNode,this.alphaTestNode=e.alphaTestNode,this.positionNode=e.positionNode,this.geometryNode=e.geometryNode,this.depthNode=e.depthNode,this.shadowPositionNode=e.shadowPositionNode,this.receivedShadowNode=e.receivedShadowNode,this.castShadowNode=e.castShadowNode,this.outputNode=e.outputNode,this.mrtNode=e.mrtNode,this.fragmentNode=e.fragmentNode,this.vertexNode=e.vertexNode,super.copy(e)}}const WF=new Nc;class QF extends Ln{static get type(){return"LineBasicNodeMaterial"}constructor(e){super(),this.isLineBasicNodeMaterial=!0,this.setDefaultValues(WF),this.setValues(e)}}const YF=new pT;class XF extends Ln{static get type(){return"LineDashedNodeMaterial"}constructor(e){super(),this.isLineDashedNodeMaterial=!0,this.setDefaultValues(YF),this.dashOffset=0,this.offsetNode=null,this.dashScaleNode=null,this.dashSizeNode=null,this.gapSizeNode=null,this.setValues(e)}setupVariants(){const e=this.offsetNode?W(this.offsetNode):Ry,t=this.dashScaleNode?W(this.dashScaleNode):My,n=this.dashSizeNode?W(this.dashSizeNode):Ey,i=this.gapSizeNode?W(this.gapSizeNode):Ny;f1.assign(n),id.assign(i);const s=Er(Ss("lineDistance").mul(t));(e?s.add(e):s).mod(f1.add(id)).greaterThan(f1).discard()}}let nf=null;class KF extends Kc{static get type(){return"ViewportSharedTextureNode"}constructor(e=Ns,t=null){nf===null&&(nf=new d7),super(e,t,nf)}updateReference(){return this}}const ZF=xe(KF),Wy=r=>Te(r).mul(.5).add(.5),JF=r=>Te(r).mul(2).sub(1),eD=new mT;class tD extends Ln{static get type(){return"MeshNormalNodeMaterial"}constructor(e){super(),this.isMeshNormalNodeMaterial=!0,this.setDefaultValues(eD),this.setValues(e)}setupDiffuseColor(){const e=this.opacityNode?W(this.opacityNode):Gp;Ft.assign(We(Wy(Mn),e))}}class nD extends Rn{static get type(){return"EquirectUVNode"}constructor(e=kp){super("vec2"),this.dirNode=e}setup(){const e=this.dirNode,t=e.z.atan(e.x).mul(1/(Math.PI*2)).add(.5),n=e.y.clamp(-1,1).asin().mul(1/Math.PI).add(.5);return Ee(t,n)}}const Yp=xe(nD);class Qy extends QT{constructor(e=1,t={}){super(e,t),this.isCubeRenderTarget=!0}fromEquirectangularTexture(e,t){const n=t.minFilter,i=t.generateMipmaps;t.generateMipmaps=!0,this.texture.type=t.type,this.texture.colorSpace
38=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const s=new qd(5,5,5),a=Yp(kp),u=new Ln;u.colorNode=xt(t,a,0),u.side=Xi,u.blending=Y0;const f=new zn(s,u),m=new Sc;m.add(f),t.minFilter===_a&&(t.minFilter=eo);const y=new YT(1,10,this),_=e.getMRT();return e.setMRT(null),y.update(e,m),e.setMRT(_),t.minFilter=n,t.currentGenerateMipmaps=i,f.geometry.dispose(),f.material.dispose(),this}}const j0=new WeakMap;class rD extends Rn{static get type(){return"CubeMapNode"}constructor(e){super("vec3"),this.envNode=e,this._cubeTexture=null,this._cubeTextureNode=kA();const t=new v7;t.isRenderTargetTexture=!0,this._defaultTexture=t,this.updateBeforeType=lt.RENDER}updateBefore(e){const{renderer:t,material:n}=e,i=this.envNode;if(i.isTextureNode||i.isMaterialReferenceNode){const s=i.isTextureNode?i.value:n[i.property];if(s&&s.isTexture){const a=s.mapping;if(a===El||a===Nl){if(j0.has(s)){const u=j0.get(s);u6(u,s.mapping),this._cubeTexture=u}else{const u=s.image;if(iD(u)){const f=new Qy(u.height);f.fromEquirectangularTexture(t,s),u6(f.texture,s.mapping),this._cubeTexture=f.texture,j0.set(s,f.texture),s.addEventListener("dispose",Yy)}else this._cubeTexture=this._defaultTexture}this._cubeTextureNode.value=this._cubeTexture}else this._cubeTextureNode=this.envNode}}}setup(e){return this.updateBefore(e),this._cubeTextureNode}}function iD(r){return r==null?!1:r.height>0}function Yy(r){const e=r.target;e.removeEventListener("dispose",Yy);const t=j0.get(e);t!==void 0&&(j0.delete(e),t.dispose())}function u6(r,e){e===El?r.mapping=NA:e===Nl&&(r.mapping=RA)}const Xy=xe(rD);class Xp extends jA{static get type(){return"BasicEnvironmentNode"}constructor(e=null){super(),this.envNode=e}setup(e){e.context.environment=Xy(this.envNode)}}class sD extends jA{static get type(){return"BasicLightMapNode"}constructor(e=null){super(),this.lightMapNode=e}setup(e){const t=W(1/Math.PI);e.context.irradianceLightMap=this.lightMapNode.mul(t)}}class Zc{start(){}finish(){}direct(){}directRectArea(){}indirect(){}ambientOcclusion(){}}class Ky extends Zc{constructor(){super()}indirect(e,t,n){const i=e.ambientOcclusion,s=e.reflectedLight,a=n.context.irradianceLightMap;s.indirectDiffuse.assign(We(0)),a?s.indirectDiffuse.addAssign(a):s.indirectDiffuse.addAssign(We(1,1,1,0)),s.indirectDiffuse.mulAssign(i),s.indirectDiffuse.mulAssign(Ft.rgb)}finish(e,t,n){const i=n.material,s=e.outgoingLight,a=n.context.environment;if(a)switch(i.combine){case vT:s.rgb.assign(qt(s.rgb,s.rgb.mul(a.rgb),z0.mul(p1)));break;case yT:s.rgb.assign(qt(s.rgb,a.rgb,z0.mul(p1)));break;case gT:s.rgb.addAssign(a.rgb.mul(z0.mul(p1)));break;default:console.warn("THREE.BasicLightingModel: Unsupported .combine value:",i.combine);break}}}const oD=new wc;class aD extends Ln{static get type(){return"MeshBasicNodeMaterial"}constructor(e){super(),this.isMeshBasicNodeMaterial=!0,this.lights=!0,this.setDefaultValues(oD),this.setValues(e)}setupNormal(){return Ri}setupEnvironment(e){const t=super.setupEnvironment(e);return t?new Xp(t):null}setupLightMap(e){let t=null;return e.material.lightMap&&(t=new sD(Vp)),t}setupOutgoingLight(){return Ft.rgb}setupLightingModel(){return new Ky}}const UA=le(({f0:r,f90:e,dotVH:t})=>{const n=t.mul(-5.55473).sub(6.98316).mul(t).exp2();return r.mul(n.oneMinus()).add(e.mul(n))}),Ra=le(r=>r.diffuseColor.mul(1/Math.PI)),AD=()=>W(.25),lD=le(({dotNH:r})=>hc.mul(W(.5)).add(1).mul(W(1/Math.PI)).mul(r.pow(hc))),uD=le(({lightDirection:r})=>{const e=r.add(un).normalize(),t=Mn.dot(e).clamp(),n=un.dot(e).clamp(),i=UA({f0:zr,f90:1,dotVH:n}),s=AD(),a=lD({dotNH:t});return i.mul(s).mul(a)});class Zy extends Ky{constructor(e=!0){super(),this.specular=e}direct({lightDirection:e,lightColor:t,reflectedLight:n}){const s=Mn.dot(e).clamp().mul(t);n.directDiffuse.addAssign(s.mul(Ra({diffuseColor:Ft.rgb}))),this.specular===!0&&n.directSpecular.addAssign(s.mul(uD({lightDirection:e})).mul(z0))}indirect({ambientOcclusion:e,irradiance:t,reflectedLight:n}){n.indirectDiffuse.addAssign(t.mul(Ra({diffuseColor:Ft}))),n.indirectDiffuse.mulAssign(e)}}const cD=new Ao;class fD extends Ln{static get type(){return"MeshLambertNodeMaterial"}constructor(e){super(),this.isMeshLambertNodeMaterial=!0,this.lights=!0,this.setDefaultValues(cD),this.setValues(e)}setupEnvironment(e){const t=super.setupEnvironment(e);return t?new Xp(t):null}setupLightingModel(){return new Zy(!1)}}const hD=new p7;class dD extends Ln{static get type(){return"MeshPhongNodeMaterial"}constructor(e){super(),this.isMeshPhongNodeMaterial=!0,this.lights=!0,this.shininessNode=null,this.specularNode=null,this.setDefaultValues(hD),this.setValues(e)}setupEnvironment(e){const t=super.setupEnvironment(e);return t?new Xp(t):null}setupLightingModel(){return new Zy}setupVariants(){const e=(this.shininessNode?W(this.shininessNode):iy).max(1e-4);hc.assign(e);const t=this.specularNode||oy;zr.assign(t)}copy(e){return this.shininessNode=e.shininessNode,this.specularNode=e.specularNode,super.copy(e)}}const Jy=le(r=>{if(r.geometry.hasAttribute("normal")===!1)return W(0);const e=Ri.dFdx().abs().max(Ri.dFdy().abs());return e.x.max(e.y).max(e.z)}),Kp=le(r=>{const{roughness:e}=r,t=Jy();let n=e.max(.0525);return n=n.add(t),n=n.min(1),n}),ev=le(({alpha:r,dotNL:e,dotNV:t})=>{const n=r.pow2(),i=e.mul(n.add(n.oneMinus().mul(t.pow2())).sqrt()),s=t.mul(n.add(n.oneMinus().mul(e.pow2())).sqrt());return Ki(.5,i.add(s).max(U8))}
38).setLayout({name:"V_GGX_SmithCorrelated",type:"float",inputs:[{name:"alpha",type:"float"},{name:"dotNL",type:"float"},{name:"dotNV",type:"float"}]}),pD=le(({alphaT:r,alphaB:e,dotTV:t,dotBV:n,dotTL:i,dotBL:s,dotNV:a,dotNL:u})=>{const f=u.mul(ie(r.mul(t),e.mul(n),a).length()),m=a.mul(ie(r.mul(i),e.mul(s),u).length());return Ki(.5,f.add(m)).saturate()}).setLayout({name:"V_GGX_SmithCorrelated_Anisotropic",type:"float",inputs:[{name:"alphaT",type:"float",qualifier:"in"},{name:"alphaB",type:"float",qualifier:"in"},{name:"dotTV",type:"float",qualifier:"in"},{name:"dotBV",type:"float",qualifier:"in"},{name:"dotTL",type:"float",qualifier:"in"},{name:"dotBL",type:"float",qualifier:"in"},{name:"dotNV",type:"float",qualifier:"in"},{name:"dotNL",type:"float",qualifier:"in"}]}),tv=le(({alpha:r,dotNH:e})=>{const t=r.pow2(),n=e.pow2().mul(t.oneMinus()).oneMinus();return t.div(n.pow2()).mul(1/Math.PI)}).setLayout({name:"D_GGX",type:"float",inputs:[{name:"alpha",type:"float"},{name:"dotNH",type:"float"}]}),mD=W(1/Math.PI),gD=le(({alphaT:r,alphaB:e,dotNH:t,dotTH:n,dotBH:i})=>{const s=r.mul(e),a=ie(e.mul(n),r.mul(i),s.mul(t)),u=a.dot(a),f=s.div(u);return mD.mul(s.mul(f.pow2()))}).setLayout({name:"D_GGX_Anisotropic",type:"float",inputs:[{name:"alphaT",type:"float",qualifier:"in"},{name:"alphaB",type:"float",qualifier:"in"},{name:"dotNH",type:"float",qualifier:"in"},{name:"dotTH",type:"float",qualifier:"in"},{name:"dotBH",type:"float",qualifier:"in"}]}),ld=le(r=>{const{lightDirection:e,f0:t,f90:n,roughness:i,f:s,USE_IRIDESCENCE:a,USE_ANISOTROPY:u}=r,f=r.normalView||Mn,m=i.pow2(),y=e.add(un).normalize(),_=f.dot(e).clamp(),b=f.dot(un).clamp(),w=f.dot(y).clamp(),S=un.dot(y).clamp();let E=UA({f0:t,f90:n,dotVH:S}),R,P;if(fl(a)&&(E=Oc.mix(E,s)),fl(u)){const L=O0.dot(e),D=O0.dot(un),O=O0.dot(y),G=wa.dot(e),U=wa.dot(un),j=wa.dot(y);R=pD({alphaT:fc,alphaB:m,dotTV:D,dotBV:U,dotTL:L,dotBL:G,dotNV:b,dotNL:_}),P=gD({alphaT:fc,alphaB:m,dotNH:w,dotTH:O,dotBH:j})}else R=ev({alpha:m,dotNL:_,dotNV:b}),P=tv({alpha:m,dotNH:w});return E.mul(R).mul(P)}),Zp=le(({roughness:r,dotNV:e})=>{const t=We(-1,-.0275,-.572,.022),n=We(1,.0425,1.04,-.04),i=r.mul(t).add(n),s=i.x.mul(i.x).min(e.mul(-9.28).exp2()).mul(i.x).add(i.y);return Ee(-1.04,1.04).mul(s).add(i.zw)}).setLayout({name:"DFGApprox",type:"vec2",inputs:[{name:"roughness",type:"float"},{name:"dotNV",type:"vec3"}]}),nv=le(r=>{const{dotNV:e,specularColor:t,specularF90:n,roughness:i}=r,s=Zp({dotNV:e,roughness:i});return t.mul(s.x).add(n.mul(s.y))}),rv=le(({f:r,f90:e,dotVH:t})=>{const n=t.oneMinus().saturate(),i=n.mul(n),s=n.mul(i,i).clamp(0,.9999);return r.sub(ie(e).mul(s)).div(s.oneMinus())}).setLayout({name:"Schlick_to_F0",type:"vec3",inputs:[{name:"f",type:"vec3"},{name:"f90",type:"float"},{name:"dotVH",type:"float"}]}),yD=le(({roughness:r,dotNH:e})=>{const t=r.pow2(),n=W(1).div(t),s=e.pow2().oneMinus().max(.0078125);return W(2).add(n).mul(s.pow(n.mul(.5))).div(2*Math.PI)}
vendor: 4,229 bytes, line 38
38).setLayout({name:"D_Charlie",type:"float",inputs:[{name:"roughness",type:"float"},{name:"dotNH",type:"float"}]}),vD=le(({dotNV:r,dotNL:e})=>W(1).div(W(4).mul(e.add(r).sub(e.mul(r))))).setLayout({name:"V_Neubelt",type:"float",inputs:[{name:"dotNV",type:"float"},{name:"dotNL",type:"float"}]}),_D=le(({lightDirection:r})=>{const e=r.add(un).normalize(),t=Mn.dot(r).clamp(),n=Mn.dot(un).clamp(),i=Mn.dot(e).clamp(),s=yD({roughness:Uc,dotNH:i}),a=vD({dotNV:n,dotNL:t});return ga.mul(s).mul(a)}),xD=le(({N:r,V:e,roughness:t})=>{const s=.0078125,a=r.dot(e).saturate(),u=Ee(t,a.oneMinus().sqrt());return u.assign(u.mul(.984375).add(s)),u}).setLayout({name:"LTC_Uv",type:"vec2",inputs:[{name:"N",type:"vec3"},{name:"V",type:"vec3"},{name:"roughness",type:"float"}]}),bD=le(({f:r})=>{const e=r.length();return Nn(e.mul(e).add(r.z).div(e.add(1)),0)}).setLayout({name:"LTC_ClippedSphereFormFactor",type:"float",inputs:[{name:"f",type:"vec3"}]}),Nu=le(({v1:r,v2:e})=>{const t=r.dot(e),n=t.abs().toVar(),i=n.mul(.0145206).add(.4965155).mul(n).add(.8543985).toVar(),s=n.add(4.1616724).mul(n).add(3.417594).toVar(),a=i.div(s),u=t.greaterThan(0).select(a,Nn(t.mul(t).oneMinus(),1e-7).inverseSqrt().mul(.5).sub(a));return r.cross(e).mul(u)}).setLayout({name:"LTC_EdgeVectorFormFactor",type:"vec3",inputs:[{name:"v1",type:"vec3"},{name:"v2",type:"vec3"}]}),c6=le(({N:r,V:e,P:t,mInv:n,p0:i,p1:s,p2:a,p3:u})=>{const f=s.sub(i).toVar(),m=u.sub(i).toVar(),y=f.cross(m),_=ie().toVar();return mt(y.dot(t.sub(i)).greaterThanEqual(0),()=>{const b=e.sub(r.mul(e.dot(r))).normalize(),w=r.cross(b).negate(),S=n.mul(Sr(b,w,r).transpose()).toVar(),E=S.mul(i.sub(t)).normalize().toVar(),R=S.mul(s.sub(t)).normalize().toVar(),P=S.mul(a.sub(t)).normalize().toVar(),L=S.mul(u.sub(t)).normalize().toVar(),D=ie(0).toVar();D.addAssign(Nu({v1:E,v2:R})),D.addAssign(Nu({v1:R,v2:P})),D.addAssign(Nu({v1:P,v2:L})),D.addAssign(Nu({v1:L,v2:E})),_.assign(ie(bD({f:D})))}),_}).setLayout({name:"LTC_Evaluate",type:"vec3",inputs:[{name:"N",type:"vec3"},{name:"V",type:"vec3"},{name:"P",type:"vec3"},{name:"mInv",type:"mat3"},{name:"p0",type:"vec3"},{name:"p1",type:"vec3"},{name:"p2",type:"vec3"},{name:"p3",type:"vec3"}]}),Jc=1/6,iv=r=>ut(Jc,ut(r,ut(r,r.negate().add(3)).sub(3)).add(1)),ud=r=>ut(Jc,ut(r,ut(r,ut(3,r).sub(6))).add(4)),sv=r=>ut(Jc,ut(r,ut(r,ut(-3,r).add(3)).add(3)).add(1)),cd=r=>ut(Jc,Hi(r,3)),f6=r=>iv(r).add(ud(r)),h6=r=>sv(r).add(cd(r)),d6=r=>Dn(-1,ud(r).div(iv(r).add(ud(r)))),p6=r=>Dn(1,cd(r).div(sv(r).add(cd(r)))),m6=(r,e,t)=>{const n=r.uvNode,i=ut(n,e.zw).add(.5),s=_s(i),a=lo(i),u=f6(a.x),f=h6(a.x),m=d6(a.x),y=p6(a.x),_=d6(a.y),b=p6(a.y),w=Ee(s.x.add(m),s.y.add(_)).sub(.5).mul(e.xy),S=Ee(s.x.add(y),s.y.add(_)).sub(.5).mul(e.xy),E=Ee(s.x.add(m),s.y.add(b)).sub(.5).mul(e.xy),R=Ee(s.x.add(y),s.y.add(b)).sub(.5).mul(e.xy),P=f6(a.y).mul(Dn(u.mul(r.sample(w).level(t)),f.mul(r.sample(S).level(t)))),L=h6(a.y).mul(Dn(u.mul(r.sample(E).level(t)),f.mul(r.sample(R).level(t))));return P.add(L)},ov=le(([r,e=W(3)])=>{const t=Ee(r.size(te(e))),n=Ee(r.size(te(e.add(1)))),i=Ki(1,t),s=Ki(1,n),a=m6(r,We(i,t),_s(e)),u=m6(r,We(s,n),Vc(e));return lo(e).mix(a,u)}),g6=le(([r,e,t,n,i])=>{const s=ie(Pp(e.negate(),ao(r),Ki(1,n))),a=ie(Zs(i[0].xyz),Zs(i[1].xyz),Zs(i[2].xyz));return ao(s).mul(t.mul(a))}).setLayout({name:"getVolumeTransmissionRay",type:"vec3",inputs:[{name:"n",type:"vec3"},{name:"v",type:"vec3"},{name:"thickness",type:"float"},{name:"ior",type:"float"},{name:"modelMatrix",type:"mat4"}]}),TD=le(([r,e])=>r.mul(Ts(e.mul(2).sub(2),0,1))).setLayout({name:"applyIorToRoughness",type:"float",inputs:[{name:"roughness",type:"float"},{name:"ior",type:"float"}]}),wD=jp(),SD=jp(),y6=le(([r,e,t],{material:n})=>{const s=(n.side===Xi?wD:SD).sample(r),a=vs(_l.x).mul(TD(e,t));return ov(s,a)}),v6=le(([r,e,t])=>(mt(t.notEqual(0),()=>{const n=Gc(e).negate().div(t);return bp(n.negate().mul(r))}),ie(1))).setLayout({name:"volumeAttenuation",type:"vec3",inputs:[{name:"transmissionDistance",type:"float"},{name:"attenuationColor",type:"vec3"},{name:"attenuationDistance",type:"float"}]}),MD=le(([r,e,t,n,i,s,a,u,f,m,y,_,b,w,S])=>{let E,R;if(S){E=We().toVar(),R=ie().toVar();const G=y.sub(1).mul(S.mul(.025)),U=ie(y.sub(G),y,y.add(G));It({start:0,end:3},({i:j})=>
38{const V=U.element(j),Q=g6(r,e,_,V,u),Z=a.add(Q),K=m.mul(f.mul(We(Z,1))),Y=Ee(K.xy.div(K.w)).toVar();Y.addAssign(1),Y.divAssign(2),Y.assign(Ee(Y.x,Y.y.oneMinus()));const ne=y6(Y,t,V);E.element(j).assign(ne.element(j)),E.a.addAssign(ne.a),R.element(j).assign(n.element(j).mul(v6(Zs(Q),b,w).element(j)))}),E.a.divAssign(3)}else{const G=g6(r,e,_,y,u),U=a.add(G),j=m.mul(f.mul(We(U,1))),V=Ee(j.xy.div(j.w)).toVar();V.addAssign(1),V.divAssign(2),V.assign(Ee(V.x,V.y.oneMinus())),E=y6(V,t,y),R=n.mul(v6(Zs(G),b,w))}const P=R.rgb.mul(E.rgb),L=r.dot(e).clamp(),D=ie(nv({dotNV:L,specularColor:i,specularF90:s,roughness:t})),O=R.r.add(R.g,R.b).div(3);return We(D.oneMinus().mul(P),E.a.oneMinus().mul(O).oneMinus())}),ED=Sr(3.2404542,-.969266,.0556434,-1.5371385,1.8760108,-.2040259,-.4985314,.041556,1.0572252),ND=r=>{const e=r.sqrt();return ie(1).add(e).div(ie(1).sub(e))},_6=(r,e)=>r.sub(e).div(r.add(e)).pow2(),RD=(r,e)=>{const t=r.mul(2*Math.PI*1e-9),n=ie(54856e-17,44201e-17,52481e-17),i=ie(1681e3,1795300,2208400),s=ie(43278e5,93046e5,66121e5),a=W(9747e-17*Math.sqrt(2*Math.PI*45282e5)).mul(t.mul(2239900).add(e.x).cos()).mul(t.pow2().mul(-45282e5).exp());let u=n.mul(s.mul(2*Math.PI).sqrt()).mul(i.mul(t).add(e).cos()).mul(t.pow2().negate().mul(s).exp());return u=ie(u.x.add(a),u.y,u.z).div(10685e-11),ED.mul(u)},CD=le(({outsideIOR:r,eta2:e,cosTheta1:t,thinFilmThickness:n,baseF0:i})=>{const s=qt(r,e,ws(0,.03,n)),u=r.div(s).pow2().mul(t.pow2().oneMinus()).oneMinus();mt(u.lessThan(0),()=>ie(1));const f=u.sqrt(),m=_6(s,r),y=UA({f0:m,f90:1,dotVH:t}),_=y.oneMinus(),b=s.lessThan(r).select(Math.PI,0),w=W(Math.PI).sub(b),S=ND(i.clamp(0,.9999)),E=_6(S,s.toVec3()),R=UA({f0:E,f90:1,dotVH:f}),P=ie(S.x.lessThan(s).select(Math.PI,0),S.y.lessThan(s).select(Math.PI,0),S.z.lessThan(s).select(Math.PI,0)),L=s.mul(n,f,2),D=ie(w).add(P),O=y.mul(R).clamp(1e-5,.9999),G=O.sqrt(),U=_.pow2().mul(R).div(ie(1).sub(O)),V=y.add(U).toVar(),Q=U.sub(_).toVar();return It({start:1,end:2,condition:"<=",name:"m"},({m:Z})=>{Q.mulAssign(G);const K=RD(W(Z).mul(L),W(Z).mul(D)).mul(2);V.addAssign(Q.mul(K))}),V.max(ie(0))}).setLayout({name:"evalIridescence",type:"vec3",inputs:[{name:"outsideIOR",type:"float"},{name:"eta2",type:"float"},{name:"cosTheta1",type:"float"},{name:"thinFilmThickness",type:"float"},{name:"baseF0",type:"vec3"}]}),PD=le(({normal:r,viewDir:e,roughness:t})=>{const n=r.dot(e).saturate(),i=t.pow2(),s=dr(t.lessThan(.25),W(-339.2).mul(i).add(W(161.4).mul(t)).sub(25.9),W(-8.48).mul(i).add(W(14.3).mul(t)).sub(9.95)),a=dr(t.lessThan(.25),W(44).mul(i).sub(W(23.7).mul(t)).add(3.26),W(1.97).mul(i).sub(W(3.27).mul(t)).add(.72));return dr(t.lessThan(.25),0,W(.1).mul(t).sub(.025)).add(s.mul(n).add(a).exp()).mul(1/Math.PI).saturate()}),rf=ie(.04),sf=W(1);class av extends Zc{constructor(e=!1,t=!1,n=!1,i=!1,s=!1,a=!1){super(),this.clearcoat=e,this.sheen=t,this.iridescence=n,this.anisotropy=i,this.transmission=s,this.dispersion=a,this.clearcoatRadiance=null,this.clearcoatSpecularDirect=null,this.clearcoatSpecularIndirect=null,this.sheenSpecularDirect=null,this.sheenSpecularIndirect=null,this.iridescenceFresnel=null,this.iridescenceF0=null}start(e){if(this.clearcoat===!0&&(this.clearcoatRadiance=ie().toVar("clearcoatRadiance"),this.clearcoatSpecularDirect=ie().toVar("clearcoatSpecularDirect"),this.clearcoatSpecularIndirect=ie().toVar("clearcoatSpecularIndirect")),this.sheen===!0&&(this.sheenSpecularDirect=ie().toVar("sheenSpecularDirect"),this.sheenSpecularIndirect=ie().toVar("sheenSpecularIndirect")),this.iridescence===!0){const t=Mn.dot(un).clamp();this.iridescenceFresnel=CD({outsideIOR:W(1),eta2:hp,cosTheta1:t,thinFilmThickness:dp,baseF0:zr}),this.iridescenceF0=rv({f:this.iridescenceFresnel,f90:1,dotVH:t})}if(this.transmission===!0){const t=Js,n=k9.sub(Js).normalize(),i=Qc;e.backdrop=MD(i,n,hs,Ft,zr,gl,t,Si,Jr,Fa,G0,pp,gp,mp,this.dispersion?yp:null),e.backdropAlpha=dc,Ft.a.mulAssign(qt(1,e.backdrop.a,dc))}}computeMultiscattering(e,t,n){const i=Mn.dot(un).clamp(),s=Zp({roughness:hs,dotNV:i}),u=(this.iridescenceF0?Oc.mix(zr,this.iridescenceF0):zr).mul(s.x).add(n.mul(s.y)),m=s.x.add(s.y).oneMinus(),y=zr.add(zr.oneMinus().mul(.047619)),_=u.mul(y).div(m.mul(y).oneMinus());e.addAssign(u),t.addAssign(_.mul(m))}direct({lightDirection:e,lightColor:t,reflectedLight:n}){const s=Mn.dot(e).clamp().mul(t);if(this.sheen===!0&&this.sheenSpecularDirect.addAssign(s.mul(_D({lightDirection:e}))),this.clearcoat===!0){const u=vA.dot(e).clamp().mul(t);this.clearcoatSpecularDirect.addAssign(u.mul(ld({lightDirection:e,f0:rf,f90:sf,roughness:ml,normalView:vA})))}n.directDiffuse.addAssign(s.mul(Ra({diffuseColor:Ft.rgb}))),n.directSpecular.addAssign(s.mul(ld({lightDirection:e,f0:zr,f90:1,roughness:hs,iridescence:this.iridescence,f:this.iridescenceFresnel,USE_IRIDESCENCE:this.iridescence,USE_ANISOTROPY:this.anisotropy})))}directRectArea({lightColor:e,lightPosition:t,halfWidth:n,halfHeight:i,reflectedLight:s,ltc_1:a,ltc_2:u}){const f=t.add(n).sub(i),m=t.sub(n).sub(i),y=t.sub(n).add(i),_=t.add(n).add(i),b=Mn,w=un,S=En.toVar(),E=xD({N:b,V:w,roughness:hs}
38),R=a.sample(E).toVar(),P=u.sample(E).toVar(),L=Sr(ie(R.x,0,R.y),ie(0,1,0),ie(R.z,0,R.w)).toVar(),D=zr.mul(P.x).add(zr.oneMinus().mul(P.y)).toVar();s.directSpecular.addAssign(e.mul(D).mul(c6({N:b,V:w,P:S,mInv:L,p0:f,p1:m,p2:y,p3:_}))),s.directDiffuse.addAssign(e.mul(Ft).mul(c6({N:b,V:w,P:S,mInv:Sr(1,0,0,0,1,0,0,0,1),p0:f,p1:m,p2:y,p3:_})))}indirect(e,t,n){this.indirectDiffuse(e,t,n),this.indirectSpecular(e,t,n),this.ambientOcclusion(e,t,n)}indirectDiffuse({irradiance:e,reflectedLight:t}){t.indirectDiffuse.addAssign(e.mul(Ra({diffuseColor:Ft})))}indirectSpecular({radiance:e,iblIrradiance:t,reflectedLight:n}){if(this.sheen===!0&&this.sheenSpecularIndirect.addAssign(t.mul(ga,PD({normal:Mn,viewDir:un,roughness:Uc}))),this.clearcoat===!0){const m=vA.dot(un).clamp(),y=nv({dotNV:m,specularColor:rf,specularF90:sf,roughness:ml});this.clearcoatSpecularIndirect.addAssign(this.clearcoatRadiance.mul(y))}const i=ie().toVar("singleScattering"),s=ie().toVar("multiScattering"),a=t.mul(1/Math.PI);this.computeMultiscattering(i,s,gl);const u=i.add(s),f=Ft.mul(u.r.max(u.g).max(u.b).oneMinus());n.indirectSpecular.addAssign(e.mul(i)),n.indirectSpecular.addAssign(s.mul(a)),n.indirectDiffuse.addAssign(f.mul(a))}ambientOcclusion({ambientOcclusion:e,reflectedLight:t}){const i=Mn.dot(un).clamp().add(e),s=hs.mul(-16).oneMinus().negate().exp2(),a=e.sub(i.pow(s).oneMinus()).clamp();this.clearcoat===!0&&this.clearcoatSpecularIndirect.mulAssign(e),this.sheen===!0&&this.sheenSpecularIndirect.mulAssign(e),t.indirectDiffuse.mulAssign(e),t.indirectSpecular.mulAssign(a)}finish(e){const{outgoingLight:t}=e;if(this.clearcoat===!0){const n=vA.dot(un).clamp(),i=UA({dotVH:n,f0:rf,f90:sf}),s=t.mul(cc.mul(i).oneMinus()).add(this.clearcoatSpecularDirect.add(this.clearcoatSpecularIndirect).mul(cc));t.assign(s)}if(this.sheen===!0){const n=ga.r.max(ga.g).max(ga.b).mul(.157).oneMinus(),i=t.mul(n).add(this.sheenSpecularDirect,this.sheenSpecularIndirect);t.assign(i)}}}const x6=W(1),fd=W(-2),Ru=W(.8),of=W(-1),Cu=W(.4),af=W(2),Pu=W(.305),Af=W(3),b6=W(.21),BD=W(4),T6=W(4),FD=W(16),DD=le(([r])=>{const e=ie(rn(r)).toVar(),t=W(-1).toVar();return mt(e.x.greaterThan(e.z),()=>{mt(e.x.greaterThan(e.y),()=>{t.assign(dr(r.x.greaterThan(0),0,3))}).Else(()=>{t.assign(dr(r.y.greaterThan(0),1,4))})}).Else(()=>{mt(e.z.greaterThan(e.y),()=>{t.assign(dr(r.z.greaterThan(0),2,5))}).Else(()=>{t.assign(dr(r.y.greaterThan(0),1,4))})}),t}).setLayout({name:"getFace",type:"float",inputs:[{name:"direction",type:"vec3"}]}),LD=le(([r,e])=>{const t=Ee().toVar();return mt(e.equal(0),()=>{t.assign(Ee(r.z,r.y).div(rn(r.x)))}).ElseIf(e.equal(1),()=>{t.assign(Ee(r.x.negate(),r.z.negate()).div(rn(r.y)))}).ElseIf(e.equal(2),()=>{t.assign(Ee(r.x.negate(),r.y).div(rn(r.z)))}).ElseIf(e.equal(3),()=>{t.assign(Ee(r.z.negate(),r.y).div(rn(r.x)))}).ElseIf(e.equal(4),()=>{t.assign(Ee(r.x.negate(),r.z).div(rn(r.y)))}).Else(()=>{t.assign(Ee(r.x,r.y).div(rn(r.z)))}),ut(.5,t.add(1))}).setLayout({name:"getUV",type:"vec2",inputs:[{name:"direction",type:"vec3"},{name:"face",type:"float"}]}),qD=le(([r])=>{const e=W(0).toVar();return mt(r.greaterThanEqual(Ru),()=>{e.assign(x6.sub(r).mul(of.sub(fd)).div(x6.sub(Ru)).add(fd))}).ElseIf(r.greaterThanEqual(Cu),()=>{e.assign(Ru.sub(r).mul(af.sub(of)).div(Ru.sub(Cu)).add(of))}).ElseIf(r.greaterThanEqual(Pu),()=>{e.assign(Cu.sub(r).mul(Af.sub(af)).div(Cu.sub(Pu)).add(af))}).ElseIf(r.greaterThanEqual(b6),()=>{e.assign(Pu.sub(r).mul(BD.sub(Af)).div(Pu.sub(b6)).add(Af))}).Else(()=>{e.assign(W(-2).mul(vs(ut(1.16,r))))}),e}).setLayout({name:"roughnessToMip",type:"float",inputs:[{name:"roughness",type:"float"}]}),Av=le(([r,e])=>{const t=r.toVar();t.assign(ut(2,t).sub(1));const n=ie(t,1).toVar();return mt(e.equal(0),()=>{n.assign(n.zyx)}).ElseIf(e.equal(1),()=>{n.assign(n.xzy),n.xz.mulAssign(-1)}).ElseIf(e.equal(2),()=>{n.x.mulAssign(-1)}).ElseIf(e.equal(3),()=>{n.assign(n.zyx),n.xz.mulAssign(-1)}).ElseIf(e.equal(4),()=>{n.assign(n.xzy),n.xy.mulAssign(-1)}).ElseIf(e.equal(5),()=>{n.z.mulAssign(-1)}),n}).setLayout({name:"getDirection",type:"vec3",inputs:[{name:"uv",type:"vec2"},{name:"face",type:"float"}]}),lv=le(([r,e,t,n,i,s])=>{const a=W(t),u=ie(e),f=Ts(qD(a),fd,s),m=lo(f),y=_s(f),_=ie(hd(r,u,y,n,i,s)).toVar();return mt(m.notEqual(0),()=>{const b=ie(hd(r,u,y.add(1),n,i,s)).toVar();_.assign(qt(_,b,m))}),_}),hd=le(([r,e,t,n,i,s])=>{const a=W(t).toVar(),u=ie(e),f=W(DD(u)).toVar(),m=W(Nn(T6.sub(a),0)).toVar();a.assign(Nn(a,T6));const y=W(IA(a)).toVar(),_=Ee(LD(u,f).mul(y.sub(2)).add(1)).toVar();return mt(f.greaterThan(2),()=>{_.y.addAssign(y),f.subAssign(3)}),_.x.addAssign(f.mul(y)),_.x.addAssign(m.mul(ut(3,FD))),_.y.addAssign(ut(4,IA(s).sub(y))),_.x.mulAssign(n),_.y.mulAssign(i),r.sample(_).grad(Ee(),Ee())}),lf=le(({envMap:r,mipInt:e,outputDirection:t,theta:n,axis:i,CUBEUV_TEXEL_WIDTH:s,CUBEUV_TEXEL_HEIGHT:a,
38CUBEUV_MAX_MIP:u})=>{const f=$s(n),m=t.mul(f).add(i.cross(t).mul(ci(n))).add(i.mul(i.dot(t).mul(f.oneMinus())));return hd(r,m,e,s,a,u)}),uv=le(({n:r,latitudinal:e,poleAxis:t,outputDirection:n,weights:i,samples:s,dTheta:a,mipInt:u,envMap:f,CUBEUV_TEXEL_WIDTH:m,CUBEUV_TEXEL_HEIGHT:y,CUBEUV_MAX_MIP:_})=>{const b=ie(dr(e,t,jc(t,n))).toVar();mt(xp(b.equals(ie(0))),()=>{b.assign(ie(n.z,0,n.x.negate()))}),b.assign(ao(b));const w=ie().toVar();return w.addAssign(i.element(0).mul(lf({theta:0,axis:b,outputDirection:n,mipInt:u,envMap:f,CUBEUV_TEXEL_WIDTH:m,CUBEUV_TEXEL_HEIGHT:y,CUBEUV_MAX_MIP:_}))),It({start:te(1),end:r},({i:S})=>{mt(S.greaterThanEqual(s),()=>{Oy()});const E=W(a.mul(W(S))).toVar();w.addAssign(i.element(S).mul(lf({theta:E.mul(-1),axis:b,outputDirection:n,mipInt:u,envMap:f,CUBEUV_TEXEL_WIDTH:m,CUBEUV_TEXEL_HEIGHT:y,CUBEUV_MAX_MIP:_}))),w.addAssign(i.element(S).mul(lf({theta:E,axis:b,outputDirection:n,mipInt:u,envMap:f,CUBEUV_TEXEL_WIDTH:m,CUBEUV_TEXEL_HEIGHT:y,CUBEUV_MAX_MIP:_})))}),We(w,1)});let vc=null;const w6=new WeakMap;function ID(r){const e=Math.log2(r)-2,t=1/r;return{texelWidth:1/(3*Math.max(Math.pow(2,e),7*16)),texelHeight:t,maxMip:e}}function kD(r){let e=w6.get(r);if((e!==void 0?e.pmremVersion:-1)!==r.pmremVersion){const n=r.image;if(r.isCubeTexture)if(OD(n))e=vc.fromCubemap(r,e);else return null;else if(GD(n))e=vc.fromEquirectangular(r,e);else return null;e.pmremVersion=r.pmremVersion,w6.set(r,e)}return e.texture}class UD extends Rn{static get type(){return"PMREMNode"}constructor(e,t=null,n=null){super("vec3"),this._value=e,this._pmrem=null,this.uvNode=t,this.levelNode=n,this._generator=null;const i=new y7;i.isRenderTargetTexture=!0,this._texture=xt(i),this._width=Ye(0),this._height=Ye(0),this._maxMip=Ye(0),this.updateBeforeType=lt.RENDER}set value(e){this._value=e,this._pmrem=null}get value(){return this._value}updateFromTexture(e){const t=ID(e.image.height);this._texture.value=e,this._width.value=t.texelWidth,this._height.value=t.texelHeight,this._maxMip.value=t.maxMip}updateBefore(){let e=this._pmrem;const t=e?e.pmremVersion:-1,n=this._value;t!==n.pmremVersion&&(n.isPMREMTexture===!0?e=n:e=kD(n),e!==null&&(this._pmrem=e,this.updateFromTexture(e)))}setup(e){vc===null&&(vc=e.createPMREMGenerator()),this.updateBefore(e);let t=this.uvNode;t===null&&e.context.getUV&&(t=e.context.getUV(this));const n=this.value;e.renderer.coordinateSystem===H0&&n.isPMREMTexture!==!0&&n.isRenderTargetTexture===!0&&(t=ie(t.x.negate(),t.yz)),t=ie(t.x,t.y.negate(),t.z);let i=this.levelNode;return i===null&&e.context.getTextureLevel&&(i=e.context.getTextureLevel(this)),lv(this._texture,t,i,this._width,this._height,this._maxMip)}}function OD(r){if(r==null)return!1;let e=0;const t=6;for(let n=0;n<t;n++)r[n]!==void 0&&e++;return e===t}function GD(r){return r==null?!1:r.height>0}const Jp=xe(UD),S6=new WeakMap;class VD extends jA{static get type(){return"EnvironmentNode"}constructor(e=null){super(),this.envNode=e}setup(e){const{material:t}=e;let n=this.envNode;if(n.isTextureNode||n.isMaterialReferenceNode){const w=n.isTextureNode?n.value:t[n.property];let S=S6.get(w);S===void 0&&(S=Jp(w),S6.set(w,S)),n=S}const s=t.envMap?zt("envMapIntensity","float",e.material):zt("environmentIntensity","float",e.scene),u=t.useAnisotropy===!0||t.anisotropy>0?ey:Mn,f=n.context(M6(hs,u)).mul(s),m=n.context(zD(Qc)).mul(Math.PI).mul(s),y=V0(f),_=V0(m);e.context.radiance.addAssign(y),e.context.iblIrradiance.addAssign(_);const b=e.context.lightingModel.clearcoatRadiance;if(b){const w=n.context(M6(ml,vA)).mul(s),S=V0(w);b.addAssign(S)}}}const M6=(r,e)=>{let t=null;return{getUV:()=>(t===null&&(t=un.negate().reflect(e),t=r.mul(r).mix(t,e).normalize(),t=t.transformDirection(Jr)),t),getTextureLevel:()=>r}},zD=r=>({getUV:()=>r,getTextureLevel:()=>W(1)}),jD=new _T;class cv extends Ln{static get type(){return"MeshStandardNodeMaterial"}constructor(e){super(),this.isMeshStandardNodeMaterial=!0,this.lights=!0,this.emissiveNode=null,this.metalnessNode=null,this.roughnessNode=null,this.setDefaultValues(jD),this.setValues(e)}setupEnvironment(e){let t=super.setupEnvironment(e);return t===null&&e.environmentNode&&(t=e.environmentNode),t?new VD(t):null}setupLightingModel(){return new av}setupSpecular(){const e=qt(ie(.04),Ft.rgb,pl);zr.assign(e),gl.assign(1)}setupVariants(){const e=this.metalnessNode?W(this.metalnessNode):ly;pl.assign(e);let t=this.roughnessNode?W(this.roughnessNode):Ay;t=Kp({roughness:t}),hs.assign(t),this.setupSpecular(),Ft.assign(We(Ft.rgb.mul(e.oneMinus()),Ft.a))}copy(e){return this.emissiveNode=e.emissiveNode,this.metalnessNode=e.metalnessNode,this.roughnessNode=e.roughnessNode,super.copy(e)}}const $D=new xT;class HD extends cv{static get type(){return"MeshPhysicalNodeMaterial"}constructor(e){super(),this.isMeshPhysicalNodeMaterial=!0,this.clearcoatNode=null,this.clearcoatRoughnessNode=null,this.clearcoatNormalNode=null,this.sheenNode=null,this.sheenRoughnessNode=null,this.iridescenceNode=null,this.iridescenceIORNode=null,this.iridescenceThicknessNode=null,this.specularIntensityNode=null,this.specularColorNode=null,this.iorNode=null,this.transmissionNode=null,this.thicknessNode=null,this.attenuationDistanceNode=null,this.attenuationColorNode=null,this.dispersionNode=null,this.anisotropyNode=null,this.setDefaultValues($D),this.setValues(e)}get useClearcoat(){return this.clearcoat>0||this.clearcoatNode!==null}get useIridescence(){return this.iridescence>0||this.iridescenceNode!==null}get useSheen(){return this.sheen>0||this.sheenNode!==null}get useAnisotropy(){return this.anisotropy>0||this.anisotropyNode!==null}get useTransmission(){return this.transmission>0||this.transmissionNode!==null}get useDispersion(){return this.dispersion>0||this.dispersionNode!==null}setupSpecular(){const e=this.iorNode?W(this.iorNode):Ty;G0.assign(e),zr.assign(qt(Kr(Rp(G0.sub(1).div(G0.add(1))).mul(ay),ie(1)).mul(Ad),Ft.rgb,pl)),gl.assign(qt(Ad,1,pl))}setupLightingModel(){return new av(this.useClearcoat,this.useSheen,this.useIridescence,this.useAnisotropy,this.useTransmission,this.useDispersion)}setupVariants(e){if(super.setupVariants(e),this.useClearcoat){const t=this.clearcoatNode?W(this.clearcoatNode):cy,n=this.clearcoatRoughnessNode?W(this.clearcoatRoughnessNode):fy;cc.assign(t),ml.assign(Kp({roughness:n}))}if(this.useSheen){const t=this.sheenNode?ie(this.sheenNode):py,n=this.sheenRoughnessNode?W(this.sheenRoughnessNode):my;ga.assign(t),Uc.assign(n)}if(this.useIridescence){const t=this.iridescenceNode?W(this.iridescenceNode):yy,n=this.iridescenceIORNode?W(this.iridescenceIORNode):vy,i=this.iridescenceThicknessNode?W(this.iridescenceThicknessNode):_y;Oc.assign(t),hp.assign(n),dp.assign(i)}if(this.useAnisotropy){const t=(this.anisotropyNode?Ee(this.anisotropyNode):gy).toVar();No.assign(t.length()),mt(No.equal(0),()=>{t.assign(Ee(1,0))}).Else(()=>{t.divAssign(Ee(No)),No.assign(No.saturate())}),fc.assign(No.pow2().mix(hs.pow2(),1)),O0.assign(ya[0].mul(t.x).add(ya[1].mul(t.y))),wa.assign(ya[1].mul(t.x).sub(ya[0].mul(t.y)))}if(this.useTransmission){const t=this.transmissionNode?W(this.transmissionNode):xy,n=this.thicknessNode?W(this.thicknessNode):by,i=this.attenuationDistanceNode?W(this.attenuationDistanceNode):wy,s=this.attenuationColorNode?ie(this.attenuationColorNode):Sy;if(dc.assign(t),pp.assign(n),mp.assign(i),gp.assign(s),this.useDispersion){const a=this.dispersionNode?W(this.dispersionNode):Py;yp.assign(a)}}}setupClearcoatNormal(){return this.clearcoatNormalNode?ie(this.clearcoatNormalNode):hy}setup(e){e.context.setupClearcoatNormal=()=>this.setupClearcoatNormal(e),super.setup(e)}copy(e){return this.clearcoatNode=e.clearcoatNode,this.clearcoatRoughnessNode=e.clearcoatRoughnessNode,this.clearcoatNormalNode=e.clearcoatNormalNode,this.sheenNode=e.sheenNode,this.sheenRoughnessNode=e.sheenRoughnessNode,this.iridescenceNode=e.iridescenceNode,this.iridescenceIORNode=e.iridescenceIORNode,this.iridescenceThicknessNode=e.iridescenceThicknessNode,this.specularIntensityNode=e.specularIntensityNode,this.specularColorNode=e.specularColorNode,this.transmissionNode=e.transmissionNode,this.thicknessNode=e.thicknessNode,this.attenuationDistanceNode=e.attenuationDistanceNode,this.attenuationColorNode=e.attenuationColorNode,this.dispersionNode=e.dis
38persionNode,this.anisotropyNode=e.anisotropyNode,super.copy(e)}}const WD=le(({normal:r,lightDirection:e,builder:t})=>{const n=r.dot(e),i=Ee(n.mul(.5).add(.5),0);if(t.material.gradientMap){const s=Qs("gradientMap","texture").context({getUV:()=>i});return ie(s.r)}else{const s=i.fwidth().mul(.5);return qt(ie(.7),ie(1),ws(W(.7).sub(s.x),W(.7).add(s.x),i.x))}});class QD extends Zc{direct({lightDirection:e,lightColor:t,reflectedLight:n},i,s){const a=WD({normal:Hc,lightDirection:e,builder:s}).mul(t);n.directDiffuse.addAssign(a.mul(Ra({diffuseColor:Ft.rgb})))}indirect({ambientOcclusion:e,irradiance:t,reflectedLight:n}){n.indirectDiffuse.addAssign(t.mul(Ra({diffuseColor:Ft}))),n.indirectDiffuse.mulAssign(e)}}const YD=new bT;class XD extends Ln{static get type(){return"MeshToonNodeMaterial"}constructor(e){super(),this.isMeshToonNodeMaterial=!0,this.lights=!0,this.setDefaultValues(YD),this.setValues(e)}setupLightingModel(){return new QD}}class KD extends Rn{static get type(){return"MatcapUVNode"}constructor(){super("vec2")}setup(){const e=ie(un.z,0,un.x.negate()).normalize(),t=un.cross(e);return Ee(e.dot(Mn),t.dot(Mn)).mul(.495).add(.5)}}const fv=Ue(KD),ZD=new TT;class JD extends Ln{static get type(){return"MeshMatcapNodeMaterial"}constructor(e){super(),this.isMeshMatcapNodeMaterial=!0,this.setDefaultValues(ZD),this.setValues(e)}setupVariants(e){const t=fv;let n;e.material.matcap?n=Qs("matcap","texture").context({getUV:()=>t}):n=ie(qt(.2,.8,t.y)),Ft.rgb.mulAssign(n.rgb)}}class eL extends Rn{static get type(){return"RotateNode"}constructor(e,t){super(),this.positionNode=e,this.rotationNode=t}getNodeType(e){return this.positionNode.getNodeType(e)}setup(e){const{rotationNode:t,positionNode:n}=this;if(this.getNodeType(e)==="vec2"){const s=t.cos(),a=t.sin();return Ic(s,a,a.negate(),s).mul(n)}else{const s=t,a=Ta(We(1,0,0,0),We(0,$s(s.x),ci(s.x).negate(),0),We(0,ci(s.x),$s(s.x),0),We(0,0,0,1)),u=Ta(We($s(s.y),0,ci(s.y),0),We(0,1,0,0),We(ci(s.y).negate(),0,$s(s.y),0),We(0,0,0,1)),f=Ta(We($s(s.z),ci(s.z).negate(),0,0),We(ci(s.z),$s(s.z),0,0),We(0,0,1,0),We(0,0,0,1));return a.mul(u).mul(f).mul(We(n,1)).xyz}}}const e2=xe(eL),tL=new wT;class hv extends Ln{static get type(){return"SpriteNodeMaterial"}constructor(e){super(),this.isSpriteNodeMaterial=!0,this._useSizeAttenuation=!0,this.positionNode=null,this.rotationNode=null,this.scaleNode=null,this.setDefaultValues(tL),this.setValues(e)}setupPositionView(e){const{object:t,camera:n}=e,i=this.sizeAttenuation,{positionNode:s,rotationNode:a,scaleNode:u}=this,f=Da.mul(ie(s||0));let m=Ee(Si[0].xyz.length(),Si[1].xyz.length());if(u!==null&&(m=m.mul(W(u))),i===!1)if(n.isPerspectiveCamera)m=m.mul(f.z.negate());else{const w=W(2).div(Fa.element(1).element(1));m=m.mul(w.mul(2))}let y=Ul.xy;if(t.center&&t.center.isVector2===!0){const w=SB("center","vec2",t);y=y.sub(w.sub(.5))}y=y.mul(m);const _=W(a||dy),b=e2(y,_);return We(f.xy.add(b),f.zw)}copy(e){return this.positionNode=e.positionNode,this.rotationNode=e.rotationNode,this.scaleNode=e.scaleNode,super.copy(e)}get sizeAttenuation(){return this._useSizeAttenuation}set sizeAttenuation(e){this._useSizeAttenuation!==e&&(this._useSizeAttenuation=e,this.needsUpdate=!0)}}const nL=new m7;class rL extends hv{static get type(){return"PointsNodeMaterial"}constructor(e){super(),this.sizeNode=null,this.isPointsNodeMaterial=!0,this.setDefaultValues(nL),this.setValues(e)}setupPositionView(){const{positionNode:e}=this;return Da.mul(ie(e||yn)).xyz}setupVertex(e){const t=super.setupVertex(e);if(e.material.isNodeMaterial!==!0)return t;const{rotationNode:n,scaleNode:i,sizeNode:s}=this,a=Ul.xy.toVar(),u=MA.z.div(MA.w);if(n&&n.isNode){const m=W(n);a.assign(e2(a,m))}let f=s!==null?Ee(s):Cy;return this.sizeAttenuation===!0&&(f=f.mul(f.div(En.z.negate()))),i&&i.isNode&&(f=f.mul(Ee(i))),a.mulAssign(f.mul(2)),a.assign(a.div(MA.z)),a.y.assign(a.y.mul(u)),a.assign(a.mul(t.w)),t.addAssign(We(a,0,0)),t}get alphaToCoverage(){return this._useAlphaToCoverage}set alphaToCoverage(e){this._useAlphaToCoverage!==e&&(this._useAlphaToCoverage=e,this.needsUpdate=!0)}}class iL extends Zc{constructor(){super(),this.shadowNode=W(1).toVar("shadowMask")}direct({shadowMask:e}){this.shadowNode.mulAssign(e)}finish(e){Ft.a.mulAssign(this.shadowNode.oneMinus()),e.outgoingLight.rgb.assign(Ft.rgb)}}const sL=new ST;class oL extends Ln{static get type(){return"ShadowNodeMaterial"}constructor(e){super(),this.isShadowNodeMaterial=!0,this.lights=!0,this.setDefaultValues(sL),this.setValues(e)}setupLightingModel(){return new iL}}const aL=le(({texture:r,uv:e})=>{const n=ie().toVar();return mt(e.x.lessThan(1e-4),()=>{n.assign(ie(1,0,0))}).ElseIf(e.y.lessThan(1e-4),()=>{n.assign(ie(0,1,0))}).ElseIf(e.z.lessThan(1e-4),()=>{n.assign(ie(0,0,1))}).ElseIf(e.x.greaterThan(1-1e-4),()=>{n.assign(ie(-1,0,0))}).ElseIf(e.y.greaterThan(1-1e-4),()=>{n.assign(ie(0,-1,0))}).ElseIf(e.z.greaterThan(1-1e-4),()=>{n.assign(ie(0,0,-1))}).Else(()=>{const s=r.sample(e.add(ie(-.01,0,0))).r.sub(r.sample(e.add(ie(.01,0,0))).r),a=r.sample(e.add(ie(0,-.01,0))).r.sub(r.sample(e.add(ie(0,.01,0))).r),u=r.sample(e.add(ie(0,0,-.01))).r.sub(r.sample(e.add(ie(0,0,.01))).r);n.assign(ie(s,a,u))}),n.normalize()});class AL extends Ms{static get type(){return"Texture3DNode"}constructor(e,t=null,n=null){super(e,t,n),this.isTexture3DNode=!0}getInputType(){return"texture3D"}getDefaultUV(){return ie(.5,.5,.5)}setUpdateMatrix(){}setupUV(e,t){const n=this.value;return e.isFlipY()&&(n.isRenderTargetTexture===!0||n.isFramebufferTexture===!0)&&(this.sampler?t=t.flipY():t=t.setY(te(ko(this,this.levelNode).y).sub(t.y).sub(1))),t}generateUV(e,t){return t.build(e,"vec3")}normal(e){return aL({texture:this,uv:e})}}const lL=xe(AL);class uL{constructor(e,t){this.nodes=e,this.info=t,this._context=self,this._animationLoop=null,this._requestId=null}start(){const e=(t,n)=>{this._requestId=this._context.requestAnimationFrame(e),this.info.autoReset===!0&&this.info.reset(),this.nodes.nodeFrame.update(
38),this.info.frame=this.nodes.nodeFrame.frameId,this._animationLoop!==null&&this._animationLoop(t,n)};e()}stop(){this._context.cancelAnimationFrame(this._requestId),this._requestId=null}getAnimationLoop(){return this._animationLoop}setAnimationLoop(e){this._animationLoop=e}getContext(){return this._context}setContext(e){this._context=e}dispose(){this.stop()}}class Rs{constructor(){this.weakMap=new WeakMap}get(e){let t=this.weakMap;for(let n=0;n<e.length-1;n++)if(t=t.get(e[n]),t===void 0)return;return t.get(e[e.length-1])}set(e,t){let n=this.weakMap;for(let i=0;i<e.length-1;i++){const s=e[i];n.has(s)===!1&&n.set(s,new WeakMap),n=n.get(s)}return n.set(e[e.length-1],t),this}delete(e){let t=this.weakMap;for(let n=0;n<e.length-1;n++)if(t=t.get(e[n]),t===void 0)return!1;return t.delete(e[e.length-1])}}let cL=0;function fL(r){const e=Object.keys(r);let t=Object.getPrototypeOf(r);for(;t;){const n=Object.getOwnPropertyDescriptors(t);for(const i in n)if(n[i]!==void 0){const s=n[i];s&&typeof s.get=="function"&&e.push(i)}t=Object.getPrototypeOf(t)}return e}class hL{constructor(e,t,n,i,s,a,u,f,m,y){this.id=cL++,this._nodes=e,this._geometries=t,this.renderer=n,this.object=i,this.material=s,this.scene=a,this.camera=u,this.lightsNode=f,this.context=m,this.geometry=i.geometry,this.version=s.version,this.drawRange=null,this.attributes=null,this.pipeline=null,this.group=null,this.vertexBuffers=null,this.drawParams=null,this.bundle=null,this.clippingContext=y,this.clippingContextCacheKey=y!==null?y.cacheKey:"",this.initialNodesCacheKey=this.getDynamicCacheKey(),this.initialCacheKey=this.getCacheKey(),this._nodeBuilderState=null,this._bindings=null,this._monitor=null,this.onDispose=null,this.isRenderObject=!0,this.onMaterialDispose=()=>{this.dispose()},this.material.addEventListener("dispose",this.onMaterialDispose)}updateClipping(e){this.clippingContext=e}get clippingNeedsUpdate(){return this.clippingContext===null||this.clippingContext.cacheKey===this.clippingContextCacheKey?!1:(this.clippingContextCacheKey=this.clippingContext.cacheKey,!0)}get hardwareClippingPlanes(){return this.material.hardwareClipping===!0?this.clippingContext.unionClippingCount:0}getNodeBuilderState(){return this._nodeBuilderState||(this._nodeBuilderState=this._nodes.getForRender(this))}getMonitor(){return this._monitor||(this._monitor=this.getNodeBuilderState().observer)}getBindings(){return this._bindings||(this._bindings=this.getNodeBuilderState().createBindings())}getBindingGroup(e){for(const t of this.getBindings())if(t.name===e)return t}getIndex(){return this._geometries.getIndex(this)}getIndirect(){return this._geometries.getIndirect(this)}getChainArray(){return[this.object,this.material,this.context,this.lightsNode]}setGeometry(e){this.geometry=e,this.attributes=null}getAttributes(){if(this.attributes!==null)return this.attributes;const e=this.getNodeBuilderState().nodeAttributes,t=this.geometry,n=[],i=new Set;for(const s of e){const a=s.node&&s.node.attribute?s.node.attribute:t.getAttribute(s.name);if(a===void 0)continue;n.push(a);const u=a.isInterleavedBufferAttribute?a.data:a;i.add(u)}return this.attributes=n,this.vertexBuffers=Array.from(i.values()),n}getVertexBuffers(){return this.vertexBuffers===null&&this.getAttributes(),this.vertexBuffers}getDrawParameters(){const{object:e,material:t,geometry:n,group:i,drawRange:s}=this,a=this.drawParams||(this.drawParams={vertexCount:0,firstVertex:0,instanceCount:0,firstInstance:0}),u=this.getIndex(),f=u!==null,m=n.isInstancedBufferGeometry?n.instanceCount:e.count>1?e.count:1;if(m===0)return null;if(a.instanceCount=m,e.isBatchedMesh===!0)return a;let y=1;t.wireframe===!0&&!e.isPoints&&!e.isLineSegments&&!e.isLine&&!e.isLineLoop&&(y=2);let _=s.start*y,b=(s.start+s.count)*y;i!==null&&(_=Math.max(_,i.start*y),b=Math.min(b,(i.start+i.count)*y));const w=n.attributes.position;let S=1/0;f?S=u.count:w!=null&&(S=w.count),_=Math.max(_,0),b=Math.min(b,S);const E=b-_;return E<0||E===1/0?null:(a.vertexCount=E,a.firstVertex=_,a)}getGeometryCacheKey(){const{geometry:e}=this;let t="";for(const n of Object.keys(e.attributes).sort()){const i=e.attributes[n];t+=n+",",i.data&&(t+=i.data.stride+","),i.offset&&(t+=i.offset+","),i.itemSize&&(t+=i.itemSize+","),i.normalized&&(t+="n,")}for(const n of Object.keys(e.morphAttributes).sort()){const i=e.morphAttributes[n];t+="morph-"+n+",";for(let s=0,a=i.length;s<a;s++){const u=i[s];t+=u.id+","}}return e.index&&(t+="index,"),t}getMaterialCacheKey(){const{object:e,material:t}=this;let n=t.customProgramCacheKey();
38for(const i of fL(t)){if(/^(is[A-Z]|_)|^(visible|version|uuid|name|opacity|userData)$/.test(i))continue;const s=t[i];let a;if(s!==null){const u=typeof s;u==="number"?a=s!==0?"1":"0":u==="object"?(a="{",s.isTexture&&(a+=s.mapping),a+="}"):a=String(s)}else a=String(s);n+=a+","}return n+=this.clippingContextCacheKey+",",e.geometry&&(n+=this.getGeometryCacheKey()),e.skeleton&&(n+=e.skeleton.bones.length+","),e.isBatchedMesh&&(n+=e._matricesTexture.uuid+",",e._colorsTexture!==null&&(n+=e._colorsTexture.uuid+",")),e.count>1&&(n+=e.uuid+","),n+=e.receiveShadow+",",Wg(n)}get needsGeometryUpdate(){return this.geometry.id!==this.object.geometry.id}get needsUpdate(){return this.initialNodesCacheKey!==this.getDynamicCacheKey()||this.clippingNeedsUpdate}getDynamicCacheKey(){let e=0;return this.material.isShadowPassMaterial!==!0&&(e=this._nodes.getCacheKey(this.scene,this.lightsNode)),this.camera.isArrayCamera&&(e=cl(e,this.camera.cameras.length)),this.object.receiveShadow&&(e=cl(e,1)),e}getCacheKey(){return this.getMaterialCacheKey()+this.getDynamicCacheKey()}dispose(){this.material.removeEventListener("dispose",this.onMaterialDispose),this.onDispose()}}const ia=[];class dL{constructor(e,t,n,i,s,a){this.renderer=e,this.nodes=t,this.geometries=n,this.pipelines=i,this.bindings=s,this.info=a,this.chainMaps={}}get(e,t,n,i,s,a,u,f){const m=this.getChainMap(f);ia[0]=e,ia[1]=t,ia[2]=a,ia[3]=s;let y=m.get(ia);return y===void 0?(y=this.createRenderObject(this.nodes,this.geometries,this.renderer,e,t,n,i,s,a,u,f),m.set(ia,y)):(y.updateClipping(u),y.needsGeometryUpdate&&y.setGeometry(e.geometry),(y.version!==t.version||y.needsUpdate)&&(y.initialCacheKey!==y.getCacheKey()?(y.dispose(),y=this.get(e,t,n,i,s,a,u,f)):y.version=t.version)),ia.length=0,y}getChainMap(e="default"){return this.chainMaps[e]||(this.chainMaps[e]=new Rs)}dispose(){this.chainMaps={}}createRenderObject(e,t,n,i,s,a,u,f,m,y,_){const b=this.getChainMap(_),w=new hL(e,t,n,i,s,a,u,f,m,y);return w.onDispose=()=>{this.pipelines.delete(w),this.bindings.delete(w),this.nodes.delete(w),b.delete(w.getChainArray())},w}}class Wo{constructor(){this.data=new WeakMap}get(e){let t=this.data.get(e);return t===void 0&&(t={},this.data.set(e,t)),t}delete(e){let t=null;return this.data.has(e)&&(t=this.data.get(e),this.data.delete(e)),t}has(e){return this.data.has(e)}dispose(){this.data=new WeakMap}}const ps={VERTEX:1,INDEX:2,STORAGE:3,INDIRECT:4},Bo=16,pL=211,mL=212;class gL extends Wo{constructor(e){super(),this.backend=e}delete(e){const t=super.delete(e);return t!==void 0&&this.backend.destroyAttribute(e),t}update(e,t){const n=this.get(e);if(n.version===void 0)t===ps.VERTEX?this.backend.createAttribute(e):t===ps.INDEX?this.backend.createIndexAttribute(e):t===ps.STORAGE?this.backend.createStorageAttribute(e):t===ps.INDIRECT&&this.backend.createIndirectStorageAttribute(e),n.version=this._getBufferAttribute(e).version;else{const i=this._getBufferAttribute(e);(n.version<i.version||i.usage===cA)&&(this.backend.updateAttribute(e),n.version=i.version)}}_getBufferAttribute(e){return e.isInterleavedBufferAttribute&&(e=e.data),e}}function dv(r){return r.index!==null?r.index.version:r.attributes.position.version}function E6(r){const e=[],t=r.index,n=r.attributes.position;if(t!==null){const s=t.array;for(let a=0,u=s.length;a<u;a+=3){const f=s[a+0],m=s[a+1],y=s[a+2];e.push(f,m,m,y,y,f)}}else{const s=n.array;for(let a=0,u=s.length/3-1;a<u;a+=3){const f=a+0,m=a+1,y=a+2;e.push(f,m,m,y,y,f)}}const i=new(MT(e)?ET:NT)(e,1);return i.version=dv(r),i}class yL extends Wo{constructor(e,t){super(),this.attributes=e,this.info=t,this.wireframes=new WeakMap,this.attributeCall=new WeakMap}has(e){const t=e.geometry;return super.has(t)&&this.get(t).initialized===!0}updateForRender(e){this.has(e)===!1&&this.initGeometry(e),this.updateAttributes(e)}initGeometry(e){const t=e.geometry,n=this.get(t);n.initialized=!0,this.info.memory.geometries++;const i=()=>{this.info.memory.geometries--;const s=t.index,a=e.getAttributes();s!==null&&this.attributes.delete(s);for(const f of a)this.attributes.delete(f);const u=this.wireframes.get(t);u!==void 0&&this.attributes.delete(u),t.removeEventListener("dispose",i)};t.addEventListener("dispose",i)}updateAttributes(e){const t=e.getAttributes();for(const s of t)s.isStorageBufferAttribute||s.isStorageInstancedBufferAttribute?this.updateAttribute(s,ps.STORAGE):this.updateAttribute(s,ps.VERTEX);const n=this.getIndex(e);n!==null&&this.updateAttribute(n,ps.INDEX);const i=e.geometry.indirect;
38i!==null&&this.updateAttribute(i,ps.INDIRECT)}updateAttribute(e,t){const n=this.info.render.calls;e.isInterleavedBufferAttribute?this.attributeCall.get(e)===void 0?(this.attributes.update(e,t),this.attributeCall.set(e,n)):this.attributeCall.get(e.data)!==n&&(this.attributes.update(e,t),this.attributeCall.set(e.data,n),this.attributeCall.set(e,n)):this.attributeCall.get(e)!==n&&(this.attributes.update(e,t),this.attributeCall.set(e,n))}getIndirect(e){return e.geometry.indirect}getIndex(e){const{geometry:t,material:n}=e;let i=t.index;if(n.wireframe===!0){const s=this.wireframes;let a=s.get(t);a===void 0?(a=E6(t),s.set(t,a)):a.version!==dv(t)&&(this.attributes.delete(a),a=E6(t),s.set(t,a)),i=a}return i}}class vL{constructor(){this.autoReset=!0,this.frame=0,this.calls=0,this.render={calls:0,frameCalls:0,drawCalls:0,triangles:0,points:0,lines:0,timestamp:0},this.compute={calls:0,frameCalls:0,timestamp:0},this.memory={geometries:0,textures:0}}update(e,t,n){this.render.drawCalls++,e.isMesh||e.isSprite?this.render.triangles+=n*(t/3):e.isPoints?this.render.points+=n*t:e.isLineSegments?this.render.lines+=n*(t/2):e.isLine?this.render.lines+=n*(t-1):console.error("THREE.WebGPUInfo: Unknown object type.")}reset(){this.render.drawCalls=0,this.render.frameCalls=0,this.compute.frameCalls=0,this.render.triangles=0,this.render.points=0,this.render.lines=0}dispose(){this.reset(),this.calls=0,this.render.calls=0,this.compute.calls=0,this.render.timestamp=0,this.compute.timestamp=0,this.memory.geometries=0,this.memory.textures=0}}class pv{constructor(e){this.cacheKey=e,this.usedTimes=0}}class _L extends pv{constructor(e,t,n){super(e),this.vertexProgram=t,this.fragmentProgram=n}}class xL extends pv{constructor(e,t){super(e),this.computeProgram=t,this.isComputePipeline=!0}}let bL=0;class uf{constructor(e,t,n,i=null,s=null){this.id=bL++,this.code=e,this.stage=t,this.name=n,this.transforms=i,this.attributes=s,this.usedTimes=0}}class TL extends Wo{constructor(e,t){super(),this.backend=e,this.nodes=t,this.bindings=null,this.caches=new Map,this.programs={vertex:new Map,fragment:new Map,compute:new Map}}getForCompute(e,t){const{backend:n}=this,i=this.get(e);if(this._needsComputeUpdate(e)){const s=i.pipeline;s&&(s.usedTimes--,s.computeProgram.usedTimes--);const a=this.nodes.getForCompute(e);let u=this.programs.compute.get(a.computeShader);u===void 0&&(s&&s.computeProgram.usedTimes===0&&this._releaseProgram(s.computeProgram),u=new uf(a.computeShader,"compute",e.name,a.transforms,a.nodeAttributes),this.programs.compute.set(a.computeShader,u),n.createProgram(u));const f=this._getComputeCacheKey(e,u);let m=this.caches.get(f);m===void 0&&(s&&s.usedTimes===0&&this._releasePipeline(s),m=this._getComputePipeline(e,u,f,t)),m.usedTimes++,u.usedTimes++,i.version=e.version,i.pipeline=m}return i.pipeline}getForRender(e,t=null){const{backend:n}=this,i=this.get(e);if(this._needsRenderUpdate(e)){const s=i.pipeline;s&&(s.usedTimes--,s.vertexProgram.usedTimes--,s.fragmentProgram.usedTimes--);const a=e.getNodeBuilderState(),u=e.material?e.material.name:"";let f=this.programs.vertex.get(a.vertexShader);f===void 0&&(s&&s.vertexProgram.usedTimes===0&&this._releaseProgram(s.vertexProgram),f=new uf(a.vertexShader,"vertex",u),this.programs.vertex.set(a.vertexShader,f),n.createProgram(f));let m=this.programs.fragment.get(a.fragmentShader);m===void 0&&(s&&s.fragmentProgram.usedTimes===0&&this._releaseProgram(s.fragmentProgram),m=new uf(a.fragmentShader,"fragment",u),this.programs.fragment.set(a.fragmentShader,m),n.createProgram(m));const y=this._getRenderCacheKey(e,f,m);let _=this.caches.get(y);_===void 0?(s&&s.usedTimes===0&&this._releasePipeline(s),_=this._getRenderPipeline(e,f,m,y,t)):e.pipeline=_,_.usedTimes++,f.usedTimes++,m.usedTimes++,i.pipeline=_}return i.pipeline}delete(e){const t=this.get(e).pipeline;return t&&(t.usedTimes--,t.usedTimes===0&&this._releasePipeline(t),t.isComputePipeline?(t.computeProgram.usedTimes--,t.computeProgram.usedTimes===0&&this._releaseProgram(t.computeProgram)):(t.fragmentProgram.usedTimes--,t.vertexProgram.usedTimes--,t.vertexProgram.usedTimes===0&&this._releaseProgram(t.vertexProgram),t.fragmentProgram.usedTimes===0&&this._releaseProgram(t.fragmentProgram))),super.delete(e)}dispose(){super.dispose(),this.caches=new Map,this.programs={vertex:new Map,fragment:new Map,compute:new Map}}updateForRender(e){this.getForRender(e)}_getComputePipeline(e,t,n,i){n=n||this._getComputeCacheKey(e,t);let s=this.caches.get(n);return s===void 0&&(s=new xL(n,t),this.caches.set(n,s),this.backend.createComputePipeline(s,i)),s}_getRenderPipeline(e,t,n,i,s){i=i||this._getRenderCacheKey(e,t,n);let a=this.caches.get(i);return a===void 0&&(a=new _L(i,t,n),this.caches.set(i,a),e.pipeline=a,this.backend.createRenderPipeline(e,s)),a}_getComputeCacheKey(e,t){return e.id+","+t.id}_getRenderCacheKey(e,t,n){return t.id+","+n.id+","+this.backend.getRenderCacheKey(e)}
38_releasePipeline(e){this.caches.delete(e.cacheKey)}_releaseProgram(e){const t=e.code,n=e.stage;this.programs[n].delete(t)}_needsComputeUpdate(e){const t=this.get(e);return t.pipeline===void 0||t.version!==e.version}_needsRenderUpdate(e){return this.get(e).pipeline===void 0||this.backend.needsRenderUpdate(e)}}class wL extends Wo{constructor(e,t,n,i,s,a){super(),this.backend=e,this.textures=n,this.pipelines=s,this.attributes=i,this.nodes=t,this.info=a,this.pipelines.bindings=this}getForRender(e){const t=e.getBindings();for(const n of t){const i=this.get(n);i.bindGroup===void 0&&(this._init(n),this.backend.createBindings(n,t,0),i.bindGroup=n)}return t}getForCompute(e){const t=this.nodes.getForCompute(e).bindings;for(const n of t){const i=this.get(n);i.bindGroup===void 0&&(this._init(n),this.backend.createBindings(n,t,0),i.bindGroup=n)}return t}updateForCompute(e){this._updateBindings(this.getForCompute(e))}updateForRender(e){this._updateBindings(this.getForRender(e))}_updateBindings(e){for(const t of e)this._update(t,e)}_init(e){for(const t of e.bindings)if(t.isSampledTexture)this.textures.updateTexture(t.texture);else if(t.isStorageBuffer){const n=t.attribute,i=n.isIndirectStorageBufferAttribute?ps.INDIRECT:ps.STORAGE;this.attributes.update(n,i)}}_update(e,t){const{backend:n}=this;let i=!1,s=!0,a=0,u=0;for(const f of e.bindings)if(!(f.isNodeUniformsGroup&&this.nodes.updateGroup(f)===!1)){if(f.isUniformBuffer)f.update()&&n.updateBinding(f);else if(f.isSampler)f.update();else if(f.isSampledTexture){const m=this.textures.get(f.texture);f.needsBindingsUpdate(m.generation)&&(i=!0);const y=f.update(),_=f.texture;y&&this.textures.updateTexture(_);const b=n.get(_);if(b.externalTexture!==void 0||m.isDefaultTexture?s=!1:(a=a*10+_.id,u+=_.version),n.isWebGPUBackend===!0&&b.texture===void 0&&b.externalTexture===void 0&&(console.error("Bindings._update: binding should be available:",f,y,_,f.textureNode.value,i),this.textures.updateTexture(_),i=!0),_.isStorageTexture===!0){const w=this.get(_);f.store===!0?w.needsMipmap=!0:this.textures.needsMipmaps(_)&&w.needsMipmap===!0&&(this.backend.generateMipmaps(_),w.needsMipmap=!1)}}}i===!0&&this.backend.updateBindings(e,t,s?a:0,u)}}function SL(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.material.id!==e.material.id?r.material.id-e.material.id:r.z!==e.z?r.z-e.z:r.id-e.id}function N6(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.z!==e.z?e.z-r.z:r.id-e.id}function R6(r){return(r.transmission>0||r.transmissionNode)&&r.side===Qi&&r.forceSinglePass===!1}class ML{constructor(e,t,n){this.renderItems=[],this.renderItemsIndex=0,this.opaque=[],this.transparentDoublePass=[],this.transparent=[],this.bundles=[],this.lightsNode=e.getNode(t,n),this.lightsArray=[],this.scene=t,this.camera=n,this.occlusionQueryCount=0}begin(){return this.renderItemsIndex=0,this.opaque.length=0,this.transparentDoublePass.length=0,this.transparent.length=0,this.bundles.length=0,this.lightsArray.length=0,this.occlusionQueryCount=0,this}getNextRenderItem(e,t,n,i,s,a,u){let f=this.renderItems[this.renderItemsIndex];return f===void 0?(f={id:e.id,object:e,geometry:t,material:n,groupOrder:i,renderOrder:e.renderOrder,z:s,group:a,clippingContext:u},this.renderItems[this.renderItemsIndex]=f):(f.id=e.id,f.object=e,f.geometry=t,f.material=n,f.groupOrder=i,f.renderOrder=e.renderOrder,f.z=s,f.group=a,f.clippingContext=u),this.renderItemsIndex++,f}push(e,t,n,i,s,a,u){const f=this.getNextRenderItem(e,t,n,i,s,a,u);e.occlusionTest===!0&&this.occlusionQueryCount++,n.transparent===!0||n.transmission>0?(R6(n)&&this.transparentDoublePass.push(f),this.transparent.push(f)):this.opaque.push(f)}unshift(e,t,n,i,s,a,u){const f=this.getNextRenderItem(e,t,n,i,s,a,u);n.transparent===!0||n.transmission>0?(R6(n)&&this.transparentDoublePass.unshift(f),this.transparent.unshift(f)):this.opaque.unshift(f)}pushBundle(e){this.bundles.push(e)}pushLight(e){this.lightsArray.push(e)}sort(e,t){this.opaque.length>1&&this.opaque.sort(e||SL),this.transparentDoublePass.length>1&&this.transparentDoublePass.sort(t||N6),this.transparent.length>1&&this.transparent.sort(t||N6)}finish(){this.lightsNode.setLights(this.lightsArray);for(let e=this.renderItemsIndex,t=this.renderItems.length;e<t;e++){const n=this.renderItems[e];if(n.id===null)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.groupOrder=null,n.renderOrder=null,n.z=null,n.group=null,n.clippingContext=null}}}const d0=[];class EL{constructor(e){this.lighting=e,this.lists=new Rs}get(e,t){const n=this.lists;d0[0]=e,d0[1]=t;let i=n.get(d0);return i===void 0&&(i=new ML(this.lighting,e,t),n.set(d0,i)),d0.length=0,i}dispose(){this.lists=new Rs}}let NL=0;class RL{constructor(){this.id=NL++,this.color=!0,this.clearColor=!0,this.clearColorValue={r:0,g:0,b:0,a:1},this.depth=!0,this.clearDepth=!0,this.clearDepthValue=1,this.stencil=!1,this.clearStencil=!0,this.clearStencilValue=1,this.viewport=!1,this.viewportValue=new Qt,this.scissor=!1,this.scissorValue=new Qt,this.renderTarget=null,this.textures=null,this.depthTexture=null,this.activeCubeFace=0,this.activeMipmapLevel=0,this.sampleCount=1,this.width=0,this.height=0,this.occlusionQueryCount=0,this.clippingContext=null,this.isRenderContext=!0}getCacheKey(){return mv(this)}}function mv(r){const{textures:e,activeCubeFace:t}=r,n=[t];for(const i of e)n.push(i.id);return Dc(n)}const p0=[],CL=new Sc,PL=new Sd;class BL{constructor(){this.chainMaps={}}get(e,t,n=null){p0[0]=e,p0[1]=t;let i;if(n===null)i="default";else{const u=n.texture.format;i=`${n.textures.length}:${u}:${n.samples}:${n.depthBuffer}:${n.stencilBuffer}`}const s=this._getChainMap(i);let a=s.get(p0);return a===void 0&&(a=new RL,s.set(p0,a)),p0.length=0,n!==null&&(a.sampleCount=n.samples===0?1:n.samples),a}getForClear(e=null){return this.get(CL,PL,e)}_getChainMap(e){return this.chainMaps[e]||(this.chainMaps[e]=new Rs)}dispose(){this.chainMaps={}}}const FL=new ke;class DL extends Wo{constructor(e,t,n){super(),this.renderer=e,this.backend=t,this.info=n}updateRenderTarget(e,t=0){const n=this.get(e),i=e.samples===0?1:e.samples,s=n.depthTextureMips||(n.depthTextureMips={}),a=e.textures,u=this.getSize(a[0]),f=u.width>>t,m=u.height>>t;let y=e.depthTexture||s[t];const _=e.depthBuffer===!0||e.stencilBuffer===!0;let b=!1;y===void 0&&_&&(y=new $o,y.format=e.stencilBuffer?wl:Sl,y.type=e.stencilBuffer?Ml:fr,y.image.width=f,y.image.height=m,s[t]=y),(n.width!==u.width||u.height!==n.height)&&(b=!0,y&&(y.needsUpdate=!0,y.image.width=f,y.image.height=m)),n.width=u.width,n.height=u.height,n.textures=a,n.depthTexture=y||null,
38n.depth=e.depthBuffer,n.stencil=e.stencilBuffer,n.renderTarget=e,n.sampleCount!==i&&(b=!0,y&&(y.needsUpdate=!0),n.sampleCount=i);const w={sampleCount:i};if(e.isXRRenderTarget!==!0){for(let S=0;S<a.length;S++){const E=a[S];b&&(E.needsUpdate=!0),this.updateTexture(E,w)}y&&this.updateTexture(y,w)}if(n.initialized!==!0){n.initialized=!0;const S=()=>{e.removeEventListener("dispose",S);for(let E=0;E<a.length;E++)this._destroyTexture(a[E]);y&&this._destroyTexture(y),this.delete(e)};e.addEventListener("dispose",S)}}updateTexture(e,t={}){const n=this.get(e);if(n.initialized===!0&&n.version===e.version)return;const i=e.isRenderTargetTexture||e.isDepthTexture||e.isFramebufferTexture,s=this.backend;if(i&&n.initialized===!0&&(s.destroySampler(e),s.destroyTexture(e)),e.isFramebufferTexture){const m=this.renderer.getRenderTarget();m?e.type=m.texture.type:e.type=ms}const{width:a,height:u,depth:f}=this.getSize(e);if(t.width=a,t.height=u,t.depth=f,t.needsMipmaps=this.needsMipmaps(e),t.levels=t.needsMipmaps?this.getMipLevels(e,a,u):1,i||e.isStorageTexture===!0)s.createSampler(e),s.createTexture(e,t),n.generation=e.version;else if(n.initialized!==!0&&s.createSampler(e),e.version>0){const y=e.image;if(y===void 0)console.warn("THREE.Renderer: Texture marked for update but image is undefined.");else if(y.complete===!1)console.warn("THREE.Renderer: Texture marked for update but image is incomplete.");else{if(e.images){const _=[];for(const b of e.images)_.push(b);t.images=_}else t.image=y;(n.isDefaultTexture===void 0||n.isDefaultTexture===!0)&&(s.createTexture(e,t),n.isDefaultTexture=!1,n.generation=e.version),e.source.dataReady===!0&&s.updateTexture(e,t),t.needsMipmaps&&e.mipmaps.length===0&&s.generateMipmaps(e)}}else s.createDefaultTexture(e),n.isDefaultTexture=!0,n.generation=e.version;if(n.initialized!==!0){n.initialized=!0,n.generation=e.version,this.info.memory.textures++;const m=()=>{e.removeEventListener("dispose",m),this._destroyTexture(e),this.info.memory.textures--};e.addEventListener("dispose",m)}n.version=e.version}getSize(e,t=FL){let n=e.images?e.images[0]:e.image;return n?(n.image!==void 0&&(n=n.image),t.width=n.width||1,t.height=n.height||1,t.depth=e.isCubeTexture?6:n.depth||1):t.width=t.height=t.depth=1,t}getMipLevels(e,t,n){let i;return e.isCompressedTexture?e.mipmaps?i=e.mipmaps.length:i=1:i=Math.floor(Math.log2(Math.max(t,n)))+1,i}needsMipmaps(e){return this.isEnvironmentTexture(e)||e.isCompressedTexture===!0||e.generateMipmaps}isEnvironmentTexture(e){const t=e.mapping;return t===El||t===Nl||t===NA||t===RA}_destroyTexture(e){this.backend.destroySampler(e),this.backend.destroyTexture(e),this.delete(e)}}class e3 extends Yn{constructor(e,t,n,i=1){super(e,t,n),this.a=i}set(e,t,n,i=1){return this.a=i,super.set(e,t,n)}copy(e){return e.a!==void 0&&(this.a=e.a),super.copy(e)}clone(){return new this.constructor(this.r,this.g,this.b,this.a)}}class gv extends kt{static get type(){return"ParameterNode"}constructor(e,t=null){super(e,t),this.isParameterNode=!0}getHash(){return this.uuid}generate(){return this.name}}const LL=(r,e)=>Te(new gv(r,e));class qL extends Ke{static get type(){return"StackNode"}constructor(e=null){super(),this.nodes=[],this.outputNode=null,this.parent=e,this._currentCond=null,this.isStackNode=!0}getNodeType(e){return this.outputNode?this.outputNode.getNodeType(e):"void"}getMemberType(e,t){return this.outputNode?this.outputNode.getMemberType(e,t):"void"}add(e){return this.nodes.push(e),this}If(e,t){const n=new U0(t);return this._currentCond=dr(e,n),this.add(this._currentCond)}ElseIf(e,t){const n=new U0(t),i=dr(e,n);return this._currentCond.elseNode=i,this._currentCond=i,this}Else(e){return this._currentCond.elseNode=new U0(e),this}build(e,...t){const n=up();hl(this);for(const i of this.nodes)i.build(e,"void");return hl(n),this.outputNode?this.outputNode.build(e,...t):super.build(e,...t)}else(...e){return console.warn("TSL.StackNode: .else() has been renamed to .Else()."),this.Else(...e)}elseif(...e){return console.warn("TSL.StackNode: .elseif() has been renamed to .ElseIf()."),this.ElseIf(...e)}}const m1=xe(qL);function IL(r){return Object.entries(r).map(([e,t])=>typeof t=="string"?{name:e,type:t,atomic:!1}:{name:e,type:t.type,atomic:t.atomic||!1})}class kL extends Ke{static get type(){return"StructTypeNode"}constructor(e,t=null){super("struct"),this.membersLayout=IL(e),this.name=t,this.isStru
38ctLayoutNode=!0}getLength(){let e=0;for(const t of this.membersLayout)e+=sp(t.type);return e}getMemberType(e,t){const n=this.membersLayout.find(i=>i.name===t);return n?n.type:"void"}getNodeType(e){return e.getStructTypeFromNode(this,this.membersLayout,this.name).name}generate(e){return this.getNodeType(e)}}class UL extends Ke{static get type(){return"StructNode"}constructor(e,t){super("vec3"),this.structLayoutNode=e,this.values=t,this.isStructNode=!0}getNodeType(e){return this.structLayoutNode.getNodeType(e)}getMemberType(e,t){return this.structLayoutNode.getMemberType(e,t)}generate(e){const t=e.getVarFromNode(this),n=t.type,i=e.getPropertyName(t);return e.addLineFlowCode(`${i} = ${e.generateStruct(n,this.structLayoutNode.membersLayout,this.values)}`,this),t.name}}const OL=(r,e=null)=>{const t=new kL(r,e),n=(...i)=>{let s=null;if(i.length>0)if(i[0].isNode){s={};const a=Object.keys(r);for(let u=0;u<i.length;u++)s[a[u]]=i[u]}else s=i[0];return Te(new UL(t,s))};return n.layout=t,n.isStruct=!0,n};class yv extends Ke{static get type(){return"OutputStructNode"}constructor(...e){super(),this.members=e,this.isOutputStructNode=!0}getNodeType(e){const t=e.getNodeProperties(this);if(t.membersLayout===void 0){const n=this.members,i=[];for(let s=0;s<n.length;s++){const a="m"+s,u=n[s].getNodeType(e);i.push({name:a,type:u,index:s})}t.membersLayout=i,t.structType=e.getOutputStructTypeFromNode(this,t.membersLayout)}return t.structType.name}generate(e){const t=e.getOutputStructName(),n=this.members,i=t!==""?t+".":"";for(let s=0;s<n.length;s++){const a=n[s].build(e);e.addLineFlowCode(`${i}m${s} = ${a}`,this)}return t}}const GL=xe(yv);function vv(r,e){for(let t=0;t<r.length;t++)if(r[t].name===e)return t;return-1}class VL extends yv{static get type(){return"MRTNode"}constructor(e){super(),this.outputNodes=e,this.isMRTNode=!0}has(e){return this.outputNodes[e]!==void 0}get(e){return this.outputNodes[e]}merge(e){const t={...this.outputNodes,...e.outputNodes};return _v(t)}setup(e){const t=this.outputNodes,n=e.renderer.getRenderTarget(),i=[],s=n.textures;for(const a in t){const u=vv(s,a);i[u]=We(t[a])}return this.members=i,super.setup(e)}}const _v=xe(VL),zL=le(([r])=>{const e=r.toUint().mul(747796405).add(2891336453),t=e.shiftRight(e.shiftRight(28).add(4)).bitXor(e).mul(277803737);return t.shiftRight(22).bitXor(t).toFloat().mul(1/2**32)}),dd=(r,e)=>Hi(ut(4,r.mul(Et(1,r))),e),jL=(r,e)=>r.lessThan(.5)?dd(r.mul(2),e).div(2):Et(1,dd(ut(Et(1,r),2),e).div(2)),$L=(r,e,t)=>Hi(Ki(Hi(r,e),Dn(Hi(r,e),Hi(Et(1,r),t))),1/e),HL=(r,e)=>ci(pc.mul(e.mul(r).sub(1))).div(pc.mul(e.mul(r).sub(1))),Hs=le(([r])=>r.fract().sub(.5).abs()).setLayout({name:"tri",type:"float",inputs:[{name:"x",type:"float"}]}),WL=le(([r])=>ie(Hs(r.z.add(Hs(r.y.mul(1)))),Hs(r.z.add(Hs(r.x.mul(1)))),Hs(r.y.add(Hs(r.x.mul(1)))))).setLayout({name:"tri3",type:"vec3",inputs:[{name:"p",type:"vec3"}]}),QL=le(([r,e,t])=>{const n=ie(r).toVar(),i=W(1.4).toVar(),s=W(0).toVar(),a=ie(n).toVar();return It({start:W(0),end:W(3),type:"float",condition:"<="},()=>{const u=ie(WL(a.mul(2))).toVar();n.addAssign(u.add(t.mul(W(.1).mul(e)))),a.mulAssign(1.8),i.mulAssign(1.5),n.mulAssign(1.2);const f=W(Hs(n.z.add(Hs(n.x.add(Hs(n.y)))))).toVar();s.addAssign(f.div(i)),a.addAssign(.14)}),s}
38).setLayout({name:"triNoise3D",type:"float",inputs:[{name:"position",type:"vec3"},{name:"speed",type:"float"},{name:"time",type:"float"}]});class YL extends Ke{static get type(){return"FunctionOverloadingNode"}constructor(e=[],...t){super(),this.functionNodes=e,this.parametersNodes=t,this._candidateFnCall=null,this.global=!0}getNodeType(){return this.functionNodes[0].shaderNode.layout.type}setup(e){const t=this.parametersNodes;let n=this._candidateFnCall;if(n===null){let i=null,s=-1;for(const a of this.functionNodes){const f=a.shaderNode.layout;if(f===null)throw new Error("FunctionOverloadingNode: FunctionNode must be a layout.");const m=f.inputs;if(t.length===m.length){let y=0;for(let _=0;_<t.length;_++){const b=t[_],w=m[_];b.getNodeType(e)===w.type?y++:y=0}y>s&&(i=a,s=y)}}this._candidateFnCall=n=i(...t)}return n}}const XL=xe(YL),gr=r=>(...e)=>XL(r,...e),La=Ye(0).setGroup(Ze).onRenderUpdate(r=>r.time),xv=Ye(0).setGroup(Ze).onRenderUpdate(r=>r.deltaTime),KL=Ye(0,"uint").setGroup(Ze).onRenderUpdate(r=>r.frameId),ZL=(r=1)=>(console.warn('TSL: timerLocal() is deprecated. Use "time" instead.'),La.mul(r)),JL=(r=1)=>(console.warn('TSL: timerGlobal() is deprecated. Use "time" instead.'),La.mul(r)),eq=(r=1)=>(console.warn('TSL: timerDelta() is deprecated. Use "deltaTime" instead.'),xv.mul(r)),tq=(r=La)=>r.add(.75).mul(Math.PI*2).sin().mul(.5).add(.5),nq=(r=La)=>r.fract().round(),rq=(r=La)=>r.add(.5).fract().mul(2).sub(1).abs(),iq=(r=La)=>r.fract(),sq=le(([r,e,t=Ee(.5)])=>e2(r.sub(t),e).add(t)),oq=le(([r,e,t=Ee(.5)])=>{const n=r.sub(t),i=n.dot(n),a=i.mul(i).mul(e);return r.add(n.mul(a))}),aq=le(({position:r=null,horizontal:e=!0,vertical:t=!1})=>{let n;r!==null?(n=Si.toVar(),n[3][0]=r.x,n[3][1]=r.y,n[3][2]=r.z):n=Si;const i=Jr.mul(n);return fl(e)&&(i[0][0]=Si[0].length(),i[0][1]=0,i[0][2]=0),fl(t)&&(i[1][0]=0,i[1][1]=Si[1].length(),i[1][2]=0),i[2][0]=0,i[2][1]=0,i[2][2]=1,Fa.mul(i).mul(yn)}),Aq=le(([r=null])=>{const e=yc();return yc($p(r)).sub(e).lessThan(0).select(Ns,r)});class lq extends Ke{static get type(){return"SpriteSheetUVNode"}constructor(e,t=dn(),n=W(0)){super("vec2"),this.countNode=e,this.uvNode=t,this.frameNode=n}setup(){const{frameNode:e,uvNode:t,countNode:n}=this,{width:i,height:s}=n,a=e.mod(i.mul(s)).floor(),u=a.mod(i),f=s.sub(a.add(1).div(i).ceil()),m=n.reciprocal(),y=Ee(u,f);return t.add(y).mul(m)}}const uq=xe(lq);class cq extends Ke{static get type(){return"TriplanarTexturesNode"}constructor(e,t=null,n=null,i=W(1),s=yn,a=Zr){super("vec4"),this.textureXNode=e,this.textureYNode=t,this.textureZNode=n,this.scaleNode=i,this.positionNode=s,this.normalNode=a}setup(){const{textureXNode:e,textureYNode:t,textureZNode:n,scaleNode:i,positionNode:s,normalNode:a}=this;let u=a.abs().normalize();u=u.div(u.dot(ie(1)));const f=s.yz.mul(i),m=s.zx.mul(i),y=s.xy.mul(i),_=e.value,b=t!==null?t.value:_,w=n!==null?n.value:_,S=xt(_,f).mul(u.x),E=xt(b,m).mul(u.y),R=xt(w,y).mul(u.z);return Dn(S,E,R)}}const bv=xe(cq),fq=(...r)=>bv(...r),Ka=new Md,sa=new ke,Za=new ke,cf=new ke,m0=new Bn,Bu=new ke(0,0,-1),is=new Qt,g0=new ke,Fu=new ke,y0=new Qt,Du=new Wt,_c=new jo,hq=Ns.flipX();_c.depthTexture=new $o(1,1);let ff=!1;class t3 extends Ms{static get type(){return"ReflectorNode"}constructor(e={}){super(e.defaultTexture||_c.texture,hq),this._reflectorBaseNode=e.reflector||new dq(this,e),this._depthNode=null,this.setUpdateMatrix(!1)}get reflector(){return this._reflectorBaseNode}get target(){return this._reflectorBaseNode.target}getDepthNode(){if(this._depthNode===null){if(this._reflectorBaseNode.depth!==!0)throw new Error("THREE.ReflectorNode: Depth node can only be requested when the reflector is created with { depth: true }. ");this._depthNode=Te(new t3({defaultTexture:_c.depthTexture,reflector:this._reflectorBaseNode}))}return this._depthNode}setup(e){return e.object.isQuadMesh||this._reflectorBaseNode.build(e),super.setup(e)}clone(){const e=new this.constructor(this.reflectorNode);return e._reflectorBaseNode=this._reflectorBaseNode,e}}class dq extends Ke{static get type(){return"ReflectorBaseNode"}constructor(e,t={}){super();const{target:n=new Rc,resolution:i=1,generateMipmaps:s=!1,bounces:a=!0,depth:u=!1}=t;this.textureNode=e,this.target=n,this.resolution=i,this.generateMipmaps=s,this.bounces=a,this.depth=u,this.updateBeforeType=a?lt.RENDER:lt.FRAME,this.virtualCameras=new WeakMap,this.renderTargets=new WeakMap}_updateResolution(e,t){const n=this.resolution;t.getDrawingBufferSize(Du),e.setSize(Math.round(Du.width*n),Math.round(Du.height*n))}setup(e){return this._updateResolution(_c,e.renderer),super.setup(e)}getVirtualCamera(e){let t=this.virtualCameras.get(e);return t===void 0&&(t=e.clone(),this.virtualCameras.set(e,t)),t}getRenderTarget(e){let t=this.renderTargets.get(e);return t===void 0&&(t=new jo(0,0,{type:Mi}),this.generateMipmaps===!0&&(t.texture.minFilter=XT,t.texture.generateMipmaps=!0),this.depth===!0&&(t.depthTexture=new $o),this.renderTargets.set(e,t)),t}updateBefore(e){if(this.bounces===!1&&ff)return!1;ff=!0;const{scene:t,camera:n,renderer:i,material:s}=e,{target:a}=this,u=this.getVirtualCamera(n),f=this.getRenderTarget(u);if(i.getDrawingBufferSize(Du),this._updateResolution(f,i),Za.setFromMatrixPosition(a.matrixWorld),cf.setFromMatrixPosition(n.matrixWorld),m0.extractRotation(a.matrixWorld),sa.set(0,0,1),sa.applyMatrix4(m0),g0.subVectors(Za,cf),g0.dot(sa)>0)return;g0.reflect(sa).negate(),g0.add(Za),m0.extractRotation(n.matrixWorld),Bu.set(0,0,-1),Bu.applyM
38atrix4(m0),Bu.add(cf),Fu.subVectors(Za,Bu),Fu.reflect(sa).negate(),Fu.add(Za),u.coordinateSystem=n.coordinateSystem,u.position.copy(g0),u.up.set(0,1,0),u.up.applyMatrix4(m0),u.up.reflect(sa),u.lookAt(Fu),u.near=n.near,u.far=n.far,u.updateMatrixWorld(),u.projectionMatrix.copy(n.projectionMatrix),Ka.setFromNormalAndCoplanarPoint(sa,Za),Ka.applyMatrix4(u.matrixWorldInverse),is.set(Ka.normal.x,Ka.normal.y,Ka.normal.z,Ka.constant);const m=u.projectionMatrix;y0.x=(Math.sign(is.x)+m.elements[8])/m.elements[0],y0.y=(Math.sign(is.y)+m.elements[9])/m.elements[5],y0.z=-1,y0.w=(1+m.elements[10])/m.elements[14],is.multiplyScalar(1/is.dot(y0));const y=0;m.elements[2]=is.x,m.elements[6]=is.y,m.elements[10]=i.coordinateSystem===VA?is.z-y:is.z+1-y,m.elements[14]=is.w,this.textureNode.value=f.texture,this.depth===!0&&(this.textureNode.getDepthNode().value=f.depthTexture),s.visible=!1;const _=i.getRenderTarget(),b=i.getMRT(),w=i.autoClear;i.setMRT(null),i.setRenderTarget(f),i.autoClear=!0,i.render(t,u),i.setMRT(b),i.setRenderTarget(_),i.autoClear=w,s.visible=!0,ff=!1}}const pq=r=>Te(new t3(r)),hf=new L0(-1,1,1,-1,0,1);class mq extends Pi{constructor(e=!1){super();const t=e===!1?[0,-1,0,1,2,1]:[0,2,0,0,2,0];this.setAttribute("position",new Uo([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Uo(t,2))}}const gq=new mq;class n3 extends zn{constructor(e=null){super(gq,e),this.camera=hf,this.isQuadMesh=!0}async renderAsync(e){return e.renderAsync(this,hf)}render(e){e.render(this,hf)}}const yq=new Wt;class vq extends Ms{static get type(){return"RTTNode"}constructor(e,t=null,n=null,i={type:Mi}){const s=new jo(t,n,i);super(s.texture,dn()),this.node=e,this.width=t,this.height=n,this.pixelRatio=1,this.renderTarget=s,this.textureNeedsUpdate=!0,this.autoUpdate=!0,this._rttNode=null,this._quadMesh=new n3(new Ln),this.updateBeforeType=lt.RENDER}get autoSize(){return this.width===null}setup(e){return this._rttNode=this.node.context(e.getSharedContext()),this._quadMesh.material.name="RTT",this._quadMesh.material.needsUpdate=!0,super.setup(e)}setSize(e,t){this.width=e,this.height=t;const n=e*this.pixelRatio,i=t*this.pixelRatio;this.renderTarget.setSize(n,i),this.textureNeedsUpdate=!0}setPixelRatio(e){this.pixelRatio=e,this.setSize(this.width,this.height)}updateBefore({renderer:e}){if(this.textureNeedsUpdate===!1&&this.autoUpdate===!1)return;if(this.textureNeedsUpdate=!1,this.autoSize===!0){this.pixelRatio=e.getPixelRatio();const n=e.getSize(yq);this.setSize(n.width,n.height)}this._quadMesh.material.fragmentNode=this._rttNode;
38const t=e.getRenderTarget();e.setRenderTarget(this.renderTarget),this._quadMesh.render(e),e.setRenderTarget(t)}clone(){const e=new Ms(this.value,this.uvNode,this.levelNode);return e.sampler=this.sampler,e.referenceNode=this,e}}const Tv=(r,...e)=>Te(new vq(Te(r),...e)),_q=(r,...e)=>r.isTextureNode?r:r.isPassNode?r.getTextureNode():Tv(r,...e),uA=le(([r,e,t],n)=>{let i;n.renderer.coordinateSystem===VA?(r=Ee(r.x,r.y.oneMinus()).mul(2).sub(1),i=We(ie(r,e),1)):i=We(ie(r.x,r.y.oneMinus(),e).mul(2).sub(1),1);const s=We(t.mul(i));return s.xyz.div(s.w)}),xq=le(([r,e])=>{const t=e.mul(We(r,1)),n=t.xy.div(t.w).mul(.5).add(.5).toVar();return Ee(n.x,n.y.oneMinus())}),bq=le(([r,e,t])=>{const n=ko(Tn(e)),i=Qn(r.mul(n)).toVar(),s=Tn(e,i).toVar(),a=Tn(e,i.sub(Qn(2,0))).toVar(),u=Tn(e,i.sub(Qn(1,0))).toVar(),f=Tn(e,i.add(Qn(1,0))).toVar(),m=Tn(e,i.add(Qn(2,0))).toVar(),y=Tn(e,i.add(Qn(0,2))).toVar(),_=Tn(e,i.add(Qn(0,1))).toVar(),b=Tn(e,i.sub(Qn(0,1))).toVar(),w=Tn(e,i.sub(Qn(0,2))).toVar(),S=rn(Et(W(2).mul(u).sub(a),s)).toVar(),E=rn(Et(W(2).mul(f).sub(m),s)).toVar(),R=rn(Et(W(2).mul(_).sub(y),s)).toVar(),P=rn(Et(W(2).mul(b).sub(w),s)).toVar(),L=uA(r,s,t).toVar(),D=S.lessThan(E).select(L.sub(uA(r.sub(Ee(W(1).div(n.x),0)),u,t)),L.negate().add(uA(r.add(Ee(W(1).div(n.x),0)),f,t))),O=R.lessThan(P).select(L.sub(uA(r.add(Ee(0,W(1).div(n.y))),_,t)),L.negate().add(uA(r.sub(Ee(0,W(1).div(n.y))),b,t)));return ao(jc(D,O))});class g1 extends Tl{constructor(e,t,n=Float32Array){const i=ArrayBuffer.isView(e)?e:new n(e*t);super(i,t),this.isStorageInstancedBufferAttribute=!0}}class Tq extends Wi{constructor(e,t,n=Float32Array){const i=ArrayBuffer.isView(e)?e:new n(e*t);super(i,t),this.isStorageBufferAttribute=!0}}class wq extends Ba{static get type(){return"StorageArrayElementNode"}constructor(e,t){super(e,t),this.isStorageArrayElementNode=!0}set storageBufferNode(e){this.node=e}get storageBufferNode(){return this.node}getMemberType(e,t){const n=this.storageBufferNode.structTypeNode;return n?n.getMemberType(e,t):"void"}setup(e){return e.isAvailable("storageBuffer")===!1&&this.node.isPBO===!0&&e.setupPBO(this.node),super.setup(e)}generate(e,t){let n;const i=e.context.assign;if(e.isAvailable("storageBuffer")===!1?this.node.isPBO===!0&&i!==!0&&(this.node.value.isInstancedBufferAttribute||e.shaderStage!=="compute")?n=e.generatePBO(this):n=this.node.build(e):n=super.generate(e),i!==!0){const s=this.getNodeType(e);n=e.format(n,s,t)}return n}}const Sq=xe(wq);class Mq extends qp{static get type(){return"StorageBufferNode"}constructor(e,t=null,n=0){let i,s=null;t&&t.isStruct?(i="struct",s=t.layout):t===null&&(e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute)?(i=Yg(e.itemSize),n=e.count):i=t,super(e,i,n),this.isStorageBufferNode=!0,this.structTypeNode=s,this.access=Tr.READ_WRITE,this.isAtomic=!1,this.isPBO=!1,this._attribute=null,this._varying=null,this.global=!0,e.isStorageBufferAttribute!==!0&&e.isStorageInstancedBufferAttribute!==!0&&(e.isInstancedBufferAttribute?e.isStorageInstancedBufferAttribute=!0:e.isStorageBufferAttribute=!0)}getHash(e){if(this.bufferCount===0){let t=e.globalCache.getData(this.value);return t===void 0&&(t={node:this},e.globalCache.setData(this.value,t)),t.node.uuid}return this.uuid}getInputType(){return this.value.isIndirectStorageBufferAttribute?"indirectStorageBuffer":"storageBuffer"}element(e){return Sq(this,e)}setPBO(e){return this.isPBO=e,this}getPBO(){return this.isPBO}setAccess(e){return this.access=e,this}toReadOnly(){return this.setAccess(Tr.READ_ONLY)}setAtomic(e){return this.isAtomic=e,this}toAtomic(){return this.setAtomic(!0)}getAttributeData(){return this._attribute===null&&(this._attribute=Il(this.value),this._varying=Er(this._attribute)),{attribute:this._attribute,varying:this._varying}}getNodeType(e){if(this.structTypeNode!==null)return this.structTypeNode.getNodeType(e);if(e.isAvailable("storageBuffer")||e.isAvailable("indirectStorageBuffer"))return super.getNodeType(e);const{attribute:t}=this.getAttributeData();return t.getNodeType(e)}generate(e){if(this.structTypeNode!==null&&this.structTypeNode.build(e),e.isAvailable("storageBuffer")||e.isAvailable("indirectStorageBuffer"))return super.generate(e);const{attribute:t,varying:n}=this.getAttributeData(),i=n.build(e);return e.registerTransform(i,t),i}}const t2=(r,e=null,t=0)=>Te(new Mq(r,e,t)),Eq=(r,e,t)=>(console.warn('THREE.TSL: "storageObject()" is deprecated. Use "storage().setPBO( true )" instead.'),t2(r,e,t).setPBO(!0)),Nq=(r,e="float")=>{let t,n;e.isStruct===!0?(t=e.layout.getLength(),n=uc("float")):(t=sp(e),n=uc(e));const i=new Tq(r,t,n);return t2(i,e,r)},Rq=(r,e="float")=>{let t,n;e.isStruct===!0?(t=e.layout.getLength(),n=uc("float")):(t=sp(e),n=uc(e));const i=new g1(r,t,n);return t2(i,e,r)};class Cq extends L9{static get type(){return"VertexColorNode"}constructor(e=0){super(null,"vec4"),this.isVertexColorNode=!0,this.index=e}getAttributeName(){const e=this.index;return"color"+(e>0?e:"")}generate(e){const t=this.getAttributeName(e),n=e.hasGeometryAttribute(t);let i;return n===!0?i=super.generate(e):i=e.generateConst(this.nodeType,new Qt(1,1,1,1)),i}serialize(e){super.serialize(e),e.index=this.index}deserialize(e){super.deserialize(e),this.index=e.index}}const Pq=r=>Te(new Cq(r));class Bq extends Ke{static get type(){return"PointUVNode"}constructor(){super("vec2"),this.isPointUVNode=!0}generate(){return"vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )"}}const Fq=Ue(Bq),v0=new _1,df=new Bn;class Yr extends Ke{static get type(){return"SceneNode"}constructor(e=Yr.BACKGROUND_BLURRINESS,t=null){super(),this.scope=e,this.scene=t}setup(e){const t=this.scope,n=this.scene!==null?this.scene:e.scene;let i;return t===Yr.BACKGROUND_BLURRINESS?i=zt("backgroundBlurriness","float",n):t===Yr.BACKGROUND_INTENSITY?i=zt("backgroundIntensity","float",n):t===Yr.BACKGROUND_ROTATION?i=Ye("mat4").label("backgroundRotation").setGroup(Ze).onRenderUpd
38ate(()=>{const s=n.background;return s!==null&&s.isTexture&&s.mapping!==Ub?(v0.copy(n.backgroundRotation),v0.x*=-1,v0.y*=-1,v0.z*=-1,df.makeRotationFromEuler(v0)):df.identity(),df}):console.error("THREE.SceneNode: Unknown scope:",t),i}}Yr.BACKGROUND_BLURRINESS="backgroundBlurriness";Yr.BACKGROUND_INTENSITY="backgroundIntensity";Yr.BACKGROUND_ROTATION="backgroundRotation";const wv=Ue(Yr,Yr.BACKGROUND_BLURRINESS),pd=Ue(Yr,Yr.BACKGROUND_INTENSITY),Sv=Ue(Yr,Yr.BACKGROUND_ROTATION);class Dq extends Ms{static get type(){return"StorageTextureNode"}constructor(e,t,n=null){super(e,t),this.storeNode=n,this.isStorageTextureNode=!0,this.access=Tr.WRITE_ONLY}getInputType(){return"storageTexture"}setup(e){super.setup(e);const t=e.getNodeProperties(this);t.storeNode=this.storeNode}setAccess(e){return this.access=e,this}generate(e,t){let n;return this.storeNode!==null?n=this.generateStore(e):n=super.generate(e,t),n}toReadWrite(){return this.setAccess(Tr.READ_WRITE)}toReadOnly(){return this.setAccess(Tr.READ_ONLY)}toWriteOnly(){return this.setAccess(Tr.WRITE_ONLY)}generateStore(e){const t=e.getNodeProperties(this),{uvNode:n,storeNode:i}=t,s=super.generate(e,"property"),a=n.build(e,"uvec2"),u=i.build(e,"vec4"),f=e.generateTextureStore(e,s,a,u);e.addLineFlowCode(f,this)}}const Mv=xe(Dq),Lq=(r,e,t)=>{const n=Mv(r,e,t);return t!==null&&n.append(),n};class qq extends Yc{static get type(){return"UserDataNode"}constructor(e,t,n=null){super(e,t,n),this.userData=n}updateReference(e){return this.reference=this.userData!==null?this.userData:e.object.userData,this.reference}}const Iq=(r,e,t)=>Te(new qq(r,e,t)),C6=new WeakMap;class kq extends Rn{static get type(){return"VelocityNode"}constructor(){super("vec2"),this.projectionMatrix=null,this.updateType=lt.OBJECT,this.updateAfterType=lt.OBJECT,this.previousModelWorldMatrix=Ye(new Bn),this.previousProjectionMatrix=Ye(new Bn).setGroup(Ze),this.previousCameraViewMatrix=Ye(new Bn)}setProjectionMatrix(e){this.projectionMatrix=e}update({frameId:e,camera:t,object:n}){const i=P6(n);this.previousModelWorldMatrix.value.copy(i);const s=Ev(t);s.frameId!==e&&(s.frameId=e,s.previousProjectionMatrix===void 0?(s.previousProjectionMatrix=new Bn,s.previousCameraViewMatrix=new Bn,s.currentProjectionMatrix=new Bn,s.currentCameraViewMatrix=new Bn,s.previousProjectionMatrix.copy(this.projectionMatrix||t.projectionMatrix),s.previousCameraViewMatrix.copy(t.matrixWorldInverse)):(s.previousProjectionMatrix.copy(s.currentProjectionMatrix),s.previousCameraViewMatrix.copy(s.currentCameraViewMatrix)),s.currentProjectionMatrix.copy(this.projectionMatrix||t.projectionMatrix),s.currentCameraViewMatrix.copy(t.matrixWorldInverse),this.previousProjectionMatrix.value.copy(s.previousProjectionMatrix),this.previousCameraViewMatrix.value.copy(s.previousCameraViewMatrix))}updateAfter({object:e}){P6(e).copy(e.matrixWorld)}setup(){const e=this.projectionMatrix===null?Fa:Ye(this.projectionMatrix),t=this.previousCameraViewMatrix.mul(this.previousModelWorldMatrix),n=e.mul(Da).mul(yn),i=this.previousProjectionMatrix.mul(t).mul(gc),s=n.xy.div(n.w),a=i.xy.div(i.w);return Et(s,a)}}function Ev(r){let e=C6.get(r);return e===void 0&&(e={},C6.set(r,e)),e}function P6(r,e=0){const t=Ev(r);let n=t[e];return n===void 0&&(t[e]=n=new Bn),n}const Uq=Ue(kq),Nv=le(([r,e])=>Kr(1,r.oneMinus().div(e)).oneMinus()).setLayout({name:"blendBurn",type:"vec3",inputs:[{name:"base",type:"vec3"},{name:"blend",type:"vec3"}]}),Rv=le(([r,e])=>Kr(r.div(e.oneMinus()),1)).setLayout({name:"blendDodge",type:"vec3",inputs:[{name:"base",type:"vec3"},{name:"blend",type:"vec3"}]}),Cv=le(([r,e])=>r.oneMinus().mul(e.oneMinus()).oneMinus()).setLayout({name:"blendScreen",type:"vec3",inputs:[{name:"base",type:"vec3"},{name:"blend",type:"vec3"}]}),Pv=le(([r,e])=>qt(r.mul(2).mul(e),r.oneMinus().mul(2).mul(e.oneMinus()).oneMinus(),zc(.5,r))).setLayout({name:"blendOverlay",type:"vec3",inputs:[{name:"base",type:"vec3"},{name:"blend",type:"vec3"}]}),Oq=le(([r,e])=>{const t=e.a.add(r.a.mul(e.a.oneMinus()));return We(e.rgb.mul(e.a).add(r.rgb.mul(r.a).mul(e.a.oneMinus())).div(t),t)}).setLayout({name:"blendColor",type:"vec4",inputs:[{name:"base",type:"vec4"},{name:"blend",type:"vec4"}]}),Gq=(...r)=>(console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'),Nv(r)),Vq=(...r)=>(console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'),Rv(r)),zq=(...r)=>(console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'),Cv(r)),jq=(...r)=>(console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'),Pv(r)),$q=le(([r])=>r3(r.rgb)),Hq=le(([r,e=W(1)])=>e.mix(r3(r.rgb),r.rgb)),Wq=le(([r,e=W(1)])=>{const t=Dn(r.r,r.g,r.b).div(3),n=r.r.max(r.g.max(r.b)),i=n.sub(t).mul(e).mul(-3);return qt(r.rgb,n,i)}),Qq=le(([r,e=W(1)])=>{const t=ie(.57735,.57735,.57735),n=e.cos();return ie(r.rgb.mul(n).add(t.cross(r.rgb).mul(e.sin()).add(t.mul(Ho(t,r.rgb).mul(n.oneMinus())))))}),r3=(r,e=ie(us.getLuminanceCoefficients(new ke)))=>Ho(r,e),Yq=le(([r,e=ie(1),t=ie(0),n=ie(1),i=W(1),s=ie(us.getLuminanceCoefficients(new ke,va))])=>{const a=r.rgb.dot(ie(s)),u=Nn(r.rgb.mul(e).add(t),0).toVar(),f=u.pow(n).toVar();return mt(u.r.greaterThan(0),()=>{u.r.assign(f.r)}),mt(u.g.greaterThan(0),()=>{u.g.assign(f.g)}),mt(u.b.greaterThan(0),()=>{u.b.assign(f.b)}),u.assign(a.add(u.sub(a).mul(i))),We(u.rgb,r.a)});class Xq extends Rn{static get type(){return"PosterizeNode"}constructor(e,t){super(),this.sourceNode=e,this.stepsNode=t}setup(){const{sourceNode:e,stepsNode:t}=this;return e.mul(t).floor().div(t)}}const Kq=xe(Xq),Zq=new Wt;class Bv extends Ms{static get type(){return"PassTextureNode"}constructor(e,t){super(t),this.passNode=e,this.setUpdateMatrix(!1)}setup(e){return e.object.isQuadMesh&&this.passNode.build(e),super.setup(e)}clone(){return new this.constructor(this.passNode,this.value)}}class B6 extends Bv{static get type(){return"PassMultipleTextureNode"}constructor(e,t,n=!1){super(e,null),this.textureName=t,this.previousTexture=n}updateTexture(){this.value=this.previousTexture?this.passNode.getPreviousTexture(this.textureName):this.passNode.getTexture(this.textureName)}setup(e){return this.updateTexture(),super.setup(e)}clone(){return new this.constructor(this.passNode,this.textureName,this.previousTexture)}}class Cs extends Rn{static get type(){return"PassNode"}constructor(e,t,n,i={}){super("vec4"),this.scope=e,this.scene=t,this.camera=n,this.options=i,this._pixelRatio=1,this._width=1,this._height=1;const s=new $o;s.isRenderTargetTexture=!0,s.name="depth";const a=new jo(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Mi,...i});a.texture.name="output",a.depthTexture=s,this.renderTarget=a,this._textures={output:a.texture,depth:s},this._textureNodes={},this._linearDepthNodes={},this._viewZNodes={},this._previousTextures={},this._previousTextureNodes={},this._cameraNear=Ye(0),this._cameraFar=Ye(0),this._mrt=null,this.isPassNode=!0,this.updateBeforeType=lt.FRAME}setMRT(e){return this._mrt=e,this}getMRT(){return this._mrt}isGlobal(){return!0}getTexture(e){let t=this._textures[e];return t===void 0&&(t=this.renderTarget.texture.clone(),t.name=e,this._textures[e]=t,this.renderTarget.textures.push(t)),t}getPreviousTexture(e){let t=this._previousTextures[e];return t===void 0&&(t=this.getTexture(e).clone(),this._previousTextures[e]=t),t}toggleTexture(e){const t=this._previousTextures[e];if(t!==void 0){const n=this._textures[e],i=this.renderTarget.textures.indexOf(n);this.renderTarget.textures[i]=t,this._textures[e]=t,this._previousTextures[e]=n,this._textureNodes[e].updateTexture(),this._previousTextureNodes[e].updateTexture()}}getTextureNode(e="output"){let t=this._textureNodes[e];return t===void 0&&(t=Te(new B6(this,e)),t.updateTexture(),this._textureNodes[e]=t),t}getPreviousTextureNode(e="output"){let t=this._previousTextureNodes[e];return t===void 0&&(this._textureNodes[e]===void 0&&this.getTextureNode(e),t=Te(new B6(this,e,!0)),t.updateTexture(),this._previousTextureNodes[e]=t),t}getViewZNode(e="depth"){let t=this._viewZNodes[e];if(t===void 0){const n=this._cameraNear,i=this._cameraFar;this._viewZNodes[e]=t=Hp(this.getTextureNode(e),n,i)}return t}getLinearDepthNode(e="depth"){let t=this._linearDepthNodes[e];if(t===void 0){const n=this._cameraNear,i=this._cameraFar,s=this.getViewZNode(e);this._linearDepthNodes[e]=t=EA(s,n,i)}return t}setup({renderer:e}){return this.renderTarget.samples=this.options.samples===void 0?e.samples:this.options.samples,e.backend.isWebGLBackend===!0&&(this.renderTarget.samples=0),this.renderTarget.texture.type=e.getColorBufferType(),this.scope===Cs.COLOR?this.getTextureNode():this.getLinearDepthNode()}updateBefore(e){const{renderer:t}=e,{scene:n,camera:i}=this;this._pixelRatio=t.getPixelRatio();const s=t.getSize(Zq);this.setSize(s.width,s.height);const a=t.getRenderTarget(),u=t.getMRT();this._cameraNear.value=i.near,this._cameraFar.value=i.far;for(const f in this._previousTextures)this.toggleTexture(f);t.setRenderTarget(this.renderTarget),t.setMRT(this._mrt),t.render(n,i),t.setRenderTarget(a),t.setMRT(u)}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,i=this._height*this._pixelRatio;this.renderTarget.setSize(n,i)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget.dispose()}}Cs.COLOR="color";Cs.DEPTH="depth";const Jq=(r,e,t)=>Te(new Cs(Cs.COLOR,r,e,t)),eI=(r,e)=>Te(new Bv(r,e)),tI=(r,e,t)=>Te(new Cs(Cs.DEPTH,r,e,t));
38class nI extends Cs{static get type(){return"ToonOutlinePassNode"}constructor(e,t,n,i,s){super(Cs.COLOR,e,t),this.colorNode=n,this.thicknessNode=i,this.alphaNode=s,this._materialCache=new WeakMap}updateBefore(e){const{renderer:t}=e,n=t.getRenderObjectFunction();t.setRenderObjectFunction((i,s,a,u,f,m,y,_)=>{if((f.isMeshToonMaterial||f.isMeshToonNodeMaterial)&&f.wireframe===!1){const b=this._getOutlineMaterial(f);t.renderObject(i,s,a,u,b,m,y,_)}t.renderObject(i,s,a,u,f,m,y,_)}),super.updateBefore(e),t.setRenderObjectFunction(n)}_createMaterial(){const e=new Ln;e.isMeshToonOutlineMaterial=!0,e.name="Toon_Outline",e.side=Xi;const t=Zr.negate(),n=Fa.mul(Da),i=W(1),s=n.mul(We(yn,1)),a=n.mul(We(yn.add(t),1)),u=ao(s.sub(a));return e.vertexNode=s.add(u.mul(this.thicknessNode).mul(s.w).mul(i)),e.colorNode=We(this.colorNode,this.alphaNode),e}_getOutlineMaterial(e){let t=this._materialCache.get(e);return t===void 0&&(t=this._createMaterial(),this._materialCache.set(e,t)),t}}const rI=(r,e,t=new Yn(0,0,0),n=.003,i=1)=>Te(new nI(r,e,Te(t),Te(n),Te(i))),Fv=le(([r,e])=>r.mul(e).clamp()).setLayout({name:"linearToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]}),Dv=le(([r,e])=>(r=r.mul(e),r.div(r.add(1)).clamp())).setLayout({name:"reinhardToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]}),Lv=le(([r,e])=>{r=r.mul(e),r=r.sub(.004).max(0);const t=r.mul(r.mul(6.2).add(.5)),n=r.mul(r.mul(6.2).add(1.7)).add(.06);return t.div(n).pow(2.2)}).setLayout({name:"cineonToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]}),iI=le(([r])=>{const e=r.mul(r.add(.0245786)).sub(90537e-9),t=r.mul(r.add(.432951).mul(.983729)).add(.238081);return e.div(t)}),qv=le(([r,e])=>{const t=Sr(.59719,.35458,.04823,.076,.90834,.01566,.0284,.13383,.83777),n=Sr(1.60475,-.53108,-.07367,-.10208,1.10813,-.00605,-.00327,-.07276,1.07602);return r=r.mul(e).div(.6),r=t.mul(r),r=iI(r),r=n.mul(r),r.clamp()}).setLayout({name:"acesFilmicToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]}),sI=Sr(ie(1.6605,-.1246,-.0182),ie(-.5876,1.1329,-.1006),ie(-.0728,-.0083,1.1187)),oI=Sr(ie(.6274,.0691,.0164),ie(.3293,.9195,.088),ie(.0433,.0113,.8956)),aI=le(([r])=>{const e=ie(r).toVar(),t=ie(e.mul(e)).toVar(),n=ie(t.mul(t)).toVar();return W(15.5).mul(n.mul(t)).sub(ut(40.14,n.mul(e))).add(ut(31.96,n).sub(ut(6.868,t.mul(e))).add(ut(.4298,t).add(ut(.1191,e).sub(.00232))))}),Iv=le(([r,e])=>{const t=ie(r).toVar(),n=Sr(ie(.856627153315983,.137318972929847,.11189821299995),ie(.0951212405381588,.761241990602591,.0767994186031903),ie(.0482516061458583,.101439036467562,.811302368396859)),i=Sr(ie(1.1271005818144368,-.1413297634984383,-.14132976349843826),ie(-.11060664309660323,1.157823702216272,-.11060664309660294),ie(-.016493938717834573,-.016493938717834257,1.2519364065950405)),s=W(-12.47393),a=W(4.026069);return t.mulAssign(e),t.assign(oI.mul(t)),t.assign(n.mul(t)),t.assign(Nn(t,1e-10)),t.assign(vs(t)),t.assign(t.sub(s).div(a.sub(s))),t.assign(Ts(t,0,1)),t.assign(aI(t)),t.assign(i.mul(t)),t.assign(Hi(Nn(ie(0),t),ie(2.2))),t.assign(sI.mul(t)),t.assign(Ts(t,0,1)),t}).setLayout({name:"agxToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]}),kv=le(([r,e])=>{const t=W(.76),n=W(.15);r=r.mul(e);const i=Kr(r.r,Kr(r.g,r.b)),s=dr(i.lessThan(.08),i.sub(ut(6.25,i.mul(i))),.04);r.subAssign(s);const a=Nn(r.r,Nn(r.g,r.b));mt(a.lessThan(t),()=>r);const u=Et(1,t),f=Et(1,u.mul(u).div(a.add(u.sub(t))));r.mulAssign(f.div(a));const m=Et(1,Ki(1,n.mul(a.sub(f)).add(1)));return qt(r,ie(f),m)}).setLayout({name:"neutralToneMapping",type:"vec3",inputs:[{name:"color",type:"vec3"},{name:"exposure",type:"float"}]});class On extends Ke{static get type(){return"CodeNode"}constructor(e="",t=[],n=""){super("code"),this.isCodeNode=!0,this.code=e,this.includes=t,this.language=n}isGlobal(){return!0}setIncludes(e){return this.includes=e,this}getIncludes(){return this.includes}generate(e){const t=this.getIncludes(e);for(const i of t)i.build(e);const n=e.getCodeFromNode(this,this.getNodeType(e));return n.code=this.code,n.code}serialize(e){super.serialize(e),e.code=this.code,e.language=this.language}deserialize(e){super.deserialize(e),this.code=e.code,this.language=e.language}}const n2=xe(On),AI=(r,e)=>n2(r,e,"js"),lI=(r,e)=>n2(r,e,"wgsl"),uI=(r,e)=>n2(r,e,"glsl");class Uv extends On{static get type(){return"FunctionNode"}constructor(e="",t=[],n=""){super(e,t,n)}getNodeType(e){return this.getNodeFunction(e).type}getInputs(e){return this.getNodeFunction(e).inputs}getNodeFunction(e){const t=e.getDataFromNode(this);let n=t.nodeFunction;return n===void 0&&(n=e.parser.parseFunction(this.code),t.nodeFunction=n),n}generate(e,t){super.generate(e);const n=this.getNodeFunction(e),i=n.name,s=n.type,a=e.getCodeFromNode(this,s);i!==""&&(a.name=i);const u=e.getPropertyName(a),f=this.getNodeFunction(e).getCode(u);return a.code=f+` 39`,t==="property"?u:e.format(`${u}()`,s,t)}}const Ov=(r,e=[],t="")=>{for(let s=0;s<e.length;s++){const a=e[s];typeof a=="function"&&(e[s]=a.functionNode)}
39const n=Te(new Uv(r,e,t)),i=(...s)=>n.call(...s);return i.functionNode=n,i},cI=(r,e)=>Ov(r,e,"glsl"),fI=(r,e)=>Ov(r,e,"wgsl");class hI extends Ke{static get type(){return"ScriptableValueNode"}constructor(e=null){super(),this._value=e,this._cache=null,this.inputType=null,this.outputType=null,this.events=new Ed,this.isScriptableValueNode=!0}get isScriptableOutputNode(){return this.outputType!==null}set value(e){this._value!==e&&(this._cache&&this.inputType==="URL"&&this.value.value instanceof ArrayBuffer&&(URL.revokeObjectURL(this._cache),this._cache=null),this._value=e,this.events.dispatchEvent({type:"change"}),this.refresh())}get value(){return this._value}refresh(){this.events.dispatchEvent({type:"refresh"})}getValue(){const e=this.value;if(e&&this._cache===null&&this.inputType==="URL"&&e.value instanceof ArrayBuffer)this._cache=URL.createObjectURL(new Blob([e.value]));else if(e&&e.value!==null&&e.value!==void 0&&((this.inputType==="URL"||this.inputType==="String")&&typeof e.value=="string"||this.inputType==="Number"&&typeof e.value=="number"||this.inputType==="Vector2"&&e.value.isVector2||this.inputType==="Vector3"&&e.value.isVector3||this.inputType==="Vector4"&&e.value.isVector4||this.inputType==="Color"&&e.value.isColor||this.inputType==="Matrix3"&&e.value.isMatrix3||this.inputType==="Matrix4"&&e.value.isMatrix4))return e.value;return this._cache||e}getNodeType(e){return this.value&&this.value.isNode?this.value.getNodeType(e):"float"}setup(){return this.value&&this.value.isNode?this.value:W()}serialize(e){super.serialize(e),this.value!==null?this.inputType==="ArrayBuffer"?e.value=Zg(this.value):e.value=this.value?this.value.toJSON(e.meta).uuid:null:e.value=null,e.inputType=this.inputType,e.outputType=this.outputType}deserialize(e){super.deserialize(e);let t=null;e.value!==null&&(e.inputType==="ArrayBuffer"?t=Jg(e.value):e.inputType==="Texture"?t=e.meta.textures[e.value]:t=e.meta.nodes[e.value]||null),this.value=t,this.inputType=e.inputType,this.outputType=e.outputType}}const y1=xe(hI);class Gv extends Map{get(e,t=null,...n){if(this.has(e))return super.get(e);if(t!==null){const i=t(...n);return this.set(e,i),i}}}class dI{constructor(e){this.scriptableNode=e}get parameters(){return this.scriptableNode.parameters}get layout(){return this.scriptableNode.getLayout()}getInputLayout(e){return this.scriptableNode.getInputLayout(e)}get(e){const t=this.parameters[e];return t?t.getValue():null}}const v1=new Gv;class pI extends Ke{static get type(){return"ScriptableNode"}constructor(e=null,t={}){super(),this.codeNode=e,this.parameters=t,this._local=new Gv,this._output=y1(),this._outputs={},this._source=this.source,this._method=null,this._object=null,this._value=null,this._needsOutputUpdate=!0,this.onRefresh=this.onRefresh.bind(this),this.isScriptableNode=!0}get source(){return this.codeNode?this.codeNode.code:""}setLocal(e,t){return this._local.set(e,t)}getLocal(e){return this._local.get(e)}onRefresh(){this._refresh()}getInputLayout(e){for(const t of this.getLayout())if(t.inputType&&(t.id===e||t.name===e))return t}getOutputLayout(e){for(const t of this.getLayout())if(t.outputType&&(t.id===e||t.name===e))return t}setOutput(e,t){const n=this._outputs;return n[e]===void 0?n[e]=y1(t):n[e].value=t,this}getOutput(e){return this._outputs[e]}getParameter(e){return this.parameters[e]}setParameter(e,t){const n=this.parameters;return t&&t.isScriptableNode?(this.deleteParameter(e),n[e]=t,n[e].getDefaultOutput().events.addEventListener("refresh",this.onRefresh)):t&&t.isScriptableValueNode?(this.deleteParameter(e),n[e]=t,n[e].events.addEventListener("refresh",this.onRefresh)):n[e]===void 0?(n[e]=y1(t),n[e].events.addEventListener("refresh",this.onRefresh)):n[e].value=t,this}getValue(){return this.getDefaultOutput().getValue()}deleteParameter(e){let t=this.parameters[e];return t&&(t.isScriptableNode&&(t=t.getDefaultOutput()),t.events.removeEventListener("refresh",this.onRefresh)),this}clearParameters(){for(const e of Object.keys(this.parameters))this.deleteParameter(e);return this.needsUpdate=!0,this}call(e,...t){const i=this.getObject()[e];if(typeof i=="function")return i(...t)}async callAsync(e,...t){const i=this.getObject()[e];if(typeof i=="function")return i.constructor.name==="AsyncFunction"?await i(...t):i(...t)}getNodeType(e){return this.getDefaultOutputNode().getNodeType(e)}refresh(e=null){e!==null?this.getOutput(e).refresh():this._refresh()}getObject(){if(this.needsUpdate&&this.dispose(),this._object!==null)return this._object;const e=()=>this.refresh(),t=(m,y)=>this.setOutput(m,y),n=new dI(this),i=v1.get("THREE"),s=v1.get("TSL"),a=this.getMethod(),u=[n,this._local,v1,e,t,i,s];this._object=a(...u);const f=this._object.layout;if(f&&(f.cache===!1&&this._local.clear(),this._output.outputType=f.outputType||null,Array.isArray(f.elements)))for(const m of f.elements){const y=m.id||m.name;m.inputType&&(this.getParameter(y)===void 0&&this.setParameter(y,null),this.getParameter(y).inputType=m.inputType),m.outputType&&(this.getOutput(y)===void 0&&this.setOutput(y,null),this.getOutput(y).outputType=m.outputType)}return this._object}deserialize(e){super.deserialize(e);for(const t in this.parameters){let n=this.parameters[t];n.isScriptableNode&&(n=n.getDefaultOutput()),n.events.addEventListener("refresh",this.onRefresh)}}getLayout(){return this.getObject().layout}getDefaultOutputNode(){const e=this.getDefaultOutput().value;return e&&e.isNode?e:W()}getDefaultOutput(){return this._exec()._output}getMethod(){if(this.needsUpdate&&this.dispose(),this._method!==null)return this._method;const e=["parameters","local","global","refresh","setOutput","THREE","TSL"],n=["layout","init","main","dispose"].join(", "),i="var "+n+`; var output = {}; 40`,s=` 41return { ...output, `+n+" };",a=i+this.codeNode.code+s;return this._method=new Function(...e,a),this._method}dispose(){this._method!==null&&(this._object&&typeof this._object.dispose=="function"&&this._object.dispose(),this._method=null,this._object=null,this._source=null,this._value=null,this._needsOutputUpdate=!0,this._output.value=null,this._outputs={})}setup(){return this.getDefaultOutputNode()}getCacheKey(e){const t=[Wg(this.source),this.getDefaultOutputNode().getCacheKey(e)];for(const n in this.parameters)t.push(this.parameters[n].getCacheKey(e));return Dc(t)}set needsUpdate(e){e===!0&&this.dispose()}get needsUpdate(){return this.source!==this._source}
41_exec(){return this.codeNode===null?this:(this._needsOutputUpdate===!0&&(this._value=this.call("main"),this._needsOutputUpdate=!1),this._output.value=this._value,this)}_refresh(){this.needsUpdate=!0,this._exec(),this._output.refresh()}}const mI=xe(pI);function Vv(r){let e;const t=r.context.getViewZ;return t!==void 0&&(e=t(this)),(e||En.z).negate()}const i3=le(([r,e],t)=>{const n=Vv(t);return ws(r,e,n)}),s3=le(([r],e)=>{const t=Vv(e);return r.mul(r,t,t).negate().exp().oneMinus()}),xl=le(([r,e])=>We(e.toFloat().mix(yl.rgb,r.toVec3()),yl.a));function gI(r,e,t){return console.warn('THREE.TSL: "rangeFog( color, near, far )" is deprecated. Use "fog( color, rangeFogFactor( near, far ) )" instead.'),xl(r,i3(e,t))}function yI(r,e){return console.warn('THREE.TSL: "densityFog( color, density )" is deprecated. Use "fog( color, densityFogFactor( density ) )" instead.'),xl(r,s3(e))}let oa=null,aa=null;class vI extends Ke{static get type(){return"RangeNode"}constructor(e=W(),t=W()){super(),this.minNode=e,this.maxNode=t}getVectorLength(e){const t=e.getTypeLength(Do(this.minNode.value)),n=e.getTypeLength(Do(this.maxNode.value));return t>n?t:n}getNodeType(e){return e.object.count>1?e.getTypeFromLength(this.getVectorLength(e)):"float"}setup(e){const t=e.object;let n=null;if(t.count>1){const i=this.minNode.value,s=this.maxNode.value,a=e.getTypeLength(Do(i)),u=e.getTypeLength(Do(s));oa=oa||new Qt,aa=aa||new Qt,oa.setScalar(0),aa.setScalar(0),a===1?oa.setScalar(i):i.isColor?oa.set(i.r,i.g,i.b,1):oa.set(i.x,i.y,i.z||0,i.w||0),u===1?aa.setScalar(s):s.isColor?aa.set(s.r,s.g,s.b,1):aa.set(s.x,s.y,s.z||0,s.w||0);const f=4,m=f*t.count,y=new Float32Array(m);for(let b=0;b<m;b++){const w=b%f,S=oa.getComponent(w),E=aa.getComponent(w);y[b]=Nd.lerp(S,E,Math.random())}const _=this.getNodeType(e);if(t.count<=4096)n=kl(y,"vec4",t.count).element(jl).convert(_);else{const b=new Tl(y,4);e.geometry.setAttribute("__range"+this.id,b),n=mc(b).convert(_)}}else n=W(0);return n}}const _I=xe(vI);class xI extends Ke{static get type(){return"ComputeBuiltinNode"}constructor(e,t){super(t),this._builtinName=e}getHash(e){return this.getBuiltinName(e)}getNodeType(){return this.nodeType}setBuiltinName(e){return this._builtinName=e,this}getBuiltinName(){return this._builtinName}hasBuiltin(e){e.hasBuiltin(this._builtinName)}generate(e,t){const n=this.getBuiltinName(e),i=this.getNodeType(e);return e.shaderStage==="compute"?e.format(n,i,t):(console.warn(`ComputeBuiltinNode: Compute built-in value ${n} can not be accessed in the ${e.shaderStage} stage`),e.generateConst(i))}serialize(e){super.serialize(e),e.global=this.global,e._builtinName=this._builtinName}deserialize(e){super.deserialize(e),this.global=e.global,this._builtinName=e._builtinName}}const Hl=(r,e)=>Te(new xI(r,e)),bI=Hl("numWorkgroups","uvec3"),TI=Hl("workgroupId","uvec3"),wI=Hl("globalId","uvec3"),SI=Hl("localId","uvec3"),MI=Hl("subgroupSize","uint");class EI extends Ke{constructor(e){super(),this.scope=e}generate(e){const{scope:t}=this,{renderer:n}=e;n.backend.isWebGLBackend===!0?e.addFlowCode(` // ${t}Barrier 42`):e.addLineFlowCode(`${t}Barrier()`,this)}}const o3=xe(EI),NI=()=>o3("workgroup").append(),RI=()=>o3("storage").append(),CI=()=>o3("texture").append();class PI extends Ba{constructor(e,t){super(e,t),this.isWorkgroupInfoElementNode=!0}generate(e,t){let n;const i=e.context.assign;if(n=super.generate(e),i!==!0){const s=this.getNodeType(e);n=e.format(n,s,t)}return n}}class BI extends Ke{constructor(e,t,n=0){super(t),this.bufferType=t,this.bufferCount=n,this.isWorkgroupInfoNode=!0,this.elementType=t,this.scope=e}label(e){return this.name=e,this}setScope(e){return this.scope=e,this}getElementType(){return this.elementType}getInputType(){return`${this.scope}Array`}element(e){return Te(new PI(this,e))}generate(e){return e.getScopedArray(this.name||`${this.scope}Array_${this.id}`,this.scope.toLowerCase(),this.bufferType,this.bufferCount)}}const FI=(r,e)=>Te(new BI("Workgroup",r,e));class Xn extends Rn{static get type(){return"AtomicFunctionNode"}constructor(e,t,n,i=null){super("uint"),this.method=e,this.pointerNode=t,this.valueNode=n,this.storeNode=i}getInputType(e){return this.pointerNode.getNodeType(e)}getNodeType(e){return this.getInputType(e)}generate(e){const t=this.method,n=this.getNodeType(e),i=this.getInputType(e),s=this.pointerNode,a=this.valueNode,u=[];u.push(`&${s.build(e,i)}`),a!==null&&u.push(a.build(e,i));const f=`${e.getMethod(t,n)}( ${u.join(", ")} )`;if(this.storeNode!==null){const m=this.storeNode.build(e,i);e.addLineFlowCode(`${m} = ${f}`,this)}else e.addLineFlowCode(f,this)}}Xn.ATOMIC_LOAD="atomicLoad";Xn.ATOMIC_STORE="atomicStore";Xn.ATOMIC_ADD="atomicAdd";Xn.ATOMIC_SUB="atomicSub";Xn.ATOMIC_MAX="atomicMax";Xn.ATOMIC_MIN="atomicMin";Xn.ATOMIC_AND="atomicAnd";Xn.ATOMIC_OR="atomicOr";Xn.ATOMIC_XOR="atomicXor";const DI=xe(Xn),Ls=(r,e,t,n=null)=>{const i=DI(r,e,t,n);return i.append(),i},LI=(r,e=null)=>Ls(Xn.ATOMIC_LOAD,r,null,e),qI=(r,e,t=null)=>Ls(Xn.ATOMIC_STORE,r,e,t),II=(r,e,t=null)=>Ls(Xn.ATOMIC_ADD,r,e,t),kI=(r,e,t=null)=>Ls(Xn.ATOMIC_SUB,r,e,t),UI=(r,e,t=null)=>Ls(Xn.ATOMIC_MAX,r,e,t),OI=(r,e,t=null)=>Ls(Xn.ATOMIC_MIN,r,e,t),GI=(r,e,t=null)=>Ls(Xn.ATOMIC_AND,r,e,t),VI=(r,e,t=null)=>Ls(Xn.ATOMIC_OR,r,e,t),zI=(r,e,t=null)=>Ls(Xn.ATOMIC_XOR,r,e,t);let Lu;function Wl(r){Lu=Lu||new WeakMap;let e=Lu.get(r);return e===void 0&&Lu.set(r,e={}),e}function a3(r){const e=Wl(r);return e.shadowMatrix||(e.shadowMatrix=Ye("mat4").setGroup(Ze).onRenderUpd
42ate(()=>(r.castShadow!==!0&&r.shadow.updateMatrices(r),r.shadow.matrix)))}function zv(r){const e=Wl(r);if(e.projectionUV===void 0){const t=a3(r).mul(Js);e.projectionUV=t.xyz.div(t.w)}return e.projectionUV}function A3(r){const e=Wl(r);return e.position||(e.position=Ye(new ke).setGroup(Ze).onRenderUpdate((t,n)=>n.value.setFromMatrixPosition(r.matrixWorld)))}function jv(r){const e=Wl(r);return e.targetPosition||(e.targetPosition=Ye(new ke).setGroup(Ze).onRenderUpdate((t,n)=>n.value.setFromMatrixPosition(r.target.matrixWorld)))}function r2(r){const e=Wl(r);return e.viewPosition||(e.viewPosition=Ye(new ke).setGroup(Ze).onRenderUpdate(({camera:t},n)=>{n.value=n.value||new ke,n.value.setFromMatrixPosition(r.matrixWorld),n.value.applyMatrix4(t.matrixWorldInverse)}))}const l3=r=>Jr.transformDirection(A3(r).sub(jv(r))),jI=r=>r.sort((e,t)=>e.id-t.id),$I=(r,e)=>{for(const t of e)if(t.isAnalyticLightNode&&t.light.id===r)return t;return null},pf=new WeakMap;class u3 extends Ke{static get type(){return"LightsNode"}constructor(){super("vec3"),this.totalDiffuseNode=ie().toVar("totalDiffuse"),this.totalSpecularNode=ie().toVar("totalSpecular"),this.outgoingLightNode=ie().toVar("outgoingLight"),this._lights=[],this._lightNodes=null,this._lightNodesHash=null,this.global=!0}customCacheKey(){const e=[],t=this._lights;for(let n=0;n<t.length;n++)e.push(t[n].id);return Dc(e)}getHash(e){if(this._lightNodesHash===null){this._lightNodes===null&&this.setupLightsNode(e);const t=[];for(const n of this._lightNodes)t.push(n.getSelf().getHash());this._lightNodesHash="lights-"+t.join(",")}return this._lightNodesHash}analyze(e){const t=e.getDataFromNode(this);for(const n of t.nodes)n.build(e)}setupLightsNode(e){const t=[],n=this._lightNodes,i=jI(this._lights),s=e.renderer.library;for(const a of i)if(a.isNode)t.push(Te(a));else{let u=null;if(n!==null&&(u=$I(a.id,n)),u===null){const f=s.getLightNodeClass(a.constructor);if(f===null){console.warn(`LightsNode.setupNodeLights: Light node not found for ${a.constructor.name}`);continue}let m=null;pf.has(a)?m=pf.get(a):(m=Te(new f(a)),pf.set(a,m)),t.push(m)}}this._lightNodes=t}setupLights(e,t){for(const n of t)n.build(e)}setup(e){this._lightNodes===null&&this.setupLightsNode(e);const t=e.context,n=t.lightingModel;let i=this.outgoingLightNode;if(n){const{_lightNodes:s,totalDiffuseNode:a,totalSpecularNode:u}=this;t.outgoingLight=i;const f=e.addStack(),m=e.getDataFromNode(this);m.nodes=f.nodes,n.start(t,f,e),this.setupLights(e,s),n.indirect(t,f,e);const{backdrop:y,backdropAlpha:_}=t,{directDiffuse:b,directSpecular:w,indirectDiffuse:S,indirectSpecular:E}=t.reflectedLight;let R=b.add(S);y!==null&&(_!==null?R=ie(_.mix(R,y)):R=ie(y),t.material.transparent=!0),a.assign(R),u.assign(w.add(E)),i.assign(a.add(u)),n.finish(t,f,e),i=i.bypass(e.removeStack())}return i}setLights(e){return this._lights=e,this._lightNodes=null,this._lightNodesHash=null,this}getLights(){return this._lights}get hasLights(){return this._lights.length>0}}const HI=(r=[])=>Te(new u3).setLights(r);class WI extends Ke{static get type(){return"ShadowBaseNode"}constructor(e){super(),this.light=e,this.updateBeforeType=lt.RENDER,this.isShadowBaseNode=!0}setupShadowPosition({material:e}){c3.assign(e.shadowPositionNode||Js)}dispose(){this.updateBeforeType=lt.NONE}}const c3=ie().toVar("shadowPositionWorld");function QI(r,e={}){return e.toneMapping=r.toneMapping,e.toneMappingExposure=r.toneMappingExposure,e.outputColorSpace=r.outputColorSpace,e.renderTarget=r.getRenderTarget(),e.activeCubeFace=r.getActiveCubeFace(),e.activeMipmapLevel=r.getActiveMipmapLevel(),e.renderObjectFunction=r.getRenderObjectFunction(),e.pixelRatio=r.getPixelRatio(),e.mrt=r.getMRT(),e.clearColor=r.getClearColor(e.clearColor||new Yn),e.clearAlpha=r.getClearAlpha(),e.autoClear=r.autoClear,e.scissorTest=r.getScissorTest(),e}function YI(r,e){return e=QI(r,e),r.setMRT(null),r.setRenderObjectFunction(null),r.setClearColor(0,1),r.autoClear=!0,e}function XI(r,e){r.toneMapping=e.toneMapping,r.toneMappingExposure=e.toneMappingExposure,r.outputColorSpace=e.outputColorSpace,r.setRenderTarget(e.renderTarget,e.activeCubeFace,e.activeMipmapLevel),r.setRenderObjectFunction(e.renderObjectFunction),r.setPixelRatio(e.pixelRatio),r.setMRT(e.mrt),r.setClearColor(e.clearColor,e.clearAlpha),r.autoClear=e.autoClear,r.setScissorTest(e.scissorTest)}function KI(r,e={}){return e.background=r.background,e.backgroundNode=r.backgroundNode,e.overrideMaterial=r.overrideMaterial,e}function ZI(r,e){return e=KI(r,e),r.background=null,r.backgroundNode=null,r.overrideMaterial=null,e}function JI(r,e){r.background=e.background,r.backgroundNode=e.backgroundNode,r.overrideMaterial=e.overrideMaterial}function ek(r,e,t){return t=YI(r,t),t=ZI(e,t),t}function tk(r,e,t){XI(r,t),JI(e,t)}
42const F6=new WeakMap,nk=le(([r,e,t])=>{let n=Js.sub(r).length();return n=n.sub(e).div(t.sub(e)),n=n.saturate(),n}),rk=r=>{const e=r.shadow.camera,t=zt("near","float",e).setGroup(Ze),n=zt("far","float",e).setGroup(Ze),i=U9(r);return nk(i,t,n)},ik=r=>{let e=F6.get(r);if(e===void 0){const t=r.isPointLight?rk(r):null;e=new Ln,e.colorNode=We(0,0,0,1),e.depthNode=t,e.isShadowPassMaterial=!0,e.name="ShadowMaterial",e.fog=!1,F6.set(r,e)}return e},$v=le(({depthTexture:r,shadowCoord:e})=>xt(r,e.xy).compare(e.z)),Hv=le(({depthTexture:r,shadowCoord:e,shadow:t})=>{const n=(E,R)=>xt(r,E).compare(R),i=zt("mapSize","vec2",t).setGroup(Ze),s=zt("radius","float",t).setGroup(Ze),a=Ee(1).div(i),u=a.x.negate().mul(s),f=a.y.negate().mul(s),m=a.x.mul(s),y=a.y.mul(s),_=u.div(2),b=f.div(2),w=m.div(2),S=y.div(2);return Dn(n(e.xy.add(Ee(u,f)),e.z),n(e.xy.add(Ee(0,f)),e.z),n(e.xy.add(Ee(m,f)),e.z),n(e.xy.add(Ee(_,b)),e.z),n(e.xy.add(Ee(0,b)),e.z),n(e.xy.add(Ee(w,b)),e.z),n(e.xy.add(Ee(u,0)),e.z),n(e.xy.add(Ee(_,0)),e.z),n(e.xy,e.z),n(e.xy.add(Ee(w,0)),e.z),n(e.xy.add(Ee(m,0)),e.z),n(e.xy.add(Ee(_,S)),e.z),n(e.xy.add(Ee(0,S)),e.z),n(e.xy.add(Ee(w,S)),e.z),n(e.xy.add(Ee(u,y)),e.z),n(e.xy.add(Ee(0,y)),e.z),n(e.xy.add(Ee(m,y)),e.z)).mul(1/17)}),Wv=le(({depthTexture:r,shadowCoord:e,shadow:t})=>{const n=(y,_)=>xt(r,y).compare(_),i=zt("mapSize","vec2",t).setGroup(Ze),s=Ee(1).div(i),a=s.x,u=s.y,f=e.xy,m=lo(f.mul(i).add(.5));return f.subAssign(m.mul(s)),Dn(n(f,e.z),n(f.add(Ee(a,0)),e.z),n(f.add(Ee(0,u)),e.z),n(f.add(s),e.z),qt(n(f.add(Ee(a.negate(),0)),e.z),n(f.add(Ee(a.mul(2),0)),e.z),m.x),qt(n(f.add(Ee(a.negate(),u)),e.z),n(f.add(Ee(a.mul(2),u)),e.z),m.x),qt(n(f.add(Ee(0,u.negate())),e.z),n(f.add(Ee(0,u.mul(2))),e.z),m.y),qt(n(f.add(Ee(a,u.negate())),e.z),n(f.add(Ee(a,u.mul(2))),e.z),m.y),qt(qt(n(f.add(Ee(a.negate(),u.negate())),e.z),n(f.add(Ee(a.mul(2),u.negate())),e.z),m.x),qt(n(f.add(Ee(a.negate(),u.mul(2))),e.z),n(f.add(Ee(a.mul(2),u.mul(2))),e.z),m.x),m.y)).mul(1/9)}),Qv=le(({depthTexture:r,shadowCoord:e})=>{const t=W(1).toVar(),n=xt(r).sample(e.xy).rg,i=zc(e.z,n.x);return mt(i.notEqual(W(1)),()=>{const s=e.z.sub(n.x),a=Nn(0,n.y.mul(n.y));let u=a.div(a.add(s.mul(s)));u=Ts(Et(u,.3).div(.95-.3)),t.assign(Ts(Nn(i,u)))}),t}),sk=le(({samples:r,radius:e,size:t,shadowPass:n})=>{const i=W(0).toVar(),s=W(0).toVar(),a=r.lessThanEqual(W(1)).select(W(0),W(2).div(r.sub(1))),u=r.lessThanEqual(W(1)).select(W(0),W(-1));It({start:te(0),end:te(r),type:"int",condition:"<"},({i:m})=>{const y=u.add(W(m).mul(a)),_=n.sample(Dn($l.xy,Ee(0,y).mul(e)).div(t)).x;i.addAssign(_),s.addAssign(_.mul(_))}),i.divAssign(r),s.divAssign(r);const f=Ds(s.sub(i.mul(i)));return Ee(i,f)}),ok=le(({samples:r,radius:e,size:t,shadowPass:n})=>{const i=W(0).toVar(),s=W(0).toVar(),a=r.lessThanEqual(W(1)).select(W(0),W(2).div(r.sub(1))),u=r.lessThanEqual(W(1)).select(W(0),W(-1));It({start:te(0),end:te(r),type:"int",condition:"<"},({i:m})=>{const y=u.add(W(m).mul(a)),_=n.sample(Dn($l.xy,Ee(y,0).mul(e)).div(t));i.addAssign(_.x),s.addAssign(Dn(_.y.mul(_.y),_.x.mul(_.x)))}),i.divAssign(r),s.divAssign(r);const f=Ds(s.sub(i.mul(i)));return Ee(i,f)}),ak=[$v,Hv,Wv,Qv];let mf;const qu=new n3;class Yv extends WI{static get type(){return"ShadowNode"}constructor(e,t=null){super(e),this.shadow=t||e.shadow,this.shadowMap=null,this.vsmShadowMapVertical=null,this.vsmShadowMapHorizontal=null,this.vsmMaterialVertical=null,this.vsmMaterialHorizontal=null,this._node=null,this.isShadowNode=!0}setupShadowFilter(e,{filterFn:t,depthTexture:n,shadowCoord:i,shadow:s}){const a=i.x.greaterThanEqual(0).and(i.x.lessThanEqual(1)).and(i.y.greaterThanEqual(0)).and(i.y.lessThanEqual(1)).and(i.z.lessThanEqual(1)),u=t({depthTexture:n,shadowCoord:i,shadow:s});return a.select(u,W(1))}setupShadowCoord(e,t){const{shadow:n}=this,{renderer:i}=e,s=zt("bias","float",n).setGroup(Ze);let a=t,u;if(n.camera.isOrthographicCamera||i.logarithmicDepthBuffer!==!0)a=a.xyz.div(a.w),u=a.z,i.coordinateSystem===VA&&(u=u.mul(2).sub(1));else{const f=a.w;a=a.xy.div(f);const m=zt("near","float",n.camera).setGroup(Ze),y=zt("far","float",n.camera).setGroup(Ze);u=Wp(f.negate(),m,y)}return a=ie(a.x,a.y.oneMinus(),u.add(s)),a}getShadowFilterFn(e){return ak[e]}setupShadow(e){const{renderer:t}=e,{light:n,shadow:i}=this,s=t.shadowMap.type,a=new $o(i.mapSize.width,i.mapSize.height);a.compareFunction=Ld;const u=e.createRenderTarget(i.mapSize.width,i.mapSize.height);if(u.depthTexture=a,i.camera.updateProjectionMatrix(),s===hu){a.compareFunction=null,this.vsmShadowMapVertical=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:X0,type:Mi}),this.vsmShadowMapHorizontal=e.createRenderTarget(i.mapSize.width,i.mapSize.height,{format:X0,type:Mi});const P=xt(a),L=xt(this.vsmShadowMapVertical.texture),D=zt("blurSamples","float",i).setGroup(Ze),O=zt("radius","float",i).setGroup(Ze),G=zt("mapSize","vec2",i).setGroup(Ze);let U=this.vsmMaterialVertical||(this.vsmMaterialVertical=new Ln);U.fragmentNode=sk({samples:D,radius:O,size:G,shadowPass:P}
42).context(e.getSharedContext()),U.name="VSMVertical",U=this.vsmMaterialHorizontal||(this.vsmMaterialHorizontal=new Ln),U.fragmentNode=ok({samples:D,radius:O,size:G,shadowPass:L}).context(e.getSharedContext()),U.name="VSMHorizontal"}const f=zt("intensity","float",i).setGroup(Ze),m=zt("normalBias","float",i).setGroup(Ze),y=a3(n).mul(c3.add(Qc.mul(m))),_=this.setupShadowCoord(e,y),b=i.filterNode||this.getShadowFilterFn(t.shadowMap.type)||null;if(b===null)throw new Error("THREE.WebGPURenderer: Shadow map type not supported yet.");const w=s===hu?this.vsmShadowMapHorizontal.texture:a,S=this.setupShadowFilter(e,{filterFn:b,shadowTexture:u.texture,depthTexture:w,shadowCoord:_,shadow:i}),E=xt(u.texture,_),R=qt(1,S.rgb.mix(E,1),f.mul(E.a)).toVar();return this.shadowMap=u,this.shadow.map=u,R}setup(e){if(e.renderer.shadowMap.enabled!==!1)return le(()=>{let t=this._node;return this.setupShadowPosition(e),t===null&&(this._node=t=this.setupShadow(e)),e.material.shadowNode&&console.warn('THREE.NodeMaterial: ".shadowNode" is deprecated. Use ".castShadowNode" instead.'),e.material.receivedShadowNode&&(t=e.material.receivedShadowNode(t)),t})()}renderShadow(e){const{shadow:t,shadowMap:n,light:i}=this,{renderer:s,scene:a}=e;t.updateMatrices(i),n.setSize(t.mapSize.width,t.mapSize.height),s.render(a,t.camera)}updateShadow(e){const{shadowMap:t,light:n,shadow:i}=this,{renderer:s,scene:a,camera:u}=e,f=s.shadowMap.type,m=t.depthTexture.version;this._depthVersionCached=m,i.camera.layers.mask=u.layers.mask;const y=s.getRenderObjectFunction(),_=s.getMRT(),b=_?_.has("velocity"):!1;mf=ek(s,a,mf),a.overrideMaterial=ik(n),s.setRenderObjectFunction((w,S,E,R,P,L,...D)=>{(w.castShadow===!0||w.receiveShadow&&f===hu)&&(b&&(Kg(w).useVelocity=!0),w.onBeforeShadow(s,w,u,i.c
42amera,R,S.overrideMaterial,L),s.renderObject(w,S,E,R,P,L,...D),w.onAfterShadow(s,w,u,i.camera,R,S.overrideMaterial,L))}),s.setRenderTarget(t),this.renderShadow(e),s.setRenderObjectFunction(y),n.isPointLight!==!0&&f===hu&&this.vsmPass(s),tk(s,a,mf)}vsmPass(e){const{shadow:t}=this;this.vsmShadowMapVertical.setSize(t.mapSize.width,t.mapSize.height),this.vsmShadowMapHorizontal.setSize(t.mapSize.width,t.mapSize.height),e.setRenderTarget(this.vsmShadowMapVertical),qu.material=this.vsmMaterialVertical,qu.render(e),e.setRenderTarget(this.vsmShadowMapHorizontal),qu.material=this.vsmMaterialHorizontal,qu.render(e)}dispose(){this.shadowMap.dispose(),this.shadowMap=null,this.vsmShadowMapVertical!==null&&(this.vsmShadowMapVertical.dispose(),this.vsmShadowMapVertical=null,this.vsmMaterialVertical.dispose(),this.vsmMaterialVertical=null),this.vsmShadowMapHorizontal!==null&&(this.vsmShadowMapHorizontal.dispose(),this.vsmShadowMapHorizontal=null,this.vsmMaterialHorizontal.dispose(),this.vsmMaterialHorizontal=null),super.dispose()}updateBefore(e){const{shadow:t}=this;(t.needsUpdate||t.autoUpdate)&&(this.updateShadow(e),this.shadowMap.depthTexture.version===this._depthVersionCached&&(t.needsUpdate=!1))}}const Xv=(r,e)=>Te(new Yv(r,e));class qa extends jA{static get type(){return"AnalyticLightNode"}constructor(e=null){super(),this.light=e,this.color=new Yn,this.colorNode=e&&e.colorNode||Ye(this.color).setGroup(Ze),this.baseColorNode=null,this.shadowNode=null,this.shadowColorNode=null,this.isAnalyticLightNode=!0,this.updateType=lt.FRAME}customCacheKey(){return cl(this.light.id,this.light.castShadow?1:0)}getHash(){return this.light.uuid}setupShadowNode(){return Xv(this.light)}setupShadow(e){const{renderer:t}=e;if(t.shadowMap.enabled===!1)return;let n=this.shadowColorNode;if(n===null){const i=this.light.shadow.shadowNode;let s;i!==void 0?s=Te(i):s=this.setupShadowNode(e),this.shadowNode=s,this.shadowColorNode=n=this.colorNode.mul(s),this.baseColorNode=this.colorNode}this.colorNode=n}setup(e){this.colorNode=this.baseColorNode||this.colorNode,this.light.castShadow?e.object.receiveShadow&&this.setupShadow(e):this.shadowNode!==null&&(this.shadowNode.dispose(),this.shadowNode=null,this.shadowColorNode=null)}update(){const{light:e}=this;this.color.copy(e.color).multiplyScalar(e.intensity)}}const f3=le(r=>{const{lightDistance:e,cutoffDistance:t,decayExponent:n}=r,i=e.pow(n).max(.01).reciprocal();return t.greaterThan(0).select(i.mul(e.div(t).pow4().oneMinus().clamp().pow2()),i)}),Ak=new Yn,ls=le(([r,e])=>{const t=r.toVar(),n=rn(t),i=Ki(1,Nn(n.x,Nn(n.y,n.z)));n.mulAssign(i),t.mulAssign(i.mul(e.mul(2).oneMinus()));const s=Ee(t.xy).toVar(),u=e.mul(1.5).oneMinus();return mt(n.z.greaterThanEqual(u),()=>{mt(t.z.greaterThan(0),()=>{s.x.assign(Et(4,t.x))})}).ElseIf(n.x.greaterThanEqual(u),()=>{const f=vl(t.x);s.x.assign(t.z.mul(f).add(f.mul(2)))}).ElseIf(n.y.greaterThanEqual(u),()=>{const f=vl(t.y);s.x.assign(t.x.add(f.mul(2)).add(2)),s.y.assign(t.z.mul(f).sub(2))}),Ee(.125,.25).mul(s).add(Ee(.375,.75)).flipY()}).setLayout({name:"cubeToUV",type:"vec2",inputs:[{name:"pos",type:"vec3"},{name:"texelSizeY",type:"float"}]}),lk=le(({depthTexture:r,bd3D:e,dp:t,texelSize:n})=>xt(r,ls(e,n.y)).compare(t)),uk=le(({depthTexture:r,bd3D:e,dp:t,texelSize:n,shadow:i})=>{const s=zt("radius","float",i).setGroup(Ze),a=Ee(-1,1).mul(s).mul(n.y);return xt(r,ls(e.add(a.xyy),n.y)).compare(t).add(xt(r,ls(e.add(a.yyy),n.y)).compare(t)).add(xt(r,ls(e.add(a.xyx),n.y)).compare(t)).add(xt(r,ls(e.add(a.yyx),n.y)).compare(t)).add(xt(r,ls(e,n.y)).compare(t)).add(xt(r,ls(e.add(a.xxy),n.y)).compare(t)).add(xt(r,ls(e.add(a.yxy),n.y)).compare(t)).add(xt(r,ls(e.add(a.xxx),n.y)).compare(t)).add(xt(r,ls(e.add(a.yxx),n.y)).compare(t)).mul(1/9)}),ck=le(({filterFn:r,depthTexture:e,shadowCoord:t,shadow:n})=>{const i=t.xyz.toVar(),s=i.length(),a=Ye("float").setGroup(Ze).onRenderUpdate(()=>n.camera.near),u=Ye("float").setGroup(Ze).onRenderUpdate(()=>n.camera.far),f=zt("bias","float",n).setGroup(Ze),m=Ye(n.mapSize).setGroup(Ze),y=W(1).toVar();return mt(s.sub(u).lessThanEqual(0).and(s.sub(a).greaterThanEqual(0)),()=>{const _=s.sub(a).div(u.sub(a)).toVar();_.addAssign(f);const b=i.normalize(),w=Ee(1).div(m.mul(Ee(4,2)));y.assign(r({depthTexture:e,bd3D:b,dp:_,texelSize:w,shadow:n}))}),y}),D6=new Qt,Ja=new Wt,_0=new Wt;class fk extends Yv{static get type(){return"PointShadowNode"}constructor(e,t=null){super(e,t)}getShadowFilterFn(e){return e===KT?lk:uk}setupShadowCoord(e,t){return t}setupShadowFilter(e,{filterFn:t,shadowTexture:n,depthTexture:i,shadowCoord:s,shadow:a}){return ck({filterFn:t,shadowTexture:n,depthTexture:i,shadowCoord:s,shadow:a})}renderShadow(e){const{shadow:t,shadowMap:n,light:i}=this,{renderer:s,scene:a}=e,u=t.getFrameExtents();_0.copy(t.mapSize),_0.multiply(u),n.setSize(_0.width,_0.height),Ja.copy(t.mapSize);const f=s.autoClear,m=s.getClearColor(Ak),y=s.getClearAlpha();s.autoClear=!1,s.setClearColor(t.clearColor,t.clearAlpha),s.clear();const _=t.getViewportCount();for(let b=0;b<_;b++){const w=t.getViewport(b),S=Ja.x*w.x,E=_0.y-Ja.y-Ja.y*w.y;D6.set(S,E,Ja.x*w.z,Ja.y*w.w),n.viewport.copy(D6),t.updateMatrices(i,b),s.render(a,t.camera)}s.autoClear=f,s.setClearColor(m,y)}}const hk=(r,e)=>Te(new fk(r,e)),Kv=le(({color:r,lightViewPosition:e,cutoffDistance:t,decayExponent:n},i)=>
42{const s=i.context.lightingModel,a=e.sub(En),u=a.normalize(),f=a.length(),m=f3({lightDistance:f,cutoffDistance:t,decayExponent:n}),y=r.mul(m),_=i.context.reflectedLight;s.direct({lightDirection:u,lightColor:y,reflectedLight:_},i.stack,i)});class dk extends qa{static get type(){return"PointLightNode"}constructor(e=null){super(e),this.cutoffDistanceNode=Ye(0).setGroup(Ze),this.decayExponentNode=Ye(2).setGroup(Ze)}update(e){const{light:t}=this;super.update(e),this.cutoffDistanceNode.value=t.distance,this.decayExponentNode.value=t.decay}setupShadowNode(){return hk(this.light)}setup(e){super.setup(e),Kv({color:this.colorNode,lightViewPosition:r2(this.light),cutoffDistance:this.cutoffDistanceNode,decayExponent:this.decayExponentNode}).append()}}const pk=le(([r=dn()])=>{const e=r.mul(2),t=e.x.floor(),n=e.y.floor();return t.add(n).mod(2).sign()}),mk=le(([r=dn()],{renderer:e,material:t})=>{const n=W(1).toVar(),i=Cp(r.mul(2).sub(1));if(t.alphaToCoverage&&e.samples>1){const s=W(i.fwidth()).toVar();n.assign(ws(s.oneMinus(),s.add(1),i).oneMinus())}else i.greaterThan(1).discard();return n}),$0=le(([r,e,t])=>{const n=W(t).toVar(),i=W(e).toVar(),s=oo(r).toVar();return dr(s,i,n)}).setLayout({name:"mx_select",type:"float",inputs:[{name:"b",type:"bool"},{name:"t",type:"float"},{name:"f",type:"float"}]}),xc=le(([r,e])=>{const t=oo(e).toVar(),n=W(r).toVar();return dr(t,n.negate(),n)}).setLayout({name:"mx_negate_if",type:"float",inputs:[{name:"val",type:"float"},{name:"b",type:"bool"}]}),Fn=le(([r])=>{const e=W(r).toVar();return te(_s(e))}).setLayout({name:"mx_floor",type:"int",inputs:[{name:"x",type:"float"}]}),hn=le(([r,e])=>{const t=W(r).toVar();return e.assign(Fn(t)),t.sub(W(e))}),gk=le(([r,e,t,n,i,s])=>{const a=W(s).toVar(),u=W(i).toVar(),f=W(n).toVar(),m=W(t).toVar(),y=W(e).toVar(),_=W(r).toVar(),b=W(Et(1,u)).toVar();return Et(1,a).mul(_.mul(b).add(y.mul(u))).add(a.mul(m.mul(b).add(f.mul(u))))}).setLayout({name:"mx_bilerp_0",type:"float",inputs:[{name:"v0",type:"float"},{name:"v1",type:"float"},{name:"v2",type:"float"},{name:"v3",type:"float"},{name:"s",type:"float"},{name:"t",type:"float"}]}),yk=le(([r,e,t,n,i,s])=>{const a=W(s).toVar(),u=W(i).toVar(),f=ie(n).toVar(),m=ie(t).toVar(),y=ie(e).toVar(),_=ie(r).toVar(),b=W(Et(1,u)).toVar();return Et(1,a).mul(_.mul(b).add(y.mul(u))).add(a.mul(m.mul(b).add(f.mul(u))))}).setLayout({name:"mx_bilerp_1",type:"vec3",inputs:[{name:"v0",type:"vec3"},{name:"v1",type:"vec3"},{name:"v2",type:"vec3"},{name:"v3",type:"vec3"},{name:"s",type:"float"},{name:"t",type:"float"}]}),Zv=gr([gk,yk]),vk=le(([r,e,t,n,i,s,a,u,f,m,y])=>{const _=W(y).toVar(),b=W(m).toVar(),w=W(f).toVar(),S=W(u).toVar(),E=W(a).toVar(),R=W(s).toVar(),P=W(i).toVar(),L=W(n).toVar(),D=W(t).toVar(),O=W(e).toVar(),G=W(r).toVar(),U=W(Et(1,w)).toVar(),j=W(Et(1,b)).toVar();return W(Et(1,_)).toVar().mul(j.mul(G.mul(U).add(O.mul(w))).add(b.mul(D.mul(U).add(L.mul(w))))).add(_.mul(j.mul(P.mul(U).add(R.mul(w))).add(b.mul(E.mul(U).add(S.mul(w))))))}).setLayout({name:"mx_trilerp_0",type:"float",inputs:[{name:"v0",type:"float"},{name:"v1",type:"float"},{name:"v2",type:"float"},{name:"v3",type:"float"},{name:"v4",type:"float"},{name:"v5",type:"float"},{name:"v6",type:"float"},{name:"v7",type:"float"},{name:"s",type:"float"},{name:"t",type:"float"},{name:"r",type:"float"}]}),_k=le(([r,e,t,n,i,s,a,u,f,m,y])=>{const _=W(y).toVar(),b=W(m).toVar(),w=W(f).toVar(),S=ie(u).toVar(),E=ie(a).toVar(),R=ie(s).toVar(),P=ie(i).toVar(),L=ie(n).toVar(),D=ie(t).toVar(),O=ie(e).toVar(),G=ie(r).toVar(),U=W(Et(1,w)).toVar(),j=W(Et(1,b)).toVar();return W(Et(1,_)).toVar().mul(j.mul(G.mul(U).add(O.mul(w))).add(b.mul(D.mul(U).add(L.mul(w))))).add(_.mul(j.mul(P.mul(U).add(R.mul(w))).add(b.mul(E.mul(U).add(S.mul(w))))))}).setLayout({name:"mx_trilerp_1",type:"vec3",inputs:[{name:"v0",type:"vec3"},{name:"v1",type:"vec3"},{name:"v2",type:"vec3"},{name:"v3",type:"vec3"},{name:"v4",type:"vec3"},{name:"v5",type:"vec3"},{name:"v6",type:"vec3"},{name:"v7",type:"vec3"},{name:"s",type:"float"},{name:"t",type:"float"},{name:"r",type:"float"}]}),Jv=gr([vk,_k]),xk=le(([r,e,t])=>{const n=W(t).toVar(),i=W(e).toVar(),s=Ve(r).toVar(),a=Ve(s.bitAnd(Ve(7))).toVar(),u=W($0(a.lessThan(Ve(4)),i,n)).toVar(),f=W(ut(2,$0(a.lessThan(Ve(4)),n,i))).toVar();return xc(u,oo(a.bitAnd(Ve(1)))).add(xc(f,oo(a.bitAnd(Ve(2)))))}).setLayout({name:"mx_gradient_float_0",type:"float",inputs:[{name:"hash",type:"uint"},{name:"x",type:"float"},{name:"y",type:"float"}]}),bk=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=W(e).toVar(),u=Ve(r).toVar(),f=Ve(u.bitAnd(Ve(15))).toVar(),m=W($0(f.lessThan(Ve(8)),a,s)).toVar(),y=W($0(f.lessThan(Ve(4)),s,$0(f.equal(Ve(12)).or(f.equal(Ve(14))),a,i))).toVar();return xc(m,oo(f.bitAnd(Ve(1)))).add(xc(y,oo(f.bitAnd(Ve(2)))))}).setLayout({name:"mx_gradient_float_1",type:"float",inputs:[{name:"hash",type:"uint"},{name:"x",type:"float"},{name:"y",type:"float"},{name:"z",type:"float"}]}),rr=gr([xk,bk]),Tk=le(([r,e,t])=>{const n=W(t).toVar(),i=W(e).toVar(),s=zA(r).toVar();return ie(rr(s.x,i,n),rr(s.y,i,n),rr(s.z,i,n))}
vendor: 13,913 bytes, line 42
42).setLayout({name:"mx_gradient_vec3_0",type:"vec3",inputs:[{name:"hash",type:"uvec3"},{name:"x",type:"float"},{name:"y",type:"float"}]}),wk=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=W(e).toVar(),u=zA(r).toVar();return ie(rr(u.x,a,s,i),rr(u.y,a,s,i),rr(u.z,a,s,i))}).setLayout({name:"mx_gradient_vec3_1",type:"vec3",inputs:[{name:"hash",type:"uvec3"},{name:"x",type:"float"},{name:"y",type:"float"},{name:"z",type:"float"}]}),xi=gr([Tk,wk]),Sk=le(([r])=>{const e=W(r).toVar();return ut(.6616,e)}).setLayout({name:"mx_gradient_scale2d_0",type:"float",inputs:[{name:"v",type:"float"}]}),Mk=le(([r])=>{const e=W(r).toVar();return ut(.982,e)}).setLayout({name:"mx_gradient_scale3d_0",type:"float",inputs:[{name:"v",type:"float"}]}),Ek=le(([r])=>{const e=ie(r).toVar();return ut(.6616,e)}).setLayout({name:"mx_gradient_scale2d_1",type:"vec3",inputs:[{name:"v",type:"vec3"}]}),e_=gr([Sk,Ek]),Nk=le(([r])=>{const e=ie(r).toVar();return ut(.982,e)}).setLayout({name:"mx_gradient_scale3d_1",type:"vec3",inputs:[{name:"v",type:"vec3"}]}),t_=gr([Mk,Nk]),li=le(([r,e])=>{const t=te(e).toVar(),n=Ve(r).toVar();return n.shiftLeft(t).bitOr(n.shiftRight(te(32).sub(t)))}).setLayout({name:"mx_rotl32",type:"uint",inputs:[{name:"x",type:"uint"},{name:"k",type:"int"}]}),n_=le(([r,e,t])=>{r.subAssign(t),r.bitXorAssign(li(t,te(4))),t.addAssign(e),e.subAssign(r),e.bitXorAssign(li(r,te(6))),r.addAssign(t),t.subAssign(e),t.bitXorAssign(li(e,te(8))),e.addAssign(r),r.subAssign(t),r.bitXorAssign(li(t,te(16))),t.addAssign(e),e.subAssign(r),e.bitXorAssign(li(r,te(19))),r.addAssign(t),t.subAssign(e),t.bitXorAssign(li(e,te(4))),e.addAssign(r)}),Ql=le(([r,e,t])=>{const n=Ve(t).toVar(),i=Ve(e).toVar(),s=Ve(r).toVar();return n.bitXorAssign(i),n.subAssign(li(i,te(14))),s.bitXorAssign(n),s.subAssign(li(n,te(11))),i.bitXorAssign(s),i.subAssign(li(s,te(25))),n.bitXorAssign(i),n.subAssign(li(i,te(16))),s.bitXorAssign(n),s.subAssign(li(n,te(4))),i.bitXorAssign(s),i.subAssign(li(s,te(14))),n.bitXorAssign(i),n.subAssign(li(i,te(24))),n}).setLayout({name:"mx_bjfinal",type:"uint",inputs:[{name:"a",type:"uint"},{name:"b",type:"uint"},{name:"c",type:"uint"}]}),wr=le(([r])=>{const e=Ve(r).toVar();return W(e).div(W(Ve(te(4294967295))))}).setLayout({name:"mx_bits_to_01",type:"float",inputs:[{name:"bits",type:"uint"}]}),xs=le(([r])=>{const e=W(r).toVar();return e.mul(e).mul(e).mul(e.mul(e.mul(6).sub(15)).add(10))}).setLayout({name:"mx_fade",type:"float",inputs:[{name:"t",type:"float"}]}),Rk=le(([r])=>{const e=te(r).toVar(),t=Ve(Ve(1)).toVar(),n=Ve(Ve(te(3735928559)).add(t.shiftLeft(Ve(2))).add(Ve(13))).toVar();return Ql(n.add(Ve(e)),n,n)}).setLayout({name:"mx_hash_int_0",type:"uint",inputs:[{name:"x",type:"int"}]}),Ck=le(([r,e])=>{const t=te(e).toVar(),n=te(r).toVar(),i=Ve(Ve(2)).toVar(),s=Ve().toVar(),a=Ve().toVar(),u=Ve().toVar();return s.assign(a.assign(u.assign(Ve(te(3735928559)).add(i.shiftLeft(Ve(2))).add(Ve(13))))),s.addAssign(Ve(n)),a.addAssign(Ve(t)),Ql(s,a,u)}).setLayout({name:"mx_hash_int_1",type:"uint",inputs:[{name:"x",type:"int"},{name:"y",type:"int"}]}),Pk=le(([r,e,t])=>{const n=te(t).toVar(),i=te(e).toVar(),s=te(r).toVar(),a=Ve(Ve(3)).toVar(),u=Ve().toVar(),f=Ve().toVar(),m=Ve().toVar();return u.assign(f.assign(m.assign(Ve(te(3735928559)).add(a.shiftLeft(Ve(2))).add(Ve(13))))),u.addAssign(Ve(s)),f.addAssign(Ve(i)),m.addAssign(Ve(n)),Ql(u,f,m)}).setLayout({name:"mx_hash_int_2",type:"uint",inputs:[{name:"x",type:"int"},{name:"y",type:"int"},{name:"z",type:"int"}]}),Bk=le(([r,e,t,n])=>{const i=te(n).toVar(),s=te(t).toVar(),a=te(e).toVar(),u=te(r).toVar(),f=Ve(Ve(4)).toVar(),m=Ve().toVar(),y=Ve().toVar(),_=Ve().toVar();return m.assign(y.assign(_.assign(Ve(te(3735928559)).add(f.shiftLeft(Ve(2))).add(Ve(13))))),m.addAssign(Ve(u)),y.addAssign(Ve(a)),_.addAssign(Ve(s)),n_(m,y,_),m.addAssign(Ve(i)),Ql(m,y,_)}).setLayout({name:"mx_hash_int_3",type:"uint",inputs:[{name:"x",type:"int"},{name:"y",type:"int"},{name:"z",type:"int"},{name:"xx",type:"int"}]}),Fk=le(([r,e,t,n,i])=>{const s=te(i).toVar(),a=te(n).toVar(),u=te(t).toVar(),f=te(e).toVar(),m=te(r).toVar(),y=Ve(Ve(5)).toVar(),_=Ve().toVar(),b=Ve().toVar(),w=Ve().toVar();return _.assign(b.assign(w.assign(Ve(te(3735928559)).add(y.shiftLeft(Ve(2))).add(Ve(13))))),_.addAssign(Ve(m)),b.addAssign(Ve(f)),w.addAssign(Ve(u)),n_(_,b,w),_.addAssign(Ve(a)),b.addAssign(Ve(s)),Ql(_,b,w)}).setLayout({name:"mx_hash_int_4",type:"uint",inputs:[{name:"x",type:"int"},{name:"y",type:"int"},{name:"z",type:"int"},{name:"xx",type:"int"},{name:"yy",type:"int"}]}),jt=gr([Rk,Ck,Pk,Bk,Fk]),Dk=le(([r,e])=>{const t=te(e).toVar(),n=te(r).toVar(),i=Ve(jt(n,t)).toVar(),s=zA().toVar();return s.x.assign(i.bitAnd(te(255))),s.y.assign(i.shiftRight(te(8)).bitAnd(te(255))),s.z.assign(i.shiftRight(te(16)).bitAnd(te(255))),s}).setLayout({name:"mx_hash_vec3_0",type:"uvec3",inputs:[{name:"x",type:"int"},{name:"y",type:"int"}]}),Lk=le(([r,e,t])=>{const n=te(t).toVar(),i=te(e).toVar(),s=te(r).toVar(),a=Ve(jt(s,i,n)).toVar(),u=zA().toVar();return u.x.assign(a.bitAnd(te(255))),u.y.assign(a.shiftRight(te(8)).bitAnd(te(255))),u.z.assign(a.shiftRight(te(16)).bitAnd(te(255))),u}).setLayout({name:"mx_hash_vec3_1",type:"uvec3",inputs:[{name:"x",type:"int"},{name:"y",type:"int"},{name:"z",type:"int"}]}),bi=gr([Dk,Lk]),qk=le(([r])=>{const e=Ee(r).toVar(),t=te().toVar(),n=te().toVar(),i=W(hn(e.x,t)).toVar(),s=W(hn(e.y,n)).toVar(),a=W(xs(i)).toVar(),u=W(xs(s)).toVar(),f=W(Zv(rr(jt(t,n),i,s),rr(jt(t.add(te(1)),n),i.sub(1),s),rr(jt(t,n.add(te(1))),i,s.sub(1)),rr(jt(t.add(te(1)),n.add(te(1))),i.sub(1),s.sub(1)),a,u)).toVar();return e_(f)}).setLayout({name:"mx_perlin_noise_float_0",type:"float",inputs:[{name:"p",type:"vec2"}]}),Ik=le(([r])=>{const e=ie(r).toVar(),t=te().toVar(),n=te().toVar(),i=te().toVar(),s=W(hn(e.x,t)).toVar(),a=W(hn(e.y,n)).toVar(),u=W(hn(e.z,i)).toVar(),f=W(xs(s)).toVar(),m=W(xs(a)).toVar(),y=W(xs(u)).toVar(),_=W(Jv(rr(jt(t,n,i),s,a,u),rr(jt(t.add(te(1)),n,i),s.sub(1),a,u),rr(jt(t,n.add(te(1)),i),s,a.sub(1),u),rr(jt(t.add(te(1)),n.add(te(1)),i),s.sub(1),a.sub(1),u),rr(jt(t,n,i.add(te(1))),s,a,u.sub(1)),rr(jt(t.add(te(1)),n,i.add(te(1))),s.sub(1),a,u.sub(1)),rr(jt(t,n.add(te(1)),i.add(te(1))),s,a.sub(1),u.sub(1)),rr(jt(t.add(te(1)),n.add(te(1)),i.add(te(1))),s.sub(1),a.sub(1),u.sub(1)),f,m,y)).toVar();return t_(_)}).setLayout({name:"mx_perlin_noise_float_1",type:"float",inputs:[{name:"p",type:"vec3"}]}),h3=gr([qk,Ik]),kk=le(([r])=>{const e=Ee(r).toVar(),t=te().toVar(),n=te().toVar(),i=W(hn(e.x,t)).toVar(),s=W(hn(e.y,n)).toVar(),a=W(xs(i)).toVar(),u=W(xs(s)).toVar(),f=ie(Zv(xi(bi(t,n),i,s),xi(bi(t.add(te(1)),n),i.sub(1),s),xi(bi(t,n.add(te(1))),i,s.sub(1)),xi(bi(t.add(te(1)),n.add(te(1))),i.sub(1),s.sub(1)),a,u)).toVar();return e_(f)}).setLayout({name:"mx_perlin_noise_vec3_0",type:"vec3",inputs:[{name:"p",type:"vec2"}]}),Uk=le(([r])=>{const e=ie(r).toVar(),t=te().toVar(),n=te().toVar(),i=te().toVar(),s=W(hn(e.x,t)).toVar(),a=W(hn(e.y,n)).toVar(),u=W(hn(e.z,i)).toVar(),f=W(xs(s)).toVar(),m=W(xs(a)).toVar(),y=W(xs(u)).toVar(),_=ie(Jv(xi(bi(t,n,i),s,a,u),xi(bi(t.add(te(1)),n,i),s.sub(1),a,u),xi(bi(t,n.add(te(1)),i),s,a.sub(1),u),xi(bi(t.add(te(1)),n.add(te(1)),i),s.sub(1),a.sub(1),u),xi(bi(t,n,i.add(te(1))),s,a,u.sub(1)),xi(bi(t.add(te(1)),n,i.add(te(1))),s.sub(1),a,u.sub(1)),xi(bi(t,n.add(te(1)),i.add(te(1))),s,a.sub(1),u.sub(1)),xi(bi(t.add(te(1)),n.add(te(1)),i.add(te(1))),s.sub(1),a.sub(1),u.sub(1)),f,m,y)).toVar();return t_(_)}).setLayout({name:"mx_perlin_noise_vec3_1",type:"vec3",inputs:[{name:"p",type:"vec3"}]}),d3=gr([kk,Uk]),Ok=le(([r])=>{const e=W(r).toVar(),t=te(Fn(e)).toVar();return wr(jt(t))}).setLayout({name:"mx_cell_noise_float_0",type:"float",inputs:[{name:"p",type:"float"}]}),Gk=le(([r])=>{const e=Ee(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar();return wr(jt(t,n))}).setLayout({name:"mx_cell_noise_float_1",type:"float",inputs:[{name:"p",type:"vec2"}]}),Vk=le(([r])=>{const e=ie(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar(),i=te(Fn(e.z)).toVar();return wr(jt(t,n,i))}).setLayout({name:"mx_cell_noise_float_2",type:"float",inputs:[{name:"p",type:"vec3"}]}),zk=le(([r])=>{const e=We(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar(),i=te(Fn(e.z)).toVar(),s=te(Fn(e.w)).toVar();return wr(jt(t,n,i,s))}).setLayout({name:"mx_cell_noise_float_3",type:"float",inputs:[{name:"p",type:"vec4"}]}),jk=gr([Ok,Gk,Vk,zk]),$k=le(([r])=>{const e=W(r).toVar(),t=te(Fn(e)).toVar();return ie(wr(jt(t,te(0))),wr(jt(t,te(1))),wr(jt(t,te(2))))}).setLayout({name:"mx_cell_noise_vec3_0",type:"vec3",inputs:[{name:"p",type:"float"}]}),Hk=le(([r])=>{const e=Ee(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar();return ie(wr(jt(t,n,te(0))),wr(jt(t,n,te(1))),wr(jt(t,n,te(2))))}).setLayout({name:"mx_cell_noise_vec3_1",type:"vec3",inputs:[{name:"p",type:"vec2"}]}),Wk=le(([r])=>{const e=ie(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar(),i=te(Fn(e.z)).toVar();return ie(wr(jt(t,n,i,te(0))),wr(jt(t,n,i,te(1))),wr(jt(t,n,i,te(2))))}).setLayout({name:"mx_cell_noise_vec3_2",type:"vec3",inputs:[{name:"p",type:"vec3"}]}),Qk=le(([r])=>{const e=We(r).toVar(),t=te(Fn(e.x)).toVar(),n=te(Fn(e.y)).toVar(),i=te(Fn(e.z)).toVar(),s=te(Fn(e.w)).toVar();return ie(wr(jt(t,n,i,s,te(0))),wr(jt(t,n,i,s,te(1))),wr(jt(t,n,i,s,te(2))))}).setLayout({name:"mx_cell_noise_vec3_3",type:"vec3",inputs:[{name:"p",type:"vec4"}]}),r_=gr([$k,Hk,Wk,Qk]),bc=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=te(e).toVar(),u=ie(r).toVar(),f=W(0).toVar(),m=W(1).toVar();return It(a,()=>{f.addAssign(m.mul(h3(u))),m.mulAssign(i),u.mulAssign(s)}),f}).setLayout({name:"mx_fractal_noise_float",type:"float",inputs:[{name:"p",type:"vec3"},{name:"octaves",type:"int"},{name:"lacunarity",type:"float"},{name:"diminish",type:"float"}]}),i_=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=te(e).toVar(),u=ie(r).toVar(),f=ie(0).toVar(),m=W(1).toVar();return It(a,()=>{f.addAssign(m.mul(d3(u))),m.mulAssign(i),u.mulAssign(s)}),f}).setLayout({name:"mx_fractal_noise_vec3",type:"vec3",inputs:[{name:"p",type:"vec3"},{name:"octaves",type:"int"},{name:"lacunarity",type:"float"},{name:"diminish",type:"float"}]}),Yk=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=te(e).toVar(),u=ie(r).toVar();return Ee(bc(u,a,s,i),bc(u.add(ie(te(19),te(193),te(17))),a,s,i))}).setLayout({name:"mx_fractal_noise_vec2",type:"vec2",inputs:[{name:"p",type:"vec3"},{name:"octaves",type:"int"},{name:"lacunarity",type:"float"},{name:"diminish",type:"float"}]}),Xk=le(([r,e,t,n])=>{const i=W(n).toVar(),s=W(t).toVar(),a=te(e).toVar(),u=ie(r).toVar(),f=ie(i_(u,a,s,i)).toVar(),m=W(bc(u.add(ie(te(19),te(193),te(17))),a,s,i)).toVar();return We(f,m)}).setLayout({name:"mx_fractal_noise_vec4",type:"vec4",inputs:[{name:"p",type:"vec3"},{name:"octaves",type:"int"},{name:"lacunarity",type:"float"},{name:"diminish",type:"float"}]}),Kk=le(([r,e,t,n,i,s,a])=>{const u=te(a).toVar(),f=W(s).toVar(),m=te(i).toVar(),y=te(n).toVar(),_=te(t).toVar(),b=te(e).toVar(),w=Ee(r).toVar(),S=ie(r_(Ee(b.add(y),_.add(m)))).toVar(),E=Ee(S.x,S.y).toVar();E.subAssign(.5),E.mulAssign(f),E.addAssign(.5);const R=Ee(Ee(W(b),W(_)).add(E)).toVar(),P=Ee(R.sub(w)).toVar();return mt(u.equal(te(2)),()=>rn(P.x).add(rn(P.y))),mt(u.equal(te(3)),()=>Nn(rn(P.x),rn(P.y))),Ho(P,P)}).setLayout({name:"mx_worley_distance_0",type:"float",inputs:[{name:"p",type:"vec2"},{name:"x",type:"int"},{name:"y",type:"int"},{name:"xoff",type:"int"},{name:"yoff",type:"int"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),Zk=le(([r,e,t,n,i,s,a,u,f])=>{const m=te(f).toVar(),y=W(u).toVar(),_=te(a).toVar(),b=te(s).toVar(),w=te(i).toVar(),S=te(n).toVar(),E=te(t).toVar(),R=te(e).toVar(),P=ie(r).toVar(),L=ie(r_(ie(R.add(w),E.add(b),S.add(_)))).toVar();L.subAssign(.5),L.mulAssign(y),L.addAssign(.5);const D=ie(ie(W(R),W(E),W(S)).add(L)).toVar(),O=ie(D.sub(P)).toVar();return mt(m.equal(te(2)),()=>rn(O.x).add(rn(O.y)).add(rn(O.z))),mt(m.equal(te(3)),()=>Nn(Nn(rn(O.x),rn(O.y)),rn(O.z))),Ho(O,O)}).setLayout({name:"mx_worley_distance_1",type:"float",inputs:[{name:"p",type:"vec3"},{name:"x",type:"int"},{name:"y",type:"int"},{name:"z",type:"int"},{name:"xoff",type:"int"},{name:"yoff",type:"int"},{name:"zoff",type:"int"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),$A=gr([Kk,Zk]),Jk=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=Ee(r).toVar(),a=te().toVar(),u=te().toVar(),f=Ee(hn(s.x,a),hn(s.y,u)).toVar(),m=W(1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:y})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:_})=>{const b=W($A(f,y,_,a,u,i,n)).toVar();m.assign(Kr(m,b))})}),mt(n.equal(te(0)),()=>{m.assign(Ds(m))}),m}).setLayout({name:"mx_worley_noise_float_0",type:"float",inputs:[{name:"p",type:"vec2"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),eU=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=Ee(r).toVar(),a=te().toVar(),u=te().toVar(),f=Ee(hn(s.x,a),hn(s.y,u)).toVar(),m=Ee(1e6,1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:y})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:_})=>{const b=W($A(f,y,_,a,u,i,n)).toVar();mt(b.lessThan(m.x),()=>{m.y.assign(m.x),m.x.assign(b)}).ElseIf(b.lessThan(m.y),()=>{m.y.assign(b)})})}),mt(n.equal(te(0)),()=>{m.assign(Ds(m))}),m}).setLayout({name:"mx_worley_noise_vec2_0",type:"vec2",inputs:[{name:"p",type:"vec2"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),tU=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=Ee(r).toVar(),a=te().toVar(),u=te().toVar(),f=Ee(hn(s.x,a),hn(s.y,u)).toVar(),m=ie(1e6,1e6,1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:y})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:_})=>{const b=W($A(f,y,_,a,u,i,n)).toVar();mt(b.lessThan(m.x),()=>{m.z.assign(m.y),m.y.assign(m.x),m.x.assign(b)}).ElseIf(b.lessThan(m.y),()=>{m.z.assign(m.y),m.y.assign(b)}).ElseIf(b.lessThan(m.z),()=>{m.z.assign(b)})})}),mt(n.equal(te(0)),()=>{m.assign(Ds(m))}),m}
vendor: 6,148 bytes, line 42
42).setLayout({name:"mx_worley_noise_vec3_0",type:"vec3",inputs:[{name:"p",type:"vec2"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),nU=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=ie(r).toVar(),a=te().toVar(),u=te().toVar(),f=te().toVar(),m=ie(hn(s.x,a),hn(s.y,u),hn(s.z,f)).toVar(),y=W(1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:_})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:b})=>{It({start:-1,end:te(1),name:"z",condition:"<="},({z:w})=>{const S=W($A(m,_,b,w,a,u,f,i,n)).toVar();y.assign(Kr(y,S))})})}),mt(n.equal(te(0)),()=>{y.assign(Ds(y))}),y}).setLayout({name:"mx_worley_noise_float_1",type:"float",inputs:[{name:"p",type:"vec3"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),rU=gr([Jk,nU]),iU=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=ie(r).toVar(),a=te().toVar(),u=te().toVar(),f=te().toVar(),m=ie(hn(s.x,a),hn(s.y,u),hn(s.z,f)).toVar(),y=Ee(1e6,1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:_})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:b})=>{It({start:-1,end:te(1),name:"z",condition:"<="},({z:w})=>{const S=W($A(m,_,b,w,a,u,f,i,n)).toVar();mt(S.lessThan(y.x),()=>{y.y.assign(y.x),y.x.assign(S)}).ElseIf(S.lessThan(y.y),()=>{y.y.assign(S)})})})}),mt(n.equal(te(0)),()=>{y.assign(Ds(y))}),y}).setLayout({name:"mx_worley_noise_vec2_1",type:"vec2",inputs:[{name:"p",type:"vec3"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),sU=gr([eU,iU]),oU=le(([r,e,t])=>{const n=te(t).toVar(),i=W(e).toVar(),s=ie(r).toVar(),a=te().toVar(),u=te().toVar(),f=te().toVar(),m=ie(hn(s.x,a),hn(s.y,u),hn(s.z,f)).toVar(),y=ie(1e6,1e6,1e6).toVar();return It({start:-1,end:te(1),name:"x",condition:"<="},({x:_})=>{It({start:-1,end:te(1),name:"y",condition:"<="},({y:b})=>{It({start:-1,end:te(1),name:"z",condition:"<="},({z:w})=>{const S=W($A(m,_,b,w,a,u,f,i,n)).toVar();mt(S.lessThan(y.x),()=>{y.z.assign(y.y),y.y.assign(y.x),y.x.assign(S)}).ElseIf(S.lessThan(y.y),()=>{y.z.assign(y.y),y.y.assign(S)}).ElseIf(S.lessThan(y.z),()=>{y.z.assign(S)})})})}),mt(n.equal(te(0)),()=>{y.assign(Ds(y))}),y}).setLayout({name:"mx_worley_noise_vec3_1",type:"vec3",inputs:[{name:"p",type:"vec3"},{name:"jitter",type:"float"},{name:"metric",type:"int"}]}),aU=gr([tU,oU]),AU=le(([r])=>{const e=r.y,t=r.z,n=ie().toVar();return mt(e.lessThan(1e-4),()=>{n.assign(ie(t,t,t))}).Else(()=>{let i=r.x;i=i.sub(_s(i)).mul(6).toVar();const s=te(Ep(i)),a=i.sub(W(s)),u=t.mul(e.oneMinus()),f=t.mul(e.mul(a).oneMinus()),m=t.mul(e.mul(a.oneMinus()).oneMinus());mt(s.equal(te(0)),()=>{n.assign(ie(t,m,u))}).ElseIf(s.equal(te(1)),()=>{n.assign(ie(f,t,u))}).ElseIf(s.equal(te(2)),()=>{n.assign(ie(u,t,m))}).ElseIf(s.equal(te(3)),()=>{n.assign(ie(u,f,t))}).ElseIf(s.equal(te(4)),()=>{n.assign(ie(m,u,t))}).Else(()=>{n.assign(ie(t,u,f))})}),n}).setLayout({name:"mx_hsvtorgb",type:"vec3",inputs:[{name:"hsv",type:"vec3"}]}),lU=le(([r])=>{const e=ie(r).toVar(),t=W(e.x).toVar(),n=W(e.y).toVar(),i=W(e.z).toVar(),s=W(Kr(t,Kr(n,i))).toVar(),a=W(Nn(t,Nn(n,i))).toVar(),u=W(a.sub(s)).toVar(),f=W().toVar(),m=W().toVar(),y=W().toVar();return y.assign(a),mt(a.greaterThan(0),()=>{m.assign(u.div(a))}).Else(()=>{m.assign(0)}),mt(m.lessThanEqual(0),()=>{f.assign(0)}).Else(()=>{mt(t.greaterThanEqual(a),()=>{f.assign(n.sub(i).div(u))}).ElseIf(n.greaterThanEqual(a),()=>{f.assign(Dn(2,i.sub(t).div(u)))}).Else(()=>{f.assign(Dn(4,t.sub(n).div(u)))}),f.mulAssign(1/6),mt(f.lessThan(0),()=>{f.addAssign(1)})}),ie(f,m,y)}).setLayout({name:"mx_rgbtohsv",type:"vec3",inputs:[{name:"c",type:"vec3"}]}),uU=le(([r])=>{const e=ie(r).toVar(),t=cp(_p(e,ie(.04045))).toVar(),n=ie(e.div(12.92)).toVar(),i=ie(Hi(Nn(e.add(ie(.055)),ie(0)).div(1.055),ie(2.4))).toVar();return qt(n,i,t)}).setLayout({name:"mx_srgb_texture_to_lin_rec709",type:"vec3",inputs:[{name:"color",type:"vec3"}]}),s_=(r,e)=>{r=W(r),e=W(e);const t=Ee(e.dFdx(),e.dFdy()).length().mul(.7071067811865476);return ws(r.sub(t),r.add(t),e)},o_=(r,e,t,n)=>qt(r,e,t[n].clamp()),cU=(r,e,t=dn())=>o_(r,e,t,"x"),fU=(r,e,t=dn())=>o_(r,e,t,"y"),a_=(r,e,t,n,i)=>qt(r,e,s_(t,n[i])),hU=(r,e,t,n=dn())=>a_(r,e,t,n,"x"),dU=(r,e,t,n=dn())=>a_(r,e,t,n,"y"),pU=(r=1,e=0,t=dn())=>t.mul(r).add(e),mU=(r,e=1)=>(r=W(r),r.abs().pow(e).mul(r.sign())),gU=(r,e=1,t=.5)=>W(r).sub(t).mul(e).add(t),yU=(r=dn(),e=1,t=0)=>h3(r.convert("vec2|vec3")).mul(e).add(t),vU=(r=dn(),e=1,t=0)=>d3(r.convert("vec2|vec3")).mul(e).add(t),_U=(r=dn(),e=1,t=0)=>(r=r.convert("vec2|vec3"),We(d3(r),h3(r.add(Ee(19,73)))).mul(e).add(t)),xU=(r=dn(),e=1)=>rU(r.convert("vec2|vec3"),e,te(1)),bU=(r=dn(),e=1)=>sU(r.convert("vec2|vec3"),e,te(1)),TU=(r=dn(),e=1)=>aU(r.convert("vec2|vec3"),e,te(1)),wU=(r=dn())=>jk(r.convert("vec2|vec3")),SU=(r=dn(),e=3,t=2,n=.5,i=1)=>bc(r,te(e),t,n).mul(i),MU=(r=dn(),e=3,t=2,n=.5,i=1)=>Yk(r,te(e),t,n).mul(i),EU=(r=dn(),e=3,t=2,n=.5,i=1)=>i_(r,te(e),t,n).mul(i),NU=(r=dn(),e=3,t=2,n=.5,i=1)=>Xk(r,te(e),t,n).mul(i),RU=le(([r,e,t])=>{const n=ao(r).toVar("nDir"),i=Et(W(.5).mul(e.sub(t)),Js).div(n).toVar("rbmax"),s=Et(W(-.5).mul(e.sub(t)),Js).div(n).toVar("rbmin"),a=ie().toVar("rbminmax");a.x=n.x.greaterThan(W(0)).select(i.x,s.x),a.y=n.y.greaterThan(W(0)).select(i.y,s.y),a.z=n.z.greaterThan(W(0)).select(i.z,s.z);const u=Kr(Kr(a.x,a.y),a.z).toVar("correction");return Js.add(n.mul(u)).toVar("boxIntersection").sub(t)}),A_=le(([r,e])=>{const t=r.x,n=r.y,i=r.z;let s=e.element(0).mul(.886227);return s=s.add(e.element(1).mul(2*.511664).mul(n)),s=s.add(e.element(2).mul(2*.511664).mul(i)),s=s.add(e.element(3).mul(2*.511664).mul(t)),s=s.add(e.element(4).mul(2*.429043).mul(t).mul(n)),s=s.add(e.element(5).mul(2*.429043).mul(n).mul(i)),s=s.add(e.element(6).mul(i.mul(i).mul(.743125).sub(.247708))),s=s.add(e.element(7).mul(2*.429043).mul(t).mul(i)),s=s.add(e.element(8).mul(.429043).mul(ut(t,t).sub(ut(n,n)))),s});var C=Object.freeze({__proto__:null,BRDF_GGX:ld,BRDF_Lambert:Ra,BasicShadowFilter:$v,Break:Oy,Const:p9,Continue:wF,DFGApprox:Zp,D_GGX:tv,Discard:F9,EPSILON:U8,F_Schlick:UA,Fn:le,INFINITY:mB,If:mt,Loop:It,NodeAccess:Tr,NodeShaderStage:Zh,NodeType:$P,NodeUpdateType:lt,PCFShadowFilter:Hv,PCFSoftShadowFilter:Wv,PI:pc,PI2:gB,Return:B
42B,Schlick_to_F0:rv,ScriptableNodeResources:v1,ShaderNode:U0,TBNViewMatrix:ya,VSMShadowFilter:Qv,V_GGX_SmithCorrelated:ev,Var:d9,abs:rn,acesFilmicToneMapping:qv,acos:$8,add:Dn,addMethodChaining:ye,addNodeElement:DB,agxToneMapping:Iv,all:xp,alphaT:fc,and:N8,anisotropy:No,anisotropyB:wa,anisotropyT:O0,any:O8,append:o8,array:m8,arrayBuffer:cB,asin:j8,assign:x8,atan:wp,atan2:u9,atomicAdd:II,atomicAnd:GI,atomicFunc:Ls,atomicLoad:LI,atomicMax:UI,atomicMin:OI,atomicOr:VI,atomicStore:qI,atomicSub:kI,atomicXor:zI,attenuationColor:gp,attenuationDistance:mp,attribute:Ss,attributeArray:Nq,backgroundBlurriness:wv,backgroundIntensity:pd,backgroundRotation:Sv,batch:Iy,billboarding:aq,bitAnd:B8,bitNot:F8,bitOr:D8,bitXor:L8,bitangentGeometry:sF,bitangentLocal:oF,bitangentView:K9,bitangentWorld:aF,bitcast:yB,blendBurn:Nv,blendColor:Oq,blendDodge:Rv,blendOverlay:Pv,blendScreen:Cv,blur:uv,bool:oo,buffer:kl,bufferAttribute:Il,bumpMap:ty,burn:Gq,bvec2:l8,bvec3:cp,bvec4:h8,bypass:R9,cache:V0,call:b8,cameraFar:Po,cameraIndex:Ip,cameraNear:Co,cameraNormalMatrix:VB,cameraPosition:k9,cameraProjectionMatrix:Fa,cameraProjectionMatrixInverse:OB,cameraViewMatrix:Jr,cameraWorldMatrix:GB,cbrt:s9,cdl:Yq,ceil:Vc,checker:pk,cineonToneMapping:Lv,clamp:Ts,clearcoat:cc,clearcoatRoughness:ml,code:n2,color:a8,colorSpaceToWorking:Lp,colorToDirection:JF,compute:N9,cond:c9,context:$c,convert:p8,convertColorSpace:TB,convertToTexture:_q,cos:$s,cross:jc,cubeTexture:kA,dFdx:Sp,dFdy:Mp,dashSize:f1,defaultBuildStages:Jh,defaultShaderStages:e8,defined:fl,degrees:V8,deltaTime:xv,densityFog:yI,densityFogFactor:s3,depth:Qp,depthPass:tI,difference:t9,diffuseColor:Ft,directPointLight:Kv,directionToColor:Wy,dispersion:yp,distance:e9,div:Ki,dodge:Vq,dot:Ho,drawIndex:Dy,dynamicBufferAttribute:E9,element:d8,emissive:rd,equal:T8,equals:Z8,equirectUV:Yp,exp:bp,exp2:IA,expression:Vo,faceDirection:Ol,faceForward:Bp,faceforward:vB,float:W,floor:_s,fog:xl,fract:lo,frameGroup:v8,frameId:KL,frontFacing:V9,fwidth:X8,gain:jL,gapSize:id,getConstNodeType:s8,getCurrentStack:up,getDirection:Av,getDistanceAttenuation:f3,getGeometryRoughness:Jy,getNormalFromDepth:bq,getParallaxCorrectNormal:RU,getRoughness:Kp,getScreenPosition:xq,getShIrradianceAt:A_,getTextureIndex:vv,getViewPosition:uA,globalId:wI,glsl:uI,glslFn:cI,grayscale:$q,greaterThan:_p,greaterThanEqual:E8,hash:zL,highpModelNormalViewMatrix:JB,highpModelViewMatrix:ZB,hue:Qq,instance:vF,instanceIndex:jl,instancedArray:Rq,instancedBufferAttribute:mc,instancedDynamicBufferAttribute:sd,instancedMesh:qy,int:te,inverseSqrt:Tp,inversesqrt:_B,invocationLocalIndex:yF,invocationSubgroupIndex:gF,ior:G0,iridescence:Oc,iridescenceIOR:hp,iridescenceThickness:dp,ivec2:Qn,ivec3:u8,ivec4:c8,js:AI,label:h9,length:Zs,lengthSq:Cp,lessThan:S8,lessThanEqual:M8,lightPosition:A3,lightProjectionUV:zv,lightShadowMatrix:a3,lightTargetDirection:l3,lightTargetPosition:jv,lightViewPosition:r2,lightingContext:Vy,lights:HI,linearDepth:yc,linearToneMapping:Fv,localId:SI,log:Gc,log2:vs,logarithmicDepthToViewZ:kF,loop:SF,luminance:r3,mat2:Ic,mat3:Sr,mat4:Ta,matcapUV:fv,materialAO:By,materialAlphaTest:ny,materialAnisotropy:gy,materialAnisotropyVector:lA,materialAttenuationColor:Sy,materialAttenuationDistance:wy,materialClearcoat:cy,materialClearcoatNormal:hy,materialClearcoatRoughness:fy,materialColor:ry,materialDispersion:Py,materialEmissive:sy,materialIOR:Ty,materialIridescence:yy,materialIridescenceIOR:vy,materialIridescenceThickness:_y,materialLightMap:Vp,materialLineDashOffset:Ry,materialLineDashSize:Ey,materialLineGapSize:Ny,materialLineScale:My,materialLineWidth:pF,materialMetalness:ly,materialNormal:uy,materialOpacity:Gp,materialPointSize:Cy,materialReference:Qs,materialReflectivity:p1,materialRefractionRatio:$9,materialRotation:dy,materialRoughness:Ay,materialSheen:py,materialSheenRoughness:my,materialShininess:iy,materialSpecular:oy,materialSpecularColor:ay,materialSpecularIntensity:Ad,materialSpecularStrength:z0,materialThickness:by,materialTransmission:xy,max:Nn,maxMipLevel:q9,mediumpModelViewMatrix:G9,metalness:pl,min:Kr,mix:qt,mixElement:A9,mod:Np,modInt:vp,modelDirection:WB,modelNormalMatrix:O9,modelPosition:QB,modelScale:YB,modelViewMatrix:Da,modelViewPosition:XB,modelViewProjection:zp,modelWorldMatrix:Si,modelWorldMatrixInverse:KB,morphReference:Gy,mrt:_v,mul:ut,mx_aastep:s_,mx_cell_noise_float:wU,mx_contrast:gU,mx_fractal_noise_float:SU,mx_fractal_noise_vec2:MU,mx_fractal_noise_vec3:EU,mx_fractal_noise_vec4:NU,mx_hsvtorgb:AU,mx_noise_float:yU,mx_noise_vec3:vU,mx_noise_vec4:_U,mx_ramplr:cU,mx_ramptb:fU,mx_rgbtohsv:lU,mx_safepower:mU,mx_splitlr:hU,mx_splittb:dU,mx_srgb_texture_to_lin_rec709:uU,mx_transform_uv:pU,mx_worley_noise_float:xU,mx_worley_noise_vec2:bU,mx_worley_noise_vec3:TU,negate:H8,neutralToneMapping:kv,nodeArray:ba,nodeImmutable:Ue,nodeObject:Te,nodeObjects:Fl,nodeProxy:xe,normalFlat:z9,normalGeometry:Hc,normalLocal:Zr,normalMap:ad,normalView:Ri,normalWorld:Wc,normalize:ao,not:C8,notEqual:w8,numWorkgroups:bI,objectDirection:zB,objectGroup:fp,objectPosition:U9,objectScale:$B,objectViewPosition:HB,objectWorldMatrix:jB,oneMinus:W8,or:R8,orthographicDepthToViewZ:IF,oscSawtooth:iq,oscSine:tq,oscSquare:nq,oscTriangle:rq,output:yl,outputStruct:GL,overlay:jq,overloadingFn:gr,parabola:dd,parallaxDirection:J9,parallaxUV:lF,parameter:LL,pass:Jq,passTexture:eI,pcurve:$L,perspectiveDepthToViewZ:Hp,pmremTexture:Jp,pointUV:Fq,pointWidth:hB,positionGeometry:Ul,positionLocal:yn,positionPrevious:gc,positionView:En,positionViewDirection:un,positionWorld:Js,positionWorldDirection:kp,posterize:Kq,pow:Hi,pow2:Rp,pow3:n9,pow4:r9,property:_8,radians:G8,rand:a9,range:_I,rangeFog:gI,rangeFogFactor:i3,reciprocal:Y8,reference:zt,referenceBuffer:od,reflect:J8,reflectVector:Q9,reflectView:H9,reflector:pq,refract:Pp,refractVector:Y9,refractView:W9,reinhardToneMapping:Dv,remainder:k8,remap:P9,remapClamp:B9,renderGroup:Ze,renderOutput:D9,rendererReference:w9,rotate:e2,rotateUV:sq,roughness:hs,round:Q8,rtt:Tv,sRGBTransferEOTF:y9,sRGBTransferOETF:v9,sampler:IB,saturate:o9,saturation:Hq,screen:zq,screenCoordinate:$l,screenSize:_l,screenUV:Ns,scriptable:mI,scriptableValue:y1,select:dr,
42setCurrentStack:hl,shaderStages:ed,shadow:Xv,shadowPositionWorld:c3,shapeCircle:mk,sharedUniformGroup:kc,sheen:ga,sheenRoughness:Uc,shiftLeft:q8,shiftRight:I8,shininess:hc,sign:vl,sin:ci,sinc:HL,skinning:bF,skinningReference:Uy,smoothstep:ws,smoothstepElement:l9,specularColor:zr,specularF90:gl,spherizeUV:oq,split:fB,spritesheetUV:uq,sqrt:Ds,stack:m1,step:zc,storage:t2,storageBarrier:RI,storageObject:Eq,storageTexture:Mv,string:uB,struct:OL,sub:Et,subgroupIndex:mF,subgroupSize:MI,tan:z8,tangentGeometry:Xc,tangentLocal:Gl,tangentView:Vl,tangentWorld:X9,temp:m9,texture:xt,texture3D:lL,textureBarrier:CI,textureBicubic:ov,textureCubeUV:lv,textureLoad:Tn,textureSize:ko,textureStore:Lq,thickness:pp,time:La,timerDelta:eq,timerGlobal:JL,timerLocal:ZL,toOutputColorSpace:_9,toWorkingColorSpace:x9,toneMapping:S9,toneMappingExposure:M9,toonOutlinePass:rI,transformDirection:i9,transformNormal:j9,transformNormalToView:Up,transformedBentNormalView:ey,transformedBitangentView:Z9,transformedBitangentWorld:AF,transformedClearcoatNormalView:vA,transformedNormalView:Mn,transformedNormalWorld:Qc,transformedTangentView:Op,transformedTangentWorld:iF,transmission:dc,transpose:K8,triNoise3D:QL,triplanarTexture:fq,triplanarTextures:bv,trunc:Ep,tslFn:lB,uint:Ve,uniform:Ye,uniformArray:zi,uniformGroup:y8,uniforms:UB,userData:Iq,uv:dn,uvec2:A8,uvec3:zA,uvec4:f8,varying:Er,varyingProperty:dl,vec2:Ee,vec3:ie,vec4:We,vectorComponents:Pa,velocity:Uq,vertexColor:Pq,vertexIndex:Fy,vertexStage:g9,vibrance:Wq,viewZToLogarithmicDepth:Wp,viewZToOrthographicDepth:EA,viewZToPerspectiveDepth:$y,viewport:MA,viewportBottomLeft:DF,viewportCoordinate:jy,viewportDepthTexture:$p,viewportLinearDepth:UF,viewportMipTexture:jp,viewportResolution:BF,viewportSafeUV:Aq,viewportSharedTexture:ZF,viewportSize:zy,viewportTexture:LF,viewportTopLeft:FF,viewportUV:PF,wgsl:lI,wgslFn:fI,workgroupArray:FI,workgroupBarrier:NI,workgroupId:TI,workingToColorSpace:b9,xor:P8});const qi=new e3;class CU extends Wo{constructor(e,t){super(),this.renderer=e,this.nodes=t}update(e,t,n){const i=this.renderer,s=this.nodes.getBackgroundNode(e)||e.background;let a=!1;if(s===null)i._clearColor.getRGB(qi,va),qi.a=i._clearColor.a;else if(s.isColor===!0)s.getRGB(qi,va),qi.a=1,a=!0;else if(s.isNode===!0){const f=this.get(e),m=s;qi.copy(i._clearColor);let y=f.backgroundMesh;if(y===void 0){const b=$c(We(m).mul(pd),{getUV:()=>Sv.mul(Wc),getTextureLevel:()=>wv});let w=zp;w=w.setZ(w.w);const S=new Ln;S.name="Background.material",S.side=Xi,S.depthTest=!1,S.depthWrite=!1,S.fog=!1,S.lights=!1,S.vertexNode=w,S.colorNode=b,f.backgroundMeshNode=b,f.backgroundMesh=y=new zn(new Ca(1,32,32),S),y.frustumCulled=!1,y.name="Background.mesh",y.onBeforeRender=function(E,R,P){this.matrixWorld.copyPosition(P.matrixWorld)}}const _=m.getCacheKey();f.backgroundCacheKey!==_&&(f.backgroundMeshNode.node=We(m).mul(pd),f.backgroundMeshNode.needsUpdate=!0,y.material.needsUpdate=!0,f.backgroundCacheKey=_),t.unshift(y,y.geometry,y.material,0,0,null,null)}else console.error("THREE.Renderer: Unsupported background configuration.",s);const u=i.xr.getEnvironmentBlendMode();if(u==="additive"?qi.set(0,0,0,1):u==="alpha-blend"&&qi.set(0,0,0,0),i.autoClear===!0||a===!0){const f=n.clearColorValue;f.r=qi.r,f.g=qi.g,f.b=qi.b,f.a=qi.a,(i.backend.isWebGLBackend===!0||i.alpha===!0)&&(f.r*=f.a,f.g*=f.a,f.b*=f.a),n.depthClearValue=i._clearDepth,n.stencilClearValue=i._clearStencil,n.clearColor=i.autoClearColor===!0,n.clearDepth=i.autoClearDepth===!0,n.clearStencil=i.autoClearStencil===!0}else n.clearColor=!1,n.clearDepth=!1,n.clearStencil=!1}}let PU=0;class md{constructor(e="",t=[],n=0,i=[]){this.name=e,this.bindings=t,this.index=n,this.bindingsReference=i,this.id=PU++}}class BU{constructor(e,t,n,i,s,a,u,f,m,y=[]){this.vertexShader=e,this.fragmentShader=t,this.computeShader=n,this.transforms=y,this.nodeAttributes=i,this.bindings=s,this.updateNodes=a,this.updateBeforeNodes=u,this.updateAfterNodes=f,this.observer=m,this.usedTimes=0}createBindings(){const e=[];for(const t of this.bindings)if(t.bindings[0].groupNode.shared!==!0){const i=new md(t.name,[],t.index,t);e.push(i);for(const s of t.bindings)i.bindings.push(s.clone())}else e.push(t);return e}}class L6{constructor(e,t,n=null){this.isNodeAttribute=!0,this.name=e,this.type=t,this.node=n}}class FU{constructor(e,t,n){this.isNodeUniform=!0,this.name=e,this.type=t,this.node=n.getSelf()}get value(){return this.node.value}set value(e){this.node.value=e}get id(){return this.node.id}get groupNode(){return this.node.groupNode}}
42class l_{constructor(e,t,n=!1,i=null){this.isNodeVar=!0,this.name=e,this.type=t,this.readOnly=n,this.count=i}}class DU extends l_{constructor(e,t){super(e,t),this.needsInterpolation=!1,this.isNodeVarying=!0}}class LU{constructor(e,t,n=""){this.name=e,this.type=t,this.code=n,Object.defineProperty(this,"isNodeCode",{value:!0})}}let qU=0;class gf{constructor(e=null){this.id=qU++,this.nodesData=new WeakMap,this.parent=e}getData(e){let t=this.nodesData.get(e);return t===void 0&&this.parent!==null&&(t=this.parent.getData(e)),t}setData(e,t){this.nodesData.set(e,t)}}class IU{constructor(e,t){this.name=e,this.members=t,this.output=!1}}class Qo{constructor(e,t){this.name=e,this.value=t,this.boundary=0,this.itemSize=0,this.offset=0}setValue(e){this.value=e}getValue(){return this.value}}class kU extends Qo{constructor(e,t=0){super(e,t),this.isNumberUniform=!0,this.boundary=4,this.itemSize=1}}class UU extends Qo{constructor(e,t=new Wt){super(e,t),this.isVector2Uniform=!0,this.boundary=8,this.itemSize=2}}class OU extends Qo{constructor(e,t=new ke){super(e,t),this.isVector3Uniform=!0,this.boundary=16,this.itemSize=3}}class GU extends Qo{constructor(e,t=new Qt){super(e,t),this.isVector4Uniform=!0,this.boundary=16,this.itemSize=4}}class VU extends Qo{constructor(e,t=new Yn){super(e,t),this.isColorUniform=!0,this.boundary=16,this.itemSize=3}}class zU extends Qo{constructor(e,t=new h7){super(e,t),this.isMatrix2Uniform=!0,this.boundary=16,this.itemSize=4}}class jU extends Qo{constructor(e,t=new Rl){super(e,t),this.isMatrix3Uniform=!0,this.boundary=48,this.itemSize=12}}class $U extends Qo{constructor(e,t=new Bn){super(e,t),this.isMatrix4Uniform=!0,this.boundary=64,this.itemSize=16}}class HU extends kU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class WU extends UU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class QU extends OU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class YU extends GU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class XU extends VU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class KU extends zU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class ZU extends jU{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}class JU extends $U{constructor(e){super(e.name,e.value),this.nodeUniform=e}getValue(){return this.nodeUniform.value}getType(){return this.nodeUniform.type}}const _A=4,q6=[.125,.215,.35,.446,.526,.582],fa=20,yf=new L0(-1,1,1,-1,0,1),eO=new Io(90,1),I6=new Yn;let vf=null,_f=0,xf=0;const ca=(1+Math.sqrt(5))/2,eA=1/ca,k6=[new ke(-ca,eA,0),new ke(ca,eA,0),new ke(-eA,0,ca),new ke(eA,0,ca),new ke(0,ca,-eA),new ke(0,ca,eA),new ke(-1,1,-1),new ke(1,1,-1),new ke(-1,1,1),new ke(1,1,1)],u_=new WeakMap,tO=[3,1,5,0,4,2],bf=Av(dn(),Ss("faceIndex")).normalize(),p3=ie(bf.x,bf.y,bf.z);class nO{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._backgroundBox=null}get _hasInitialized(){return this._renderer.hasInitialized()}fromScene(e,t=0,n=.1,i=100,s=null){if(this._setSize(256),this._hasInitialized===!1){console.warn("THREE.PMREMGenerator: .fromScene() called before the backend is initialized. Try using .fromSceneAsync() instead.");const u=s||this._allocateTargets();return this.fromSceneAsync(e,t,n,i,u),u}vf=this._renderer.getRenderTarget(),_f=this._renderer.getActiveCubeFace(),xf=this._renderer.getActiveMipmapLevel();const a=s||this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,n,i,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}async fromSceneAsync(e,t=0,n=.1,i=100,s=null){return this._hasInitialized===!1&&await this._renderer.init(),this.fromScene(e,t,n,i,s)}fromEquirectangular(e,t=null){if(this._hasInitialized===!1){console.warn("THREE.PMREMGenerator: .fromEquirectangular() called before the backend is initialized. Try using .fromEquirectangularAsync() instead."),this._setSizeFromTexture(e);const n=t||this._allocateTargets();return this.fromEquirectangularAsync(e,n),n}return this._fromTexture(e,t)}async fromEquirectangularAsync(e,t=null){return this._hasInitialized===!1&&await this._renderer.init(),this._fromTexture(e,t)}fromCubemap(e,t=null){if(this._hasInitialized===!1){console.warn("THREE.PMREMGenerator: .fromCubemap() called before the backend is initialized. Try using .fromCubemapAsync() instead."),this._setSizeFromTexture(e);const n=t||this._allocateTargets();return this.fromCubemapAsync(e,t),n}return this._fromTexture(e,t)}async fromCubemapAsync(e,t=null){return this._hasInitialized===!1&&await this._renderer.init(),this._fromTexture(e,t)}async compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=O6(),await this._compileMaterial(this._cubemapMaterial))}async compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=G6(),await this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSizeFromTexture(e){e.mapping===NA||e.mapping===RA?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4)}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(vf,_f,xf),e.scissorTest=!1,Iu(e,0,0,e.width,e.height)}_fromTexture(e,t){this._setSizeFromTexture(e),vf=this._renderer.getRenderTarget(),_f=this._renderer.getActiveCubeFace(),xf=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:eo,minFilter:eo,generateMipmaps:!1,type:Mi,format:Oo,colorSpace:va},i=U6(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=U6(e,t,n);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas,lodMeshes:this._lodMeshes}=rO(s)),this._blurMaterial=iO(s,e,t)}return i}async _compileMaterial(e){const t=new zn(this._lodPlanes[0],e);await this._renderer.compile(t,yf)}_sceneToCubeUV(e,t,n,i){const s=eO;s.near=t,s.far=n;const a=[1,1,1,1,-1,1],u=[1,-1,1,-1,1,-1],f=this._renderer,m=f.autoClear;f.getClearColor(I6),f.autoClear=!1;let y=this._backgroundBox;
42if(y===null){const w=new wc({name:"PMREM.Background",side:Xi,depthWrite:!1,depthTest:!1});y=new zn(new qd,w)}let _=!1;const b=e.background;b?b.isColor&&(y.material.color.copy(b),e.background=null,_=!0):(y.material.color.copy(I6),_=!0),f.setRenderTarget(i),f.clear(),_&&f.render(y,s);for(let w=0;w<6;w++){const S=w%3;S===0?(s.up.set(0,a[w],0),s.lookAt(u[w],0,0)):S===1?(s.up.set(0,0,a[w]),s.lookAt(0,u[w],0)):(s.up.set(0,a[w],0),s.lookAt(0,0,u[w]));const E=this._cubeSize;Iu(i,S*E,w>2?E:0,E,E),f.render(e,s)}f.autoClear=m,e.background=b}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===NA||e.mapping===RA;i?this._cubemapMaterial===null&&(this._cubemapMaterial=O6(e)):this._equirectMaterial===null&&(this._equirectMaterial=G6(e));const s=i?this._cubemapMaterial:this._equirectMaterial;s.fragmentNode.value=e;const a=this._lodMeshes[0];a.material=s;const u=this._cubeSize;Iu(t,0,0,3*u,2*u),n.setRenderTarget(t),n.render(a,yf)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;s<i;s++){const a=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),u=k6[(i-s-1)%k6.length];this._blur(e,s-1,s,a,u)}t.autoClear=n}_blur(e,t,n,i,s){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",s),this._halfBlur(a,e,n,n,i,"longitudinal",s)}_halfBlur(e,t,n,i,s,a,u){const f=this._renderer,m=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const y=3,_=this._lodMeshes[i];_.material=m;const b=u_.get(m),w=this._sizeLods[n]-1,S=isFinite(s)?Math.PI/(2*w):2*Math.PI/(2*fa-1),E=s/S,R=isFinite(s)?1+Math.floor(y*E):fa;R>fa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${R} samples when the maximum is set to ${fa}`);const P=[];let L=0;for(let j=0;j<fa;++j){const V=j/E,Q=Math.exp(-V*V/2);P.push(Q),j===0?L+=Q:j<R&&(L+=2*Q)}for(let j=0;j<P.length;j++)P[j]=P[j]/L;e.texture.frame=(e.texture.frame||0)+1,b.envMap.value=e.texture,b.samples.value=R,b.weights.array=P,b.latitudinal.value=a==="latitudinal"?1:0,u&&(b.poleAxis.value=u);const{_lodMax:D}=this;b.dTheta.value=S,b.mipInt.value=D-n;const O=this._sizeLods[i],G=3*O*(i>D-_A?i-D+_A:0),U=4*(this._cubeSize-O);Iu(t,G,U,3*O,2*O),f.setRenderTarget(t),f.render(_,yf)}}function rO(r){const e=[],t=[],n=[],i=[];let s=r;const a=r-_A+1+q6.length;for(let u=0;u<a;u++){const f=Math.pow(2,s);t.push(f);let m=1/f;u>r-_A?m=q6[u-r+_A-1]:u===0&&(m=0),n.push(m);const y=1/(f-2),_=-y,b=1+y,w=[_,_,b,_,b,b,_,_,b,b,_,b],S=6,E=6,R=3,P=2,L=1,D=new Float32Array(R*E*S),O=new Float32Array(P*E*S),G=new Float32Array(L*E*S);for(let j=0;j<S;j++){const V=j%3*2/3-1,Q=j>2?0:-1,Z=[V,Q,0,V+2/3,Q,0,V+2/3,Q+1,0,V,Q,0,V+2/3,Q+1,0,V,Q+1,0],K=tO[j];D.set(Z,R*E*K),O.set(w,P*E*K);const Y=[K,K,K,K,K,K];G.set(Y,L*E*K)}const U=new Pi;U.setAttribute("position",new Wi(D,R)),U.setAttribute("uv",new Wi(O,P)),U.setAttribute("faceIndex",new Wi(G,L)),e.push(U),i.push(new zn(U,null)),s>_A&&s--}return{lodPlanes:e,sizeLods:t,sigmas:n,lodMeshes:i}}function U6(r,e,t){const n=new jo(r,e,t);return n.texture.mapping=zf,n.texture.name="PMREM.cubeUv",n.texture.isPMREMTexture=!0,n.scissorTest=!0,n}function Iu(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function m3(r){const e=new Ln;return e.depthTest=!1,e.depthWrite=!1,e.blending=Y0,e.name=`PMREM_${r}`,e}function iO(r,e,t){const n=zi(new Array(fa).fill(0)),i=Ye(new ke(0,1,0)),s=Ye(0),a=W(fa),u=Ye(0),f=Ye(1),m=xt(null),y=Ye(0),_=W(1/e),b=W(1/t),w=W(r),S={n:a,latitudinal:u,weights:n,poleAxis:i,outputDirection:p3,dTheta:s,samples:f,envMap:m,mipInt:y,CUBEUV_TEXEL_WIDTH:_,CUBEUV_TEXEL_HEIGHT:b,CUBEUV_MAX_MIP:w},E=m3("blur");return E.fragmentNode=uv({...S,latitudinal:u.equal(1)}),u_.set(E,S),E}function O6(r){const e=m3("cubemap");return e.fragmentNode=kA(r,p3),e}function G6(r){const e=m3("equirect");return e.fragmentNode=xt(r,Yp(p3),0),e}const V6=new WeakMap,sO=new Map([[Int8Array,"int"],[Int16Array,"int"],[Int32Array,"int"],[Uint8Array,"uint"],[Uint16Array,"uint"],[Uint32Array,"uint"],[Float32Array,"float"]]),ku=r=>/e/g.test(r)?String(r).replace(/\+/g,""):(r=Number(r),r+(r%1?"":".0"));class c_{constructor(e,t,n){this.object=e,this.material=e&&e.material||null,this.geometry=e&&e.geometry||null,this.renderer=t,this.parser=n,this.scene=null,this.camera=null,this.nodes=[],this.sequentialNodes=[],this.updateNodes=[],this.updateBeforeNodes=[],this.updateAfterNodes=[],this.hashNodes={},this.observer=null,this.lightsNode=null,this.environmentNode=null,this.fogNode=null,this.clippingContext=null,this.vertexShader=null,this.fragmentShader=null,this.computeShader=null,this.flowNodes={vertex:[],fragment:[],compute:[]},this.flowCode={vertex:"",fragment:"",compute:""},this.uniforms={vertex:[],fragment:[],compute:[],index:0},this.structs={vertex:[],fragment:[],compute:[],index:0},this.bindings={vertex:{},fragment:{},compute:{}},this.bindingsIndexes={},this.bindGroups=null,this.attributes=[],this.bufferAttributes=[],this.varyings=[],this.codes={},this.vars={},this.flow={code:""},this.chaining=[],this.stack=m1(),this.stacks=[],this.tab=" ",this.currentFunctionNode=null,this.context={material:this.material},this.cache=new gf,this.globalCache=this.cache,this.flowsData=new WeakMap,this.shaderStage=null,this.buildStage=null,this.useComparisonMethod=!1}getBindGroupsCache(){let e=V6.get(this.renderer);return e===void 0&&(e=new Rs,V6.set(this.renderer,e)),e}createRenderTarget(e,t,n){return new jo(e,t,n)}createCubeRenderTarget(e,t){return new Qy(e,t)}createPMREMGenerator(){return new nO(this.renderer)}includes(e){return this.nodes.includes(e)}getOutputStructName(){}_getBindGroup(e,t){const n=this.getBindGroupsCache(),i=[];let s=!0;for(const u of t)i.push(u),s=s&&u.groupNode.shared!==!0;let a;return s?(a=n.get(i),a===void 0&&(a=new md(e,i,this.bindingsIndexes[e].group,i),n.set(i,a))):a=new md(e,i,this.bindingsIndexes[e].group,i),a}getBindGroupArray(e,t){const n=this.bindings[t];let i=n[e];return i===void 0&&(this.bindingsIndexes[e]===void 0&&(this.bindingsIndexes[e]={binding:0,group:Object.keys(this.bindingsIndexes).length}),n[e]=i=[]),i}getBindings(){let e=this.bindGroups;if(e===null){const t={},n=this.bindings;for(const i of ed)for(const s in n[i]){const a=n[i][s];(t[s]||(t[s]=[])).push(...a)}e=[];for(const i in t){const s=t[i],a=this._getBindGroup(i,s);e.push(a)}this.bindGroups=e}return e}sortBindingGroups(){const e=this.getBindings();e.sort((t,n)=>t.bindings[0].groupNode.order-n.bindings[0].groupNode.order);for(let t=0;t<e.length;t++){const n=e[t];this.bindingsIndexes[n.name].group=t,n.index=t}}setHashNode(e,t){this.hashNodes[t]=e}addNode(e){this.nodes.includes(e)===!1&&(this.nodes.push(e),this.setHashNode(e,e.getHash(this)))}addSequentialNode(e){this.sequentialNodes.includes(e)===!1&&this.sequentialNodes.push(e)}buildUpdateNodes(){for(const e of this.nodes)e.getUpdateType()!==lt.NONE&&this.updateNodes.push(e.getSelf());for(const e of this.sequentialNodes){const t=e.getUpdateBeforeType(),n=e.getUpdateAfterType();t!==lt.NONE&&this.updateBeforeNodes.push(e.getSelf()),n!==lt.NONE&&this.updateAfterNodes.push(e.getSelf())}}get currentNode(){return this.chaining[this.chaining.length-1]}isFilteredTexture(e){return e.magFilter===eo||e.magFilter===oh||e.magFilter===K0||e.magFilter===_a||e.minFilter===eo||e.minFilter===oh||e.minFilter===K0||e.minFilter===_a}addChain(e){this.chaining.push(e)}removeChain(e){if(this.chaining.pop()!==e)throw new Error("NodeBuilder: Invalid node chaining!")}getMethod(e){return e}getNodeFromHash(e){return this.hashNodes[e]}addFlow(e,t){return this.flowNodes[e].push(t),t}setContext(e){this.context=e}getContext(){return this.context}getSharedContext(){return{...this.context},this.context}setCache(e){this.cache=e}getCache(){return this.cache}getCacheFromNode(e,t=!0){const n=this.getDataFromNode(e);return n.cache===void 0&&(n.cache=new gf(t?this.getCache():null)),n.cache}isAvailable(){return!1}getVertexIndex(){console.warn("Abstract function.")}getInstanceIndex(){console.warn("Abstract function.")}getDrawIndex(){console.warn("Abstract function.")}getFrontFacing(){console.warn("Abstract function.")}getFragCoord(){console.warn("Abstract function.")}isFlipY(){return!1}increaseUsage(e){const t=this.getDataFromNode(e);return t.usageCount=t.usageCount===void 0?1:t.usageCount+1,t.usageCount}generateTexture(){console.warn("Abstract function.")}generateTextureLod(){console.warn("Abstract function.")}generateArrayDeclaration(e,t){return this.getType(e)+"[ "+t+" ]"}generateArray(e,t,n=null){let i=this.generateArrayDeclaration(e,t)+"( ";for(let s=0;s<t;s++){const a=n?n[s]:null;a!==null?i+=a.build(this,e):i+=this.generateConst(e),s<t-1&&(i+=", ")}return i+=" )",i}generateStruct(e,t,n=null){const i=[];for(const s of t){const{name:a,type:u}=s;n&&n[a]&&n[a].isNode?i.push(n[a].build(this,u)):i.push(this.generateConst(u))}return e+"( "+i.join(", ")+" )"}generateConst(e,t=null){if(t===null&&(e==="float"||e==="int"||e==="uint"?t=0:e==="bool"?t=!1:e==="color"?t=new Yn:e==="vec2"?t=new Wt:e==="vec3"?t=new ke:e==="vec4"&&(t=new Qt)),e==="float")return ku(t);if(e==="int")return`${Math.round(t)}`;if(e==="uint")return t>=0?`${Math.round(t)}u`:"0u";if(e==="bool")return t?"true":"false";if(e==="color")return`${this.getType("vec3")}( ${ku(t.r)}, ${ku(t.g)}, ${ku(t.b)} )`;const n=this.getTypeLength(e),i=this.getComponentType(e),s=a=>this.generateConst(i,a);if(n===2)return`${this.getType(e)}( ${s(t.x)}, ${s(t.y)} )`;if(n===3)return`${this.getType(e)}( ${s(t.x)}, ${s(t.y)}, ${s(t.z)} )`;if(n===4)return`${this.getType(e)}( ${s(t.x)}, ${s(t.y)}, ${s(t.z)}, ${s(t.w)} )`;if(n>4&&t&&(t.isMatrix3||t.isMatrix4))return`${this.getType(e)}( ${t.elements.map(s).join(", ")} )`;if(n>4)return`${this.getType(e)}()`;throw new Error(`NodeBuilder: Type '${e}' not found in generate constant attempt.`)}getType(e){return e==="color"?"vec3":e}hasGeometryAttribute(e){return this.geometry&&this.geometry.getAttribute(e)!==void 0}getAttribute(e,t){const n=this.attributes;for(const s of n)if(s.name===e)return s;const i=new L6(e,t);return n.push(i),i}getPropertyName(e){return e.name}isVector(e){return/vec\d/.test(e)}isMatrix(e){return/mat\d/.test(e)}isReference(e){return e==="void"||e==="property"||e==="sampler"||e==="texture"||e==="cubeTexture"||e==="storageTexture"||e==="depthTexture"||e==="texture3D"}needsToWorkingColorSpace(){return!1}getComponentTypeFromTexture(e){const t=e.type;if(e.isDataTexture){if(t===Fr)return"int";if(t===fr)return"uint"}return"float"}getElementType(e){return e==="mat2"?"vec2":e==="mat3"?"vec3":e==="mat4"?"vec4":this.getComponentType(e)}getComponentType(e){if(e=this.getVectorType(e),e==="float"||e==="bool"||e==="int"||e==="uint")return e;const t=/(b|i|u|)(vec|mat)([2-4])/.exec(e);return t===null?null:t[1]==="b"?"bool":t[1]==="i"?"int":t[1]==="u"?"uint":"float"}getVectorType(e){return e==="color"?"vec3":e==="texture"||e==="cubeTexture"||e==="storageTexture"||e==="texture3D"?"vec4":e}getTypeFromLength(e,t="float"){if(e===1)return t;let n=Yg(e);const i=t==="float"?"":t[0];return/mat2/.test(t)===!0&&(n=n.replace("vec","mat")),i+n}getTypeFromArray(e){return sO.get(e.constructor)}getTypeFromAttribute(e){let t=e;e.isInterleavedBufferAttribute&&(t=e.data);const n=t.array,i=e.itemSize,s=e.normalized;let a;return!(e instanceof g7)&&s!==!0&&(a=this.getTypeFromArray(n)),this.getTypeFromLength(i,a)}getTypeLength(e){const t=this.getVectorType(e),n=/vec([2-4])/.exec(t);return n!==null?Number(n[1]):t==="float"||t==="bool"||t==="int"||t==="uint"?1:/mat2/.test(e)===!0?4:/mat3/.test(e)===!0?9:/mat4/.test(e)===!0?16:0}getVectorFromMatrix(e){return e.replace("mat","vec")}changeComponentType(e,t){return this.getTypeFromLength(this.getTypeLength(e),t)}getIntegerType(e){const t=this.getComponentType(e);return t==="int"||t==="uint"?e:this.changeComponentType(e,"int")}addStack(){return this.stack=m1(this.stack),this.stacks.push(up()||this.stack),hl(this.stack),this.stack}removeStack(){const e=this.stack;return this.stack=e.parent,hl(this.stacks.pop()),e}getDataFromNode(e,t=this.shaderStage,n=null){n=n===null?e.isGlobal(this)?this.globalCache:this.cache:n;let i=n.getData(e);return i===void 0&&(i={},n.setData(e,i)),i[t]===void 0&&(i[t]={}),i[t]}getNodeProperties(e,t="any"){const n=this.getDataFromNode(e,t);return n.properties||(n.properties={outputNode:null})}getBufferAttributeFromNode(e,t){const n=this.getDataFromNode(e);let i=n.bufferAttribute;if(i===void 0){const s=this.uniforms.index++;i=new L6("nodeAttribute"+s,t,e),this.bufferAttributes.push(i),n.bufferAttribute=i}return i}getStructTypeFromNode(e,t,n=null,i=this.shaderStage){const s=this.getDataFromNode(e,i);let a=s.structType;if(a===void 0){const u=this.structs.index++;n===null&&(n="StructType"+u),a=new IU(n,t),this.structs[i].push(a),s.structType=a}return a}getOutputStructTypeFromNode(e,t){const n=this.getStructTypeFromNode(e,t,"OutputType","fragment");return n.output=!0,n}getUniformFromNode(e,t,n=this.shaderStage,i=null){const s=this.getDataFromNode(e,n,this.globalCache);let a=s.uniform;if(a===void 0){const u=this.uniforms.index++;a=new FU(i||"nodeUniform"+u,t,e),this.uniforms[n].push(a),s.uniform=a}return a}getArrayCount(e){let t=null;return e.isArrayNode?t=e.count:e.isVarNode&&e.node.isArrayNode&&(t=e.node.count),t}getVarFromNode(e,t=null,n=e.getNodeType(this),i=this.shaderStage,s=!1){const a=this.getDataFromNode(e,i);let u=a.variable;if(u===void 0){const f=s?"_const":"_var",m=this.vars[i]||(this.vars[i]=[]),y=this.vars[f]||(this.vars[f]=0);t===null&&(t=(s?"nodeConst":"nodeVar")+y,this.vars[f]++);const _=this.getArrayCount(e);u=new l_(t,n,s,_),s||m.push(u),a.variable=u}return u}isDeterministic(e){if(e.isMathNode)return this.isDeterministic(e.aNode)&&(e.bNode?this.isDeterministic(e.bNode):!0)&&(e.cNode?this.isDeterministic(e.cNode):!0);if(e.isOperatorNode)return this.isDeterministic(e.aNode)&&(e.bNode?this.isDeterministic(e.bNode):!0);if(e.isArrayNode){if(e.values!==null){for(const t of e.values)if(!this.isDeterministic(t))return!1}return!0}else if(e.isConstNode)return!0;return!1}getVaryingFromNode(e,t=null,n=e.getNodeType(this)){const i=this.getDataFromNode(e,"any");let s=i.varying;if(s===void 0){const a=this.varyings,u=a.length;t===null&&(t="nodeVarying"+u),s=new DU(t,n),a.push(s),i.varying=s}return s}getCodeFromNode(e,t,n=this.shaderStage){const i=this.getDataFromNode(e);let s=i.code;if(s===void 0){const a=this.codes[n]||(this.codes[n]=[]),u=a.length;s=new LU("nodeCode"+u,t),a.push(s),i.code=s}return s}addFlowCodeHierarchy(e,t){const{flowCodes:n,flowCodeBlock:i}=this.getDataFromNode(e);let s=!0,a=t;for(;a;){if(i.get(a)===!0){s=!1;break}a=this.getDataFromNode(a).parentNodeBlock}if(s)for(const u of n)this.addLineFlowCode(u)}addLineFlowCodeBlock(e,t,n){const i=this.getDataFromNode(e),s=i.flowCodes||(i.flowCodes=[]),a=i.flowCodeBlock||(i.flowCodeBlock=new WeakMap);s.push(t),a.set(n,!0)}addLineFlowCode(e,t=null){return e===""?this:(t!==null&&this.context.nodeBlock&&this.addLineFlowCodeBlock(t,e,this.context.nodeBlock),e=this.tab+e,/;\s*$/.test(e)||(e=e+`; 43`),this.flow.code+=e,this)}addFlowCode(e){return this.flow.code+=e,this}addFlowTab(){return this.tab+=" ",this}removeFlowTab(){return this.tab=this.tab.slice(0,-1),this}getFlowData(e){return this.flowsData.get(e)}flowNode(e){const t=e.getNodeType(this),n=this.flowChildNode(e,t);return this.flowsData.set(e,n),n}buildFunctionNode(e){const t=new Uv,n=this.currentFunctionNode;return this.currentFunctionNode=t,t.code=this.buildFunctionCode(e),this.currentFunctionNode=n,t}flowShaderNode(e){const t=e.layout,n={[Symbol.iterator](){let a=0;const u=Object.values(this);return{next:()=>({value:u[a],done:a++>=u.length})}}};
43for(const a of t.inputs)n[a.name]=new gv(a.type,a.name);e.layout=null;const i=e.call(n),s=this.flowStagesNode(i,t.type);return e.layout=t,s}flowStagesNode(e,t=null){const n=this.flow,i=this.vars,s=this.cache,a=this.buildStage,u=this.stack,f={code:""};this.flow=f,this.vars={},this.cache=new gf,this.stack=m1();for(const m of Jh)this.setBuildStage(m),f.result=e.build(this,t);return f.vars=this.getVars(this.shaderStage),this.flow=n,this.vars=i,this.cache=s,this.stack=u,this.setBuildStage(a),f}getFunctionOperator(){return null}flowChildNode(e,t=null){const n=this.flow,i={code:""};return this.flow=i,i.result=e.build(this,t),this.flow=n,i}flowNodeFromShaderStage(e,t,n=null,i=null){const s=this.shaderStage;this.setShaderStage(e);const a=this.flowChildNode(t,n);return i!==null&&(a.code+=`${this.tab+i} = ${a.result}; 44`),this.flowCode[e]=this.flowCode[e]+a.code,this.setShaderStage(s),a}getAttributesArray(){return this.attributes.concat(this.bufferAttributes)}getAttributes(){console.warn("Abstract function.")}getVaryings(){console.warn("Abstract function.")}getVar(e,t,n=null){return`${n!==null?this.generateArrayDeclaration(e,n):this.getType(e)} ${t}`}getVars(e){let t="";const n=this.vars[e];if(n!==void 0)for(const i of n)t+=`${this.getVar(i.type,i.name)}; `;return t}getUniforms(){console.warn("Abstract function.")}getCodes(e){const t=this.codes[e];let n="";if(t!==void 0)for(const i of t)n+=i.code+` 45`;return n}getHash(){return this.vertexShader+this.fragmentShader+this.computeShader}setShaderStage(e){this.shaderStage=e}getShaderStage(){return this.shaderStage}setBuildStage(e){this.buildStage=e}getBuildStage(){return this.buildStage}buildCode(){console.warn("Abstract function.")}build(){const{object:e,material:t,renderer:n}=this;if(t!==null){let i=n.library.fromMaterial(t);i===null&&(console.error(`NodeMaterial: Material "${t.type}" is not compatible.`),i=new Ln),i.build(this)}else this.addFlow("compute",e);for(const i of Jh){this.setBuildStage(i),this.context.vertex&&this.context.vertex.isNode&&this.flowNodeFromShaderStage("vertex",this.context.vertex);for(const s of ed){this.setShaderStage(s);const a=this.flowNodes[s];for(const u of a)i==="generate"?this.flowNode(u):u.build(this)}}return this.setBuildStage(null),this.setShaderStage(null),this.buildCode(),this.buildUpdateNodes(),this}getNodeUniform(e,t){if(t==="float"||t==="int"||t==="uint")return new HU(e);if(t==="vec2"||t==="ivec2"||t==="uvec2")return new WU(e);if(t==="vec3"||t==="ivec3"||t==="uvec3")return new QU(e);if(t==="vec4"||t==="ivec4"||t==="uvec4")return new YU(e);if(t==="color")return new XU(e);if(t==="mat2")return new KU(e);if(t==="mat3")return new ZU(e);if(t==="mat4")return new JU(e);throw new Error(`Uniform "${t}" not declared.`)}format(e,t,n){if(t=this.getVectorType(t),n=this.getVectorType(n),t===n||n===null||this.isReference(n))return e;const i=this.getTypeLength(t),s=this.getTypeLength(n);return i===16&&s===9?`${this.getType(n)}(${e}[0].xyz, ${e}[1].xyz, ${e}[2].xyz)`:i===9&&s===4?`${this.getType(n)}(${e}[0].xy, ${e}[1].xy)`:i>4||s>4||s===0?e:i===s?`${this.getType(n)}( ${e} )`:i>s?this.format(`${e}.${"xyz".slice(0,s)}`,this.getTypeFromLength(s,this.getComponentType(t)),n):s===4&&i>1?`${this.getType(n)}( ${this.format(e,t,"vec3")}, 1.0 )`:i===2?`${this.getType(n)}( ${this.format(e,t,"vec2")}, 0.0 )`:(i===1&&s>1&&t!==this.getComponentType(n)&&(e=`${this.getType(this.getComponentType(n))}( ${e} )`),`${this.getType(n)}( ${e} )`)}getSignature(){return`// Three.js r${Lm} - Node System 46`}createNodeMaterial(e="NodeMaterial"){throw new Error(`THREE.NodeBuilder: createNodeMaterial() was deprecated. Use new ${e}() instead.`)}}class z6{constructor(){this.time=0,this.deltaTime=0,this.frameId=0,this.renderId=0,this.updateMap=new WeakMap,this.updateBeforeMap=new WeakMap,this.updateAfterMap=new WeakMap,this.renderer=null,this.material=null,this.camera=null,this.object=null,this.scene=null}_getMaps(e,t){let n=e.get(t);return n===void 0&&(n={renderMap:new WeakMap,frameMap:new WeakMap},e.set(t,n)),n}updateBeforeNode(e){const t=e.getUpdateBeforeType(),n=e.updateReference(this);if(t===lt.FRAME){const{frameMap:i}=this._getMaps(this.updateBeforeMap,n);i.get(n)!==this.frameId&&e.updateBefore(this)!==!1&&i.set(n,this.frameId)}else if(t===lt.RENDER){const{renderMap:i}=this._getMaps(this.updateBeforeMap,n);i.get(n)!==this.renderId&&e.updateBefore(this)!==!1&&i.set(n,this.renderId)}else t===lt.OBJECT&&e.updateBefore(this)}updateAfterNode(e){const t=e.getUpdateAfterType(),n=e.updateReference(this);if(t===lt.FRAME){const{frameMap:i}=this._getMaps(this.updateAfterMap,n);i.get(n)!==this.frameId&&e.updateAfter(this)!==!1&&i.set(n,this.frameId)}else if(t===lt.RENDER){const{renderMap:i}=this._getMaps(this.updateAfterMap,n);i.get(n)!==this.renderId&&e.updateAfter(this)!==!1&&i.set(n,this.renderId)}else t===lt.OBJECT&&e.updateAfter(this)}updateNode(e){const t=e.getUpdateType(),n=e.updateReference(this);if(t===lt.FRAME){const{frameMap:i}=this._getMaps(this.updateMap,n);i.get(n)!==this.frameId&&e.update(this)!==!1&&i.set(n,this.frameId)}else if(t===lt.RENDER){const{renderMap:i}=this._getMaps(this.updateMap,n);i.get(n)!==this.renderId&&e.update(this)!==!1&&i.set(n,this.renderId)}else t===lt.OBJECT&&e.update(this)}update(){this.frameId++,this.lastTime===void 0&&(this.lastTime=performance.now()),this.deltaTime=(performance.now()-this.lastTime)/1e3,this.lastTime=performance.now(),this.time+=this.deltaTime}}class g3{constructor(e,t,n=null,i="",s=!1){this.type=e,this.name=t,this.count=n,this.qual
46ifier=i,this.isConst=s}}g3.isNodeFunctionInput=!0;class oO extends qa{static get type(){return"DirectionalLightNode"}constructor(e=null){super(e)}setup(e){super.setup(e);const t=e.context.lightingModel,n=this.colorNode,i=l3(this.light),s=e.context.reflectedLight;t.direct({lightDirection:i,lightColor:n,reflectedLight:s},e.stack,e)}}const Tf=new Bn,Uu=new Bn;let x0=null;class aO extends qa{static get type(){return"RectAreaLightNode"}constructor(e=null){super(e),this.halfHeight=Ye(new ke).setGroup(Ze),this.halfWidth=Ye(new ke).setGroup(Ze),this.updateType=lt.RENDER}update(e){super.update(e);const{light:t}=this,n=e.camera.matrixWorldInverse;Uu.identity(),Tf.copy(t.matrixWorld),Tf.premultiply(n),Uu.extractRotation(Tf),this.halfWidth.value.set(t.width*.5,0,0),this.halfHeight.value.set(0,t.height*.5,0),this.halfWidth.value.applyMatrix4(Uu),this.halfHeight.value.applyMatrix4(Uu)}setup(e){super.setup(e);let t,n;e.isAvailable("float32Filterable")?(t=xt(x0.LTC_FLOAT_1),n=xt(x0.LTC_FLOAT_2)):(t=xt(x0.LTC_HALF_1),n=xt(x0.LTC_HALF_2));const{colorNode:i,light:s}=this,a=e.context.lightingModel,u=r2(s),f=e.context.reflectedLight;a.directRectArea({lightColor:i,lightPosition:u,halfWidth:this.halfWidth,halfHeight:this.halfHeight,reflectedLight:f,ltc_1:t,ltc_2:n},e.stack,e)}static setLTC(e){x0=e}}class f_ extends qa{static get type(){return"SpotLightNode"}constructor(e=null){super(e),this.coneCosNode=Ye(0).setGroup(Ze),this.penumbraCosNode=Ye(0).setGroup(Ze),this.cutoffDistanceNode=Ye(0).setGroup(Ze),this.decayExponentNode=Ye(0).setGroup(Ze)}update(e){super.update(e);const{light:t}=this;this.coneCosNode.value=Math.cos(t.angle),this.penumbraCosNode.value=Math.cos(t.angle*(1-t.penumbra)),this.cutoffDistanceNode.value=t.distance,this.decayExponentNode.value=t.decay}getSpotAttenuation(e){const{coneCosNode:t,penumbraCosNode:n}=this;return ws(t,n,e)}setup(e){super.setup(e);const t=e.context.lightingModel,{colorNode:n,cutoffDistanceNode:i,decayExponentNode:s,light:a}=this,u=r2(a).sub(En),f=u.normalize(),m=f.dot(l3(a)),y=this.getSpotAttenuation(m),_=u.length(),b=f3({lightDistance:_,cutoffDistance:i,decayExponent:s});let w=n.mul(y).mul(b);if(a.map){const E=zv(a),R=xt(a.map,E.xy).onRenderUpdate(()=>a.map);w=E.mul(2).sub(1).abs().lessThan(1).all().select(w.mul(R),w)}const S=e.context.reflectedLight;t.direct({lightDirection:f,lightColor:w,reflectedLight:S},e.stack,e)}}class AO extends f_{static get type(){return"IESSpotLightNode"}getSpotAttenuation(e){const t=this.light.iesMap;let n=null;if(t&&t.isTexture===!0){const i=e.acos().mul(1/Math.PI);n=xt(t,Ee(i,0),0).r}else n=super.getSpotAttenuation(e);return n}}class lO extends qa{static get type(){return"AmbientLightNode"}constructor(e=null){super(e)}setup({context:e}){e.irradiance.addAssign(this.colorNode)}}class uO extends qa{static get type(){return"HemisphereLightNode"}constructor(e=null){super(e),this.lightPositionNode=A3(e),this.lightDirectionNode=this.lightPositionNode.normalize(),this.groundColorNode=Ye(new Yn).setGroup(Ze)}update(e){const{light:t}=this;super.update(e),this.lightPositionNode.object3d=t,this.groundColorNode.value.copy(t.groundColor).multiplyScalar(t.intensity)}setup(e){const{colorNode:t,groundColorNode:n,lightDirectionNode:i}=this,a=Ri.dot(i).mul(.5).add(.5),u=qt(n,t,a);e.context.irradiance.addAssign(u)}}class cO extends qa{static get type(){return"LightProbeNode"}constructor(e=null){super(e);const t=[];for(let n=0;n<9;n++)t.push(new ke);this.lightProbe=zi(t)}update(e){const{light:t}=this;super.update(e);for(let n=0;n<9;n++)this.lightProbe.array[n].copy(t.sh.coefficients[n]).multiplyScalar(t.intensity)}setup(e){const t=A_(Wc,this.lightProbe);e.context.irradiance.addAssign(t)}}class h_{parseFunction(){console.warn("Abstract function.")}}class y3{constructor(e,t,n="",i=""){this.type=e,this.inputs=t,this.name=n,this.precision=i}getCode(){console.warn("Abstract function.")}}y3.isNodeFunction=!0;const fO=/^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i,hO=/[a-z_0-9]+/ig,j6="#pragma main",dO=r=>{r=r.trim();const e=r.indexOf(j6),t=e!==-1?r.slice(e+j6.length):r,n=t.match(fO);if(n!==null&&n.length===5){const i=n[4],s=[];let a=null;for(;(a=hO.exec(i))!==null;)s.push(a);const u=[];let f=0;for(;f<s.length;){const S=s[f][0]==="const";S===!0&&f++;let E=s[f][0];E==="in"||E==="out"||E==="inout"?f++:E="";
46const R=s[f++][0];let P=Number.parseInt(s[f][0]);Number.isNaN(P)===!1?f++:P=null;const L=s[f++][0];u.push(new g3(R,L,P,E,S))}const m=t.substring(n[0].length),y=n[3]!==void 0?n[3]:"",_=n[2],b=n[1]!==void 0?n[1]:"",w=e!==-1?r.slice(0,e):"";return{type:_,inputs:u,name:y,precision:b,inputsCode:i,blockCode:m,headerCode:w}}else throw new Error("FunctionNode: Function is not a GLSL code.")};class pO extends y3{constructor(e){const{type:t,inputs:n,name:i,precision:s,inputsCode:a,blockCode:u,headerCode:f}=dO(e);super(t,n,i,s),this.inputsCode=a,this.blockCode=u,this.headerCode=f}getCode(e=this.name){let t;const n=this.blockCode;if(n!==""){const{type:i,inputsCode:s,headerCode:a,precision:u}=this;let f=`${i} ${e} ( ${s.trim()} )`;u!==""&&(f=`${u} ${f}`),t=a+f+n}else t="";return t}}class mO extends h_{parseFunction(e){return new pO(e)}}const $6=new WeakMap,ss=[],tA=[];class gO extends Wo{constructor(e,t){super(),this.renderer=e,this.backend=t,this.nodeFrame=new z6,this.nodeBuilderCache=new Map,this.callHashCache=new Rs,this.groupsData=new Rs,this.cacheLib={}}updateGroup(e){const t=e.groupNode,n=t.name;if(n===fp.name)return!0;if(n===Ze.name){const s=this.get(e),a=this.nodeFrame.renderId;return s.renderId!==a?(s.renderId=a,!0):!1}if(n===v8.name){const s=this.get(e),a=this.nodeFrame.frameId;return s.frameId!==a?(s.frameId=a,!0):!1}ss[0]=t,ss[1]=e;let i=this.groupsData.get(ss);return i===void 0&&this.groupsData.set(ss,i={}),ss.length=0,i.version!==t.version?(i.version=t.version,!0):!1}getForRenderCacheKey(e){return e.initialCacheKey}getForRender(e){const t=this.get(e);let n=t.nodeBuilderState;if(n===void 0){const{nodeBuilderCache:i}=this,s=this.getForRenderCacheKey(e);if(n=i.get(s),n===void 0){const a=this.backend.createNodeBuilder(e.object,this.renderer);a.scene=e.scene,a.material=e.material,a.camera=e.camera,a.context.material=e.material,a.lightsNode=e.lightsNode,a.environmentNode=this.getEnvironmentNode(e.scene),a.fogNode=this.getFogNode(e.scene),a.clippingContext=e.clippingContext,a.build(),n=this._createNodeBuilderState(a),i.set(s,n)}n.usedTimes++,t.nodeBuilderState=n}return n}delete(e){if(e.isRenderObject){const t=this.get(e).nodeBuilderState;t.usedTimes--,t.usedTimes===0&&this.nodeBuilderCache.delete(this.getForRenderCacheKey(e))}return super.delete(e)}getForCompute(e){const t=this.get(e);let n=t.nodeBuilderState;if(n===void 0){const i=this.backend.createNodeBuilder(e,this.renderer);i.build(),n=this._createNodeBuilderState(i),t.nodeBuilderState=n}return n}_createNodeBuilderState(e){return new BU(e.vertexShader,e.fragmentShader,e.computeShader,e.getAttributesArray(),e.getBindings(),e.updateNodes,e.updateBeforeNodes,e.updateAfterNodes,e.observer,e.transforms)}getEnvironmentNode(e){this.updateEnvironment(e);let t=null;if(e.environmentNode&&e.environmentNode.isNode)t=e.environmentNode;else{const n=this.get(e);n.environmentNode&&(t=n.environmentNode)}return t}
46getBackgroundNode(e){this.updateBackground(e);let t=null;if(e.backgroundNode&&e.backgroundNode.isNode)t=e.backgroundNode;else{const n=this.get(e);n.backgroundNode&&(t=n.backgroundNode)}return t}getFogNode(e){return this.updateFog(e),e.fogNode||this.get(e).fogNode||null}getCacheKey(e,t){ss[0]=e,ss[1]=t;const n=this.renderer.info.calls,i=this.callHashCache.get(ss)||{};if(i.callId!==n){const s=this.getEnvironmentNode(e),a=this.getFogNode(e);t&&tA.push(t.getCacheKey(!0)),s&&tA.push(s.getCacheKey()),a&&tA.push(a.getCacheKey()),tA.push(this.renderer.shadowMap.enabled?1:0),i.callId=n,i.cacheKey=Dc(tA),this.callHashCache.set(ss,i),tA.length=0}return ss.length=0,i.cacheKey}get isToneMappingState(){return!this.renderer.getRenderTarget()}updateBackground(e){const t=this.get(e),n=e.background;if(n){const i=e.backgroundBlurriness===0&&t.backgroundBlurriness>0||e.backgroundBlurriness>0&&t.backgroundBlurriness===0;if(t.background!==n||i){const s=this.getCacheNode("background",n,()=>{if(n.isCubeTexture===!0||n.mapping===El||n.mapping===Nl||n.mapping===zf){if(e.backgroundBlurriness>0||n.mapping===zf)return Jp(n);{let a;return n.isCubeTexture===!0?a=kA(n):a=xt(n),Xy(a)}}else{if(n.isTexture===!0)return xt(n,Ns.flipY()).setUpdateMatrix(!0);n.isColor!==!0&&console.error("WebGPUNodes: Unsupported background configuration.",n)}},i);t.backgroundNode=s,t.background=n,t.backgroundBlurriness=e.backgroundBlurriness}}else t.backgroundNode&&(delete t.backgroundNode,delete t.background)}getCacheNode(e,t,n,i=!1){const s=this.cacheLib[e]||(this.cacheLib[e]=new WeakMap);let a=s.get(t);return(a===void 0||i)&&(a=n(),s.set(t,a)),a}updateFog(e){const t=this.get(e),n=e.fog;if(n){if(t.fog!==n){const i=this.getCacheNode("fog",n,()=>{if(n.isFogExp2){const s=zt("color","color",n).setGroup(Ze),a=zt("density","float",n).setGroup(Ze);return xl(s,s3(a))}else if(n.isFog){const s=zt("color","color",n).setGroup(Ze),a=zt("near","float",n).setGroup(Ze),u=zt("far","float",n).setGroup(Ze);return xl(s,i3(a,u))}else console.error("THREE.Renderer: Unsupported fog configuration.",n)});t.fogNode=i,t.fog=n}}else delete t.fogNode,delete t.fog}updateEnvironment(e){const t=this.get(e),n=e.environment;if(n){if(t.environment!==n){const i=this.getCacheNode("environment",n,()=>{if(n.isCubeTexture===!0)return kA(n);if(n.isTexture===!0)return xt(n);console.error("Nodes: Unsupported environment configuration.",n)});t.environmentNode=i,t.environment=n}}else t.environmentNode&&(delete t.environmentNode,delete t.environment)}getNodeFrame(e=this.renderer,t=null,n=null,i=null,s=null){const a=this.nodeFrame;return a.renderer=e,a.scene=t,a.object=n,a.camera=i,a.material=s,a}getNodeFrameForRender(e){return this.getNodeFrame(e.renderer,e.scene,e.object,e.camera,e.material)}getOutputCacheKey(){const e=this.renderer;return e.toneMapping+","+e.currentColorSpace}hasOutputChange(e){return $6.get(e)!==this.getOutputCacheKey()}getOutputNode(e){const t=this.renderer,n=this.getOutputCacheKey(),i=xt(e,Ns).renderOutput(t.toneMapping,t.currentColorSpace);return $6.set(e,n),i}updateBefore(e){const t=e.getNodeBuilderState();for(const n of t.updateBeforeNodes)this.getNodeFrameForRender(e).updateBeforeNode(n)}updateAfter(e){const t=e.getNodeBuilderState();for(const n of t.updateAfterNodes)this.getNodeFrameForRender(e).updateAfterNode(n)}updateForCompute(e){const t=this.getNodeFrame(),n=this.getForCompute(e);for(const i of n.updateNodes)t.updateNode(i)}updateForRender(e){const t=this.getNodeFrameForRender(e),n=e.getNodeBuilderState();for(const i of n.updateNodes)t.updateNode(i)}needsRefresh(e){const t=this.getNodeFrameForRender(e);return e.getMonitor().needsRefresh(e,t)}dispose(){super.dispose(),this.nodeFrame=new z6,this.nodeBuilderCache=new Map,this.cacheLib={}}}const wf=new Md;class Tc{constructor(e=null){this.version=0,this.clipIntersection=null,this.cacheKey="",this.shadowPass=!1,this.viewNormalMatrix=new Rl,this.clippingGroupContexts=new WeakMap,this.intersectionPlanes=[],this.unionPlanes=[],this.parentVersion=null,e!==null&&(this.viewNormalMatrix=e.viewNormalMatrix,this.clippingGroupContexts=e.clippingGroupContexts,this.shadowPass=e.shadowPass,this.viewMatrix=e.viewMatrix)}projectPlanes(e,t,n){const i=e.length;for(let s=0;s<i;s++){wf.copy(e[s]).applyMatrix4(this.viewMatrix,this.viewNormalMatrix);const a=t[n+s],u=wf.normal;a.x=-u.x,a.y=-u.y,a.z=-u.z,a.w=wf.constant}}updateGlobal(e,t){this.shadowPass=e.overrideMaterial!==null&&e.overrideMaterial.isShadowPassMaterial,this.viewMatrix=t.matrixWorldInverse,this.viewNormalMatrix.getNormalMatrix(this.viewMatrix)}update(e,t){let n=!1;e.version!==this.parentVersion&&(this.intersectionPlanes=Array.from(e.intersectionPlanes),this.unionPlanes=Array.from(e.unionPlanes),this.parentVersion=e.version),this.clipIntersection!==t.clipIntersection&&(this.clipIntersection=t.clipIntersection,this.clipIntersection?this.unionPlanes.length=e.unionPlanes.length:this.intersectionPlanes.length=e.intersectionPlanes.length);const i=t.clippingPlanes,s=i.length;let a,u;if(this.clipIntersection?(a=this.intersectionPlanes,u=e.intersectionPlanes.length):(a=this.unionPlanes,u=e.unionPlanes.length),a.length!==u+s){a.length=u+s;for(let f=0;f<s;f++)a[u+f]=new Qt;n=!0}this.projectPlanes(i,a,u),n&&(this.version++,this.cacheKey=`${this.intersectionPlanes.length}:${this.unionPlanes.length}`)}
46getGroupContext(e){if(this.shadowPass&&!e.clipShadows)return this;let t=this.clippingGroupContexts.get(e);return t===void 0&&(t=new Tc(this),this.clippingGroupContexts.set(e,t)),t.update(this,e),t}get unionClippingCount(){return this.unionPlanes.length}}class yO{constructor(e,t){this.bundleGroup=e,this.camera=t}}const b0=[];class vO{constructor(){this.bundles=new Rs}get(e,t){const n=this.bundles;b0[0]=e,b0[1]=t;let i=n.get(b0);return i===void 0&&(i=new yO(e,t),n.set(b0,i)),b0.length=0,i}dispose(){this.bundles=new Rs}}class d_{constructor(){this.lightNodes=new WeakMap,this.materialNodes=new Map,this.toneMappingNodes=new Map}fromMaterial(e){if(e.isNodeMaterial)return e;let t=null;const n=this.getMaterialNodeClass(e.type);if(n!==null){t=new n;for(const i in e)t[i]=e[i]}return t}addToneMapping(e,t){this.addType(e,t,this.toneMappingNodes)}getToneMappingFunction(e){return this.toneMappingNodes.get(e)||null}getMaterialNodeClass(e){return this.materialNodes.get(e)||null}addMaterial(e,t){this.addType(e,t,this.materialNodes)}getLightNodeClass(e){return this.lightNodes.get(e)||null}addLight(e,t){this.addClass(e,t,this.lightNodes)}addType(e,t,n){if(n.has(t)){console.warn(`Redefinition of node ${t}`);return}if(typeof e!="function")throw new Error(`Node class ${e.name} is not a class.`);if(typeof t=="function"||typeof t=="object")throw new Error(`Base class ${t} is not a class.`);n.set(t,e)}addClass(e,t,n){if(n.has(t)){console.warn(`Redefinition of node ${t.name}`);return}if(typeof e!="function")throw new Error(`Node class ${e.name} is not a class.`);if(typeof t!="function")throw new Error(`Base class ${t.name} is not a class.`);n.set(t,e)}}const _O=new u3,T0=[];class xO extends Rs{constructor(){super()}createNode(e=[]){return new u3().setLights(e)}getNode(e,t){if(e.isQuadMesh)return _O;T0[0]=e,T0[1]=t;let n=this.get(T0);return n===void 0&&(n=this.createNode(),this.set(T0,n)),T0.length=0,n}}class H6 extends jo{constructor(e=1,t=1,n={}){super(e,t,n),this.isXRRenderTarget=!0,this.hasExternalTextures=!1,this.autoAllocateDepthBuffer=!0}copy(e){return super.copy(e),this.hasExternalTextures=e.hasExternalTextures,this.autoAllocateDepthBuffer=e.autoAllocateDepthBuffer,this}}const W6=new ke,Q6=new ke;class bO extends Ed{constructor(e){super(),this.enabled=!1,this.isPresenting=!1,this.cameraAutoUpdate=!0,this._renderer=e,this._cameraL=new Io,this._cameraL.viewport=new Qt,this._cameraR=new Io,this._cameraR.viewport=new Qt,this._cameras=[this._cameraL,this._cameraR],this._cameraXR=new Jb,this._currentDepthNear=null,this._currentDepthFar=null,this._controllers=[],this._controllerInputSources=[],this._currentRenderTarget=null,this._xrRenderTarget=null,this._currentAnimationContext=null,this._currentAnimationLoop=null,this._currentPixelRatio=null,this._currentSize=new Wt,this._onSessionEvent=SO.bind(this),this._onSessionEnd=MO.bind(this),this._onInputSourcesChange=EO.bind(this),this._onAnimationFrame=NO.bind(this),this._referenceSpace=null,this._referenceSpaceType="local-floor",this._customReferenceSpace=null,this._framebufferScaleFactor=1,this._foveation=1,this._session=null,this._glBaseLayer=null,this._glBinding=null,this._glProjLayer=null,this._xrFrame=null,this._useLayers=typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype}getController(e){return this._getController(e).getTargetRaySpace()}getControllerGrip(e){return this._getController(e).getGripSpace()}getHand(e){return this._getController(e).getHandSpace()}getFoveation(){if(!(this._glProjLayer===null&&this._glBaseLayer===null))return this._foveation}setFoveation(e){this._foveation=e,this._glProjLayer!==null&&(this._glProjLayer.fixedFoveation=e),this._glBaseLayer!==null&&this._glBaseLayer.fixedFoveation!==void 0&&(this._glBaseLayer.fixedFoveation=e)}getFramebufferScaleFactor(){return this._framebufferScaleFactor}setFramebufferScaleFactor(e){this._framebufferScaleFactor=e,this.isPresenting===!0&&console.warn("THREE.XRManager: Cannot change framebuffer scale while presenting.")}getReferenceSpaceType(){return this._referenceSpaceType}setReferenceSpaceType(e){this._referenceSpaceType=e,this.isPresenting===!0&&console.warn("THREE.XRManager: Cannot change reference space type while presenting.")}getReferenceSpace(){return this._customReferenceSpace||this._referenceSpace}setReferenceSpace(e){this._customReferenceSpace=e}getCamera(){return this._cameraXR}getEnvironmentBlendMode(){if(this._session!==null)return this._session.environmentBlendMode}getFrame(){return this._xrFrame}getSession(){return this._session}async setSession(e){const t=this._renderer,n=t.backend,i=t.getContext();if(this._session=e,e!==null){if(n.isWebGPUBackend===!0)throw new Error('THREE.XRManager: XR is currently not supported with a WebGPU backend. Use WebGL by passing "{ forceWebGL: true }" to the constructor of the renderer.');if(this._currentRenderTarget=t.getRenderTarget(),e.addEventListener("select",this._onSessionEvent),e.addEventListener("selectstart",this._onSessionEvent),e.addEventListener("selectend",this._onSessionEvent),e.addEventListener("squeeze",this._onSessionEvent),e.addEventListener("squeezestart",this._onSessionEvent),e.addEventListener("squeezeend",this._onSessionEvent),e.addEventListener("end",this._onSessionEnd),e.addEventListener("inputsourceschange",this._onInputSourcesChange),await n.makeXRCompatible(),this._currentPixelRatio=t.getPixelRatio(),t.getSize(this._currentSize),this._currentAnimationContext=t._animation.getContext(),this._currentAnimationLoop=t._animation.getAnimationLoop(),t._animation.stop(),this._useLayers===!0){let s=null,a=null,u=null;t.depth&&(u=t.stencil?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24,s=t.stencil?wl:Sl,a=t.stencil?Ml:fr);const f={colorFormat:i.RGBA8,depthFormat:u,scaleFactor:this._framebufferScaleFactor},m=new XRWebGLBinding(e,i),y=m.createProjectionLayer(f);this._glBinding=m,this._glProjLayer=y,e.updateRenderState({layers:[y]}),t.setPixelRatio(1),t.setSize(y.textureWidth,y.textureHeight,!1),this._xrRenderTarget=new H6(y.textureWidth,y.textureHeight,{format:Oo,type:ms,colorSpace:t.outputColorSpace,depthTexture:new $o(y.textureWidth,y.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,s),stencilBuffer:t.stencil,samples:t.samples}),this._xrRenderTarget.hasExternalTextures=!0}else{const s={antialias:t.samples>0,alpha:!0,depth:t.depth,stencil:t.stencil,framebufferScaleFactor:this.getFramebufferScaleFactor()},a=new XRWebGLLayer(e,i,s);this._glBaseLayer=a,e.updateRenderState({baseLayer:a}),t.setPixelRatio(1),t.setSize(a.framebufferWidth,a.framebufferHeight,!1),this._xrRenderTarget=new H6(a.framebufferWidth,a.framebufferHeight,{format:Oo,type:ms,colorSpace:t.outputColorSpace,stencilBuffer:t.stencil})}this.setFoveation(this.getFoveation()),this._referenceSpace=await e.requestReferenceSpace(this.getReferenceSpaceType()),t._animation.setAnimationLoop(this._onAnimationFrame),t._animation.setContext(e),t._animation.start(),this.isPresenting=!0,this.dispatchEvent({type:"sessionstart"})}}updateCamera(e){const t=this._session;if(t===null)return;const n=e.near,i=e.far,s=this._cameraXR,a=this._cameraL,u=this._cameraR;s.near=u.near=a.near=n,s.far=u.far=a.far=i,(this._currentDepthNear!==s.near||this._currentDepthFar!==s.far)&&(t.updateRenderState({depthNear:s.near,depthFar:s.far}),this._currentDepthNear=s.near,this._currentDepthFar=s.far),a.layers.mask=e.layers.mask|2,u.layers.mask=e.layers.mask|4,s.layers.mask=a.layers.mask|u.layers.mask;const f=e.parent,m=s.cameras;Y6(s,f);for(let y=0;y<m.length;y++)Y6(m[y],f);m.length===2?TO(s,a,u):s.projectionMatrix.copy(a.projectionMatrix),wO(e,s,f)}_getController(e){let t=this._controllers[e];return t===void 0&&(t=new eT,this._controllers[e]=t),t}}function TO(r,e,t){W6.setFromMatrixPosition(e.matrixWorld),Q6.setFromMatrixPosition(t.matrixWorld);const n=W6.distanceTo(Q6),i=e.projectionMatrix.elements,s=t.projectionMatrix.elements,a=i[14]/(i[10]-1),u=i[14]/(i[10]+1),f=(i[9]+1)/i[5],m=(i[9]-1)/i[5],y=(i[8]-1)/i[0],_=(s[8]+1)/s[0],b=a*y,w=a*_,S=n/(-y+_),E=S*-y;if(e.matrixWorld.decompose(r.position,r.quaternion,r.scale),r.translateX(E),r.translateZ(S),r.matrixWorld.compose(r.position,r.quaternion,r.scale),r.matrixWorldInverse.copy(r.matrixWorld).invert(),i[10]===-1)r.projectionMatrix.copy(e.projectionMatrix),r.projectionMatrixInverse.copy(e.projectionMatrixInverse);else{const R=a+S,P=u+S,L=b-E,D=w+(n-E),O=f*u/P*R,G=m*u/P*R;r.projectionMatrix.makePerspective(L,D,O,G,R,P),r.projectionMatrixInverse.copy(r.projectionMatrix).invert()}}function Y6(r,e){e===null?r.matrixWorld.copy(r.matrix):r.matrixWorld.multiplyMatrices(e.matrixWorld,r.matrix),r.matrixWorldInverse.copy(r.matrixWorld).invert()}function wO(r,e,t){t===null?r.matrix.copy(e.matrixWorld):(r.matrix.copy(t.matrixWorld),r.matrix.invert(),r.matrix.multiply(e.matrixWorld)),r.matrix.decompose(r.position,r.quaternion,r.scale),r.updateMatrixWorld(!0),r.projectionMatrix.copy(e.projectionMatrix),r.projectionMatrixInverse.copy(e.projectionMatrixInverse),r.isPerspectiveCamera&&(r.fov=tT*2*Math.atan(1/r.projectionMatrix.elements[5]),r.zoom=1)}function SO(r){const e=this._controllerInputSources.indexOf(r.inputSource);if(e===-1)return;const t=this._controllers[e];if(t!==void 0){const n=this.getReferenceSpace();
46t.update(r.inputSource,r.frame,n),t.dispatchEvent({type:r.type,data:r.inputSource})}}function MO(){const r=this._session,e=this._renderer;r.removeEventListener("select",this._onSessionEvent),r.removeEventListener("selectstart",this._onSessionEvent),r.removeEventListener("selectend",this._onSessionEvent),r.removeEventListener("squeeze",this._onSessionEvent),r.removeEventListener("squeezestart",this._onSessionEvent),r.removeEventListener("squeezeend",this._onSessionEvent),r.removeEventListener("end",this._onSessionEnd),r.removeEventListener("inputsourceschange",this._onInputSourcesChange);for(let t=0;t<this._controllers.length;t++){const n=this._controllerInputSources[t];n!==null&&(this._controllerInputSources[t]=null,this._controllers[t].disconnect(n))}this._currentDepthNear=null,this._currentDepthFar=null,e.backend.setXRTarget(null),e.setRenderTarget(this._currentRenderTarget),this._session=null,this._xrRenderTarget=null,this.isPresenting=!1,e._animation.stop(),e._animation.setAnimationLoop(this._currentAnimationLoop),e._animation.setContext(this._currentAnimationContext),e._animation.start(),e.setPixelRatio(this._currentPixelRatio),e.setSize(this._currentSize.width,this._currentSize.height,!1),this.dispatchEvent({type:"sessionend"})}function EO(r){const e=this._controllers,t=this._controllerInputSources;for(let n=0;n<r.removed.length;n++){const i=r.removed[n],s=t.indexOf(i);s>=0&&(t[s]=null,e[s].disconnect(i))}for(let n=0;n<r.added.length;n++){const i=r.added[n];let s=t.indexOf(i);if(s===-1){for(let u=0;u<e.length;u++)if(u>=t.length){t.push(i),s=u;break}else if(t[u]===null){t[u]=i,s=u;break}if(s===-1)break}const a=e[s];a&&a.connect(i)}}function NO(r,e){if(e===void 0)return;const t=this._cameraXR,n=this._renderer,i=n.backend,s=this._glBaseLayer,a=this.getReferenceSpace(),u=e.getViewerPose(a);if(this._xrFrame=e,u!==null){const f=u.views;this._glBaseLayer!==null&&i.setXRTarget(s.framebuffer);let m=!1;f.length!==t.cameras.length&&(t.cameras.length=0,m=!0);for(let y=0;y<f.length;y++){const _=f[y];let b;if(this._useLayers===!0){const S=this._glBinding.getViewSubImage(this._glProjLayer,_);b=S.viewport,y===0&&i.setXRRenderTargetTextures(this._xrRenderTarget,S.colorTexture,this._glProjLayer.ignoreDepthValues?void 0:S.depthStencilTexture)}else b=s.getViewport(_);let w=this._cameras[y];w===void 0&&(w=new Io,w.layers.enable(y),w.viewport=new Qt,this._cameras[y]=w),w.matrix.fromArray(_.transform.matrix),w.matrix.decompose(w.position,w.quaternion,w.scale),w.projectionMatrix.fromArray(_.projectionMatrix),w.projectionMatrixInverse.copy(w.projectionMatrix).invert(),w.viewport.set(b.x,b.y,b.width,b.height),y===0&&(t.matrix.copy(w.matrix),t.matrix.decompose(t.position,t.quaternion,t.scale)),m===!0&&t.cameras.push(w)}n.setRenderTarget(this._xrRenderTarget)}for(let f=0;f<this._controllers.length;f++){const m=this._controllerInputSources[f],y=this._controllers[f];m!==null&&y!==void 0&&y.update(m,e,a)}this._currentAnimationLoop&&this._currentAnimationLoop(r,e),e.detectedPlanes&&this.dispatchEvent({type:"planesdetected",data:e}),this._xrFrame=null}const X6=new Sc,Ou=new Wt,Sf=new Qt,Mf=new Pm,Gu=new Bn,To=new Qt;class RO{constructor(e,t={}){this.isRenderer=!0;const{logarithmicDepthBuffer:n=!1,alpha:i=!0,depth:s=!0,stencil:a=!1,antialias:u=!1,samples:f=0,getFallback:m=null,colorBufferType:y=Mi}=t;this.domElement=e.getDomElement(),this.backend=e,this.samples=f||u===!0?4:0,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.alpha=i,this.logarithmicDepthBuffer=n,this.outputColorSpace=dt,this.toneMapping=bA,this.toneMappingExposure=1,this.sortObjects=!0,this.depth=s,this.stencil=a,this.info=new vL,this.nodes={modelViewMatrix:null,modelNormalViewMatrix:null},this.library=new d_,this.lighting=new xO,this._getFallback=m,this._pixelRatio=1,this._width=this.domElement.width,this._height=this.domElement.height,this._viewport=new Qt(0,0,this._width,this._height),this._scissor=new Qt(0,0,this._width,this._height),this._scissorTest=!1,this._attributes=null,this._geometries=null,this._nodes=null,this._animation=null,this._bindings=null,this._objects=null,this._pipelines=null,this._bundles=null,this._renderLists=null,this._renderContexts=null,this._textures=null,this._background=null,this._quad=new n3(new Ln),this._quad.material.name="Renderer_output",this._currentRenderContext=null,this._opaqueSort=null,this._transparentSort=null,this._frameBufferTarget=null;const _=this.alpha===!0?0:1;this._clearColor=new e3(0,0,0,_),this._clearDepth=1,this._clearStencil=0,this._renderTarget=null,this._activeCubeFace=0,this._activeMipmapLevel=0,this._mrt=null,this._renderObjectFunction=null,this._currentRenderObjectFunction=null,this._currentRenderBundle=null,this._handleObjectFunction=this._renderObjectDirect,this._isDeviceLost=!1,this.onDeviceLost=this._onDeviceLost,this._colorBufferType=y,this._initialized=!1,this._initPromise=null,this._compilationPromises=null,this.transparent=!0,this.opaque=!0,this.shadowMap={enabled:!1,type:Ob}
46,this.xr=new bO(this),this.debug={checkShaderErrors:!0,onShaderError:null,getShaderAsync:async(b,w,S)=>{await this.compileAsync(b,w);const E=this._renderLists.get(b,w),R=this._renderContexts.get(b,w,this._renderTarget),P=b.overrideMaterial||S.material,L=this._objects.get(S,P,b,w,E.lightsNode,R,R.clippingContext),{fragmentShader:D,vertexShader:O}=L.getNodeBuilderState();return{fragmentShader:D,vertexShader:O}}}}async init(){if(this._initialized)throw new Error("Renderer: Backend has already been initialized.");return this._initPromise!==null?this._initPromise:(this._initPromise=new Promise(async(e,t)=>{let n=this.backend;try{await n.init(this)}catch(i){if(this._getFallback!==null)try{this.backend=n=this._getFallback(i),await n.init(this)}catch(s){t(s);return}else{t(i);return}}this._nodes=new gO(this,n),this._animation=new uL(this._nodes,this.info),this._attributes=new gL(n),this._background=new CU(this,this._nodes),this._geometries=new yL(this._attributes,this.info),this._textures=new DL(this,n,this.info),this._pipelines=new TL(n,this._nodes),this._bindings=new wL(n,this._nodes,this._textures,this._attributes,this._pipelines,this.info),this._objects=new dL(this,this._nodes,this._geometries,this._pipelines,this._bindings,this.info),this._renderLists=new EL(this.lighting),this._bundles=new vO,this._renderContexts=new BL,this._animation.start(),this._initialized=!0,e()}),this._initPromise)}get coordinateSystem(){return this.backend.coordinateSystem}async compileAsync(e,t,n=null){if(this._isDeviceLost===!0)return;this._initialized===!1&&await this.init();const i=this._nodes.nodeFrame,s=i.renderId,a=this._currentRenderContext,u=this._currentRenderObjectFunction,f=this._compilationPromises,m=e.isScene===!0?e:X6;n===null&&(n=e);const y=this._renderTarget,_=this._renderContexts.get(n,t,y),b=this._activeMipmapLevel,w=[];this._currentRenderContext=_,this._currentRenderObjectFunction=this.renderObject,this._handleObjectFunction=this._createObjectPipeline,this._compilationPromises=w,i.renderId++,i.update(),_.depth=this.depth,_.stencil=this.stencil,_.clippingContext||(_.clippingContext=new Tc),_.clippingContext.updateGlobal(m,t),m.onBeforeRender(this,e,t,y);const S=this._renderLists.get(e,t);if(S.begin(),this._projectObject(e,t,0,S,_.clippingContext),n!==e&&n.traverseVisible(function(D){D.isLight&&D.layers.test(t.layers)&&S.pushLight(D)}),S.finish(),y!==null){this._textures.updateRenderTarget(y,b);const D=this._textures.get(y);_.textures=D.textures,_.depthTexture=D.depthTexture}else _.textures=null,_.depthTexture=null;this._background.update(m,S,_);const E=S.opaque,R=S.transparent,P=S.transparentDoublePass,L=S.lightsNode;this.opaque===!0&&E.length>0&&this._renderObjects(E,t,m,L),this.transparent===!0&&R.length>0&&this._renderTransparents(R,P,t,m,L),i.renderId=s,this._currentRenderContext=a,this._currentRenderObjectFunction=u,this._compilationPromises=f,this._handleObjectFunction=this._renderObjectDirect,await Promise.all(w)}async renderAsync(e,t){this._initialized===!1&&await this.init(),this._renderScene(e,t)}async waitForGPU(){await this.backend.waitForGPU()}setMRT(e){return this._mrt=e,this}getMRT(){return this._mrt}getColorBufferType(){return this._colorBufferType}_onDeviceLost(e){let t=`THREE.WebGPURenderer: ${e.api} Device Lost: 47 48Message: ${e.message}`;e.reason&&(t+=` 49Reason: ${e.reason}`),console.error(t),this._isDeviceLost=!0}_renderBundle(e,t,n){const{bundleGroup:i,camera:s,renderList:a}=e,u=this._currentRenderContext,f=this._bundles.get(i,s),m=this.backend.get(f);m.renderContexts===void 0&&(m.renderContexts=new Set);const y=i.version!==m.version,_=m.renderContexts.has(u)===!1||y;if(m.renderContexts.add(u),_){this.backend.beginBundle(u),(m.renderObjects===void 0||y)&&(m.renderObjects=[]),this._currentRenderBundle=f;const b=a.opaque;this.opaque===!0&&b.length>0&&this._renderObjects(b,s,t,n),this._currentRenderBundle=null,this.backend.finishBundle(u,f),m.version=i.version}else{const{renderObjects:b}=m;for(let w=0,S=b.length;w<S;w++){const E=b[w];this._nodes.needsRefresh(E)&&(this._nodes.updateBefore(E),this._nodes.updateForRender(E),this._bindings.updateForRender(E),this._nodes.updateAfter(E))}}this.backend.addBundle(u,f)}render(e,t){if(this._initialized===!1)return console.warn("THREE.Renderer: .render() called before the backend is initialized. Try using .renderAsync() instead."),this.renderAsync(e,t);this._renderScene(e,t)}_getFrameBufferTarget(){const{currentToneMapping:e,currentColorSpace:t}=this;if(e!==bA===!1&&t!==va===!1)return null;const{width:s,height:a}=this.getDrawingBufferSize(Ou),{depth:u,stencil:f}=this;let m=this._frameBufferTarget;return m===null&&(m=new jo(s,a,{depthBuffer:u,stencilBuffer:f,type:this._colorBufferType,format:Oo,colorSpace:va,generateMipmaps:!1,minFilter:eo,magFilter:eo,samples:this.samples}),m.isPostProcessingRenderTarget=!0,this._frameBufferTarget=m),m.depthBuffer=u,m.
49stencilBuffer=f,m.setSize(s,a),m.viewport.copy(this._viewport),m.scissor.copy(this._scissor),m.viewport.multiplyScalar(this._pixelRatio),m.scissor.multiplyScalar(this._pixelRatio),m.scissorTest=this._scissorTest,m}_renderScene(e,t,n=!0){if(this._isDeviceLost===!0)return;const i=n?this._getFrameBufferTarget():null,s=this._nodes.nodeFrame,a=s.renderId,u=this._currentRenderContext,f=this._currentRenderObjectFunction,m=e.isScene===!0?e:X6,y=this._renderTarget,_=this._activeCubeFace,b=this._activeMipmapLevel;let w;i!==null?(w=i,this.setRenderTarget(w)):w=y;const S=this._renderContexts.get(e,t,w);this._currentRenderContext=S,this._currentRenderObjectFunction=this._renderObjectFunction||this.renderObject,this.info.calls++,this.info.render.calls++,this.info.render.frameCalls++,s.renderId=this.info.calls;const E=this.coordinateSystem,R=this.xr;if(t.coordinateSystem!==E&&R.isPresenting===!1&&(t.coordinateSystem=E,t.updateProjectionMatrix(),t.isArrayCamera))for(const Y of t.cameras)Y.coordinateSystem=E,Y.updateProjectionMatrix();e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),R.enabled===!0&&R.isPresenting===!0&&(R.cameraAutoUpdate===!0&&R.updateCamera(t),t=R.getCamera());let P=this._viewport,L=this._scissor,D=this._pixelRatio;w!==null&&(P=w.viewport,L=w.scissor,D=1),this.getDrawingBufferSize(Ou),Sf.set(0,0,Ou.width,Ou.height);const O=P.minDepth===void 0?0:P.minDepth,G=P.maxDepth===void 0?1:P.maxDepth;S.viewportValue.copy(P).multiplyScalar(D).floor(),S.viewportValue.width>>=b,S.viewportValue.height>>=b,S.viewportValue.minDepth=O,S.viewportValue.maxDepth=G,S.viewport=S.viewportValue.equals(Sf)===!1,S.scissorValue.copy(L).multiplyScalar(D).floor(),S.scissor=this._scissorTest&&S.scissorValue.equals(Sf)===!1,S.scissorValue.width>>=b,S.scissorValue.height>>=b,S.clippingContext||(S.clippingContext=new Tc),S.clippingContext.updateGlobal(m,t),m.onBeforeRender(this,e,t,w),Gu.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Mf.setFromProjectionMatrix(Gu,E);const U=this._renderLists.get(e,t);if(U.begin(),this._projectObject(e,t,0,U,S.clippingContext),U.finish(),this.sortObjects===!0&&U.sort(this._opaqueSort,this._transparentSort),w!==null){this._textures.updateRenderTarget(w,b);const Y=this._textures.get(w);S.textures=Y.textures,S.depthTexture=Y.depthTexture,S.width=Y.width,S.height=Y.height,S.renderTarget=w,S.depth=w.depthBuffer,S.stencil=w.stencilBuffer}else S.textures=null,S.depthTexture=null,S.width=this.domElement.width,S.height=this.domElement.height,S.depth=this.depth,S.stencil=this.stencil;S.width>>=b,S.height>>=b,S.activeCubeFace=_,S.activeMipmapLevel=b,S.occlusionQueryCount=U.occlusionQueryCount,this._background.update(m,U,S),this.backend.beginRender(S);const{bundles:j,lightsNode:V,transparentDoublePass:Q,transparent:Z,opaque:K}=U;if(j.length>0&&this._renderBundles(j,m,V),this.opaque===!0&&K.length>0&&this._renderObjects(K,t,m,V),this.transparent===!0&&Z.length>0&&this._renderTransparents(Z,Q,t,m,V),this.backend.finishRender(S),s.renderId=a,this._currentRenderContext=u,this._currentRenderObjectFunction=f,i!==null){this.setRenderTarget(y,_,b);const Y=this._quad;this._nodes.hasOutputChange(w.texture)&&(Y.material.fragmentNode=this._nodes.getOutputNode(w.texture),Y.material.needsUpdate=!0),this._renderScene(Y,Y.camera,!1)}return m.onAfterRender(this,e,t,w),S}getMaxAnisotropy(){return this.backend.getMaxAnisotropy()}getActiveCubeFace(){return this._activeCubeFace}getActiveMipmapLevel(){return this._activeMipmapLevel}async setAnimationLoop(e){this._initialized===!1&&await this.init(),this._animation.setAnimationLoop(e)}async getArrayBufferAsync(e){return await this.backend.getArrayBufferAsync(e)}getContext(){return this.backend.getContext()}getPixelRatio(){return this._pixelRatio}getDrawingBufferSize(e){return e.set(this._width*this._pixelRatio,this._height*this._pixelRatio).floor()}getSize(e){return e.set(this._width,this._height)}setPixelRatio(e=1){this._pixelRatio!==e&&(this._pixelRatio=e,this.setSize(this._width,this._height,!1))}setDrawingBufferSize(e,t,n){this._width=e,this._height=t,this._pixelRatio=n,this.domElement.width=Math.floor(e*n),this.domElement.height=Math.floor(t*n),this.setViewport(0,0,e,t),this._initialized&&this.backend.updateSize()}setSize(e,t,n=!0){this._width=e,this._height=t,this.domElement.width=Math.floor(e*this._pixelRatio),this.domElement.height=Math.floor(t*this._pixelRatio),n===!0&&(this.domElement.style.width=e+"px",this.domElement.style.height=t+"px"),this.setViewport(0,0,e,t),this._initialized&&this.backend.updateSize()}setOpaqueSort(e){this._opaqueSort=e}setTransparentSort(e){this._transparentSort=e}getScissor(e){const t=this._scissor;return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e}setScissor(e,t,n,i){const s=this._scissor;e.isVector4?s.copy(e):s.set(e,t,n,i)}getScissorTest(){return this._scissorTest}setScissorTest(e){this._scissorTest=e,this.backend.setScissorTest(e)}getViewport(e){return e.copy(this._viewport)}setViewport(e,t,n,i,s=0,a=1){const u=this._viewport;e.isVector4?u.copy(e):u.set(e,t,n,i),u.minDepth=s,u.maxDepth=a}getClearColor(e){return e.copy(this._clearColor)}
49setClearColor(e,t=1){this._clearColor.set(e),this._clearColor.a=t}getClearAlpha(){return this._clearColor.a}setClearAlpha(e){this._clearColor.a=e}getClearDepth(){return this._clearDepth}setClearDepth(e){this._clearDepth=e}getClearStencil(){return this._clearStencil}setClearStencil(e){this._clearStencil=e}isOccluded(e){const t=this._currentRenderContext;return t&&this.backend.isOccluded(t,e)}clear(e=!0,t=!0,n=!0){if(this._initialized===!1)return console.warn("THREE.Renderer: .clear() called before the backend is initialized. Try using .clearAsync() instead."),this.clearAsync(e,t,n);const i=this._renderTarget||this._getFrameBufferTarget();let s=null;if(i!==null){this._textures.updateRenderTarget(i);const a=this._textures.get(i);s=this._renderContexts.getForClear(i),s.textures=a.textures,s.depthTexture=a.depthTexture,s.width=a.width,s.height=a.height,s.renderTarget=i,s.depth=i.depthBuffer,s.stencil=i.stencilBuffer}if(s.clearColorValue=this._clearColor,this.backend.clear(e,t,n,s),i!==null&&this._renderTarget===null){const a=this._quad;this._nodes.hasOutputChange(i.texture)&&(a.material.fragmentNode=this._nodes.getOutputNode(i.texture),a.material.needsUpdate=!0),this._renderScene(a,a.camera,!1)}}clearColor(){return this.clear(!0,!1,!1)}clearDepth(){return this.clear(!1,!0,!1)}clearStencil(){return this.clear(!1,!1,!0)}async clearAsync(e=!0,t=!0,n=!0){this._initialized===!1&&await this.init(),this.clear(e,t,n)}async clearColorAsync(){this.clearAsync(!0,!1,!1)}async clearDepthAsync(){this.clearAsync(!1,!0,!1)}async clearStencilAsync(){this.clearAsync(!1,!1,!0)}get currentToneMapping(){return this._renderTarget!==null?bA:this.toneMapping}get currentColorSpace(){return this._renderTarget!==null?va:this.outputColorSpace}dispose(){this.info.dispose(),this.backend.dispose(),this._animation.dispose(),this._objects.dispose(),this._pipelines.dispose(),this._nodes.dispose(),this._bindings.dispose(),this._renderLists.dispose(),this._renderContexts.dispose(),this._textures.dispose(),this._frameBufferTarget!==null&&this._frameBufferTarget.dispose(),Object.values(this.backend.timestampQueryPool).forEach(e=>{e!==null&&e.dispose()}),this.setRenderTarget(null),this.setAnimationLoop(null)}setRenderTarget(e,t=0,n=0){this._renderTarget=e,this._activeCubeFace=t,this._activeMipmapLevel=n}getRenderTarget(){return this._renderTarget}setRenderObjectFunction(e){this._renderObjectFunction=e}getRenderObjectFunction(){return this._renderObjectFunction}compute(e){if(this._isDeviceLost===!0)return;if(this._initialized===!1)return console.warn("THREE.Renderer: .compute() called before the backend is initialized. Try using .computeAsync() instead."),this.computeAsync(e);const t=this._nodes.nodeFrame,n=t.renderId;this.info.calls++,this.info.compute.calls++,this.info.compute.frameCalls++,t.renderId=this.info.calls;const i=this.backend,s=this._pipelines,a=this._bindings,u=this._nodes,f=Array.isArray(e)?e:[e];if(f[0]===void 0||f[0].isComputeNode!==!0)throw new Error("THREE.Renderer: .compute() expects a ComputeNode.");i.beginCompute(e);for(const m of f){if(s.has(m)===!1){const b=()=>{m.removeEventListener("dispose",b),s.delete(m),a.delete(m),u.delete(m)};m.addEventListener("dispose",b);const w=m.onInitFunction;w!==null&&w.call(m,{renderer:this})}u.updateForCompute(m),a.updateForCompute(m);const y=a.getForCompute(m),_=s.getForCompute(m,y);i.compute(e,m,y,_)}i.finishCompute(e),t.renderId=n}async computeAsync(e){this._initialized===!1&&await this.init(),this.compute(e)}async hasFeatureAsync(e){return this._initialized===!1&&await this.init(),this.backend.hasFeature(e)}async resolveTimestampsAsync(e="render"){return this._initialized===!1&&await this.init(),this.backend.resolveTimestampsAsync(e)}hasFeature(e){return this._initialized===!1?(console.warn("THREE.Renderer: .hasFeature() called before the backend is initialized. Try using .hasFeatureAsync() instead."),!1):this.backend.hasFeature(e)}hasInitialized(){return this._initialized}async initTextureAsync(e){this._initialized===!1&&await this.init(),this._textures.updateTexture(e)}initTexture(e){this._initialized===!1&&console.warn("THREE.Renderer: .initTexture() called before the backend is initialized. Try using .initTextureAsync() instead."),this._textures.updateTexture(e)}
49copyFramebufferToTexture(e,t=null){if(t!==null)if(t.isVector2)t=To.set(t.x,t.y,e.image.width,e.image.height).floor();else if(t.isVector4)t=To.copy(t).floor();else{console.error("THREE.Renderer.copyFramebufferToTexture: Invalid rectangle.");return}else t=To.set(0,0,e.image.width,e.image.height);let n=this._currentRenderContext,i;n!==null?i=n.renderTarget:(i=this._renderTarget||this._getFrameBufferTarget(),i!==null&&(this._textures.updateRenderTarget(i),n=this._textures.get(i))),this._textures.updateTexture(e,{renderTarget:i}),this.backend.copyFramebufferToTexture(e,n,t)}copyTextureToTexture(e,t,n=null,i=null,s=0){this._textures.updateTexture(e),this._textures.updateTexture(t),this.backend.copyTextureToTexture(e,t,n,i,s)}async readRenderTargetPixelsAsync(e,t,n,i,s,a=0,u=0){return this.backend.copyTextureToBuffer(e.textures[a],t,n,i,s,u)}_projectObject(e,t,n,i,s){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder,e.isClippingGroup&&e.enabled&&(s=s.getGroupContext(e));else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)i.pushLight(e);else if(e.isSprite){if(!e.frustumCulled||Mf.intersectsSprite(e)){this.sortObjects===!0&&To.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Gu);const{geometry:f,material:m}=e;m.visible&&i.push(e,f,m,n,To.z,null,s)}}else if(e.isLineLoop)console.error("THREE.Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.");else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||Mf.intersectsObject(e))){const{geometry:f,material:m}=e;if(this.sortObjects===!0&&(f.boundingSphere===null&&f.computeBoundingSphere(),To.copy(f.boundingSphere.center).applyMatrix4(e.matrixWorld).applyMatrix4(Gu)),Array.isArray(m)){const y=f.groups;for(let _=0,b=y.length;_<b;_++){const w=y[_],S=m[w.materialIndex];S&&S.visible&&i.push(e,f,S,n,To.z,w,s)}}else m.visible&&i.push(e,f,m,n,To.z,null,s)}}if(e.isBundleGroup===!0&&this.backend.beginBundle!==void 0){const f=i;i=this._renderLists.get(e,t),i.begin(),f.pushBundle({bundleGroup:e,camera:t,renderList:i}),i.finish()}const u=e.children;for(let f=0,m=u.length;f<m;f++)this._projectObject(u[f],t,n,i,s)}_renderBundles(e,t,n){for(const i of e)this._renderBundle(i,t,n)}_renderTransparents(e,t,n,i,s){if(t.length>0){for(const{material:a}of t)a.side=Xi;this._renderObjects(t,n,i,s,"backSide");for(const{material:a}of t)a.side=Vf;this._renderObjects(e,n,i,s);for(const{material:a}of t)a.side=Qi}else this._renderObjects(e,n,i,s)}_renderObjects(e,t,n,i,s=null){for(let a=0,u=e.length;a<u;a++){const{object:f,geometry:m,material:y,group:_,clippingContext:b}=e[a];this._currentRenderObjectFunction(f,n,t,m,y,_,i,b,s)}}renderObject(e,t,n,i,s,a,u,f=null,m=null){let y,_,b;if(e.onBeforeRender(this,t,n,i,s,a),t.overrideMaterial!==null){const w=t.overrideMaterial;s.positionNode&&s.positionNode.isNode&&(y=w.positionNode,w.positionNode=s.positionNode),w.alphaTest=s.alphaTest,w.alphaMap=s.alphaMap,w.transparent=s.transparent||s.transmission>0,w.isShadowPassMaterial&&(w.side=s.shadowSide===null?s.side:s.shadowSide,s.depthNode&&s.depthNode.isNode&&(b=w.depthNode,w.depthNode=s.depthNode),s.castShadowNode&&s.castShadowNode.isNode&&(_=w.colorNode,w.colorNode=s.castShadowNode)),s=w}s.transparent===!0&&s.side===Qi&&s.forceSinglePass===!1?(s.side=Xi,this._handleObjectFunction(e,s,t,n,u,a,f,"backSide"),s.side=Vf,this._handleObjectFunction(e,s,t,n,u,a,f,m),s.side=Qi):this._handleObjectFunction(e,s,t,n,u,a,f,m),y!==void 0&&(t.overrideMaterial.positionNode=y),b!==void 0&&(t.overrideMaterial.depthNode=b),_!==void 0&&(t.overrideMaterial.colorNode=_),e.onAfterRender(this,t,n,i,s,a)}_renderObjectDirect(e,t,n,i,s,a,u,f){const m=this._objects.get(e,t,n,i,s,this._currentRenderContext,u,f);m.drawRange=e.geometry.drawRange,m.group=a;const y=this._nodes.needsRefresh(m);y&&(this._nodes.updateBefore(m),this._geometries.updateForRender(m),this._nodes.updateForRender(m),this._bindings.updateForRender(m)),this._pipelines.updateForRender(m),this._currentRenderBundle!==null&&(this.backend.get(this._currentRenderBundle).renderObjects.push(m),m.bundle=this._currentRenderBundle.bundleGroup),this.backend.draw(m,this.info),y&&this._nodes.updateAfter(m)}_createObjectPipeline(e,t,n,i,s,a,u,f){const m=this._objects.get(e,t,n,i,s,this._currentRenderContext,u,f);m.drawRange=e.geometry.drawRange,m.group=a,this._nodes.updateBefore(m),this._geometries.updateForRender(m),this._nodes.updateForRender(m),this._bindings.updateForRender(m),this._pipelines.getForRender(m,this._compilationPromises),this._nodes.updateAfter(m)}get compile(){return this.compileAsync}}class v3{constructor(e=""){this.name=e,this.visibility=0}setVisibility(e){this.visibility|=e}clone(){return Object.assign(new this.constructor,this)}}function CO(r){return r+(Bo-r%Bo)%Bo}class p_ extends v3{constructor(e,t=null){super(e),this.isBuffer=!0,this.bytesPerElement=Float32Array.BYTES_PER_ELEMENT,this._buffer=t}get byteLength(){return CO(this._buffer.byteLength)}get buffer(){return this._buffer}update(){return!0}}class m_ extends p_{constructor(e,t=null){super(e,t),this.isUniformBuffer=!0}}let PO=0;class g_ extends m_{constructor(e,t){super("UniformBuffer_"+PO++,e?e.value:null),this.nodeUniform=e,this.groupNode=t}get buffer(){return this.nodeUniform.value}}class BO extends m_{constructor(e){super(e),this.isUniformsGroup=!0,this._values=null,this.uniforms=[]}addUniform(e){return this.uniforms.push(e),this}removeUniform(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}get values(){return this._values===null&&(this._values=Array.from(this.buffer)),this._values}get buffer(){let e=this._buffer;if(e===null){const t=this.byteLength;
49e=new Float32Array(new ArrayBuffer(t)),this._buffer=e}return e}get byteLength(){let e=0;for(let t=0,n=this.uniforms.length;t<n;t++){const i=this.uniforms[t],{boundary:s,itemSize:a}=i,u=e%Bo,f=Bo-u;u!==0&&f-s<0?e+=Bo-u:u%s!==0&&(e+=u%s),i.offset=e/this.bytesPerElement,e+=a*this.bytesPerElement}return Math.ceil(e/Bo)*Bo}update(){let e=!1;for(const t of this.uniforms)this.updateByType(t)===!0&&(e=!0);return e}updateByType(e){if(e.isNumberUniform)return this.updateNumber(e);if(e.isVector2Uniform)return this.updateVector2(e);if(e.isVector3Uniform)return this.updateVector3(e);if(e.isVector4Uniform)return this.updateVector4(e);if(e.isColorUniform)return this.updateColor(e);if(e.isMatrix3Uniform)return this.updateMatrix3(e);if(e.isMatrix4Uniform)return this.updateMatrix4(e);console.error("THREE.WebGPUUniformsGroup: Unsupported uniform type.",e)}updateNumber(e){let t=!1;const n=this.values,i=e.getValue(),s=e.offset,a=e.getType();if(n[s]!==i){const u=this._getBufferForType(a);u[s]=n[s]=i,t=!0}return t}updateVector2(e){let t=!1;const n=this.values,i=e.getValue(),s=e.offset,a=e.getType();if(n[s+0]!==i.x||n[s+1]!==i.y){const u=this._getBufferForType(a);u[s+0]=n[s+0]=i.x,u[s+1]=n[s+1]=i.y,t=!0}return t}updateVector3(e){let t=!1;const n=this.values,i=e.getValue(),s=e.offset,a=e.getType();if(n[s+0]!==i.x||n[s+1]!==i.y||n[s+2]!==i.z){const u=this._getBufferForType(a);u[s+0]=n[s+0]=i.x,u[s+1]=n[s+1]=i.y,u[s+2]=n[s+2]=i.z,t=!0}return t}updateVector4(e){let t=!1;const n=this.values,i=e.getValue(),s=e.offset,a=e.getType();if(n[s+0]!==i.x||n[s+1]!==i.y||n[s+2]!==i.z||n[s+4]!==i.w){const u=this._getBufferForType(a);u[s+0]=n[s+0]=i.x,u[s+1]=n[s+1]=i.y,u[s+2]=n[s+2]=i.z,u[s+3]=n[s+3]=i.w,t=!0}return t}updateColor(e){let t=!1;const n=this.values,i=e.getValue(),s=e.offset;if(n[s+0]!==i.r||n[s+1]!==i.g||n[s+2]!==i.b){const a=this.buffer;a[s+0]=n[s+0]=i.r,a[s+1]=n[s+1]=i.g,a[s+2]=n[s+2]=i.b,t=!0}return t}updateMatrix3(e){let t=!1;const n=this.values,i=e.getValue().elements,s=e.offset;if(n[s+0]!==i[0]||n[s+1]!==i[1]||n[s+2]!==i[2]||n[s+4]!==i[3]||n[s+5]!==i[4]||n[s+6]!==i[5]||n[s+8]!==i[6]||n[s+9]!==i[7]||n[s+10]!==i[8]){const a=this.buffer;a[s+0]=n[s+0]=i[0],a[s+1]=n[s+1]=i[1],a[s+2]=n[s+2]=i[2],a[s+4]=n[s+4]=i[3],a[s+5]=n[s+5]=i[4],a[s+6]=n[s+6]=i[5],a[s+8]=n[s+8]=i[6],a[s+9]=n[s+9]=i[7],a[s+10]=n[s+10]=i[8],t=!0}return t}updateMatrix4(e){let t=!1;const n=this.values,i=e.getValue().elements,s=e.offset;return DO(n,i,s)===!1&&(this.buffer.set(i,s),FO(n,i,s),t=!0),t}_getBufferForType(e){return e==="int"||e==="ivec2"||e==="ivec3"||e==="ivec4"?new Int32Array(this.buffer.buffer):e==="uint"||e==="uvec2"||e==="uvec3"||e==="uvec4"?new Uint32Array(this.buffer.buffer):this.buffer}}function FO(r,e,t){for(let n=0,i=e.length;n<i;n++)r[t+n]=e[n]}function DO(r,e,t){for(let n=0,i=e.length;n<i;n++)if(r[t+n]!==e[n])return!1;return!0}let LO=0;class y_ extends BO{constructor(e,t){super(e),this.id=LO++,this.groupNode=t,this.isNodeUniformsGroup=!0}}let qO=0;class IO extends v3{constructor(e,t){super(e),this.id=qO++,this.texture=t,this.version=t?t.version:0,this.store=!1,this.generation=null,this.isSampledTexture=!0}needsBindingsUpdate(e){const{texture:t}=this;return e!==this.generation?(this.generation=e,!0):t.isVideoTexture}update(){const{texture:e,version:t}=this;return t!==e.version?(this.version=e.version,!0):!1}}class i2 extends IO{constructor(e,t,n,i=null){super(e,t?t.value:null),this.textureNode=t,this.groupNode=n,this.access=i}needsBindingsUpdate(e){return this.textureNode.value!==this.texture||super.needsBindingsUpdate(e)}update(){const{textureNode:e}=this;return this.texture!==e.value?(this.texture=e.value,!0):super.update()}}class v_ extends i2{constructor(e,t,n,i=null){super(e,t,n,i),this.isSampledCubeTexture=!0}}class __ extends i2{constructor(e,t,n,i=null){super(e,t,n,i),this.isSampledTexture3D=!0}}const kO={textureDimensions:"textureSize",equals:"equal"},UO={low:"lowp",medium:"mediump",high:"highp"},K6={swizzleAssign:!0,storageBuffer:!1},Z6=` 50precision highp float; 51precision highp int; 52precision highp sampler2D; 53precision highp sampler3D; 54precision highp samplerCube; 55precision highp sampler2DArray; 56 57precision highp usampler2D; 58precision highp usampler3D; 59precision highp usamplerCube; 60precision highp usampler2DArray; 61 62precision highp isampler2D; 63precision highp isampler3D; 64precision highp isamplerCube; 65precision highp isampler2DArray; 66 67precision lowp sampler2DShadow; 68`;class OO extends c_{constructor(e,t){super(e,t,new mO),this.uniformGroups={},this.transforms=[],this.extensions={},this.builtins={vertex:[],fragment:[],compute:[]},this.useComparisonMethod=!0}needsToWorkingColorSpace(e){return e.isVideoTexture===!0&&e.colorSpace!==W0}getMethod(e){return kO[e]||e}getOutputStructName(){return""}buildFunctionCode(e){const t=e.layout,n=this.flowShaderNode(e),i=[];
68for(const a of t.inputs)i.push(this.getType(a.type)+" "+a.name);return`${this.getType(t.type)} ${t.name}( ${i.join(", ")} ) { 69 70 ${n.vars} 71 72${n.code} 73 return ${n.result}; 74 75}`}setupPBO(e){const t=e.value;if(t.pbo===void 0){const n=t.array,i=t.count*t.itemSize,{itemSize:s}=t,a=t.array.constructor.name.toLowerCase().includes("int");let u=a?Pd:Cd;s===2?u=a?Bd:X0:s===3?u=a?RT:Rd:s===4&&(u=a?Fd:Oo);const f={Float32Array:wi,Uint8Array:ms,Uint16Array:fA,Uint32Array:fr,Int8Array:F0,Int16Array:D0,Int32Array:Fr,Uint8ClampedArray:ms},m=Math.pow(2,Math.ceil(Math.log2(Math.sqrt(i/s))));let y=Math.ceil(i/s/m);m*y*s<i&&y++;const _=m*y*s,b=new n.constructor(_);b.set(n,0),t.array=b;const w=new nT(t.array,m,y,u,f[t.array.constructor.name]||wi);w.needsUpdate=!0,w.isPBOTexture=!0;const S=new Ms(w,null,null);S.setPrecision("high"),t.pboNode=S,t.pbo=S.value,this.getUniformFromNode(t.pboNode,"texture",this.shaderStage,this.context.label)}}getPropertyName(e,t=this.shaderStage){return e.isNodeUniform&&e.node.isTextureNode!==!0&&e.node.isBufferNode!==!0?t.charAt(0)+"_"+e.name:super.getPropertyName(e,t)}generatePBO(e){const{node:t,indexNode:n}=e,i=t.value;if(this.renderer.backend.has(i)){const y=this.renderer.backend.get(i);y.pbo=i.pbo}const s=this.getUniformFromNode(i.pboNode,"texture",this.shaderStage,this.context.label),a=this.getPropertyName(s);this.increaseUsage(n);const u=n.build(this,"uint"),f=this.getDataFromNode(e);let m=f.propertyName;if(m===void 0){const y=this.getVarFromNode(e);m=this.getPropertyName(y);const _=this.getDataFromNode(t);let b=_.propertySizeName;b===void 0&&(b=m+"Size",this.getVarFromNode(t,b,"uint"),this.addLineFlowCode(`${b} = uint( textureSize( ${a}, 0 ).x )`,e),_.propertySizeName=b);const{itemSize:w}=i,S="."+Pa.join("").slice(0,w),E=`ivec2(${u} % ${b}, ${u} / ${b})`,R=this.generateTextureLoad(null,a,E,null,"0");let P="vec4";i.pbo.type===fr?P="uvec4":i.pbo.type===Fr&&(P="ivec4"),this.addLineFlowCode(`${m} = ${P}(${R})${S}`,e),f.propertyName=m}return m}generateTextureLoad(e,t,n,i,s="0"){return i?`texelFetch( ${t}, ivec3( ${n}, ${i} ), ${s} )`:`texelFetch( ${t}, ${n}, ${s} )`}generateTexture(e,t,n,i){return e.isDepthTexture?`texture( ${t}, ${n} ).x`:(i&&(n=`vec3( ${n}, ${i} )`),`texture( ${t}, ${n} )`)}generateTextureLevel(e,t,n,i){return`textureLod( ${t}, ${n}, ${i} )`}generateTextureBias(e,t,n,i){return`texture( ${t}, ${n}, ${i} )`}generateTextureGrad(e,t,n,i){return`textureGrad( ${t}, ${n}, ${i[0]}, ${i[1]} )`}generateTextureCompare(e,t,n,i,s,a=this.shaderStage){if(a==="fragment")return`texture( ${t}, vec3( ${n}, ${i} ) )`;console.error(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${a} shader.`)}getVars(e){const t=[],n=this.vars[e];if(n!==void 0)for(const i of n)t.push(`${this.getVar(i.type,i.name,i.count)};`);return t.join(` 76 `)}getUniforms(e){const t=this.uniforms[e],n=[],i={};for(const a of t){let u=null,f=!1;if(a.type==="texture"){const y=a.node.value;let _="";y.isDataTexture===!0&&(y.type===fr?_="u":y.type===Fr&&(_="i")),y.compareFunction?u=`sampler2DShadow ${a.name};`:y.isDataArrayTexture===!0||y.isCompressedArrayTexture===!0?u=`${_}sampler2DArray ${a.name};`:u=`${_}sampler2D ${a.name};`}else if(a.type==="cubeTexture")u=`samplerCube ${a.name};`;else if(a.type==="texture3D")u=`sampler3D ${a.name};`;else if(a.type==="buffer"){const y=a.node,_=this.getType(y.bufferType),b=y.bufferCount,w=b>0?b:"";u=`${y.name} { 77 ${_} ${a.name}[${w}]; 78}; 79`}else u=`${this.getVectorType(a.type)} ${this.getPropertyName(a,e)};`,f=!0;const m=a.node.precision;if(m!==null&&(u=UO[m]+" "+u),f){u=" "+u;const y=a.groupNode.name;(i[y]||(i[y]=[])).push(u)}else u="uniform "+u,n.push(u)}let s="";for(const a in i){const u=i[a];s+=this._getGLSLUniformStruct(e+"_"+a,u.join(` 80`))+` 81`}return s+=n.join(` 82`),s}getTypeFromAttribute(e){let t=super.getTypeFromAttribute(e);if(/^[iu]/.test(t)&&e.gpuType!==Fr){let n=e;e.isInterleavedBufferAttribute&&(n=e.data);const i=n.array;i instanceof Uint32Array||i instanceof Int32Array||(t=t.slice(1))}return t}getAttributes(e){let t="";if(e==="vertex"||e==="compute"){const n=this.getAttributesArray();let i=0;for(const s of n)t+=`layout( location = ${i++} ) in ${s.type} ${s.name}; 83`}return t}getStructMembers(e){const t=[];for(const n of e.members)t.push(` ${n.type} ${n.name};`);return t.join(` 84`)}getStructs(e){const t=[],n=this.structs[e],i=[];for(const s of n)if(s.output)for(const a of s.members)i.push(`layout( location = ${a.index} ) out ${a.type} ${a.name};`);else{let a="struct "+s.name+` { 85`;a+=this.getStructMembers(s),a+=` 86}; 87`,t.push(a)}return i.length===0&&i.push("layout( location = 0 ) out vec4 fragColor;"),` 88`+i.join(` 89`)+` 90 91`+t.join(` 92`)}getVaryings(e){let t="";const n=this.varyings;if(e==="vertex"||e==="compute")for(const i of n){e==="compute"&&(i.needsInterpolation=!0);const s=this.getType(i.type);if(i.needsInterpolation){const a=s.includes("int")||s.includes("uv")||s.includes("iv")?"flat ":"";t+=`${a} out ${s} ${i.name}; 93`}else t+=`${s} ${i.name}; 94`}else if(e==="fragment"){for(const i of n)if(i.needsInterpolation){const s=this.getType(i.type),a=s.includes("int")||s.includes("uv")||s.includes("iv")?"flat ":"";t+=`${a}in ${s} ${i.name}; 95`}}for(const i of this.builtins[e])t+=`${i}; 96`;return t}getVertexIndex(){return"uint( gl_VertexID )"}getInstanceIndex(){return"uint( gl_InstanceID )"}getInvocationLocalIndex(){return`uint( gl_InstanceID ) % ${this.object.workgroupSize.reduce((n,i)=>
96n*i,1)}u`}getDrawIndex(){return this.renderer.backend.extensions.has("WEBGL_multi_draw")?"uint( gl_DrawID )":null}getFrontFacing(){return"gl_FrontFacing"}getFragCoord(){return"gl_FragCoord.xy"}getFragDepth(){return"gl_FragDepth"}enableExtension(e,t,n=this.shaderStage){const i=this.extensions[n]||(this.extensions[n]=new Map);i.has(e)===!1&&i.set(e,{name:e,behavior:t})}getExtensions(e){const t=[];if(e==="vertex"){const i=this.renderer.backend.extensions;this.object.isBatchedMesh&&i.has("WEBGL_multi_draw")&&this.enableExtension("GL_ANGLE_multi_draw","require",e)}const n=this.extensions[e];if(n!==void 0)for(const{name:i,behavior:s}of n.values())t.push(`#extension ${i} : ${s}`);return t.join(` 97`)}getClipDistance(){return"gl_ClipDistance"}isAvailable(e){let t=K6[e];if(t===void 0){let n;switch(t=!1,e){case"float32Filterable":n="OES_texture_float_linear";break;case"clipDistance":n="WEBGL_clip_cull_distance";break}if(n!==void 0){const i=this.renderer.backend.extensions;i.has(n)&&(i.get(n),t=!0)}K6[e]=t}return t}isFlipY(){return!0}enableHardwareClipping(e){this.enableExtension("GL_ANGLE_clip_cull_distance","require"),this.builtins.vertex.push(`out float gl_ClipDistance[ ${e} ]`)}registerTransform(e,t){this.transforms.push({varyingName:e,attributeNode:t})}getTransforms(){const e=this.transforms;let t="";for(let n=0;n<e.length;n++){const i=e[n],s=this.getPropertyName(i.attributeNode);t+=`${i.varyingName} = ${s}; 98 `}return t}_getGLSLUniformStruct(e,t){return` 99layout( std140 ) uniform ${e} { 100${t} 101};`}_getGLSLVertexCode(e){return`#version 300 es 102 103${this.getSignature()} 104 105// extensions 106${e.extensions} 107 108// precision 109${Z6} 110 111// uniforms 112${e.uniforms} 113 114// varyings 115${e.varyings} 116 117// attributes 118${e.attributes} 119 120// codes 121${e.codes} 122 123void main() { 124 125 // vars 126 ${e.vars} 127 128 // transforms 129 ${e.transforms} 130 131 // flow 132 ${e.flow} 133 134 gl_PointSize = 1.0; 135 136} 137`}_getGLSLFragmentCode(e){return`#version 300 es 138 139${this.getSignature()} 140 141// precision 142${Z6} 143 144// uniforms 145${e.uniforms} 146 147// varyings 148${e.varyings} 149 150// codes 151${e.codes} 152 153// structs 154${e.structs} 155 156void main() { 157 158 // vars 159 ${e.vars} 160 161 // flow 162 ${e.flow} 163 164} 165`}buildCode(){const e=this.material!==null?{fragment:{},vertex:{}}:{compute:{}};this.sortBindingGroups();for(const t in e){let n=`// code 166 167`;n+=this.flowCode[t];const i=this.flowNodes[t],s=i[i.length-1];for(const u of i){const f=this.getFlowData(u),m=u.name;m&&(n.length>0&&(n+=` 168`),n+=` // flow -> ${m} 169 `),n+=`${f.code} 170 `,u===s&&t!=="compute"&&(n+=`// result 171 `,t==="vertex"?(n+="gl_Position = ",n+=`${f.result};`):t==="fragment"&&(u.outputNode.isOutputStructNode||(n+="fragColor = ",n+=`${f.result};`)))}const a=e[t];a.extensions=this.getExtensions(t),a.uniforms=this.getUniforms(t),a.attributes=this.getAttributes(t),a.varyings=this.getVaryings(t),a.vars=this.getVars(t),a.structs=this.getStructs(t),a.codes=this.getCodes(t),a.transforms=this.getTransforms(t),a.flow=n}this.material!==null?(this.vertexShader=this._getGLSLVertexCode(e.vertex),this.fragmentShader=this._getGLSLFragmentCode(e.fragment)):this.computeShader=this._getGLSLVertexCode(e.compute)}getUniformFromNode(e,t,n,i=null){const s=super.getUniformFromNode(e,t,n,i),a=this.getDataFromNode(e,n,this.globalCache);let u=a.uniformGPU;if(u===void 0){const f=e.groupNode,m=f.name,y=this.getBindGroupArray(m,n);if(t==="texture")u=new i2(s.name,s.node,f),y.push(u);else if(t==="cubeTexture")u=new v_(s.name,s.node,f),y.push(u);else if(t==="texture3D")u=new __(s.name,s.node,f),y.push(u);else if(t==="buffer"){e.name=`NodeBuffer_${e.id}`,s.name=`buffer${e.id}`;const _=new g_(e,f);_.name=e.name,y.push(_),u=_}else{const _=this.uniformGroups[n]||(this.uniformGroups[n]={});let b=_[m];b===void 0&&(b=new y_(n+"_"+m,f),_[m]=b,y.push(b)),u=this.getNodeUniform(s,t),b.addUniform(u)}a.uniformGPU=u}return s}}let Ef=null,nA=null;class x_{constructor(e={}){this.parameters=Object.assign({},e),this.data=new WeakMap,this.renderer=null,this.domElement=null,this.timestampQueryPool={render:null,compute:null}}async init(e){this.renderer=e}get coordinateSystem(){}beginRender(){}finishRender(){}beginCompute(){}finishCompute(){}draw(){}compute(){}createProgram(){}destroyProgram(){}createBindings(){}updateBindings(){}updateBinding(){}createRenderPipeline(){}createComputePipeline(){}
171needsRenderUpdate(){}getRenderCacheKey(){}createNodeBuilder(){}createSampler(){}destroySampler(){}createDefaultTexture(){}createTexture(){}updateTexture(){}generateMipmaps(){}destroyTexture(){}async copyTextureToBuffer(){}copyTextureToTexture(){}copyFramebufferToTexture(){}createAttribute(){}createIndexAttribute(){}createStorageAttribute(){}updateAttribute(){}destroyAttribute(){}getContext(){}updateSize(){}updateViewport(){}isOccluded(){}async resolveTimestampsAsync(e="render"){if(!this.trackTimestamp){Q0("WebGPURenderer: Timestamp tracking is disabled.");return}const t=this.timestampQueryPool[e];if(!t){Q0(`WebGPURenderer: No timestamp query pool for type '${e}' found.`);return}const n=await t.resolveQueriesAsync();return this.renderer.info[e].timestamp=n,n}async waitForGPU(){}async getArrayBufferAsync(){}async hasFeatureAsync(){}hasFeature(){}getMaxAnisotropy(){}getDrawingBufferSize(){return Ef=Ef||new Wt,this.renderer.getDrawingBufferSize(Ef)}setScissorTest(){}getClearColor(){const e=this.renderer;return nA=nA||new e3,e.getClearColor(nA),nA.getRGB(nA,this.renderer.currentColorSpace),nA}getDomElement(){let e=this.domElement;return e===null&&(e=this.parameters.canvas!==void 0?this.parameters.canvas:rT(),"setAttribute"in e&&e.setAttribute("data-engine",`three.js r${Lm} webgpu`),this.domElement=e),e}set(e,t){this.data.set(e,t)}get(e){let t=this.data.get(e);return t===void 0&&(t={},this.data.set(e,t)),t}has(e){return this.data.has(e)}delete(e){this.data.delete(e)}dispose(){}}let GO=0;class VO{constructor(e,t){this.buffers=[e.bufferGPU,t],this.type=e.type,this.bufferType=e.bufferType,this.pbo=e.pbo,this.byteLength=e.byteLength,this.bytesPerElement=e.BYTES_PER_ELEMENT,this.version=e.version,this.isInteger=e.isInteger,this.activeBufferIndex=0,this.baseId=e.id}get id(){return`${this.baseId}|${this.activeBufferIndex}`}get bufferGPU(){return this.buffers[this.activeBufferIndex]}get transformBuffer(){return this.buffers[this.activeBufferIndex^1]}switchBuffers(){this.activeBufferIndex^=1}}class zO{constructor(e){this.backend=e}createAttribute(e,t){const n=this.backend,{gl:i}=n,s=e.array,a=e.usage||i.STATIC_DRAW,u=e.isInterleavedBufferAttribute?e.data:e,f=n.get(u);let m=f.bufferGPU;m===void 0&&(m=this._createBuffer(i,t,s,a),f.bufferGPU=m,f.bufferType=t,f.version=u.version);let y;if(s instanceof Float32Array)y=i.FLOAT;else if(s instanceof Uint16Array)e.isFloat16BufferAttribute?y=i.HALF_FLOAT:y=i.UNSIGNED_SHORT;else if(s instanceof Int16Array)y=i.SHORT;else if(s instanceof Uint32Array)y=i.UNSIGNED_INT;else if(s instanceof Int32Array)y=i.INT;else if(s instanceof Int8Array)y=i.BYTE;else if(s instanceof Uint8Array)y=i.UNSIGNED_BYTE;else if(s instanceof Uint8ClampedArray)y=i.UNSIGNED_BYTE;else throw new Error("THREE.WebGLBackend: Unsupported buffer data format: "+s);let _={bufferGPU:m,bufferType:t,type:y,byteLength:s.byteLength,bytesPerElement:s.BYTES_PER_ELEMENT,version:e.version,pbo:e.pbo,isInteger:y===i.INT||y===i.UNSIGNED_INT||e.gpuType===Fr,id:GO++};if(e.isStorageBufferAttribute||e.isStorageInstancedBufferAttribute){const b=this._createBuffer(i,t,s,a);_=new VO(_,b)}n.set(e,_)}updateAttribute(e){const t=this.backend,{gl:n}=t,i=e.array,s=e.isInterleavedBufferAttribute?e.data:e,a=t.get(s),u=a.bufferType,f=e.isInterleavedBufferAttribute?e.data.updateRanges:e.updateRanges;if(n.bindBuffer(u,a.bufferGPU),f.length===0)n.bufferSubData(u,0,i);else{for(let m=0,y=f.length;m<y;m++){const _=f[m];n.bufferSubData(u,_.start*i.BYTES_PER_ELEMENT,i,_.start,_.count)}s.clearUpdateRanges()}n.bindBuffer(u,null),a.version=s.version}destroyAttribute(e){const t=this.backend,{gl:n}=t;e.isInterleavedBufferAttribute&&t.delete(e.data);const i=t.get(e);n.deleteBuffer(i.bufferGPU),t.delete(e)}async getArrayBufferAsync(e){const t=this.backend,{gl:n}=t,i=e.isInterleavedBufferAttribute?e.data:e,{bufferGPU:s}=t.get(i),a=e.array,u=a.byteLength;n.bindBuffer(n.COPY_READ_BUFFER,s);const f=n.createBuffer();n.bindBuffer(n.COPY_WRITE_BUFFER,f),n.bufferData(n.COPY_WRITE_BUFFER,u,n.STREAM_READ),n.copyBufferSubData(n.COPY_READ_BUFFER,n.COPY_WRITE_BUFFER,0,0,u),await t.utils._clientWaitAsync();const m=new e.array.constructor(a.length);return n.bindBuffer(n.COPY_WRITE_BUFFER,f),n.getBufferSubData(n.COPY_WRITE_BUFFER,0,m),n.deleteBuffer(f),n.bindBuffer(n.COPY_READ_BUFFER,null),n.bindBuffer(n.COPY_WRITE_BUFFER,null),m.buffer}_createBuffer(e,t,n,i){const s=e.createBuffer();return e.bindBuffer(t,s),e.bufferData(t,n,i),e.bindBuffer(t,null),s}}let Nf,w0;class jO{constructor(e){this.backend=e,this.gl=this.backend.gl,this.enabled={},this.currentFlipSided=null,this.currentCullFace=null,this.currentProgram=null,this.currentBlendingEnabled=!1,this.currentBlending=null,this.currentBlendSrc=null,this.currentBlendDst=null,this.currentBlendSrcAlpha=null,this.currentBlendDstAlpha=null,this.currentPremultipledAlpha=null,this.currentPolygonOffsetFactor=null,this.currentPolygonOffsetUnits=null,this.currentColorMask=null,this.currentDepthFunc=null,this.currentDepthMask=null,this.currentStencilFunc=null,this.currentStencilRef=null,this.currentStencilFuncMask=null,this.currentStencilFail=null,this.currentStencilZFail=null,this.currentStencilZPass=null,this.currentStencilMask=null,this.currentLineWidth=null,this.currentClippingPlanes=0,this.currentBoundFramebuffers={},this.currentDrawbuffers=new WeakMap,this.maxTextures=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS),this.currentTextureSlot=null,this.currentBoundTextures={},this.currentBoundBufferBases={},this._init()}_init(){const e=this.gl;Nf={[AA]:e.FUNC_ADD,[qm]:e.FUNC_SUBTRACT,[Im]:e.FUNC_REVERSE_SUBTRACT}
171,w0={[km]:e.ZERO,[Um]:e.ONE,[Om]:e.SRC_COLOR,[Gm]:e.SRC_ALPHA,[Vm]:e.SRC_ALPHA_SATURATE,[zm]:e.DST_COLOR,[jm]:e.DST_ALPHA,[$m]:e.ONE_MINUS_SRC_COLOR,[Hm]:e.ONE_MINUS_SRC_ALPHA,[Wm]:e.ONE_MINUS_DST_COLOR,[Qm]:e.ONE_MINUS_DST_ALPHA};const t=e.getParameter(e.SCISSOR_BOX),n=e.getParameter(e.VIEWPORT);this.currentScissor=new Qt().fromArray(t),this.currentViewport=new Qt().fromArray(n),this._tempVec4=new Qt}enable(e){const{enabled:t}=this;t[e]!==!0&&(this.gl.enable(e),t[e]=!0)}disable(e){const{enabled:t}=this;t[e]!==!1&&(this.gl.disable(e),t[e]=!1)}setFlipSided(e){if(this.currentFlipSided!==e){const{gl:t}=this;e?t.frontFace(t.CW):t.frontFace(t.CCW),this.currentFlipSided=e}}setCullFace(e){const{gl:t}=this;e!==iT?(this.enable(t.CULL_FACE),e!==this.currentCullFace&&(e===sT?t.cullFace(t.BACK):e===oT?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):this.disable(t.CULL_FACE),this.currentCullFace=e}setLineWidth(e){const{currentLineWidth:t,gl:n}=this;e!==t&&(n.lineWidth(e),this.currentLineWidth=e)}setBlending(e,t,n,i,s,a,u,f){const{gl:m}=this;if(e===Y0){this.currentBlendingEnabled===!0&&(this.disable(m.BLEND),this.currentBlendingEnabled=!1);return}if(this.currentBlendingEnabled===!1&&(this.enable(m.BLEND),this.currentBlendingEnabled=!0),e!==Ym){if(e!==this.currentBlending||f!==this.currentPremultipledAlpha){if((this.currentBlendEquation!==AA||this.currentBlendEquationAlpha!==AA)&&(m.blendEquation(m.FUNC_ADD),this.currentBlendEquation=AA,this.currentBlendEquationAlpha=AA),f)switch(e){case qo:m.blendFuncSeparate(m.ONE,m.ONE_MINUS_SRC_ALPHA,m.ONE,m.ONE_MINUS_SRC_ALPHA);break;case T1:m.blendFunc(m.ONE,m.ONE);break;case b1:m.blendFuncSeparate(m.ZERO,m.ONE_MINUS_SRC_COLOR,m.ZERO,m.ONE);break;case x1:m.blendFuncSeparate(m.ZERO,m.SRC_COLOR,m.ZERO,m.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",e);break}else switch(e){case qo:m.blendFuncSeparate(m.SRC_ALPHA,m.ONE_MINUS_SRC_ALPHA,m.ONE,m.ONE_MINUS_SRC_ALPHA);break;case T1:m.blendFunc(m.SRC_ALPHA,m.ONE);break;case b1:m.blendFuncSeparate(m.ZERO,m.ONE_MINUS_SRC_COLOR,m.ZERO,m.ONE);break;case x1:m.blendFunc(m.ZERO,m.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",e);break}this.currentBlendSrc=null,this.currentBlendDst=null,this.currentBlendSrcAlpha=null,this.currentBlendDstAlpha=null,this.currentBlending=e,this.currentPremultipledAlpha=f}return}s=s||t,a=a||n,u=u||i,(t!==this.currentBlendEquation||s!==this.currentBlendEquationAlpha)&&(m.blendEquationSeparate(Nf[t],Nf[s]),this.currentBlendEquation=t,this.currentBlendEquationAlpha=s),(n!==this.currentBlendSrc||i!==this.currentBlendDst||a!==this.currentBlendSrcAlpha||u!==this.currentBlendDstAlpha)&&(m.blendFuncSeparate(w0[n],w0[i],w0[a],w0[u]),this.currentBlendSrc=n,this.currentBlendDst=i,this.currentBlendSrcAlpha=a,this.currentBlendDstAlpha=u),this.currentBlending=e,this.currentPremultipledAlpha=!1}setColorMask(e){this.currentColorMask!==e&&(this.gl.colorMask(e,e,e,e),this.currentColorMask=e)}setDepthTest(e){const{gl:t}=this;e?this.enable(t.DEPTH_TEST):this.disable(t.DEPTH_TEST)}setDepthMask(e){this.currentDepthMask!==e&&(this.gl.depthMask(e),this.currentDepthMask=e)}setDepthFunc(e){if(this.currentDepthFunc!==e){const{gl:t}=this;switch(e){case r7:t.depthFunc(t.NEVER);break;case n7:t.depthFunc(t.ALWAYS);break;case t7:t.depthFunc(t.LESS);break;case e7:t.depthFunc(t.LEQUAL);break;case Jm:t.depthFunc(t.EQUAL);break;case Zm:t.depthFunc(t.GEQUAL);break;case Km:t.depthFunc(t.GREATER);break;case Xm:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}this.currentDepthFunc=e}}scissor(e,t,n,i){const s=this._tempVec4.set(e,t,n,i);if(this.currentScissor.equals(s)===!1){const{gl:a}=this;a.scissor(s.x,s.y,s.z,s.w),this.currentScissor.copy(s)}}viewport(e,t,n,i){const s=this._tempVec4.set(e,t,n,i);if(this.currentViewport.equals(s)===!1){const{gl:a}=this;a.viewport(s.x,s.y,s.z,s.w),this.currentViewport.copy(s)}}setScissorTest(e){const t=this.gl;e?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST)}setStencilTest(e){const{gl:t}=this;e?this.enable(t.STENCIL_TEST):this.disable(t.STENCIL_TEST)}setStencilMask(e){this.currentStencilMask!==e&&(this.gl.stencilMask(e),this.currentStencilMask=e)}setStencilFunc(e,t,n){(this.currentStencilFunc!==e||this.currentStencilRef!==t||this.currentStencilFuncMask!==n)&&(this.gl.stencilFunc(e,t,n),this.currentStencilFunc=e,this.currentStencilRef=t,this.currentStencilFuncMask=n)}setStencilOp(e,t,n){(this.currentStencilFail!==e||this.currentStencilZFail!==t||this.currentStencilZPass!==n)&&(this.gl.stencilOp(e,t,n),this.currentStencilFail=e,this.currentStencilZFail=t,this.currentStencilZPass=n)}setMaterial(e,t,n){const{gl:i}=this;e.side===Qi?this.disable(i.CULL_FACE):this.enable(i.CULL_FACE);let s=e.side===Xi;t&&(s=!s),this.setFlipSided(s),e.blending===qo&&e.transparent===!1?this.setBlending(Y0):this.setBlending(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),this.setDepthFunc(e.depthFunc),this.setDepthTest(e.depthTest),this.setDepthMask(e.depthWrite),this.setColorMask(e.colorWrite);const a=e.stencilWrite;if(this.setStencilTest(a),a&&(this.setStencilMask(e.stencilWriteMask),this.setStencilFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),this.setStencilOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),this.setPolygonOffset(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),e.alphaToCoverage===!0&&this.backend.renderer.samples>1?this.enable(i.SAMPLE_ALPHA_TO_COVERAGE):this.disable(i.SAMPLE_ALPHA_TO_COVERAGE),n>0&&this.currentClippingPlanes!==n)for(let f=0;f<8;f++)f<n?this.enable(12288+f):this.disable(12288+f)}setPolygonOffset(e,t,n){const{gl:i}=this;e?(this.enable(i.POLYGON_OFFSET_FILL),(this.currentPolygonOffsetFactor!==t||this.currentPolygonOffsetUnits!==n)&&(i.polygonOffset(t,n),this.currentPolygonOffsetFactor=t,this.currentPolygonOffsetUnits=n)):this.disable(i.POLYGON_OFFSET_FILL)}useProgram(e){return this.currentProgram!==e?(this.gl.useProgram(e),this.currentProgram=e,!0):!1}bindFramebuffer(e,t){const{gl:n,currentBoundFramebuffers:i}=this;return i[e]!==t?(n.bindFramebuffer(e,t),i[e]=t,e===n.DRAW_FRAMEBUFFER&&(i[n.FRAMEBUFFER]=t),e===n.FRAMEBUFFER&&(i[n.DRAW_FRAMEBUFFER]=t),!0):!1}drawBuffers(e,t){const{gl:n}=this;let i=[],s=!1;if(e.textures!==null){i=this.currentDrawbuffers.get(t),i===void 0&&(i=[],this.currentDrawbuffers.set(t,i));const a=e.textures;if(i.length!==a.length||i[0]!==n.COLOR_ATTACHMENT0){for(let u=0,f=a.length;u<f;u++)i[u]=n.COLOR_ATTACHMENT0+u;i.length=a.length,s=!0}}else i[0]!==n.BACK&&(i[0]=n.BACK,s=!0);s&&n.drawBuffers(i)}activeTexture(e){const{gl:t,currentTextureSlot:n,maxTextures:i}=this;e===void 0&&(e=t.TEXTURE0+i-1),n!==e&&(t.activeTexture(e),this.currentTextureSlot=e)}bindTexture(e,t,n){const{gl:i,currentTextureSlot:s,currentBoundTextures:a,maxTextures:u}=this;n===void 0&&(s===null?n=i.TEXTURE0+u-1:n=s);let f=a[n];f===void 0&&(f={type:void 0,texture:void 0},a[n]=f),(f.type!==e||f.texture!==t)&&(s!==n&&(i.activeTexture(n),this.currentTextureSlot=n),i.bindTexture(e,t),f.type=e,f.texture=t)}bindBufferBase(e,t,n){const{gl:i}=this,s=`${e}-${t}`;return this.currentBoundBufferBases[s]!==n?(i.bindBufferBase(e,t,n),this.currentBoundBufferBases[s]=n,!0):!1}unbindTexture(){const{gl:e,currentTextureSlot:t,currentBoundTextures:n}=this,i=n[t];i!==void 0&&i.type!==void 0&&(e.bindTexture(i.type,null),i.type=void 0,i.texture=void 0)}}class $O{constructor(e){this.backend=e,this.gl=this.backend.gl,this.extensions=e.extensions}convert(e,t=W0){const{gl:n,extensions:i}=this;let s;if(e===ms)return n.UNSIGNED_BYTE;if(e===aT)return n.UNSIGNED_SHORT_4_4_4_4;if(e===AT)return n.UNSIGNED_SHORT_5_5_5_1;if(e===i7)return n.UNSIGNED_INT_5_9_9_9_REV;if(e===F0)return n.BYTE;if(e===D0)return n.SHORT;if(e===fA)return n.UNSIGNED_SHORT;if(e===Fr)return n.INT;if(e===fr)return n.UNSIGNED_INT;if(e===wi)return n.FLOAT;if(e===Mi)return n.HALF_FLOAT;if(e===lT)return n.ALPHA;if(e===Rd)return n.RGB;if(e===Oo)return n.RGBA;if(e===uT)return n.LUMINANCE;if(e===cT)return n.LUMINANCE_ALPHA;if(e===Sl)return n.DEPTH_COMPONENT;if(e===wl)return n.DEPTH_STENCIL;if(e===Cd)return n.RED;if(e===Pd)return n.RED_INTEGER;if(e===X0)return n.RG;if(e===Bd)return n.RG_INTEGER;if(e===Fd)return n.RGBA_INTEGER;if(e===I2||e===t1||e===n1||e===r1)if(t===dt)if(s=i.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(e===I2)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(e===t1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(e===n1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(e===r1)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=i.get("WEBGL_compressed_texture_s3tc"),s!==null){if(e===I2)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===t1)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===n1)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===r1)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(e===p4||e===m4||e===g4||e===y4)if(s=i.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(e===p4)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===m4)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===g4)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===y4)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(e===v4||e===jf||e===$f)if(s=i.get("WEBGL_compressed_texture_etc"),s!==null){if(e===v4||e===jf)return t===dt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(e===$f)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(e===Hf||e===Wf||e===Qf||e===Yf||e===Xf||e===Kf||e===Zf||e===Jf||e===eh||e===th||e===nh||e===rh||e===ih||e===sh)if(s=i.get("WEBGL_compressed_texture_astc"),s!==null){if(e===Hf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(e===Wf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(e===Qf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(e===Yf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(e===Xf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(e===Kf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(e===Zf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(e===Jf)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(e===eh)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(e===th)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(e===nh)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(e===rh)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(e===ih)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(e===sh)return t===dt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(e===k2)if(s=i.get("EXT_texture_compression_bptc"),s!==null){if(e===k2)return t===dt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(e===fT||e===_4||e===x4||e===b4)if(s=i.get("EXT_texture_compression_rgtc"),s!==null){if(e===k2)return s.COMPRESSED_RED_RGT
171C1_EXT;if(e===_4)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(e===x4)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(e===b4)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return e===Ml?n.UNSIGNED_INT_24_8:n[e]!==void 0?n[e]:null}_clientWaitAsync(){const{gl:e}=this,t=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0);return e.flush(),new Promise((n,i)=>{function s(){const a=e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0);if(a===e.WAIT_FAILED){e.deleteSync(t),i();return}if(a===e.TIMEOUT_EXPIRED){requestAnimationFrame(s);return}e.deleteSync(t),n()}s()})}}let J6=!1,Vu,Rf,em;class HO{constructor(e){this.backend=e,this.gl=e.gl,this.extensions=e.extensions,this.defaultTextures={},J6===!1&&(this._init(),J6=!0)}_init(){const e=this.gl;Vu={[Mc]:e.REPEAT,[Dd]:e.CLAMP_TO_EDGE,[Ec]:e.MIRRORED_REPEAT},Rf={[Ws]:e.NEAREST,[s7]:e.NEAREST_MIPMAP_NEAREST,[K0]:e.NEAREST_MIPMAP_LINEAR,[eo]:e.LINEAR,[oh]:e.LINEAR_MIPMAP_NEAREST,[_a]:e.LINEAR_MIPMAP_LINEAR},em={[o7]:e.NEVER,[a7]:e.ALWAYS,[Ld]:e.LESS,[A7]:e.LEQUAL,[l7]:e.EQUAL,[u7]:e.GEQUAL,[c7]:e.GREATER,[f7]:e.NOTEQUAL}}getGLTextureType(e){const{gl:t}=this;let n;return e.isCubeTexture===!0?n=t.TEXTURE_CUBE_MAP:e.isDataArrayTexture===!0||e.isCompressedArrayTexture===!0?n=t.TEXTURE_2D_ARRAY:e.isData3DTexture===!0?n=t.TEXTURE_3D:n=t.TEXTURE_2D,n}getInternalFormat(e,t,n,i,s=!1){const{gl:a,extensions:u}=this;if(e!==null){if(a[e]!==void 0)return a[e];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}let f=t;return t===a.RED&&(n===a.FLOAT&&(f=a.R32F),n===a.HALF_FLOAT&&(f=a.R16F),n===a.UNSIGNED_BYTE&&(f=a.R8),n===a.UNSIGNED_SHORT&&(f=a.R16),n===a.UNSIGNED_INT&&(f=a.R32UI),n===a.BYTE&&(f=a.R8I),n===a.SHORT&&(f=a.R16I),n===a.INT&&(f=a.R32I)),t===a.RED_INTEGER&&(n===a.UNSIGNED_BYTE&&(f=a.R8UI),n===a.UNSIGNED_SHORT&&(f=a.R16UI),n===a.UNSIGNED_INT&&(f=a.R32UI),n===a.BYTE&&(f=a.R8I),n===a.SHORT&&(f=a.R16I),n===a.INT&&(f=a.R32I)),t===a.RG&&(n===a.FLOAT&&(f=a.RG32F),n===a.HALF_FLOAT&&(f=a.RG16F),n===a.UNSIGNED_BYTE&&(f=a.RG8),n===a.UNSIGNED_SHORT&&(f=a.RG16),n===a.UNSIGNED_INT&&(f=a.RG32UI),n===a.BYTE&&(f=a.RG8I),n===a.SHORT&&(f=a.RG16I),n===a.INT&&(f=a.RG32I)),t===a.RG_INTEGER&&(n===a.UNSIGNED_BYTE&&(f=a.RG8UI),n===a.UNSIGNED_SHORT&&(f=a.RG16UI),n===a.UNSIGNED_INT&&(f=a.RG32UI),n===a.BYTE&&(f=a.RG8I),n===a.SHORT&&(f=a.RG16I),n===a.INT&&(f=a.RG32I)),t===a.RGB&&(n===a.FLOAT&&(f=a.RGB32F),n===a.HALF_FLOAT&&(f=a.RGB16F),n===a.UNSIGNED_BYTE&&(f=a.RGB8),n===a.UNSIGNED_SHORT&&(f=a.RGB16),n===a.UNSIGNED_INT&&(f=a.RGB32UI),n===a.BYTE&&(f=a.RGB8I),n===a.SHORT&&(f=a.RGB16I),n===a.INT&&(f=a.RGB32I),n===a.UNSIGNED_BYTE&&(f=i===dt&&s===!1?a.SRGB8:a.RGB8),n===a.UNSIGNED_SHORT_5_6_5&&(f=a.RGB565),n===a.UNSIGNED_SHORT_5_5_5_1&&(f=a.RGB5_A1),n===a.UNSIGNED_SHORT_4_4_4_4&&(f=a.RGB4),n===a.UNSIGNED_INT_5_9_9_9_REV&&(f=a.RGB9_E5)),t===a.RGB_INTEGER&&(n===a.UNSIGNED_BYTE&&(f=a.RGB8UI),n===a.UNSIGNED_SHORT&&(f=a.RGB16UI),n===a.UNSIGNED_INT&&(f=a.RGB32UI),n===a.BYTE&&(f=a.RGB8I),n===a.SHORT&&(f=a.RGB16I),n===a.INT&&(f=a.RGB32I)),t===a.RGBA&&(n===a.FLOAT&&(f=a.RGBA32F),n===a.HALF_FLOAT&&(f=a.RGBA16F),n===a.UNSIGNED_BYTE&&(f=a.RGBA8),n===a.UNSIGNED_SHORT&&(f=a.RGBA16),n===a.UNSIGNED_INT&&(f=a.RGBA32UI),n===a.BYTE&&(f=a.RGBA8I),n===a.SHORT&&(f=a.RGBA16I),n===a.INT&&(f=a.RGBA32I),n===a.UNSIGNED_BYTE&&(f=i===dt&&s===!1?a.SRGB8_ALPHA8:a.RGBA8),n===a.UNSIGNED_SHORT_4_4_4_4&&(f=a.RGBA4),n===a.UNSIGNED_SHORT_5_5_5_1&&(f=a.RGB5_A1)),t===a.RGBA_INTEGER&&(n===a.UNSIGNED_BYTE&&(f=a.RGBA8UI),n===a.UNSIGNED_SHORT&&(f=a.RGBA16UI),n===a.UNSIGNED_INT&&(f=a.RGBA32UI),n===a.BYTE&&(f=a.RGBA8I),n===a.SHORT&&(f=a.RGBA16I),n===a.INT&&(f=a.RGBA32I)),t===a.DEPTH_COMPONENT&&(n===a.UNSIGNED_SHORT&&(f=a.DEPTH_COMPONENT16),n===a.UNSIGNED_INT&&(f=a.DEPTH_COMPONENT24),n===a.FLOAT&&(f=a.DEPTH_COMPONENT32F)),t===a.DEPTH_STENCIL&&n===a.UNSIGNED_INT_24_8&&(f=a.DEPTH24_STENCIL8),(f===a.R16F||f===a.R32F||f===a.RG16F||f===a.RG32F||f===a.RGBA16F||f===a.RGBA32F)&&u.get("EXT_color_buffer_float"),f}setTextureParameters(e,t){const{gl:n,extensions:i,backend:s}=this;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,t.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,t.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE),n.texParameteri(e,n.TEXTURE_WRAP_S,Vu[t.wrapS]),n.texParameteri(e,n.TEXTURE_WRAP_T,Vu[t.wrapT]),(e===n.TEXTURE_3D||e===n.TEXTURE_2D_ARRAY)&&n.texParameteri(e,n.TEXTURE_WRAP_R,Vu[t.wrapR]),n.texParameteri(e,n.TEXTURE_MAG_FILTER,Rf[t.magFilter]);const a=t.mipmaps!==void 0&&t.mipmaps.length>0,u=t.minFilter===eo&&a?_a:t.minFilter;if(n.texParameteri(e,n.TEXTURE_MIN_FILTER,Rf[u]),t.compareFunction&&(n.texParameteri(e,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(e,n.TEXTURE_COMPARE_FUNC,em[t.compareFunction])),i.has("EXT_texture_filter_anisotropic")===!0){if(t.magFilter===Ws||t.minFilter!==K0&&t.minFilter!==_a||t.type===wi&&i.has("OES_texture_float_linear")===!1)return;if(t.anisotropy>1){const f=i.get("EXT_texture_filter_anisotropic");n.texParameterf(e,f.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,s.getMaxAnisotropy()))}}}createDefaultTexture(e){const{gl:t,backend:n,defaultTextures:i}=this,s=this.getGLTextureType(e);let a=i[s];a===void 0&&(a=t.createTexture(),n.state.bindTexture(s,a),t.texParameteri(s,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(s,t.TEXTURE_MAG_FILTER,t.NEAREST),i[s]=a),n.set(e,{textureGPU:a,glTextureType:s,isDefault:!0})}createTexture(e,t){const{gl:n,backend:i}=this,{levels:s,width:a,height:u,depth:f}=t,m=i.utils.convert(e.format,e.colorSpace),y=i.utils.convert(e.type),_=this.getInternalFormat(e.internalFormat,m,y,e.colorSpace,e.isVideoTexture),b=n.createTexture(),w=this.getGLTextureType(e);i.state.bindTexture(w,b),this.setTextureParameters(w,e),e.isDataArrayTexture||e.isCompressedArrayTexture?n.texStorage3D(n.TEXTURE_2D_ARRAY,s,_,a,u,f):e.isData3DTexture?n.texStorage3D(n.TEXTURE_3D,s,_,a,u,f):e.isVideoTexture||n.texStorage2D(w,s,_,a,u),i.set(e,{textureGPU:b,glTextureType:w,glFormat:m,glType:y,glInternalFormat:_})}copyBufferToTexture(e,t){const{gl:n,backend:i}=this,{textureGPU:s,glTextureType:a,glFormat:u,glType:f}=i.get(t),{width:m,height:y}=t.source.data;n.bindBuffer(n.PIXEL_UNPACK_BUFFER,e),i.state.bindTexture(a,s),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.texSubImage2D(a,0,0,0,m,y,u,f,0),n.bindBuffer(n.PIXEL_UNPACK_BUFFER,null),i.state.unbindTexture()}updateTexture(e,t){const{gl:n}=this,{width:i,height:s}=t,{textureGPU:a,glTextureType:u,glFormat:f,glType:m,glInternalFormat:y}=this.backend.get(e);if(e.isRenderTargetTexture||a===void 0)return;const _=b=>b.isDataTexture?b.image.data:typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&b instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&b instanceof ImageBitmap||b instanceof OffscreenCanvas?b:b.data;if(this.backend.state.bindTexture(u,a),this.setTextureParameters(u,e),e.isCompressedTexture){const b=e.mipmaps,w=t.image;for(let S=0;S<b.length;S++){const E=b[S];e.isCompressedArrayTexture?e.format!==n.RGBA?f!==null?n.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,S,0,0,0,E.width,E.height,w.depth,f,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texSubImage3D(n.TEXTURE_2D_ARRAY,S,0,0,0,E.width,E.height,w.depth,f,m,E.data):f!==null?n.compressedTexSubImage2D(n.TEXTURE_2D,S,0,0,E.width,E.height,f,E.data):console.warn("Unsupported compressed texture format")}}else if(e.isCubeTexture){const b=t.images;for(let w=0;w<6;w++){const S=_(b[w]);n.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+w,0,0,0,i,s,f,m,S)}}else if(e.isDataArrayTexture){const b=t.image;n.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,b.width,b.height,b.depth,f,m,b.data)}else if(e.isData3DTexture){const b=t.image;n.texSubImage3D(n.TEXTURE_3D,0,0,0,0,b.width,b.height,b.depth,f,m,b.data)}
171else if(e.isVideoTexture)e.update(),n.texImage2D(u,0,y,f,m,t.image);else{const b=_(t.image);n.texSubImage2D(u,0,0,0,i,s,f,m,b)}}generateMipmaps(e){const{gl:t,backend:n}=this,{textureGPU:i,glTextureType:s}=n.get(e);n.state.bindTexture(s,i),t.generateMipmap(s)}deallocateRenderBuffers(e){const{gl:t,backend:n}=this;if(e){const i=n.get(e);if(i.renderBufferStorageSetup=void 0,i.framebuffers){for(const s in i.framebuffers)t.deleteFramebuffer(i.framebuffers[s]);delete i.framebuffers}if(i.depthRenderbuffer&&(t.deleteRenderbuffer(i.depthRenderbuffer),delete i.depthRenderbuffer),i.stencilRenderbuffer&&(t.deleteRenderbuffer(i.stencilRenderbuffer),delete i.stencilRenderbuffer),i.msaaFrameBuffer&&(t.deleteFramebuffer(i.msaaFrameBuffer),delete i.msaaFrameBuffer),i.msaaRenderbuffers){for(let s=0;s<i.msaaRenderbuffers.length;s++)t.deleteRenderbuffer(i.msaaRenderbuffers[s]);delete i.msaaRenderbuffers}}}destroyTexture(e){const{gl:t,backend:n}=this,{textureGPU:i,renderTarget:s}=n.get(e);this.deallocateRenderBuffers(s),t.deleteTexture(i),n.delete(e)}copyTextureToTexture(e,t,n=null,i=null,s=0){const{gl:a,backend:u}=this,{state:f}=this.backend,{textureGPU:m,glTextureType:y,glType:_,glFormat:b}=u.get(t);let w,S,E,R,P,L;n!==null?(w=n.max.x-n.min.x,S=n.max.y-n.min.y,E=n.min.x,R=n.min.y):(w=e.image.width,S=e.image.height,E=0,R=0),i!==null?(P=i.x,L=i.y):(P=0,L=0),f.bindTexture(y,m),a.pixelStorei(a.UNPACK_ALIGNMENT,t.unpackAlignment),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,t.flipY),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),a.pixelStorei(a.UNPACK_ALIGNMENT,t.unpackAlignment);const D=a.getParameter(a.UNPACK_ROW_LENGTH),O=a.getParameter(a.UNPACK_IMAGE_HEIGHT),G=a.getParameter(a.UNPACK_SKIP_PIXELS),U=a.getParameter(a.UNPACK_SKIP_ROWS),j=a.getParameter(a.UNPACK_SKIP_IMAGES),V=e.isCompressedTexture?e.mipmaps[s]:e.image;if(a.pixelStorei(a.UNPACK_ROW_LENGTH,V.width),a.pixelStorei(a.UNPACK_IMAGE_HEIGHT,V.height),a.pixelStorei(a.UNPACK_SKIP_PIXELS,E),a.pixelStorei(a.UNPACK_SKIP_ROWS,R),e.isRenderTargetTexture||e.isDepthTexture){const Q=u.get(e),Z=u.get(t),K=u.get(Q.renderTarget),Y=u.get(Z.renderTarget),ne=K.framebuffers[Q.cacheKey],ae=Y.framebuffers[Z.cacheKey];f.bindFramebuffer(a.READ_FRAMEBUFFER,ne),f.bindFramebuffer(a.DRAW_FRAMEBUFFER,ae);let J=a.COLOR_BUFFER_BIT;e.isDepthTexture&&(J=a.DEPTH_BUFFER_BIT),a.blitFramebuffer(E,R,w,S,P,L,w,S,J,a.NEAREST),f.bindFramebuffer(a.READ_FRAMEBUFFER,null),f.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}else e.isDataTexture?a.texSubImage2D(a.TEXTURE_2D,s,P,L,w,S,b,_,V.data):e.isCompressedTexture?a.compressedTexSubImage2D(a.TEXTURE_2D,s,P,L,V.width,V.height,b,V.data):a.texSubImage2D(a.TEXTURE_2D,s,P,L,w,S,b,_,V);a.pixelStorei(a.UNPACK_ROW_LENGTH,D),a.pixelStorei(a.UNPACK_IMAGE_HEIGHT,O),a.pixelStorei(a.UNPACK_SKIP_PIXELS,G),a.pixelStorei(a.UNPACK_SKIP_ROWS,U),a.pixelStorei(a.UNPACK_SKIP_IMAGES,j),s===0&&t.generateMipmaps&&a.generateMipmap(a.TEXTURE_2D),f.unbindTexture()}copyFramebufferToTexture(e,t,n){const{gl:i}=this,{state:s}=this.backend,{textureGPU:a}=this.backend.get(e),{x:u,y:f,z:m,w:y}=n,_=e.isDepthTexture===!0||t.renderTarget&&t.renderTarget.samples>0,b=t.renderTarget?t.renderTarget.height:this.backend.getDrawingBufferSize().y;if(_){const w=u!==0||f!==0;let S,E;if(e.isDepthTexture===!0?(S=i.DEPTH_BUFFER_BIT,E=i.DEPTH_ATTACHMENT,t.stencil&&(S|=i.STENCIL_BUFFER_BIT)):(S=i.COLOR_BUFFER_BIT,E=i.COLOR_ATTACHMENT0),w){const R=this.backend.get(t.renderTarget),P=R.framebuffers[t.getCacheKey()],L=R.msaaFrameBuffer;s.bindFramebuffer(i.DRAW_FRAMEBUFFER,P),s.bindFramebuffer(i.READ_FRAMEBUFFER,L);const D=b-f-y;i.blitFramebuffer(u,D,u+m,D+y,u,D,u+m,D+y,S,i.NEAREST),s.bindFramebuffer(i.READ_FRAMEBUFFER,P),s.bindTexture(i.TEXTURE_2D,a),i.copyTexSubImage2D(i.TEXTURE_2D,0,0,0,u,D,m,y),s.unbindTexture()}else{const R=i.createFramebuffer();s.bindFramebuffer(i.DRAW_FRAMEBUFFER,R),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,E,i.TEXTURE_2D,a,0),i.blitFramebuffer(0,0,m,y,0,0,m,y,S,i.NEAREST),i.deleteFramebuffer(R)}}else s.bindTexture(i.TEXTURE_2D,a),i.copyTexSubImage2D(i.TEXTURE_2D,0,0,0,u,b-y-f,m,y),s.unbindTexture();e.generateMipmaps&&this.generateMipmaps(e),this.backend._setFramebuffer(t)}setupRenderBufferStorage(e,t,n,i=!1){const{gl:s}=this,a=t.renderTarget,{depthTexture:u,depthBuffer:f,stencilBuffer:m,width:y,height:_}=a;if(s.bindRenderbuffer(s.RENDERBUFFER,e),f&&!m){let b=s.DEPTH_COMPONENT24;i===!0?this.extensions.get("WEBGL_multisampled_render_to_texture").renderbufferStorageMultisampleEXT(s.RENDERBUFFER,a.samples,b,y,_):n>0?(u&&u.isDepthTexture&&u.type===s.FLOAT&&(b=s.DEPTH_COMPONENT32F),s.renderbufferStorageMultisample(s.RENDERBUFFER,n,b,y,_)):s.renderbufferStorage(s.RENDERBUFFER,b,y,_),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,e)}else f&&m&&(n>0?s.renderbufferStorageMultisample(s.RENDERBUFFER,n,s.DEPTH24_STENCIL8,y,_):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,y,_),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,e))}async copyTextureToBuffer(e,t,n,i,s,a){const{backend:u,gl:f}=this,{textureGPU:m,glFormat:y,glType:_}=this.backend.get(e),b=f.createFramebuffer();f.bindFramebuffer(f.READ_FRAMEBUFFER,b);const w=e.isCubeTexture?f.TEXTURE_CUBE_MAP_POSITIVE_X+a:f.TEXTURE_2D;f.framebufferTexture2D(f.READ_FRAMEBUFFER,f.COLOR_ATTACHMENT0,w,m,0);const S=this._getTypedArrayType(_),E=this._getBytesPerTexel(_,y),P=i*s*E,L=f.createBuffer();f.bindBuffer(f.PIXEL_PACK_BUFFER,L),f.bufferData(f.PIXEL_PACK_BUFFER,P,f.STREAM_READ),f.readPixels(t,n,i,s,y,_,0),f.bindBuffer(f.PIXEL_PACK_BUFFER,null),await u.utils._clientWaitAsync();const D=new S(P/S.BYTES_PER_ELEMENT);return f.bindBuffer(f.PIXEL_PACK_BUFFER,L),f.getBufferSubData(f.PIXEL_PACK_BUFFER,0,D),f.bindBuffer(f.PIXEL_PACK_BUFFER,null),f.deleteFramebuffer(b),D}_getTypedArrayType(e){const{gl:t}=this;if(e===t.UNSIGNED_BYTE)return Uint8Array;
171if(e===t.UNSIGNED_SHORT_4_4_4_4||e===t.UNSIGNED_SHORT_5_5_5_1||e===t.UNSIGNED_SHORT_5_6_5||e===t.UNSIGNED_SHORT)return Uint16Array;if(e===t.UNSIGNED_INT)return Uint32Array;if(e===t.HALF_FLOAT)return Uint16Array;if(e===t.FLOAT)return Float32Array;throw new Error(`Unsupported WebGL type: ${e}`)}_getBytesPerTexel(e,t){const{gl:n}=this;let i=0;if(e===n.UNSIGNED_BYTE&&(i=1),(e===n.UNSIGNED_SHORT_4_4_4_4||e===n.UNSIGNED_SHORT_5_5_5_1||e===n.UNSIGNED_SHORT_5_6_5||e===n.UNSIGNED_SHORT||e===n.HALF_FLOAT)&&(i=2),(e===n.UNSIGNED_INT||e===n.FLOAT)&&(i=4),t===n.RGBA)return i*4;if(t===n.RGB)return i*3;if(t===n.ALPHA)return i}}class WO{constructor(e){this.backend=e,this.gl=this.backend.gl,this.availableExtensions=this.gl.getSupportedExtensions(),this.extensions={}}get(e){let t=this.extensions[e];return t===void 0&&(t=this.gl.getExtension(e),this.extensions[e]=t),t}has(e){return this.availableExtensions.includes(e)}}class QO{constructor(e){this.backend=e,this.maxAnisotropy=null}getMaxAnisotropy(){if(this.maxAnisotropy!==null)return this.maxAnisotropy;const e=this.backend.gl,t=this.backend.extensions;if(t.has("EXT_texture_filter_anisotropic")===!0){const n=t.get("EXT_texture_filter_anisotropic");this.maxAnisotropy=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else this.maxAnisotropy=0;return this.maxAnisotropy}}const tm={WEBGL_multi_draw:"WEBGL_multi_draw",WEBGL_compressed_texture_astc:"texture-compression-astc",WEBGL_compressed_texture_etc:"texture-compression-etc2",WEBGL_compressed_texture_etc1:"texture-compression-etc1",WEBGL_compressed_texture_pvrtc:"texture-compression-pvrtc",WEBKIT_WEBGL_compressed_texture_pvrtc:"texture-compression-pvrtc",WEBGL_compressed_texture_s3tc:"texture-compression-bc",EXT_texture_compression_bptc:"texture-compression-bptc",EXT_disjoint_timer_query_webgl2:"timestamp-query"};class YO{constructor(e){this.gl=e.gl,this.extensions=e.extensions,this.info=e.renderer.info,this.mode=null,this.index=0,this.type=null,this.object=null}render(e,t){const{gl:n,mode:i,object:s,type:a,info:u,index:f}=this;f!==0?n.drawElements(i,t,a,e):n.drawArrays(i,e,t),u.update(s,t,i,1)}renderInstances(e,t,n){const{gl:i,mode:s,type:a,index:u,object:f,info:m}=this;n!==0&&(u!==0?i.drawElementsInstanced(s,t,a,e,n):i.drawArraysInstanced(s,e,t,n),m.update(f,t,s,n))}renderMultiDraw(e,t,n){const{extensions:i,mode:s,object:a,info:u}=this;if(n===0)return;const f=i.get("WEBGL_multi_draw");if(f===null)for(let m=0;m<n;m++)this.render(e[m],t[m]);else{this.index!==0?f.multiDrawElementsWEBGL(s,t,0,this.type,e,0,n):f.multiDrawArraysWEBGL(s,e,0,t,0,n);let m=0;for(let y=0;y<n;y++)m+=t[y];u.update(a,m,s,1)}}renderMultiDrawInstances(e,t,n,i){const{extensions:s,mode:a,object:u,info:f}=this;if(n===0)return;const m=s.get("WEBGL_multi_draw");if(m===null)for(let y=0;y<n;y++)this.renderInstances(e[y],t[y],i[y]);else{this.index!==0?m.multiDrawElementsInstancedWEBGL(a,t,0,this.type,e,0,i,0,n):m.multiDrawArraysInstancedWE
171BGL(a,e,0,t,0,i,0,n);let y=0;for(let _=0;_<n;_++)y+=t[_]*i[_];f.update(u,y,a,1)}}}class b_{constructor(e=256){this.trackTimestamp=!0,this.maxQueries=e,this.currentQueryIndex=0,this.queryOffsets=new Map,this.isDisposed=!1,this.lastValue=0,this.pendingResolve=!1}allocateQueriesForContext(){}async resolveQueriesAsync(){}dispose(){}}class XO extends b_{constructor(e,t,n=2048){if(super(n),this.gl=e,this.type=t,this.ext=e.getExtension("EXT_disjoint_timer_query_webgl2")||e.getExtension("EXT_disjoint_timer_query"),!this.ext){console.warn("EXT_disjoint_timer_query not supported; timestamps will be disabled."),this.trackTimestamp=!1;return}this.queries=[];for(let i=0;i<this.maxQueries;i++)this.queries.push(e.createQuery());this.activeQuery=null,this.queryStates=new Map}allocateQueriesForContext(e){if(!this.trackTimestamp)return null;if(this.currentQueryIndex+2>this.maxQueries)return Q0(`WebGPUTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`),null;const t=this.currentQueryIndex;return this.currentQueryIndex+=2,this.queryStates.set(t,"inactive"),this.queryOffsets.set(e.id,t),t}beginQuery(e){if(!this.trackTimestamp||this.isDisposed)return;const t=this.queryOffsets.get(e.id);if(t==null||this.activeQuery!==null)return;const n=this.queries[t];if(n)try{this.queryStates.get(t)==="inactive"&&(this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,n),this.activeQuery=t,this.queryStates.set(t,"started"))}catch(i){console.error("Error in beginQuery:",i),this.activeQuery=null,this.queryStates.set(t,"inactive")}}endQuery(e){if(!this.trackTimestamp||this.isDisposed)return;const t=this.queryOffsets.get(e.id);if(t!=null&&this.activeQuery===t)try{this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.queryStates.set(t,"ended"),this.activeQuery=null}catch(n){console.error("Error in endQuery:",n),this.queryStates.set(t,"inactive"),this.activeQuery=null}}async resolveQueriesAsync(){if(!this.trackTimestamp||this.pendingResolve)return this.lastValue;this.pendingResolve=!0;try{const e=[];for(const[i,s]of this.queryStates)if(s==="ended"){const a=this.queries[i];e.push(this.resolveQuery(a))}if(e.length===0)return this.lastValue;const n=(await Promise.all(e)).reduce((i,s)=>i+s,0);return this.lastValue=n,this.currentQueryIndex=0,this.queryOffsets.clear(),this.queryStates.clear(),this.activeQuery=null,n}catch(e){return console.error("Error resolving queries:",e),this.lastValue}finally{this.pendingResolve=!1}}async resolveQuery(e){return new Promise(t=>{if(this.isDisposed){t(this.lastValue);return}let n,i=!1;const s=()=>{n&&(clearTimeout(n),n=null)},a=f=>{i||(i=!0,s(),t(f))},u=()=>{if(this.isDisposed){a(this.lastValue);return}try{if(this.gl.getParameter(this.ext.GPU_DISJOINT_EXT)){a(this.lastValue);return}if(!this.gl.getQueryParameter(e,this.gl.QUERY_RESULT_AVAILABLE)){n=setTimeout(u,1);return}const y=this.gl.getQueryParameter(e,this.gl.QUERY_RESULT);t(Number(y)/1e6)}catch(f){console.error("Error checking query:",f),t(this.lastValue)}};u()})}dispose(){if(!this.isDisposed&&(this.isDisposed=!0,!!this.trackTimestamp)){for(const e of this.queries)this.gl.deleteQuery(e);this.queries=[],this.queryStates.clear(),this.queryOffsets.clear(),this.lastValue=0,this.activeQuery=null}}}class nm extends x_{constructor(e={}){super(e),this.isWebGLBackend=!0,this.attributeUtils=null,this.extensions=null,this.capabilities=null,this.textureUtils=null,this.bufferRenderer=null,this.gl=null,this.state=null,this.utils=null,this.vaoCache={},this.transformFeedbackCache={},this.discard=!1,this.disjoint=null,this.parallel=null,this.trackTimestamp=e.trackTimestamp===!0,this._currentContext=null,this._knownBindings=new WeakSet,this._xrFamebuffer=null}init(e){super.init(e);const t=this.parameters,n={antialias:!1,alpha:!0,depth:!1,stencil:!1},i=t.context!==void 0?t.context:e.domElement.getContext("webgl2",n);function s(a){a.preventDefault();const u={api:"WebGL",message:a.statusMessage||"Unknown reason",reason:null,originalEvent:a};e.onDeviceLost(u)}this._onContextLost=s,e.domElement.addEventListener("webglcontextlost",s,!1),this.gl=i,this.extensions=new WO(this),this.capabilities=new QO(this),this.attributeUtils=new zO(this),this.textureUtils=new HO(this),this.bufferRenderer=new YO(this),this.state=new jO(this),this.utils=new $O(this),this.extensions.get("EXT_color_buffer_float"),this.extensions.get("WEBGL_clip_cull_distance"),this.extensions.get("OES_texture_float_linear"),this.extensions.get("EXT_color_buffer_half_float"),this.extensions.get("WEBGL_multisampled_render_to_texture"),this.extensions.get("WEBGL_render_shared_exponent"),this.extensions.get("WEBGL_multi_draw"),this.disjoint=this.extensions.get("EXT_disjoint_timer_query_webgl2"),this.parallel=this.extensions.get("KHR_parallel_shader_compile")}get coordinateSystem(){return H0}async getArrayBufferAsync(e){return await this.attributeUtils.getArrayBufferAsync(e)}async waitForGPU(){await this.utils._clientWaitAsync()}async makeXRCompatible(){this.gl.getContextAttributes().xrCompatible!==!0&&await this.gl.makeXRCompatible()}setXRTarget(e){this._xrFamebuffer=e}setXRRenderTargetTextures(e,t,n=null){const i=this.gl;if(this.set(e.texture,{textureGPU:t,glInternalFormat:i.RGBA8}),n!==null){const s=e.stencilBuffer?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24;this.set(e.depthTexture,{textureGPU:n,glInternalFormat:s}),e.autoAllocateDepthBuffer=!1,this.extensions.has("WEBGL_multisampled_render_to_texture")===!0&&console.warn("THREE.WebGLBackend: Render-to-texture extension was disabled because an external texture was provided")}}initTimestampQuery(e){if(!this.disjoint||!this.trackTimestamp)return;const t=e.isComputeNode?"compute":"render";this.timestampQueryPool[t]||(this.timestampQueryPool[t]=new XO(this.gl,t,2048));const n=this.timestampQueryPool[t];n.allocateQueriesForContext(e)!==null&&n.beginQuery(e)}prepareTimestampBuffer(e){if(!this.disjoint||!this.trackTimestamp)return;const t=e.isComputeNode?"compute":"render";this.timestampQueryPool[t].endQuery(e)}getContext(){return this.gl}beginRender(e){const{state:t,gl:n}=this,i=this.get(e);if(this.initTimestampQuery(e),i.previousContext=this._currentContext,this._currentContext=e,this._setFramebuffer(e),this.clear(e.clearColor,e.clearDepth,e.clearStencil,e,!1),e.viewport?this.updateViewport(e):t.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),e.scissor){const{x:a,y:u,width:f,height:m}=e.scissorValue;t.scissor(a,e.height-m-u,f,m)}const s=e.occlusionQueryCount;s>0&&(i.currentOcclusionQueries=i.occlusionQueries,i.currentOcclusionQueryObjects=i.occlusionQueryObjects,i.lastOcclusionObject=null,i.occlusionQueries=new Array(s),i.occlusionQueryObjects=new Array(s),i.occlusionQueryIndex=0)}finishRender(e){const{gl:t,state:n}=this,i=this.get(e),s=i.previousContext,a=e.occlusionQueryCount;a>0&&(a>i.occlusionQueryIndex&&t.endQuery(t.ANY_SAMPLES_PASSED),this.resolveOccludedAsync(e));const u=e.textures;if(u!==null)for(let f=0;f<u.length;f++){const m=u[f];m.generateMipmaps&&this.generateMipmaps(m)}if(this._currentContext=s,e.textures!==null&&e.renderTarget){const f=this.get(e.renderTarget),{samples:m}=e.renderTarget;if(m>0&&this._useMultisampledRTT(e.renderTarget)===!1){const y=f.framebuffers[e.getCacheKey()],_=t.COLOR_BUFFER_BIT,b=f.msaaFrameBuffer,w=e.textures;n.bindFramebuffer(t.READ_FRAMEBUFFER,b),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,y);for(let S=0;S<w.length;S++)if(e.scissor){const{x:E,y:R,width:P,height:L}=e.scissorValue,D=e.height-L-R;t.blitFramebuffer(E,D,E+P,D+L,E,D,E+P,D+L,_,t.NEAREST),t.invalidateSubFramebuffer(t.READ_FRAMEBUFFER,f.invalidationArray,E,D,P,L)}else t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,_,t.NEAREST),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,f.invalidationArray)}}s!==null&&(this._setFramebuffer(s),s.viewport?this.updateViewport(s):n.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight)),this.prepareTimestampBuffer(e)}resolveOccludedAsync(e){const t=this.get(e),{currentOcclusionQueries:n,currentOcclusionQueryObjects:i}=t;if(n&&i){const s=new WeakSet,{gl:a}=this;t.currentOcclusionQueryObjects=null,t.currentOcclusionQueries=null;const u=()=>{let f=0;for(let m=0;m<n.length;m++){const y=n[m];y!==null&&a.getQueryParameter(y,a.QUERY_RESULT_AVAILABLE)&&(a.getQueryParameter(y,a.QUERY_RESULT)===0&&s.add(i[m]),n[m]=null,a.deleteQuery(y),f++)}f<n.length?requestAnimationFrame(u):t.occluded=s};u()}}isOccluded(e,t){const n=this.get(e);return n.occluded&&n.occluded.has(t)}updateViewport(e){const{state:t}=this,{x:n,y:i,width:s,height:a}=e.viewportValue;t.viewport(n,e.height-a-i,s,a)}setScissorTest(e){this.state.setScissorTest(e)}clear(e,t,n,i=null,s=!0){const{gl:a}=this;if(i===null){const f=this.getClearColor();f.r*=f.a,f.g*=f.a,f.b*=f.a,i={textures:null,clearColorValue:f}}let u=0;if(e&&(u|=a.COLOR_BUFFER_BIT),t&&(u|=a.DEPTH_BUFFER_BIT),n&&(u|=a.STENCIL_BUFFER_BIT),u!==0){let f;if(i.clearColorValue?f=i.clearColorValue:(f=this.getClearColor(),f.r*=f.a,f.g*=f.a,f.b*=f.a),t&&this.state.setDepthMask(!0),i.textures===null)a.clearColor(f.r,f.g,f.b,f.a),a.clear(u);else{if(s&&this._setFramebuffer(i),e)for(let m=0;m<i.textures.length;
171m++)a.clearBufferfv(a.COLOR,m,[f.r,f.g,f.b,f.a]);t&&n?a.clearBufferfi(a.DEPTH_STENCIL,0,1,0):t?a.clearBufferfv(a.DEPTH,0,[1]):n&&a.clearBufferiv(a.STENCIL,0,[0])}}}beginCompute(e){const{state:t,gl:n}=this;t.bindFramebuffer(n.FRAMEBUFFER,null),this.initTimestampQuery(e)}compute(e,t,n,i){const{state:s,gl:a}=this;this.discard===!1&&(a.enable(a.RASTERIZER_DISCARD),this.discard=!0);const{programGPU:u,transformBuffers:f,attributes:m}=this.get(i),y=this._getVaoKey(null,m),_=this.vaoCache[y];_===void 0?this._createVao(null,m):a.bindVertexArray(_),s.useProgram(u),this._bindUniforms(n);const b=this._getTransformFeedback(f);a.bindTransformFeedback(a.TRANSFORM_FEEDBACK,b),a.beginTransformFeedback(a.POINTS),m[0].isStorageInstancedBufferAttribute?a.drawArraysInstanced(a.POINTS,0,1,t.count):a.drawArrays(a.POINTS,0,t.count),a.endTransformFeedback(),a.bindTransformFeedback(a.TRANSFORM_FEEDBACK,null);for(let w=0;w<f.length;w++){const S=f[w];S.pbo&&this.textureUtils.copyBufferToTexture(S.transformBuffer,S.pbo),S.switchBuffers()}}finishCompute(e){const t=this.gl;this.discard=!1,t.disable(t.RASTERIZER_DISCARD),this.prepareTimestampBuffer(e),this._currentContext&&this._setFramebuffer(this._currentContext)}draw(e){const{object:t,pipeline:n,material:i,context:s,hardwareClippingPlanes:a}=e,{programGPU:u}=this.get(n),{gl:f,state:m}=this,y=this.get(s),_=e.getDrawParameters();if(_===null)return;this._bindUniforms(e.getBindings());const b=t.isMesh&&t.matrixWorld.determinant()<0;m.setMaterial(i,b,a),m.useProgram(u);const w=this.get(e);let S=w.staticVao;if(S===void 0||w.geometryId!==e.geometry.id){const U=this._getVaoKey(e.getIndex(),e.getAttributes());if(S=this.vaoCache[U],S===void 0){let j;({vaoGPU:S,staticVao:j}=this._createVao(e.getIndex(),e.getAttributes())),j&&(w.staticVao=S,w.geometryId=e.geometry.id)}}f.bindVertexArray(S);const E=e.getIndex(),R=y.lastOcclusionObject;if(R!==t&&R!==void 0){if(R!==null&&R.occlusionTest===!0&&(f.endQuery(f.ANY_SAMPLES_PASSED),y.occlusionQueryIndex++),t.occlusionTest===!0){const U=f.createQuery();f.beginQuery(f.ANY_SAMPLES_PASSED,U),y.occlusionQueries[y.occlusionQueryIndex]=U,y.occlusionQueryObjects[y.occlusionQueryIndex]=t}y.lastOcclusionObject=t}const P=this.bufferRenderer;t.isPoints?P.mode=f.POINTS:t.isLineSegments?P.mode=f.LINES:t.isLine?P.mode=f.LINE_STRIP:t.isLineLoop?P.mode=f.LINE_LOOP:i.wireframe===!0?(m.setLineWidth(i.wireframeLinewidth*this.renderer.getPixelRatio()),P.mode=f.LINES):P.mode=f.TRIANGLES;const{vertexCount:L,instanceCount:D}=_;let{firstVertex:O}=_;if(P.object=t,E!==null){O*=E.array.BYTES_PER_ELEMENT;const U=this.get(E);P.index=E.count,P.type=U.type}else P.index=0;const G=()=>{t.isBatchedMesh?t._multiDrawInstances!==null?P.renderMultiDrawInstances(t._multiDrawStarts,t._multiDrawCounts,t._multiDrawCount,t._multiDrawInstances):this.hasFeature("WEBGL_multi_draw")?P.renderMultiDraw(t._multiDrawStarts,t._multiDrawCounts,t._multiDrawCount):Q0("THREE.WebGLRenderer: WEBGL_multi_draw not supported."):D>1?P.renderInstances(O,L,D):P.render(O,L)};if(e.camera.isArrayCamera&&e.camera.cameras.length>0){const U=this.get(e.camera),j=e.camera.cameras,V=e.getBindingGroup("cameraIndex").bindings[0];if(U.indexesGPU===void 0||U.indexesGPU.length!==j.length){const K=new Uint32Array([0,0,0,0]),Y=[];for(let ne=0,ae=j.length;ne<ae;ne++){const J=f.createBuffer();K[0]=ne,f.bindBuffer(f.UNIFORM_BUFFER,J),f.bufferData(f.UNIFORM_BUFFER,K,f.STATIC_DRAW),Y.push(J)}U.indexesGPU=Y}const Q=this.get(V),Z=this.renderer.getPixelRatio();for(let K=0,Y=j.length;K<Y;K++){const ne=j[K];if(t.layers.test(ne.layers)){const ae=ne.viewport,J=ae.x*Z,fe=ae.y*Z,pe=ae.width*Z,Re=ae.height*Z;m.viewport(Math.floor(J),Math.floor(e.context.height-Re-fe),Math.floor(pe),Math.floor(Re)),m.bindBufferBase(f.UNIFORM_BUFFER,Q.index,U.indexesGPU[K]),G()}}}else G();f.bindVertexArray(null)}needsRenderUpdate(){return!1}getRenderCacheKey(){return""}createDefaultTexture(e){this.textureUtils.createDefaultTexture(e)}createTexture(e,t){this.textureUtils.createTexture(e,t)}updateTexture(e,t){this.textureUtils.updateTexture(e,t)}generateMipmaps(e){this.textureUtils.generateMipmaps(e)}destroyTexture(e){this.textureUtils.destroyTexture(e)}async copyTextureToBuffer(e,t,n,i,s,a){return this.textureUtils.copyTextureToBuffer(e,t,n,i,s,a)}createSampler(){}destroySampler(){}createNodeBuilder(e,t){return new OO(e,t)}createProgram(e){const t=this.gl,{stage:n,code:i}=e,s=n==="fragment"?t.createShader(t.FRAGMENT_SHADER):t.createShader(t.VERTEX_SHADER);t.shaderSource(s,i),t.compileShader(s),this.set(e,{shaderGPU:s})}destroyProgram(e){this.delete(e)}createRenderPipeline(e,t){const n=this.gl,i=e.pipeline,{fragmentProgram:s,vertexProgram:a}=i,u=n.createProgram(),f=this.get(s).shaderGPU,m=this.get(a).shaderGPU;if(n.attachShader(u,f),n.attachShader(u,m),n.linkProgram(u),this.set(i,{programGPU:u,fragmentShader:f,vertexShader:m}),t!==null&&this.parallel){const y=new Promise(_=>{const b=this.parallel,w=()=>
171{n.getProgramParameter(u,b.COMPLETION_STATUS_KHR)?(this._completeCompile(e,i),_()):requestAnimationFrame(w)};w()});t.push(y);return}this._completeCompile(e,i)}_handleSource(e,t){const n=e.split(` 172`),i=[],s=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let u=s;u<a;u++){const f=u+1;i.push(`${f===t?">":" "} ${f}: ${n[u]}`)}return i.join(` 173`)}_getShaderErrors(e,t,n){const i=e.getShaderParameter(t,e.COMPILE_STATUS),s=e.getShaderInfoLog(t).trim();if(i&&s==="")return"";const a=/ERROR: 0:(\d+)/.exec(s);if(a){const u=parseInt(a[1]);return n.toUpperCase()+` 174 175`+s+` 176 177`+this._handleSource(e.getShaderSource(t),u)}else return s}_logProgramError(e,t,n){if(this.renderer.debug.checkShaderErrors){const i=this.gl,s=i.getProgramInfoLog(e).trim();if(i.getProgramParameter(e,i.LINK_STATUS)===!1)if(typeof this.renderer.debug.onShaderError=="function")this.renderer.debug.onShaderError(i,e,n,t);else{const a=this._getShaderErrors(i,n,"vertex"),u=this._getShaderErrors(i,t,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(e,i.VALIDATE_STATUS)+` 178 179Program Info Log: `+s+` 180`+a+` 181`+u)}else s!==""&&console.warn("THREE.WebGLProgram: Program Info Log:",s)}}_completeCompile(e,t){const{state:n,gl:i}=this,s=this.get(t),{programGPU:a,fragmentShader:u,vertexShader:f}=s;i.getProgramParameter(a,i.LINK_STATUS)===!1&&this._logProgramError(a,u,f),n.useProgram(a);const m=e.getBindings();this._setupBindings(m,a),this.set(t,{programGPU:a})}createComputePipeline(e,t){const{state:n,gl:i}=this,s={stage:"fragment",code:`#version 300 es 182precision highp float; 183void main() {}`};this.createProgram(s);const{computeProgram:a}=e,u=i.createProgram(),f=this.get(s).shaderGPU,m=this.get(a).shaderGPU,y=a.transforms,_=[],b=[];for(let R=0;R<y.length;R++){const P=y[R];_.push(P.varyingName),b.push(P.attributeNode)}i.attachShader(u,f),i.attachShader(u,m),i.transformFeedbackVaryings(u,_,i.SEPARATE_ATTRIBS),i.linkProgram(u),i.getProgramParameter(u,i.LINK_STATUS)===!1&&this._logProgramError(u,f,m),n.useProgram(u),this._setupBindings(t,u);const w=a.attributes,S=[],E=[];for(let R=0;R<w.length;R++){const P=w[R].node.attribute;S.push(P),this.has(P)||this.attributeUtils.createAttribute(P,i.ARRAY_BUFFER)}for(let R=0;R<b.length;R++){const P=b[R].attribute;this.has(P)||this.attributeUtils.createAttribute(P,i.ARRAY_BUFFER);const L=this.get(P);E.push(L)}this.set(e,{programGPU:u,transformBuffers:E,attributes:S})}createBindings(e,t){if(this._knownBindings.has(t)===!1){this._knownBindings.add(t);let n=0,i=0;for(const s of t){this.set(s,{textures:i,uniformBuffers:n});for(const a of s.bindings)a.isUniformBuffer&&n++,a.isSampledTexture&&i++}}this.updateBindings(e,t)}updateBindings(e){const{gl:t}=this,n=this.get(e);let i=n.uniformBuffers,s=n.textures;for(const a of e.bindings)if(a.isUniformsGroup||a.isUniformBuffer){const u=a.buffer,f=t.createBuffer();t.bindBuffer(t.UNIFORM_BUFFER,f),t.bufferData(t.UNIFORM_BUFFER,u,t.DYNAMIC_DRAW),this.set(a,{index:i++,bufferGPU:f})}else if(a.isSampledTexture){const{textureGPU:u,glTextureType:f}=this.get(a.texture);this.set(a,{index:s++,textureGPU:u,glTextureType:f})}}updateBinding(e){const t=this.gl;if(e.isUniformsGroup||e.isUniformBuffer){const i=this.get(e).bufferGPU,s=e.buffer;t.bindBuffer(t.UNIFORM_BUFFER,i),t.bufferData(t.UNIFORM_BUFFER,s,t.DYNAMIC_DRAW)}}createIndexAttribute(e){const t=this.gl;this.attributeUtils.createAttribute(e,t.ELEMENT_ARRAY_BUFFER)}createAttribute(e){if(this.has(e))return;const t=this.gl;this.attributeUtils.createAttribute(e,t.ARRAY_BUFFER)}createStorageAttribute(e){if(this.has(e))return;const t=this.gl;this.attributeUtils.createAttribute(e,t.ARRAY_BUFFER)}updateAttribute(e){this.attributeUtils.updateAttribute(e)}destroyAttribute(e){this.attributeUtils.destroyAttribute(e)}hasFeature(e){const t=Object.keys(tm).filter(i=>tm[i]===e),n=this.extensions;for(let i=0;i<t.length;i++)if(n.has(t[i]))return!0;return!1}getMaxAnisotropy(){return this.capabilities.getMaxAnisotropy()}copyTextureToTexture(e,t,n=null,i=null,s=0){this.textureUtils.copyTextureToTexture(e,t,n,i,s)}copyFramebufferToTexture(e,t,n){this.textureUtils.copyFramebufferToTexture(e,t,n)}_setFramebuffer(e){const{gl:t,state:n}=this;let i=null;if(e.textures!==null){const s=e.renderTarget,a=this.get(s),{samples:u,depthBuffer:f,stencilBuffer:m}
183=s,y=s.isWebGLCubeRenderTarget===!0,_=s.isRenderTarget3D===!0,b=s.isRenderTargetArray===!0,w=s.isXRRenderTarget===!0,S=w===!0&&s.hasExternalTextures===!0;let E=a.msaaFrameBuffer,R=a.depthRenderbuffer;const P=this.extensions.get("WEBGL_multisampled_render_to_texture"),L=this._useMultisampledRTT(s),D=mv(e);let O;if(y?(a.cubeFramebuffers||(a.cubeFramebuffers={}),O=a.cubeFramebuffers[D]):w&&S===!1?O=this._xrFamebuffer:(a.framebuffers||(a.framebuffers={}),O=a.framebuffers[D]),O===void 0){O=t.createFramebuffer(),n.bindFramebuffer(t.FRAMEBUFFER,O);const G=e.textures;if(y){a.cubeFramebuffers[D]=O;const{textureGPU:U}=this.get(G[0]),j=this.renderer._activeCubeFace;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+j,U,0)}else{a.framebuffers[D]=O;for(let U=0;U<G.length;U++){const j=G[U],V=this.get(j);V.renderTarget=e.renderTarget,V.cacheKey=D;const Q=t.COLOR_ATTACHMENT0+U;if(_||b){const Z=this.renderer._activeCubeFace;t.framebufferTextureLayer(t.FRAMEBUFFER,Q,V.textureGPU,0,Z)}else L?P.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Q,t.TEXTURE_2D,V.textureGPU,0,u):t.framebufferTexture2D(t.FRAMEBUFFER,Q,t.TEXTURE_2D,V.textureGPU,0)}n.drawBuffers(e,O)}if(s.isXRRenderTarget&&s.autoAllocateDepthBuffer===!0){const U=t.createRenderbuffer();this.textureUtils.setupRenderBufferStorage(U,e,0,L),a.xrDepthRenderbuffer=U}else if(e.depthTexture!==null){const U=this.get(e.depthTexture),j=m?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;U.renderTarget=e.renderTarget,U.cacheKey=D,L?P.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,j,t.TEXTURE_2D,U.textureGPU,0,u):t.framebufferTexture2D(t.FRAMEBUFFER,j,t.TEXTURE_2D,U.textureGPU,0)}}else if(w&&S){n.bindFramebuffer(t.FRAMEBUFFER,O);const G=this.get(e.textures[0]);L?P.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,G.textureGPU,0,u):t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,G.textureGPU,0);const U=m?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;if(s.autoAllocateDepthBuffer===!0){const j=a.xrDepthRenderbuffer;t.bindRenderbuffer(t.RENDERBUFFER,j),t.framebufferRenderbuffer(t.FRAMEBUFFER,U,t.RENDERBUFFER,j)}else{const j=this.get(e.depthTexture);L?P.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,U,t.TEXTURE_2D,j.textureGPU,0,u):t.framebufferTexture2D(t.FRAMEBUFFER,U,t.TEXTURE_2D,j.textureGPU,0)}}if(u>0&&L===!1){if(E===void 0){const G=[];E=t.createFramebuffer(),n.bindFramebuffer(t.FRAMEBUFFER,E);const U=[],j=e.textures;for(let V=0;V<j.length;V++){if(U[V]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,U[V]),G.push(t.COLOR_ATTACHMENT0+V),f){const K=m?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;G.push(K)}const Q=e.textures[V],Z=this.get(Q);t.renderbufferStorageMultisample(t.RENDERBUFFER,u,Z.glInternalFormat,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+V,t.RENDERBUFFER,U[V])}if(a.msaaFrameBuffer=E,a.msaaRenderbuffers=U,R===void 0){R=t.createRenderbuffer(),this.textureUtils.setupRenderBufferStorage(R,e,u),a.depthRenderbuffer=R;const V=m?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;G.push(V)}a.invalidationArray=G}i=a.msaaFrameBuffer}else i=O}n.bindFramebuffer(t.FRAMEBUFFER,i)}_getVaoKey(e,t){let n="";if(e!==null){const i=this.get(e);n+=":"+i.id}for(let i=0;i<t.length;i++){const s=this.get(t[i]);n+=":"+s.id}return n}_createVao(e,t){const{gl:n}=this,i=n.createVertexArray();let s="",a=!0;if(n.bindVertexArray(i),e!==null){const u=this.get(e);n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,u.bufferGPU),s+=":"+u.id}for(let u=0;u<t.length;u++){const f=t[u],m=this.get(f);s+=":"+m.id,n.bindBuffer(n.ARRAY_BUFFER,m.bufferGPU),n.enableVertexAttribArray(u),(f.isStorageBufferAttribute||f.isStorageInstancedBufferAttribute)&&(a=!1);let y,_;f.isInterleavedBufferAttribute===!0?(y=f.data.stride*m.bytesPerElement,_=f.offset*m.bytesPerElement):(y=0,_=0),m.isInteger?n.vertexAttribIPointer(u,f.itemSize,m.type,y,_):n.vertexAttribPointer(u,f.itemSize,m.type,f.normalized,y,_),f.isInstancedBufferAttribute&&!f.isInterleavedBufferAttribute?n.vertexAttribDivisor(u,f.meshPerAttribute):f.isInterleavedBufferAttribute&&f.data.isInstancedInterleavedBuffer&&n.vertexAttribDivisor(u,f.data.meshPerAttribute)}return n.bindBuffer(n.ARRAY_BUFFER,null),this.vaoCache[s]=i,{vaoGPU:i,staticVao:a}}_getTransformFeedback(e){let t="";for(let s=0;s<e.length;s++)t+=":"+e[s].id;let n=this.transformFeedbackCache[t];if(n!==void 0)return n;const{gl:i}=this;n=i.createTransformFeedback(),i.bindTransformFeedback(i.TRANSFORM_FEEDBACK,n);for(let s=0;s<e.length;s++){const a=e[s];i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,s,a.transformBuffer)}return i.bindTransformFeedback(i.TRANSFORM_FEEDBACK,null),this.transformFeedbackCache[t]=n,n}_setupBindings(e,t){const n=this.gl;for(const i of e)for(const s of i.bindings){const u=this.get(s).index;if(s.isUniformsGroup||s.isUniformBuffer){const f=n.getUniformBlockIndex(t,s.name);n.uniformBlockBinding(t,f,u)}else if(s.isSampledTexture){const f=n.getUniformLocation(t,s.name);n.uniform1i(f,u)}}}_bindUniforms(e){const{gl:t,state:n}=this;for(const i of e)for(const s of i.bindings){const a=this.get(s),u=a.index;s.isUniformsGroup||s.isUniformBuffer?n.bindBufferBase(t.UNIFORM_BUFFER,u,a.bufferGPU):s.isSampledTexture&&n.bindTexture(a.glTextureType,a.textureGPU,t.TEXTURE0+u)}}_useMultisampledRTT(e){return e.samples>0&&this.extensions.has("WEBGL_multisampled_render_to_texture")===!0&&e.autoAllocateDepthBuffer!==!1}dispose(){const e=this.extensions.get("WEBGL_lose_context");e&&e.loseContext(),this.renderer.domElement.removeEventListener("webglcontextlost",this._onContextLost)}}const xA={PointList:"point-list",LineList:"line-list",LineStrip:"line-strip",TriangleList:"triangle-list",TriangleStrip:"triangle-strip"},Ar={Never:"never",Less:"less",Equal:"equal",LessEqual:"less-equal",Greater:"greater",NotEqual:"not-equal",GreaterEqual:"greater-equal",Always:"always"},xr={Store:"store",Discard:"discard"},Pn={Load:"load",Clear:"clear"},Cf={CCW:"ccw",CW:"cw"},Pf={None:"none",Front:"front",Back:"back"},OA={Uint16:"uint16",Uint32:"uint32"},re={R8Unorm:"r8unorm",R8Snorm:"r8snorm",R8Uint:"r8uint",R8Sint:"r8sint",R16Uint:"r16uint",R16Sint:"r16sint",R16Float:"r16float",RG8Unorm:"rg8unorm",RG8Snorm:"rg8snorm",RG8Uint:"rg8uint",RG8Sint:"rg8sint",R32Uint:"r32uint",R32Sint:"r32sint",R32Float:"r32float",RG16Uint:"rg16uint",RG16Sint:"rg16sint",RG16Float:"rg16float",RGBA8Unorm:"rgba8unorm",RGBA8UnormSRGB:"rgba8unorm-srgb",RGBA8Snorm:"rgba8snorm",RGBA8Uint:"rgba8uint",RGBA8Sint:"rgba8sint",BGRA8Unorm:"bgra8unorm",BGRA8UnormSRGB:"bgra8unorm-srgb",RGB9E5UFloat:"rgb9e5ufloat",RGB10A2Unorm:"rgb10a2unorm",RG11B10uFloat:"rgb10a2unorm",RG32Uint:"rg32uint",RG32Sint:"rg32sint",RG32Float:"rg32float",RGBA16Uint:"rgba16uint",RGBA16Sint:"rgba16sint",RGBA16Float:"rgba16float",RGBA32Uint:"rgba32uint",RGBA32Sint:"rgba32sint",RGBA32Float:"rgba32float",Stencil8:"stencil8",Depth16Unorm:"depth16unorm",Depth24Plus:"depth24plus",Depth24PlusStencil8:"depth24plus-stencil8",Depth32Float:"depth32float",Depth32FloatStencil8:"depth32float-stencil8",BC1RGBAUnorm:"bc1-rgba-unorm",BC1RGBAUnormSRGB:"bc1-rgba-unorm-srgb",BC2RGBAUnorm:"bc2-rgba-unorm",BC2RGBAUnormSRGB:"bc2-rgba-unorm-srgb",BC3RGBAUnorm:"bc3-rgba-unorm",BC3RGBAUnormSRGB:"bc3-rgba-unorm-srgb",BC4RUnorm:"bc4-r-unorm",BC4RSnorm:"bc4-r-snorm",BC5RGUnorm:"bc5-rg-unorm",BC5RGSnorm:"bc5-rg-snorm",BC6HRGBUFloat:"bc6h-rgb-ufloat",BC6HRGBFloat:"bc6h-rgb-float",BC7RGBAUnorm:"bc7-rgba-unorm",BC7RGBAUnormSRGB:"bc7-rgba-srgb",ETC2RGB8Unorm:"etc2-rgb8unorm",ETC2RGB8UnormSRGB:"etc2-rgb8unorm-srgb",ETC2RGB8A1Unorm:"etc2-rgb8a1unorm",ETC2RGB8A1UnormSRGB:"etc2-rgb8a1unorm-srgb",ETC2RGBA8Unorm:"etc2-rgba8unorm",ETC2RGBA8UnormSRGB:"etc2-rgba8unorm-srgb",EACR11Unorm:"eac-r11unorm",EACR11Snorm:"eac-r11snorm",EACRG11Unorm:"eac-rg11unorm",EACRG11Snorm:"eac-rg11snorm",ASTC4x4Unorm:"astc-4x4-unorm",ASTC4x4UnormSRGB:"astc-4x4-unorm-srgb",ASTC5x4Unorm:"astc-5x4-unorm",ASTC5x4UnormSRGB:"astc-5x4-unorm-srgb",ASTC5x5Unorm:"astc-5x5-unorm",ASTC5x5UnormSRGB:"astc-5x5-unorm-srgb",ASTC6x5Unorm:"astc-6x5-unorm",ASTC6x5UnormSRGB:"astc-6x5-unorm-srgb",ASTC6x6Unorm:"astc-6x6-unorm",ASTC6x6UnormSRGB:"astc-6x6-unorm-srgb",ASTC8x5Unorm:"astc-8x5-unorm",ASTC8x5UnormSRGB:"astc-8x5-unorm-srgb",ASTC8x6Unorm:"astc-8x6-unorm",ASTC8x6UnormSRGB:"astc-8x6-unorm-srgb",ASTC8x8Unorm:"astc-8x8-unorm",ASTC8x8UnormSRGB:"astc-8x8-unorm-srgb",ASTC10x5Unorm:"astc-10x5-unorm",ASTC10x5UnormSRGB:"astc-10x5-unorm-srgb",ASTC10x6Unorm:"astc-10x6-unorm",ASTC10x6UnormSRGB:"astc-10x6-unorm-srgb",ASTC10x8Unorm:"astc-10x8-unorm",ASTC10x8UnormSRGB:"astc-10x8-unorm-srgb",ASTC10x10Unorm:"astc-10x10-unorm",ASTC10x10UnormSRGB:"astc-10x10-unorm-srgb",ASTC12x10Unorm:"astc-12x10-unorm",ASTC12x10UnormSRGB:"astc-12x10-unorm-srgb",ASTC12x12Unorm:"astc-12x12-unorm",ASTC12x12UnormSRGB:"astc-12x12-unorm-srgb"},Bf={ClampToEdge:"clamp-to-edge",Repeat:"repeat",MirrorRepeat:"mirror-repeat"},ha={Linear:"linear",Nearest:"nearest"},ft={Zero:"zero",One:"one",Src:"src",OneMinusSrc:"one-minus-src",SrcAlpha:"src-alpha",OneMinusSrcAlpha:"one-minus-src-alpha",Dst:"dst",OneMinusDstColor:"one-minus-dst",DstAlpha:"dst-alpha",OneMinusDstAlpha:"one-minus-dst-alpha",SrcAlphaSaturated:"src-alpha-saturated",Constant:"constant",OneMinusConstant:"one-minus-constant"},Aa={Add:"add",Subtract:"subtract",ReverseSubtract:"reverse-subtract",Min:"min",Max:"max"},rm={None:0,Red:1,Green:2,Blue:4,Alpha:8,All:15},wo={Keep:"keep",Zero:"zero",Replace:"replace",Invert:"invert",IncrementClamp:"increment-clamp",DecrementClamp:"decrement-clamp",IncrementWrap:"increment-wrap",DecrementWrap:"decrement-wrap"},Ff={Uniform:"uniform",Storage:"storage",ReadOnlyStorage:"read-only-storage"},Df={WriteOnly:"write-only",ReadOnly:"read-only",ReadWrite:"read-write"},rA={Float:"float",UnfilterableFloat:"unfilterable-float",Depth:"depth",SInt:"sint",UInt:"uint"},im={OneD:"1d",TwoD:"2d",ThreeD:"3d"},jr={OneD:"1d",TwoD:"2d",TwoDArray:"2d-array",Cube:"cube",CubeArray:"cube-array",ThreeD:"3d"},KO={All:"all",StencilOnly:"stencil-only",DepthOnly:"depth-only"},zu={Vertex:"vertex",Instance:"instance"},gd={DepthClipControl:"depth-clip-control",Depth32FloatStencil8:"depth32float-stencil8",TextureCompressionBC:"texture-compression-bc",TextureCompressionETC2:"texture-compression-etc2",TextureCompressionASTC:"texture-compression-astc",TimestampQuery:"timestamp-query",IndirectFirstInstance:"indirect-first-instance",ShaderF16:"shader-f16",RG11B10UFloat:"rg11b10ufloat-renderable",BGRA8UNormStorage:"bgra8unorm-storage",Float32Filterable:"float32-filterable",ClipDistances:"clip-distances",DualSourceBlending:"dual-source-blending",Subgroups:"subgroups"};class ZO extends v3{constructor(e,t){super(e),this.texture=t,this.version=t?t.version:0,this.isSampler=!0}}class JO extends ZO{constructor(e,t,n){super(e,t?t.value:null),this.textureNode=t,this.groupNode=n}update(){this.texture=this.textureNode.value}}class eG extends p_{constructor(e,t){super(e,t?t.array:null),this.attribute=t,this.isStorageBuffer=!0}}
183let tG=0;class nG extends eG{constructor(e,t){super("StorageBuffer_"+tG++,e?e.value:null),this.nodeUniform=e,this.access=e?e.access:Tr.READ_WRITE,this.groupNode=t}get buffer(){return this.nodeUniform.value}}class rG extends Wo{constructor(e){super(),this.device=e;const t=` 184struct VarysStruct { 185 @builtin( position ) Position: vec4<f32>, 186 @location( 0 ) vTex : vec2<f32> 187}; 188 189@vertex 190fn main( @builtin( vertex_index ) vertexIndex : u32 ) -> VarysStruct { 191 192 var Varys : VarysStruct; 193 194 var pos = array< vec2<f32>, 4 >( 195 vec2<f32>( -1.0, 1.0 ), 196 vec2<f32>( 1.0, 1.0 ), 197 vec2<f32>( -1.0, -1.0 ), 198 vec2<f32>( 1.0, -1.0 ) 199 ); 200 201 var tex = array< vec2<f32>, 4 >( 202 vec2<f32>( 0.0, 0.0 ), 203 vec2<f32>( 1.0, 0.0 ), 204 vec2<f32>( 0.0, 1.0 ), 205 vec2<f32>( 1.0, 1.0 ) 206 ); 207 208 Varys.vTex = tex[ vertexIndex ]; 209 Varys.Position = vec4<f32>( pos[ vertexIndex ], 0.0, 1.0 ); 210 211 return Varys; 212 213} 214`,n=` 215@group( 0 ) @binding( 0 ) 216var imgSampler : sampler; 217 218@group( 0 ) @binding( 1 ) 219var img : texture_2d<f32>; 220 221@fragment 222fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> { 223 224 return textureSample( img, imgSampler, vTex ); 225 226} 227`,i=` 228@group( 0 ) @binding( 0 ) 229var imgSampler : sampler; 230 231@group( 0 ) @binding( 1 ) 232var img : texture_2d<f32>; 233 234@fragment 235fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> { 236 237 return textureSample( img, imgSampler, vec2( vTex.x, 1.0 - vTex.y ) ); 238 239} 240`;this.mipmapSampler=e.createSampler({minFilter:ha.Linear}),this.flipYSampler=e.createSampler({minFilter:ha.Nearest}),this.transferPipelines={},this.flipYPipelines={},this.mipmapVertexShaderModule=e.createShaderModule({label:"mipmapVertex",code:t}),this.mipmapFragmentShaderModule=e.createShaderModule({label:"mipmapFragment",code:n}),this.flipYFragmentShaderModule=e.createShaderModule({label:"flipYFragment",code:i})}getTransferPipeline(e){let t=this.transferPipelines[e];return t===void 0&&(t=this.device.createRenderPipeline({label:`mipmap-${e}`,vertex:{module:this.mipmapVertexShaderModule,entryPoint:"main"},fragment:{module:this.mipmapFragmentShaderModule,entryPoint:"main",targets:[{format:e}]},primitive:{topology:xA.TriangleStrip,stripIndexFormat:OA.Uint32},layout:"auto"}),this.transferPipelines[e]=t),t}getFlipYPipeline(e){let t=this.flipYPipelines[e];return t===void 0&&(t=this.device.createRenderPipeline({label:`flipY-${e}`,vertex:{module:this.mipmapVertexShaderModule,entryPoint:"main"},fragment:{module:this.flipYFragmentShaderModule,entryPoint:"main",targets:[{format:e}]},primitive:{topology:xA.TriangleStrip,stripIndexFormat:OA.Uint32},layout:"auto"}),this.flipYPipelines[e]=t),t}flipY(e,t,n=0){const i=t.format,{width:s,height:a}=t.size,u=this.getTransferPipeline(i),f=this.getFlipYPipeline(i),m=this.device.createTexture({size:{width:s,height:a,depthOrArrayLayers:1},format:i,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING}),y=e.createView({baseMipLevel:0,mipLevelCount:1,dimension:jr.TwoD,baseArrayLayer:n}),_=m.createView({baseMipLevel:0,mipLevelCount:1,dimension:jr.TwoD,baseArrayLayer:0}),b=this.device.createCommandEncoder({}),w=(S,E,R)=>{const P=S.getBindGroupLayout(0),L=this.device.createBindGroup({layout:P,entries:[{binding:0,resource:this.flipYSampler},{binding:1,resource:E}]}),D=b.beginRenderPass({colorAttachments:[{view:R,loadOp:Pn.Clear,storeOp:xr.Store,clearValue:[0,0,0,0]}]});D.setPipeline(S),D.setBindGroup(0,L),D.draw(4,1,0,0),D.end()};w(u,y,_),w(f,_,y),this.device.queue.submit([b.finish()]),m.destroy()}generateMipmaps(e,t,n=0){const i=this.get(e);i.useCount===void 0&&(i.useCount=0,i.layers=[]);const s=i.layers[n]||this._mipmapCreateBundles(e,t,n),a=this.device.createCommandEncoder({});this._mipmapRunBundles(a,s),this.device.queue.submit([a.finish()]),i.useCount!==0&&(i.layers[n]=s),i.useCount++}_mipmapCreateBundles(e,t,n){const i=this.getTransferPipeline(t.format),s=i.getBindGroupLayout(0);let a=e.createView({baseMipLevel:0,mipLevelCount:1,dimension:jr.TwoD,baseArrayLayer:n});const u=[];for(let f=1;f<t.mipLevelCount;f++){const m=this.device.createBindGroup({layout:s,entries:[{binding:0,resource:this.mipmapSampler},{binding:1,resource:a}]}),y=e.createView({baseMipLevel:f,mipLevelCount:1,dimension:jr.TwoD,baseArrayLayer:n}),_={colorAttachments:[{view:y,loadOp:Pn.Clear,storeOp:xr.Store,clearValue:[0,0,0,0]}]},b=this.device.createRenderBundleEncoder({colorFormats:[t.format]});b.setPipeline(i),b.setBindGroup(0,m),b.draw(4,1,0,0),u.push({renderBundles:[b.finish()],passDescriptor:_}),a=y}return u}_mipmapRunBundles(e,t){const n=t.length;for(let i=0;i<n;i++){const s=t[i],a=e.beginRenderPass(s.passDescriptor);a.executeBundles(s.renderBundles),a.end()}}}const iG={[o7]:"never",[Ld]:"less",[l7]:"equal",[A7]:"less-equal",[c7]:"greater",[u7]:"greater-equal",[a7]:"always",[f7]:"not-equal"},sG=[0,1,3,2,4,5];class oG{constructor(e){this.backend=e,this._passUtils=null,this.defaultTexture={},this.defaultCubeTexture={},this.defaultVideoFrame=null,this.colorBuffer=null,this.depthTexture=new $o,this.depthTexture.name="depthBuffer"}createSampler(e){const t=this.backend,n=t.device,i=t.get(e),s={addressModeU:this._convertAddressMode(e.wrapS),addressModeV:this._convertAddressMode(e.wrapT),addressModeW:this._convertAddressMode(e.wrapR),magFilter:this._convertFilterMode(e.magFilter),minFilter:this._convertFilterMode(e.minFilter),mipmapFilter:this._convertFilterMode(e.minFilter),maxAnisotropy:1};s.magFilter===ha.Linear&&s.minFilter===ha.Linear&&s.mipmapFilter===ha.Linear&&(s.maxAnisotropy=e.anisotropy),e.isDepthTexture&&e.compareFunction!==null&&(s.compare=iG[e.compareFunction]),i.sampler=n.createSampler(s)}createDefaultTexture(e){let t;const n=yd(e);e.isCubeTexture?t=this._getDefaultCubeTextureGPU(n):e.isVideoTexture?this.backend.get(e).externalTexture=this._getDefaultVideoFrame():t=this._getDefaultTextureGPU(n),this.backend.get(e).texture=t}
240createTexture(e,t={}){const n=this.backend,i=n.get(e);if(i.initialized)throw new Error("WebGPUTextureUtils: Texture already initialized.");t.needsMipmaps===void 0&&(t.needsMipmaps=!1),t.levels===void 0&&(t.levels=1),t.depth===void 0&&(t.depth=1);const{width:s,height:a,depth:u,levels:f}=t;e.isFramebufferTexture&&(t.renderTarget?t.format=this.backend.utils.getCurrentColorFormat(t.renderTarget):t.format=this.backend.utils.getPreferredCanvasFormat());const m=this._getDimension(e),y=e.internalFormat||t.format||yd(e,n.device);i.format=y;const{samples:_,primarySamples:b,isMSAA:w}=n.utils.getTextureSampleData(e);let S=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC;e.isStorageTexture===!0&&(S|=GPUTextureUsage.STORAGE_BINDING),e.isCompressedTexture!==!0&&e.isCompressedArrayTexture!==!0&&(S|=GPUTextureUsage.RENDER_ATTACHMENT);const E={label:e.name,size:{width:s,height:a,depthOrArrayLayers:u},mipLevelCount:f,sampleCount:b,dimension:m,format:y,usage:S};if(e.isVideoTexture){const R=e.source.data,P=new VideoFrame(R);E.size.width=P.displayWidth,E.size.height=P.displayHeight,P.close(),i.externalTexture=R}else{if(y===void 0)return console.warn("WebGPURenderer: Texture format not supported."),this.createDefaultTexture(e);i.texture=n.device.createTexture(E)}if(w){const R=Object.assign({},E);R.label=R.label+"-msaa",R.sampleCount=_,i.msaaTexture=n.device.createTexture(R)}i.initialized=!0,i.textureDescriptorGPU=E}destroyTexture(e){const t=this.backend,n=t.get(e);n.texture!==void 0&&n.texture.destroy(),n.msaaTexture!==void 0&&n.msaaTexture.destroy(),t.delete(e)}destroySampler(e){const n=this.backend.get(e);delete n.sampler}generateMipmaps(e){const t=this.backend.get(e);if(e.isCubeTexture)for(let n=0;n<6;n++)this._generateMipmaps(t.texture,t.textureDescriptorGPU,n);else{const n=e.image.depth||1;for(let i=0;i<n;i++)this._generateMipmaps(t.texture,t.textureDescriptorGPU,i)}}getColorBuffer(){this.colorBuffer&&this.colorBuffer.destroy();const e=this.backend,{width:t,height:n}=e.getDrawingBufferSize();return this.colorBuffer=e.device.createTexture({label:"colorBuffer",size:{width:t,height:n,depthOrArrayLayers:1},sampleCount:e.utils.getSampleCount(e.renderer.samples),format:e.utils.getPreferredCanvasFormat(),usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC}),this.colorBuffer}getDepthBuffer(e=!0,t=!1){const n=this.backend,{width:i,height:s}=n.getDrawingBufferSize(),a=this.depthTexture,u=n.get(a).texture;let f,m;if(t?(f=wl,m=Ml):e&&(f=Sl,m=fr),u!==void 0){if(a.image.width===i&&a.image.height===s&&a.format===f&&a.type===m)return u;this.destroyTexture(a)}
240return a.name="depthBuffer",a.format=f,a.type=m,a.image.width=i,a.image.height=s,this.createTexture(a,{width:i,height:s}),n.get(a).texture}updateTexture(e,t){const n=this.backend.get(e),{textureDescriptorGPU:i}=n;if(!(e.isRenderTargetTexture||i===void 0)){if(e.isDataTexture)this._copyBufferToTexture(t.image,n.texture,i,0,e.flipY);else if(e.isDataArrayTexture||e.isData3DTexture)for(let s=0;s<t.image.depth;s++)this._copyBufferToTexture(t.image,n.texture,i,s,e.flipY,s);else if(e.isCompressedTexture||e.isCompressedArrayTexture)this._copyCompressedBufferToTexture(e.mipmaps,n.texture,i);else if(e.isCubeTexture)this._copyCubeMapToTexture(t.images,n.texture,i,e.flipY);else if(e.isVideoTexture){const s=e.source.data;n.externalTexture=s}else this._copyImageToTexture(t.image,n.texture,i,0,e.flipY);n.version=e.version,e.onUpdate&&e.onUpdate(e)}}async copyTextureToBuffer(e,t,n,i,s,a){const u=this.backend.device,f=this.backend.get(e),m=f.texture,y=f.textureDescriptorGPU.format,_=this._getBytesPerTexel(y);let b=i*_;b=Math.ceil(b/256)*256;const w=u.createBuffer({size:i*s*_,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}),S=u.createCommandEncoder();S.copyTextureToBuffer({texture:m,origin:{x:t,y:n,z:a}},{buffer:w,bytesPerRow:b},{width:i,height:s});const E=this._getTypedArrayType(y);u.queue.submit([S.finish()]),await w.mapAsync(GPUMapMode.READ);const R=w.getMappedRange();return new E(R)}_isEnvironmentTexture(e){const t=e.mapping;return t===El||t===Nl||t===NA||t===RA}_getDefaultTextureGPU(e){let t=this.defaultTexture[e];if(t===void 0){const n=new y7;n.minFilter=Ws,n.magFilter=Ws,this.createTexture(n,{width:1,height:1,format:e}),this.defaultTexture[e]=t=n}return this.backend.get(t).texture}_getDefaultCubeTextureGPU(e){let t=this.defaultTexture[e];if(t===void 0){const n=new v7;n.minFilter=Ws,n.magFilter=Ws,this.createTexture(n,{width:1,height:1,depth:6}),this.defaultCubeTexture[e]=t=n}return this.backend.get(t).texture}_getDefaultVideoFrame(){let e=this.defaultVideoFrame;if(e===null){const t={timestamp:0,codedWidth:1,codedHeight:1,format:"RGBA"};this.defaultVideoFrame=e=new VideoFrame(new Uint8Array([0,0,0,255]),t)}return e}_copyCubeMapToTexture(e,t,n,i){for(let s=0;s<6;s++){const a=e[s],u=i===!0?sG[s]:s;a.isDataTexture?this._copyBufferToTexture(a.image,t,n,u,i):this._copyImageToTexture(a,t,n,u,i)}}_copyImageToTexture(e,t,n,i,s){this.backend.device.queue.copyExternalImageToTexture({source:e,flipY:s},{texture:t,mipLevel:0,origin:{x:0,y:0,z:i}},{width:e.width,height:e.height,depthOrArrayLayers:1})}_getPassUtils(){let e=this._passUtils;return e===null&&(this._passUtils=e=new rG(this.backend.device)),e}_generateMipmaps(e,t,n=0){this._getPassUtils().generateMipmaps(e,t,n)}_flipY(e,t,n=0){this._getPassUtils().flipY(e,t,n)}_copyBufferToTexture(e,t,n,i,s,a=0){const u=this.backend.device,f=e.data,m=this._getBytesPerTexel(n.format),y=e.width*m;u.queue.writeTexture({texture:t,mipLevel:0,origin:{x:0,y:0,z:i}},f,{offset:e.width*e.height*m*a,bytesPerRow:y},{width:e.width,height:e.height,depthOrArrayLayers:1}),s===!0&&this._flipY(t,n,i)}_copyCompressedBufferToTexture(e,t,n){const i=this.backend.device,s=this._getBlockData(n.format),a=n.size.depthOrArrayLayers>1;for(let u=0;u<e.length;u++){const f=e[u],m=f.width,y=f.height,_=a?n.size.depthOrArrayLayers:1,b=Math.ceil(m/s.width)*s.byteLength,w=b*Math.ceil(y/s.height);for(let S=0;S<_;S++)i.queue.writeTexture({texture:t,mipLevel:u,origin:{x:0,y:0,z:S}},f.data,{offset:S*w,bytesPerRow:b,rowsPerImage:Math.ceil(y/s.height)},{width:Math.ceil(m/s.width)*s.width,height:Math.ceil(y/s.height)*s.height,depthOrArrayLayers:1})}}_getBlockData(e){if(e===re.BC1RGBAUnorm||e===re.BC1RGBAUnormSRGB)return{byteLength:8,width:4,height:4};if(e===re.BC2RGBAUnorm||e===re.BC2RGBAUnormSRGB)return{byteLength:16,width:4,height:4};if(e===re.BC3RGBAUnorm||e===re.BC3RGBAUnormSRGB)return{byteLength:16,width:4,height:4};if(e===re.BC4RUnorm||e===re.BC4RSNorm)return{byteLength:8,width:4,height:4};if(e===re.BC5RGUnorm||e===re.BC5RGSnorm)return{byteLength:16,width:4,height:4};if(e===re.BC6HRGBUFloat||e===re.BC6HRGBFloat)return{byteLength:16,width:4,height:4};if(e===re.BC7RGBAUnorm||e===re.BC7RGBAUnormSRGB)return{byteLength:16,width:4,height:4};if(e===re.ETC2RGB8Unorm||e===re.ETC2RGB8UnormSRGB)return{byteLength:8,width:4,height:4};if(e===re.ETC2RGB8A1Unorm||e===re.ETC2RGB8A1UnormSRGB)return{byteLength:8,width:4,height:4};if(e===re.ETC2RGBA8Unorm||e===re.ETC2RGBA8UnormSRGB)return{byteLength:16,width:4,height:4};if(e===re.EACR11Unorm)return{byteLength:8,width:4,height:4};if(e===re.EACR11Snorm)return{byteLength:8,width:4,height:4};if(e===re.EACRG11Unorm)return{byteLength:16,width:4,height:4};if(e===re.EACRG11Snorm)return{byteLength:16,width:4,height:4};if(e===re.ASTC4x4Unorm||e===re.ASTC4x4UnormSRGB)return{byteLength:16,width:4,height:4};if(e===re.ASTC5x4Unorm||e===re.ASTC5x4UnormSRGB)return{byteLength:16,width:5,height:4};if(e===re.ASTC5x5Unorm||e===re.ASTC5x5UnormSRGB)return{byteLength:16,width:5,height:5};if(e===re.ASTC6x5Unorm||e===re.ASTC6x5UnormSRGB)return{byteLength:16,width:6,height:5};if(e===re.ASTC6x6Unorm||e===re.ASTC6x6UnormSRGB)return{byteLength:16,width:6,height:6};if(e===re.ASTC8x5Unorm||e===re.ASTC8x5UnormSRGB)return{byteLength:16,width:8,height:5};if(e===re.ASTC8x6Unorm||e===re.ASTC8x6UnormSRGB)return{byteLength:16,width:8,height:6};if(e===re.ASTC8x8Unorm||e===re.ASTC8x8UnormSRGB)return{byteLength:16,width:8,height:8};if(e===re.ASTC10x5Unorm||e===re.ASTC10x5UnormSRGB)return{byteLength:16,width:10,height:5};if(e===re.ASTC10x6Unorm||e===re.ASTC10x6UnormSRGB)return{byteLength:16,width:10,height:6};if(e===re.ASTC10x8Unorm||e===re.ASTC10x8UnormSRGB)return{byteLength:16,width:10,height:8};if(e===re.ASTC10x10Unorm||e===re.ASTC10x10UnormSRGB)return{byteLength:16,width:10,height:10};if(e===re.ASTC12x10Unorm||e===re.ASTC12x10UnormSRGB)return{byteLength:16,width:12,height:10};if(e===re.ASTC12x12Unorm||e===re.ASTC12x12UnormSRGB)return{byteLength:16,width:12,height:12}}_convertAddressMode(e){let t=Bf.ClampToEdge;return e===Mc?t=Bf.Repeat:e===Ec&&(t=Bf.MirrorRepeat),t}_convertFilterMode(e){let t=ha.Linear;return(e===Ws||e===s7||e===K0)&&(t=ha.Nearest),t}_getBytesPerTexel(e){if(e===re.R8Unorm||e===re.R8Snorm||e===re.R8Uint||e===re.R8Sint)return 1;if(e===re.R16Uint||e===re.R16Sint||e===re.R16Float||e===re.RG8Unorm||e===re.RG8Snorm||e===re.RG8Uint||e===re.RG8Sint)return 2;if(e===re.R32Uint||e===re.R32Sint||e===re.R32Float||e===re.RG16Uint||e===re.RG16Sint||e===re.RG16Float||e===re.RGBA8Unorm||e===re.RGBA8UnormSRGB||e===re.RGBA8Snorm||e===re.RGBA8Uint||e===re.RGBA8Sint||e===re.BGRA8Unorm||e===re.BGRA8UnormSRGB||e===re.RGB9E5UFloat||e===re.RGB10A2Unorm||e===re.RG11B10UFloat||e===re.Depth32Float||e===re.Depth24Plus||e===re.Depth24PlusStencil8||e===re.Depth32FloatStencil8)return 4;if(e===re.RG32Uint||e===re.RG32Sint||e===re.RG32Float||e===re.RGBA16Uint||e===re.RGBA16Sint||e===re.RGBA16Float)return 8;if(e===re.RGBA32Uint||e===re.RGBA32Sint||e===re.RGBA32Float)return 16}_getTypedArrayType(e){if(e===re.R8Uint)return Uint8Array;
240if(e===re.R8Sint)return Int8Array;if(e===re.R8Unorm)return Uint8Array;if(e===re.R8Snorm)return Int8Array;if(e===re.RG8Uint)return Uint8Array;if(e===re.RG8Sint)return Int8Array;if(e===re.RG8Unorm)return Uint8Array;if(e===re.RG8Snorm)return Int8Array;if(e===re.RGBA8Uint)return Uint8Array;if(e===re.RGBA8Sint)return Int8Array;if(e===re.RGBA8Unorm)return Uint8Array;if(e===re.RGBA8Snorm)return Int8Array;if(e===re.R16Uint)return Uint16Array;if(e===re.R16Sint)return Int16Array;if(e===re.RG16Uint)return Uint16Array;if(e===re.RG16Sint)return Int16Array;if(e===re.RGBA16Uint)return Uint16Array;if(e===re.RGBA16Sint)return Int16Array;if(e===re.R16Float||e===re.RG16Float||e===re.RGBA16Float)return Uint16Array;if(e===re.R32Uint)return Uint32Array;if(e===re.R32Sint)return Int32Array;if(e===re.R32Float)return Float32Array;if(e===re.RG32Uint)return Uint32Array;if(e===re.RG32Sint)return Int32Array;if(e===re.RG32Float)return Float32Array;if(e===re.RGBA32Uint)return Uint32Array;if(e===re.RGBA32Sint)return Int32Array;if(e===re.RGBA32Float)return Float32Array;if(e===re.BGRA8Unorm||e===re.BGRA8UnormSRGB)return Uint8Array;
240if(e===re.RGB10A2Unorm||e===re.RGB9E5UFloat||e===re.RG11B10UFloat)return Uint32Array;if(e===re.Depth32Float)return Float32Array;if(e===re.Depth24Plus||e===re.Depth24PlusStencil8)return Uint32Array;if(e===re.Depth32FloatStencil8)return Float32Array}_getDimension(e){let t;return e.isData3DTexture?t=im.ThreeD:t=im.TwoD,t}}function yd(r,e=null){const t=r.format,n=r.type,i=r.colorSpace;let s;if(r.isCompressedTexture===!0||r.isCompressedArrayTexture===!0)switch(t){case t1:s=i===dt?re.BC1RGBAUnormSRGB:re.BC1RGBAUnorm;break;case n1:s=i===dt?re.BC2RGBAUnormSRGB:re.BC2RGBAUnorm;break;case r1:s=i===dt?re.BC3RGBAUnormSRGB:re.BC3RGBAUnorm;break;case jf:s=i===dt?re.ETC2RGB8UnormSRGB:re.ETC2RGB8Unorm;break;case $f:s=i===dt?re.ETC2RGBA8UnormSRGB:re.ETC2RGBA8Unorm;break;case Hf:s=i===dt?re.ASTC4x4UnormSRGB:re.ASTC4x4Unorm;break;case Wf:s=i===dt?re.ASTC5x4UnormSRGB:re.ASTC5x4Unorm;break;case Qf:s=i===dt?re.ASTC5x5UnormSRGB:re.ASTC5x5Unorm;break;case Yf:s=i===dt?re.ASTC6x5UnormSRGB:re.ASTC6x5Unorm;break;case Xf:s=i===dt?re.ASTC6x6UnormSRGB:re.ASTC6x6Unorm;break;case Kf:s=i===dt?re.ASTC8x5UnormSRGB:re.ASTC8x5Unorm;break;case Zf:s=i===dt?re.ASTC8x6UnormSRGB:re.ASTC8x6Unorm;break;case Jf:s=i===dt?re.ASTC8x8UnormSRGB:re.ASTC8x8Unorm;break;case eh:s=i===dt?re.ASTC10x5UnormSRGB:re.ASTC10x5Unorm;break;case th:s=i===dt?re.ASTC10x6UnormSRGB:re.ASTC10x6Unorm;break;case nh:s=i===dt?re.ASTC10x8UnormSRGB:re.ASTC10x8Unorm;break;case rh:s=i===dt?re.ASTC10x10UnormSRGB:re.ASTC10x10Unorm;break;case ih:s=i===dt?re.ASTC12x10UnormSRGB:re.ASTC12x10Unorm;break;case sh:s=i===dt?re.ASTC12x12UnormSRGB:re.ASTC12x12Unorm;break;case Oo:s=i===dt?re.RGBA8UnormSRGB:re.RGBA8Unorm;break;default:console.error("WebGPURenderer: Unsupported texture format.",t)}else switch(t){case Oo:switch(n){case F0:s=re.RGBA8Snorm;break;case D0:s=re.RGBA16Sint;break;case fA:s=re.RGBA16Uint;break;case fr:s=re.RGBA32Uint;break;case Fr:s=re.RGBA32Sint;break;case ms:s=i===dt?re.RGBA8UnormSRGB:re.RGBA8Unorm;break;case Mi:s=re.RGBA16Float;break;case wi:s=re.RGBA32Float;break;default:console.error("WebGPURenderer: Unsupported texture type with RGBAFormat.",n)}break;case Rd:switch(n){case i7:s=re.RGB9E5UFloat;break;default:console.error("WebGPURenderer: Unsupported texture type with RGBFormat.",n)}break;case Cd:switch(n){case F0:s=re.R8Snorm;break;case D0:s=re.R16Sint;break;case fA:s=re.R16Uint;break;case fr:s=re.R32Uint;break;case Fr:s=re.R32Sint;break;case ms:s=re.R8Unorm;break;case Mi:s=re.R16Float;break;case wi:s=re.R32Float;break;default:console.error("WebGPURenderer: Unsupported texture type with RedFormat.",n)}break;case X0:switch(n){case F0:s=re.RG8Snorm;break;case D0:s=re.RG16Sint;break;case fA:s=re.RG16Uint;break;case fr:s=re.RG32Uint;break;case Fr:s=re.RG32Sint;break;case ms:s=re.RG8Unorm;break;case Mi:s=re.RG16Float;break;case wi:s=re.RG32Float;break;default:console.error("WebGPURenderer: Unsupported texture type with RGFormat.",n)}break;case Sl:switch(n){case fA:s=re.Depth16Unorm;break;case fr:s=re.Depth24Plus;break;case wi:s=re.Depth32Float;break;default:console.error("WebGPURenderer: Unsupported texture type with DepthFormat.",n)}break;case wl:switch(n){case Ml:s=re.Depth24PlusStencil8;break;case wi:e&&e.features.has(gd.Depth32FloatStencil8)===!1&&console.error('WebGPURenderer: Depth textures with DepthStencilFormat + FloatType can only be used with the "depth32float-stencil8" GPU feature.'),s=re.Depth32FloatStencil8;break;default:console.error("WebGPURenderer: Unsupported texture type with DepthStencilFormat.",n)}break;case Pd:switch(n){case Fr:s=re.R32Sint;break;case fr:s=re.R32Uint;break;default:console.error("WebGPURenderer: Unsupported texture type with RedIntegerFormat.",n)}break;case Bd:switch(n){case Fr:s=re.RG32Sint;break;case fr:s=re.RG32Uint;break;default:console.error("WebGPURenderer: Unsupported texture type with RGIntegerFormat.",n)}break;case Fd:switch(n){case Fr:s=re.RGBA32Sint;break;case fr:s=re.RGBA32Uint;break;default:console.error("WebGPURenderer: Unsupported texture type with RGBAIntegerFormat.",n)}break;default:console.error("WebGPURenderer: Unsupported texture format.",t)}return s}const aG=/^[fn]*\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)\s*[\-\>]*\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/i,AG=/([a-z_0-9]+)\s*:\s*([a-z_0-9]+(?:<[\s\S]+?>)?)/ig,sm={f32:"float",i32:"int",u32:"uint",bool:"bool","vec2<f32>":"vec2","vec2<i32>":"ivec2","vec2<u32>":"uvec2","vec2<bool>":"bvec2",vec2f:"vec2",vec2i:"ivec2",vec2u:"uvec2",vec2b:"bvec2","vec3<f32>":"vec3","vec3<i32>":"ivec3","vec3<u32>":"uvec3","vec3<bool>":"bvec3",vec3f:"vec3",vec3i:"ivec3",vec3u:"uvec3",vec3b:"bvec3","vec4<f32>":"vec4","vec4<i32>":"ivec4","vec4<u32>":"uvec4","vec4<bool>":"bvec4",vec4f:"vec4",vec4i:"ivec4",vec4u:"uvec4",vec4b:"bvec4","mat2x2<f32>":"mat2",mat2x2f:"mat2","mat3x3<f32>":"mat3",mat3x3f:"mat3","mat4x4<f32>
240":"mat4",mat4x4f:"mat4",sampler:"sampler",texture_1d:"texture",texture_2d:"texture",texture_2d_array:"texture",texture_multisampled_2d:"cubeTexture",texture_depth_2d:"depthTexture",texture_depth_multisampled_2d:"depthTexture",texture_3d:"texture3D",texture_cube:"cubeTexture",texture_cube_array:"cubeTexture",texture_storage_1d:"storageTexture",texture_storage_2d:"storageTexture",texture_storage_2d_array:"storageTexture",texture_storage_3d:"storageTexture"},lG=r=>{r=r.trim();const e=r.match(aG);if(e!==null&&e.length===4){const t=e[2],n=[];let i=null;for(;(i=AG.exec(t))!==null;)n.push({name:i[1],type:i[2]});const s=[];for(let y=0;y<n.length;y++){const{name:_,type:b}=n[y];let w=b;w.startsWith("ptr")?w="pointer":(w.startsWith("texture")&&(w=b.split("<")[0]),w=sm[w]),s.push(new g3(w,_))}const a=r.substring(e[0].length),u=e[3]||"void",f=e[1]!==void 0?e[1]:"";return{type:sm[u]||u,inputs:s,name:f,inputsCode:t,blockCode:a,outputType:u}}else throw new Error("FunctionNode: Function is not a WGSL code.")};class uG extends y3{constructor(e){const{type:t,inputs:n,name:i,inputsCode:s,blockCode:a,outputType:u}=lG(e);super(t,n,i),this.inputsCode=s,this.blockCode=a,this.outputType=u}getCode(e=this.name){const t=this.outputType!=="void"?"-> "+this.outputType:"";return`fn ${e} ( ${this.inputsCode.trim()} ) ${t}`+this.blockCode}}class cG extends h_{parseFunction(e){return new uG(e)}}const iA=typeof self<"u"?self.GPUShaderStage:{VERTEX:1,FRAGMENT:2,COMPUTE:4},fG={[Tr.READ_ONLY]:"read",[Tr.WRITE_ONLY]:"write",[Tr.READ_WRITE]:"read_write"},om={[Mc]:"repeat",[Dd]:"clamp",[Ec]:"mirror"},ju={vertex:iA?iA.VERTEX:1,fragment:iA?iA.FRAGMENT:2,compute:iA?iA.COMPUTE:4},am={instance:!0,swizzleAssign:!1,storageBuffer:!0},hG={"^^":"tsl_xor"},dG={float:"f32",int:"i32",uint:"u32",bool:"bool",color:"vec3<f32>",vec2:"vec2<f32>",ivec2:"vec2<i32>",uvec2:"vec2<u32>",bvec2:"vec2<bool>",vec3:"vec3<f32>",ivec3:"vec3<i32>",uvec3:"vec3<u32>",bvec3:"vec3<bool>",vec4:"vec4<f32>",ivec4:"vec4<i32>",uvec4:"vec4<u32>",bvec4:"vec4<bool>",mat2:"mat2x2<f32>",mat3:"mat3x3<f32>",mat4:"mat4x4<f32>"},Am={},Ti={tsl_xor:new On("fn tsl_xor( a : bool, b : bool ) -> bool { return ( a || b ) && !( a && b ); }"),mod_float:new On("fn tsl_mod_float( x : f32, y : f32 ) -> f32 { return x - y * floor( x / y ); }"),mod_vec2:new On("fn tsl_mod_vec2( x : vec2f, y : vec2f ) -> vec2f { return x - y * floor( x / y ); }"),mod_vec3:new On("fn tsl_mod_vec3( x : vec3f, y : vec3f ) -> vec3f { return x - y * floor( x / y ); }"),mod_vec4:new On("fn tsl_mod_vec4( x : vec4f, y : vec4f ) -> vec4f { return x - y * floor( x / y ); }"),equals_bool:new On("fn tsl_equals_bool( a : bool, b : bool ) -> bool { return a == b; }"),equals_bvec2:new On("fn tsl_equals_bvec2( a : vec2f, b : vec2f ) -> vec2<bool> { return vec2<bool>( a.x == b.x, a.y == b.y ); }"),equals_bvec3:new On("fn tsl_equals_bvec3( a : vec3f, b : vec3f ) -> vec3<bool> { return vec3<bool>( a.x == b.x, a.y == b.y, a.z == b.z ); }"),equals_bvec4:new On("fn tsl_equals_bvec4( a : vec4f, b : vec4f ) -> vec4<bool> { return vec4<bool>( a.x == b.x, a.y == b.y, a.z == b.z, a.w == b.w ); }"),repeatWrapping_float:new On("fn tsl_repeatWrapping_float( coord: f32 ) -> f32 { return fract( coord ); }"),mirrorWrapping_float:new On("fn tsl_mirrorWrapping_float( coord: f32 ) -> f32 { let mirrored = fract( coord * 0.5 ) * 2.0; return 1.0 - abs( 1.0 - mirrored ); }"),clampWrapping_float:new On("fn tsl_clampWrapping_float( coord: f32 ) -> f32 { return clamp( coord, 0.0, 1.0 ); }"),biquadraticTexture:new On(` 241fn tsl_biquadraticTexture( map : texture_2d<f32>, coord : vec2f, iRes : vec2u, level : u32 ) -> vec4f { 242 243 let res = vec2f( iRes ); 244 245 let uvScaled = coord * res; 246 let uvWrapping = ( ( uvScaled % res ) + res ) % res; 247 248 // https://www.shadertoy.com/view/WtyXRy 249 250 let uv = uvWrapping - 0.5; 251 let iuv = floor( uv ); 252 let f = fract( uv ); 253 254 let rg1 = textureLoad( map, vec2u( iuv + vec2( 0.5, 0.5 ) ) % iRes, level ); 255 let rg2 = textureLoad( map, vec2u( iuv + vec2( 1.5, 0.5 ) ) % iRes, level ); 256 let rg3 = textureLoad( map, vec2u( iuv + vec2( 0.5, 1.5 ) ) % iRes, level ); 257 let rg4 = textureLoad( map, vec2u( iuv + vec2( 1.5, 1.5 ) ) % iRes, level ); 258 259 return mix( mix( rg1, rg2, f.x ), mix( rg3, rg4, f.x ), f.y ); 260 261} 262`)},B0={dFdx:"dpdx",dFdy:"- dpdy",mod_float:"tsl_mod_float",mod_vec2:"tsl_mod_vec2",mod_vec3:"tsl_mod_vec3",mod_vec4:"tsl_mod_vec4",equals_bool:"tsl_equals_bool",equals_bvec2:"tsl_equals_bvec2",equals_bvec3:"tsl_equals_bvec3",equals_bvec4:"tsl_equals_bvec4",inversesqrt:"inverseSqrt",bitcast:"bitcast<f32>"};typeof navigator<"u"&&/Windows/g.test(navigator.userAgent)&&(Ti.pow_float=ne
262w On("fn tsl_pow_float( a : f32, b : f32 ) -> f32 { return select( -pow( -a, b ), pow( a, b ), a > 0.0 ); }"),Ti.pow_vec2=new On("fn tsl_pow_vec2( a : vec2f, b : vec2f ) -> vec2f { return vec2f( tsl_pow_float( a.x, b.x ), tsl_pow_float( a.y, b.y ) ); }",[Ti.pow_float]),Ti.pow_vec3=new On("fn tsl_pow_vec3( a : vec3f, b : vec3f ) -> vec3f { return vec3f( tsl_pow_float( a.x, b.x ), tsl_pow_float( a.y, b.y ), tsl_pow_float( a.z, b.z ) ); }",[Ti.pow_float]),Ti.pow_vec4=new On("fn tsl_pow_vec4( a : vec4f, b : vec4f ) -> vec4f { return vec4f( tsl_pow_float( a.x, b.x ), tsl_pow_float( a.y, b.y ), tsl_pow_float( a.z, b.z ), tsl_pow_float( a.w, b.w ) ); }",[Ti.pow_float]),B0.pow_float="tsl_pow_float",B0.pow_vec2="tsl_pow_vec2",B0.pow_vec3="tsl_pow_vec3",B0.pow_vec4="tsl_pow_vec4");let T_="";(typeof navigator<"u"&&/Firefox|Deno/g.test(navigator.userAgent))!==!0&&(T_+=`diagnostic( off, derivative_uniformity ); 263`);class pG extends c_{constructor(e,t){super(e,t,new cG),this.uniformGroups={},this.builtins={},this.directives={},this.scopedArrays=new Map}needsToWorkingColorSpace(e){return e.isVideoTexture===!0&&e.colorSpace!==W0}_generateTextureSample(e,t,n,i,s=this.shaderStage){return s==="fragment"?i?`textureSample( ${t}, ${t}_sampler, ${n}, ${i} )`:`textureSample( ${t}, ${t}_sampler, ${n} )`:this.isFilteredTexture(e)?this.generateFilteredTexture(e,t,n):this.generateTextureLod(e,t,n,i,"0")}_generateVideoSample(e,t,n=this.shaderStage){if(n==="fragment")return`textureSampleBaseClampToEdge( ${e}, ${e}_sampler, vec2<f32>( ${t}.x, 1.0 - ${t}.y ) )`;console.error(`WebGPURenderer: THREE.VideoTexture does not support ${n} shader.`)}_generateTextureSampleLevel(e,t,n,i,s,a=this.shaderStage){return(a==="fragment"||a==="compute")&&this.isUnfilterable(e)===!1?`textureSampleLevel( ${t}, ${t}_sampler, ${n}, ${i} )`:this.isFilteredTexture(e)?this.generateFilteredTexture(e,t,n,i):this.generateTextureLod(e,t,n,s,i)}generateWrapFunction(e){const t=`tsl_coord_${om[e.wrapS]}S_${om[e.wrapT]}_${e.isData3DTexture?"3d":"2d"}T`;let n=Am[t];if(n===void 0){const i=[],s=e.isData3DTexture?"vec3f":"vec2f";let a=`fn ${t}( coord : ${s} ) -> ${s} { 264 265 return ${s}( 266`;const u=(f,m)=>{f===Mc?(i.push(Ti.repeatWrapping_float),a+=` tsl_repeatWrapping_float( coord.${m} )`):f===Dd?(i.push(Ti.clampWrapping_float),a+=` tsl_clampWrapping_float( coord.${m} )`):f===Ec?(i.push(Ti.mirrorWrapping_float),a+=` tsl_mirrorWrapping_float( coord.${m} )`):(a+=` coord.${m}`,console.warn(`WebGPURenderer: Unsupported texture wrap type "${f}" for vertex shader.`))};u(e.wrapS,"x"),a+=`, 267`,u(e.wrapT,"y"),e.isData3DTexture&&(a+=`, 268`,u(e.wrapR,"z")),a+=` 269 ); 270 271} 272`,Am[t]=n=new On(a,i)}return n.build(this),t}generateArrayDeclaration(e,t){return`array< ${this.getType(e)}, ${t} >`}generateTextureDimension(e,t,n){const i=this.getDataFromNode(e,this.shaderStage,this.globalCache);i.dimensionsSnippet===void 0&&(i.dimensionsSnippet={});let s=i.dimensionsSnippet[n];if(i.dimensionsSnippet[n]===void 0){let a,u;const{primarySamples:f}=this.renderer.backend.utils.getTextureSampleData(e),m=f>1;e.isData3DTexture?u="vec3<u32>":u="vec2<u32>",m||e.isVideoTexture||e.isStorageTexture?a=t:a=`${t}${n?`, u32( ${n} )`:""}`,s=new h1(new d1(`textureDimensions( ${a} )`,u)),i.dimensionsSnippet[n]=s,(e.isDataArrayTexture||e.isData3DTexture)&&(i.arrayLayerCount=new h1(new d1(`textureNumLayers(${t})`,"u32"))),e.isTextureCube&&(i.cubeFaceCount=new h1(new d1("6u","u32")))}return s.build(this)}generateFilteredTexture(e,t,n,i="0u"){this._include("biquadraticTexture");const s=this.generateWrapFunction(e),a=this.generateTextureDimension(e,t,i);return`tsl_biquadraticTexture( ${t}, ${s}( ${n} ), ${a}, u32( ${i} ) )`}generateTextureLod(e,t,n,i,s="0u"){const a=this.generateWrapFunction(e),u=this.generateTextureDimension(e,t,s),f=e.isData3DTexture?"vec3":"vec2",m=`${f}<u32>(${a}(${n}) * ${f}<f32>(${u}))`;return this.generateTextureLoad(e,t,m,i,s)}generateTextureLoad(e,t,n,i,s="0u"){return e.isVideoTexture===!0||e.isStorageTexture===!0?`textureLoad( ${t}, ${n} )`:i?`textureLoad( ${t}, ${n}, ${i}, u32( ${s} ) )`:`textureLoad( ${t}, ${n}, u32( ${s} ) )`}generateTextureStore(e,t,n,i){return`textureStore( ${t}, ${n}, ${i} )`}isSampleCompare(e){return e.isDepthTexture===!0&&e.compareFunction!==null}isUnfilterable(e){return this.getComponentTypeFromTexture(e)!=="float"||!this.isAvailable("float32Filterable")&&e.isDataTexture===!0&&e.type===wi||this.isSampleCompare(e)===!1&&e.minFilter===Ws&&e.magFilter===Ws||this.renderer.backend.utils.getTextureSampleData(e).primarySamples>1}generateTexture(e,t,n,i,s=this.shaderStage){let a=null;return e.isVideoTexture===!0?a=this._generateVideoSample(t,n,s):this.isUnfilterable(e)?a=this.generateTextureLod(e,t,n,i,"0",s):a=this._generateTextureSample(e,t,n,i,s),a}generateTextureGrad(e,t,n,i,s,a=this.shaderStage){if(a==="fragment")return`textureSampleGrad( ${t}, ${t}_sampler, ${n}, ${i[0]}, ${i[1]} )`;console.error(`WebGPURenderer: THREE.TextureNode.gradient() does not support ${a} shader.`)}generateTextureCompare(e,t,n,i,s,a=this.shaderStage){if(a==="fragment")return`textureSampleCompare( ${t}, ${t}_sampler, ${n}, ${i} )`;console.error(`WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${a} shader.`)}generateTextureLevel(e,t,n,i,s,a=this.shaderStage){let u=null;return e.isVideoTexture===!0?u=this._generateVideoSample(t,n,a):u=this._generateTextureSampleLevel(e,t,n,i,s,a),u}generateTextureBias(e,t,n,i,s,a=this.shaderStage){if(a==="fragment")return`textureSampleBias( ${t}, ${t}_sampler, ${n}, ${i} )`;console.error(`WebGPURenderer: THREE.TextureNode.biasNode does not support ${a} shader.`)}getPropertyName(e,t=this.shaderStage){if(e.isNodeVarying===!0&&e.needsInterpolation===!0){if(t==="vertex")return`varyings.${e.name}`}else if(e.isNodeUniform===!0){const n=e.name,i=e.type;return i==="texture"||i==="cubeTexture"||i==="storageTexture"||i==="texture3D"?n:i==="buffer"||i==="storageBuffer"||i==="indirectStorageBuffer"?this.isCu
272stomStruct(e)?n:n+".value":e.groupNode.name+"."+n}return super.getPropertyName(e)}getOutputStructName(){return"output"}_getUniformGroupCount(e){return Object.keys(this.uniforms[e]).length}getFunctionOperator(e){const t=hG[e];return t!==void 0?(this._include(t),t):null}getNodeAccess(e,t){return t!=="compute"?Tr.READ_ONLY:e.access}getStorageAccess(e,t){return fG[this.getNodeAccess(e,t)]}getUniformFromNode(e,t,n,i=null){const s=super.getUniformFromNode(e,t,n,i),a=this.getDataFromNode(e,n,this.globalCache);if(a.uniformGPU===void 0){let u;const f=e.groupNode,m=f.name,y=this.getBindGroupArray(m,n);if(t==="texture"||t==="cubeTexture"||t==="storageTexture"||t==="texture3D"){let _=null;const b=this.getNodeAccess(e,n);if(t==="texture"||t==="storageTexture"?_=new i2(s.name,s.node,f,b):t==="cubeTexture"?_=new v_(s.name,s.node,f,b):t==="texture3D"&&(_=new __(s.name,s.node,f,b)),_.store=e.isStorageTextureNode===!0,_.setVisibility(ju[n]),(n==="fragment"||n==="compute")&&this.isUnfilterable(e.value)===!1&&_.store===!1){const w=new JO(`${s.name}_sampler`,s.node,f);w.setVisibility(ju[n]),y.push(w,_),u=[w,_]}else y.push(_),u=[_]}else if(t==="buffer"||t==="storageBuffer"||t==="indirectStorageBuffer"){const _=t==="buffer"?g_:nG,b=new _(e,f);b.setVisibility(ju[n]),y.push(b),u=b,s.name=i||"NodeBuffer_"+s.id}else{const _=this.uniformGroups[n]||(this.uniformGroups[n]={});let b=_[m];b===void 0&&(b=new y_(m,f),b.setVisibility(ju[n]),_[m]=b,y.push(b)),u=this.getNodeUniform(s,t),b.addUniform(u)}a.uniformGPU=u}return s}getBuiltin(e,t,n,i=this.shaderStage){const s=this.builtins[i]||(this.builtins[i]=new Map);return s.has(e)===!1&&s.set(e,{name:e,property:t,type:n}),t}hasBuiltin(e,t=this.shaderStage){return this.builtins[t]!==void 0&&this.builtins[t].has(e)}getVertexIndex(){return this.shaderStage==="vertex"?this.getBuiltin("vertex_index","vertexIndex","u32","attribute"):"vertexIndex"}buildFunctionCode(e){const t=e.layout,n=this.flowShaderNode(e),i=[];for(const a of t.inputs)i.push(a.name+" : "+this.getType(a.type));let s=`fn ${t.name}( ${i.join(", ")} ) -> ${this.getType(t.type)} { 273${n.vars} 274${n.code} 275`;return n.result&&(s+=` return ${n.result}; 276`),s+=` 277} 278`,s}getInstanceIndex(){return this.shaderStage==="vertex"?this.getBuiltin("instance_index","instanceIndex","u32","attribute"):"instanceIndex"}getInvocationLocalIndex(){return this.getBuiltin("local_invocation_index","invocationLocalIndex","u32","attribute")}getSubgroupSize(){return this.enableSubGroups(),this.getBuiltin("subgroup_size","subgroupSize","u32","attribute")}getInvocationSubgroupIndex(){return this.enableSubGroups(),this.getBuiltin("subgroup_invocation_id","invocationSubgroupIndex","u32","attribute")}getSubgroupIndex(){return this.enableSubGroups(),this.getBuiltin("subgroup_id","subgroupIndex","u32","attribute")}getDrawIndex(){return null}getFrontFacing(){return this.getBuiltin("front_facing","isFront","bool")}getFragCoord(){return this.getBuiltin("position","fragCoord","vec4<f32>")+".xy"}getFragDepth(){return"output."+this.getBuiltin("frag_depth","depth","f32","output")}getClipDistance(){return"varyings.hw_clip_distances"}isFlipY(){return!1}enableDirective(e,t=this.shaderStage){(this.directives[t]||(this.directives[t]=new Set)).add(e)}getDirectives(e){const t=[],n=this.directives[e];if(n!==void 0)for(const i of n)t.push(`enable ${i};`);return t.join(` 279`)}enableSubGroups(){this.enableDirective("subgroups")}enableSubgroupsF16(){this.enableDirective("subgroups-f16")}enableClipDistances(){this.enableDirective("clip_distances")}enableShaderF16(){this.enableDirective("f16")}enableDualSourceBlending(){this.enableDirective("dual_source_blending")}enableHardwareClipping(e){this.enableClipDistances(),this.getBuiltin("clip_distances","hw_clip_distances",`array<f32, ${e} >`,"vertex")}getBuiltins(e){const t=[],n=this.builtins[e];if(n!==void 0)for(const{name:i,property:s,type:a}of n.values())t.push(`@builtin( ${i} ) ${s} : ${a}`);return t.join(`, 280 `)}getScopedArray(e,t,n,i){return this.scopedArrays.has(e)===!1&&this.scopedArrays.set(e,{name:e,scope:t,bufferType:n,bufferCount:i}),e}getScopedArrays(e){if(e!=="compute")return;const t=[];for(const{name:n,scope:i,bufferType:s,bufferCount:a}of this.scopedArrays.values()){const u=this.getType(s);t.push(`var<${i}> ${n}: array< ${u}, ${a} >;`)}return t.join(` 281`)}getAttributes(e){const t=[];if(e==="compute"&&(this.getBuiltin("global_invocation_id","globalId","vec3<u32>","attribute"),this.getBuiltin("workgroup_id","workgroupId","vec3<u32>","attribute"),this.getBuiltin("local_invocation_id","localId","vec3<u32>","attribute"),this.getBuiltin("num_workgroups","numWorkgroups","vec3<u32>","attribute"),this.renderer.hasFeature("subgroups")&&(this.enableDirective("subgroups",e),this.getBuiltin("subgroup_size","subgroupSize","u32","attribute"))),e==="vertex"||e==="compute"){const n=this.getBuiltins("attribute");
281n&&t.push(n);const i=this.getAttributesArray();for(let s=0,a=i.length;s<a;s++){const u=i[s],f=u.name,m=this.getType(u.type);t.push(`@location( ${s} ) ${f} : ${m}`)}}return t.join(`, 282 `)}getStructMembers(e){const t=[];for(const n of e.members){const i=e.output?"@location( "+n.index+" ) ":"";let s=this.getType(n.type);n.atomic&&(s="atomic< "+s+" >"),t.push(` ${i+n.name} : ${s}`)}return t.join(`, 283`)}getStructs(e){let t="";const n=this.structs[e];if(n.length>0){const i=[];for(const s of n){let a=`struct ${s.name} { 284`;a+=this.getStructMembers(s),a+=` 285};`,i.push(a)}t=` 286`+i.join(` 287 288`)+` 289`}return t}getVar(e,t,n=null){let i=`var ${t} : `;return n!==null?i+=this.generateArrayDeclaration(e,n):i+=this.getType(e),i}getVars(e){const t=[],n=this.vars[e];if(n!==void 0)for(const i of n)t.push(` ${this.getVar(i.type,i.name,i.count)};`);return` 290${t.join(` 291`)} 292`}getVaryings(e){const t=[];if(e==="vertex"&&this.getBuiltin("position","Vertex","vec4<f32>","vertex"),e==="vertex"||e==="fragment"){const s=this.varyings,a=this.vars[e];for(let u=0;u<s.length;u++){const f=s[u];if(f.needsInterpolation){let m=`@location( ${u} )`;/^(int|uint|ivec|uvec)/.test(f.type)&&(m+=" @interpolate( flat )"),t.push(`${m} ${f.name} : ${this.getType(f.type)}`)}else e==="vertex"&&a.includes(f)===!1&&a.push(f)}}const n=this.getBuiltins(e);n&&t.push(n);const i=t.join(`, 293 `);return e==="vertex"?this._getWGSLStruct("VaryingsStruct"," "+i):i}isCustomStruct(e){return e.value.isStorageBufferAttribute&&e.node.structTypeNode!==null}getUniforms(e){const t=this.uniforms[e],n=[],i=[],s=[],a={};for(const f of t){const m=f.groupNode.name,y=this.bindingsIndexes[m];if(f.type==="texture"||f.type==="cubeTexture"||f.type==="storageTexture"||f.type==="texture3D"){const _=f.node.value;(e==="fragment"||e==="compute")&&this.isUnfilterable(_)===!1&&f.node.isStorageTextureNode!==!0&&(this.isSampleCompare(_)?n.push(`@binding( ${y.binding++} ) @group( ${y.group} ) var ${f.name}_sampler : sampler_comparison;`):n.push(`@binding( ${y.binding++} ) @group( ${y.group} ) var ${f.name}_sampler : sampler;`));let b,w="";const{primarySamples:S}=this.renderer.backend.utils.getTextureSampleData(_);if(S>1&&(w="_multisampled"),_.isCubeTexture===!0)b="texture_cube<f32>";else if(_.isDataArrayTexture===!0||_.isCompressedArrayTexture===!0)b="texture_2d_array<f32>";else if(_.isDepthTexture===!0)b=`texture_depth${w}_2d`;else if(_.isVideoTexture===!0)b="texture_external";else if(_.isData3DTexture===!0)b="texture_3d<f32>";else if(f.node.isStorageTextureNode===!0){const E=yd(_),R=this.getStorageAccess(f.node,e);b=`texture_storage_2d<${E}, ${R}>`}else{const E=this.getComponentTypeFromTexture(_).charAt(0);b=`texture${w}_2d<${E}32>`}n.push(`@binding( ${y.binding++} ) @group( ${y.group} ) var ${f.name} : ${b};`)}else if(f.type==="buffer"||f.type==="storageBuffer"||f.type==="indirectStorageBuffer"){const _=f.node,b=this.getType(_.getNodeType(this)),w=_.bufferCount,S=w>0&&f.type==="buffer"?", "+w:"",E=_.isStorageBufferNode?`storage, ${this.getStorageAccess(_,e)}`:"uniform";if(this.isCustomStruct(f))i.push(`@binding( ${y.binding++} ) @group( ${y.group} ) var<${E}> ${f.name} : ${b};`);else{const P=` value : array< ${_.isAtomic?`atomic<${b}>`:`${b}`}${S} >`;i.push(this._getWGSLStructBinding(f.name,P,E,y.binding++,y.group))}}else{const _=this.getType(this.getVectorType(f.type)),b=f.groupNode.name;(a[b]||(a[b]={index:y.binding++,id:y.group,snippets:[]})).snippets.push(` ${f.name} : ${_}`)}}for(const f in a){const m=a[f];s.push(this._getWGSLStructBinding(f,m.snippets.join(`, 294`),"uniform",m.index,m.id))}let u=n.join(` 295`);return u+=i.join(` 296`),u+=s.join(` 297`),u}buildCode(){const e=this.material!==null?{fragment:{},vertex:{}}:{compute:{}};this.sortBindingGroups();for(const t in e){this.shaderStage=t;const n=e[t];n.uniforms=this.getUniforms(t),n.attributes=this.getAttributes(t),n.varyings=this.getVaryings(t),n.structs=this.getStructs(t),n.vars=this.getVars(t),n.codes=this.getCodes(t),n.directives=this.getDirectives(t),n.scopedArrays=this.getScopedArrays(t);let i=`// code 298 299`;i+=this.flowCode[t];const s=this.flowNodes[t],a=s[s.length-1],u=a.outputNode,f=u!==void 0&&u.isOutputStructNode===!0;for(const m of s){const y=this.getFlowData(m),_=m.name;if(_&&(i.length>0&&(i+=` 300`),i+=` // flow -> ${_} 301`),i+=`${y.code} 302 `,m===a&&t!=="compute"){if(i+=`// result 303 304 `,t==="vertex")i+=`varyings.Vertex = ${y.result};`;else if(t==="fragment")if(f)n.returnType=u.getNodeType(this),n.structs+="var<private> output : "+n.returnType+";",i+=`return ${y.result};`;else{let b=" @location(0) color: vec4<f32>";const w=this.getBuiltins("output");w&&(b+=`, 305 `+w),n.returnType="OutputStruct",n.structs+=this._getWGSLStruct("OutputStruct",b),n.structs+=` 306var<private> output : OutputStruct;`,i+=`output.color = ${y.result}; 307 308 return output;`}}}n.flow=i}this.shaderStage=null,this.material!==null?(this.vertexShader=this._getWGSLVertexCode(e.vertex),this.fragmentShader=this._getWGSLFragmentCode(e.fragment)):this.computeShader=this._getWGSLComputeCode(e.compute,(this.object.workgroupSize||[64]).join(", "))}getMethod(e,t=null){let n;return t!==null&&(n=this._getWGSLMethod(e+"_"+t)),n===void 0&&(n=this._getWGSLMethod(e)),n||e}getType(e){return dG[e]||e}isAvailable(e){let t=am[e];return t===void 0&&(e==="float32Filterable"?t=this.renderer.hasFeature("float32-filterable"):e==="clipDistance"&&(t=this.renderer.hasFeature("clip-distances")),am[e]=t),t}_getWGSLMethod(e){return Ti[e]!==void 0&&this._include(e),B0[e]}_include(e){const t=Ti[e];return t.build(this),this.currentFunctionNode!==null&&this.currentFunctionNode.includes.push(t),t}
308_getWGSLVertexCode(e){return`${this.getSignature()} 309// directives 310${e.directives} 311 312// structs 313${e.structs} 314 315// uniforms 316${e.uniforms} 317 318// varyings 319${e.varyings} 320var<private> varyings : VaryingsStruct; 321 322// codes 323${e.codes} 324 325@vertex 326fn main( ${e.attributes} ) -> VaryingsStruct { 327 328 // vars 329 ${e.vars} 330 331 // flow 332 ${e.flow} 333 334 return varyings; 335 336} 337`}_getWGSLFragmentCode(e){return`${this.getSignature()} 338// global 339${T_} 340 341// structs 342${e.structs} 343 344// uniforms 345${e.uniforms} 346 347// codes 348${e.codes} 349 350@fragment 351fn main( ${e.varyings} ) -> ${e.returnType} { 352 353 // vars 354 ${e.vars} 355 356 // flow 357 ${e.flow} 358 359} 360`}_getWGSLComputeCode(e,t){return`${this.getSignature()} 361// directives 362${e.directives} 363 364// system 365var<private> instanceIndex : u32; 366 367// locals 368${e.scopedArrays} 369 370// structs 371${e.structs} 372 373// uniforms 374${e.uniforms} 375 376// codes 377${e.codes} 378 379@compute @workgroup_size( ${t} ) 380fn main( ${e.attributes} ) { 381 382 // system 383 instanceIndex = globalId.x + globalId.y * numWorkgroups.x * u32(${t}) + globalId.z * numWorkgroups.x * numWorkgroups.y * u32(${t}); 384 385 // vars 386 ${e.vars} 387 388 // flow 389 ${e.flow} 390 391} 392`}_getWGSLStruct(e,t){return` 393struct ${e} { 394${t} 395};`}_getWGSLStructBinding(e,t,n,i=0,s=0){const a=e+"Struct";return`${this._getWGSLStruct(a,t)} 396@binding( ${i} ) @group( ${s} ) 397var<${n}> ${e} : ${a};`}}class mG{constructor(e){this.backend=e}getCurrentDepthStencilFormat(e){let t;return e.depthTexture!==null?t=this.getTextureFormatGPU(e.depthTexture):e.depth&&e.stencil?t=re.Depth24PlusStencil8:e.depth&&(t=re.Depth24Plus),t}getTextureFormatGPU(e){return this.backend.get(e).format}getTextureSampleData(e){let t;if(e.isFramebufferTexture)t=1;else if(e.isDepthTexture&&!e.renderTarget){const s=this.backend.renderer,a=s.getRenderTarget();t=a?a.samples:s.samples}else e.renderTarget&&(t=e.renderTarget.samples);t=t||1;const n=t>1&&e.renderTarget!==null&&e.isDepthTexture!==!0&&e.isFramebufferTexture!==!0;return{samples:t,primarySamples:n?1:t,isMSAA:n}}getCurrentColorFormat(e){let t;return e.textures!==null?t=this.getTextureFormatGPU(e.textures[0]):t=this.getPreferredCanvasFormat(),t}getCurrentColorSpace(e){return e.textures!==null?e.textures[0].colorSpace:this.backend.renderer.outputColorSpace}getPrimitiveTopology(e,t){if(e.isPoints)return xA.PointList;if(e.isLineSegments||e.isMesh&&t.wireframe===!0)return xA.LineList;if(e.isLine)return xA.LineStrip;if(e.isMesh)return xA.TriangleList}getSampleCount(e){let t=1;return e>1&&(t=Math.pow(2,Math.floor(Math.log2(e))),t===2&&(t=4)),t}getSampleCountRenderContext(e){return e.textures!==null?this.getSampleCount(e.sampleCount):this.getSampleCount(this.backend.renderer.samples)}getPreferredCanvasFormat(){const e=this.backend.parameters.outputType;if(e===void 0)return navigator.gpu.getPreferredCanvasFormat();if(e===ms)return re.BGRA8Unorm;if(e===Mi)return re.RGBA16Float;throw new Error("Unsupported outputType")}}const gG=new Map([[Int8Array,["sint8","snorm8"]],[Uint8Array,["uint8","unorm8"]],[Int16Array,["sint16","snorm16"]],[Uint16Array,["uint16","unorm16"]],[Int32Array,["sint32","snorm32"]],[Uint32Array,["uint32","unorm32"]],[Float32Array,["float32"]]]),yG=new Map([[g7,["float16"]]]),vG=new Map([[Int32Array,"sint32"],[Int16Array,"sint32"],[Uint32Array,"uint32"],[Uint16Array,"uint32"],[Float32Array,"float32"]]);class _G{constructor(e){this.backend=e}createAttribute(e,t){const n=this._getBufferAttribute(e),i=this.backend,s=i.get(n);let a=s.buffer;if(a===void 0){const u=i.device;let f=n.array;if(e.normalized===!1){if(f.constructor===Int16Array)f=new Int32Array(f);else if(f.constructor===Uint16Array&&(f=new Uint32Array(f),t&GPUBufferUsage.INDEX))for(let y=0;y<f.length;y++)f[y]===65535&&(f[y]=4294967295)}if(n.array=f,(n.isStorageBufferAttribute||n.isStorageInstancedBufferAttribute)&&n.itemSize===3){f=new f.constructor(n.count*4);for(let y=0;y<n.count;y++)f.set(n.array.subarray(y*3,y*3+3),y*4);n.itemSize=4,n.array=f}const m=f.byteLength+(4-f.byteLength%4)%4;a=u.createBuffer({label:n.name,size:m,usage:t,mappedAtCreation:!0}),new f.constructor(a.getMappedRange()).set(f),a.unmap(),s.buffer=a}}updateAttribute(e){const t=this._getBufferAttribute(e),n=this.backend,i=n.device,s=n.get(t).buffer,a=t.array,u=this._isTypedArray(a),f=t.updateRanges;if(f.length===0)i.queue.writeBuffer(s,0,a,0);else{const m=u?1:a.BYTES_PER_ELEMENT;for(let y=0,_=f.length;y<_;y++){const b=f[y],w=b.start*m,S=b.count*m;i.queue.writeBuffer(s,0,a,w,S)}t.clearUpdateRanges()}}createShaderVertexBuffers(e){const t=e.getAttributes(),n=new Map;for(let i=0;i<t.length;i++){const s=t[i],a=s.array.BYTES_PER_ELEMENT,u=this._getBufferAttribute(s);let f=n.get(u);if(f===void 0){let _,b;s.isInterleavedBufferAttribute===!0?(_=s.data.stride*a,b=s.data.isInstancedInterleavedBuffer?zu.Instance:zu.Vertex):(_=s.itemSize*a,b=s.isInstancedBufferAttribute?zu.Instance:zu.Vertex),s.normalized===!1&&(s.array.constructor===Int16Array||s.array.
397constructor===Uint16Array)&&(_=4),f={arrayStride:_,attributes:[],stepMode:b},n.set(u,f)}const m=this._getVertexFormat(s),y=s.isInterleavedBufferAttribute===!0?s.offset*a:0;f.attributes.push({shaderLocation:i,offset:y,format:m})}return Array.from(n.values())}destroyAttribute(e){const t=this.backend;t.get(this._getBufferAttribute(e)).buffer.destroy(),t.delete(e)}async getArrayBufferAsync(e){const t=this.backend,n=t.device,s=t.get(this._getBufferAttribute(e)).buffer,a=s.size,u=n.createBuffer({label:`${e.name}_readback`,size:a,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}),f=n.createCommandEncoder({label:`readback_encoder_${e.name}`});f.copyBufferToBuffer(s,0,u,0,a);const m=f.finish();n.queue.submit([m]),await u.mapAsync(GPUMapMode.READ);const y=u.getMappedRange(),_=new e.array.constructor(y.slice(0));return u.unmap(),_.buffer}_getVertexFormat(e){const{itemSize:t,normalized:n}=e,i=e.array.constructor,s=e.constructor;let a;if(t===1)a=vG.get(i);else{const f=(yG.get(s)||gG.get(i))[n?1:0];if(f){const m=i.BYTES_PER_ELEMENT*t,_=Math.floor((m+3)/4)*4/i.BYTES_PER_ELEMENT;if(_%1)throw new Error("THREE.WebGPUAttributeUtils: Bad vertex format item size.");a=`${f}x${_}`}}return a||console.error("THREE.WebGPUAttributeUtils: Vertex format not supported yet."),a}_isTypedArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}_getBufferAttribute(e){return e.isInterleavedBufferAttribute&&(e=e.data),e}}class xG{constructor(e){this.backend=e,this.bindGroupLayoutCache=new WeakMap}createBindingsLayout(e){const t=this.backend,n=t.device,i=[];let s=0;for(const a of e.bindings){const u={binding:s++,visibility:a.visibility};if(a.isUniformBuffer||a.isStorageBuffer){const f={};a.isStorageBuffer&&(a.visibility&4&&(a.access===Tr.READ_WRITE||a.access===Tr.WRITE_ONLY)?f.type=Ff.Storage:f.type=Ff.ReadOnlyStorage),u.buffer=f}else if(a.isSampler){const f={};a.texture.isDepthTexture&&a.texture.compareFunction!==null&&(f.type="comparison"),u.sampler=f}else if(a.isSampledTexture&&a.texture.isVideoTexture)u.externalTexture={};else if(a.isSampledTexture&&a.store){const f={};f.format=this.backend.get(a.texture).texture.format;const m=a.access;m===Tr.READ_WRITE?f.access=Df.ReadWrite:m===Tr.WRITE_ONLY?f.access=Df.WriteOnly:f.access=Df.ReadOnly,u.storageTexture=f}else if(a.isSampledTexture){const f={},{primarySamples:m}=t.utils.getTextureSampleData(a.texture);if(m>1&&(f.multisampled=!0,a.texture.isDepthTexture||(f.sampleType=rA.UnfilterableFloat)),a.texture.isDepthTexture)f.sampleType=rA.Depth;else if(a.texture.isDataTexture||a.texture.isDataArrayTexture||a.texture.isData3DTexture){const y=a.texture.type;y===Fr?f.sampleType=rA.SInt:y===fr?f.sampleType=rA.UInt:y===wi&&(this.backend.hasFeature("float32-filterable")?f.sampleType=rA.Float:f.sampleType=rA.UnfilterableFloat)}a.isSampledCubeTexture?f.viewDimension=jr.Cube:a.texture.isDataArrayTexture||a.texture.isCompressedArrayTexture?f.viewDimension=jr.TwoDArray:a.isSampledTexture3D&&(f.viewDimension=jr.ThreeD),u.texture=f}else console.error(`WebGPUBindingUtils: Unsupported binding "${a}".`);i.push(u)}return n.createBindGroupLayout({entries:i})}createBindings(e,t,n,i=0){const{backend:s,bindGroupLayoutCache:a}=this,u=s.get(e);let f=a.get(e.bindingsReference);f===void 0&&(f=this.createBindingsLayout(e),a.set(e.bindingsReference,f));let m;n>0&&(u.groups===void 0&&(u.groups=[],u.versions=[]),u.versions[n]===i&&(m=u.groups[n])),m===void 0&&(m=this.createBindGroup(e,f),n>0&&(u.groups[n]=m,u.versions[n]=i)),u.group=m,u.layout=f}updateBinding(e){const t=this.backend,n=t.device,i=e.buffer,s=t.get(e).buffer;n.queue.writeBuffer(s,0,i,0)}createBindGroupIndex(e,t){const i=this.backend.device,s=GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST,a=e[0],u=i.createBuffer({label:"bindingCameraIndex_"+a,size:16,usage:s});i.queue.writeBuffer(u,0,e,0);const f=[{binding:0,resource:{buffer:u}}];return i.createBindGroup({label:"bindGroupCameraIndex_"+a,layout:t,entries:f})}createBindGroup(e,t){const n=this.backend,i=n.device;let s=0;const a=[];for(const u of e.bindings){if(u.isUniformBuffer){const f=n.get(u);if(f.buffer===void 0){const m=u.byteLength,y=GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST,_=i.createBuffer({label:"bindingBuffer_"+u.name,size:m,usage:y});f.buffer=_}a.push({binding:s,resource:{buffer:f.buffer}})}else if(u.isStorageBuffer){const f=n.get(u);if(f.buffer===void 0){const m=u.attribute;f.buffer=n.get(m).buffer}a.push({binding:s,resource:{buffer:f.buffer}})}else if(u.isSampler){const f=n.get(u.texture);a.push({binding:s,resource:f.sampler})}else if(u.isSampledTexture){const f=n.get(u.texture);let m;if(f.externalTexture!==void 0)m=i.importExternalTexture({source:f.externalTexture});else{const y=u.store?1:f.texture.mipLevelCount,_=`view-${f.texture.width}-${f.texture.height}-${y}`;if(m=f[_],m===void 0){const b=KO.All;let w;u.isSampledCubeTexture?w=jr.Cube:u.isSampledTexture3D?w=jr.ThreeD:u.texture.isDataArrayTexture||u.texture.isCompressedArrayTexture?w=jr.TwoDArray:w=jr.TwoD,m=f[_]=f.texture.createView({aspect:b,dimension:w,mipLevelCount:y})}}a.push({binding:s,resource:m})}s++}return i.createBindGroup({label:"bindGroup_"+e.name,layout:t,entries:a})}}class bG{constructor(e){this.backend=e}
397_getSampleCount(e){return this.backend.utils.getSampleCountRenderContext(e)}createRenderPipeline(e,t){const{object:n,material:i,geometry:s,pipeline:a}=e,{vertexProgram:u,fragmentProgram:f}=a,m=this.backend,y=m.device,_=m.utils,b=m.get(a),w=[];for(const ne of e.getBindings()){const ae=m.get(ne);w.push(ae.layout)}const S=m.attributeUtils.createShaderVertexBuffers(e);let E;i.transparent===!0&&i.blending!==Y0&&(E=this._getBlending(i));let R={};i.stencilWrite===!0&&(R={compare:this._getStencilCompare(i),failOp:this._getStencilOperation(i.stencilFail),depthFailOp:this._getStencilOperation(i.stencilZFail),passOp:this._getStencilOperation(i.stencilZPass)});const P=this._getColorWriteMask(i),L=[];if(e.context.textures!==null){const ne=e.context.textures;for(let ae=0;ae<ne.length;ae++){const J=_.getTextureFormatGPU(ne[ae]);L.push({format:J,blend:E,writeMask:P})}}else{const ne=_.getCurrentColorFormat(e.context);L.push({format:ne,blend:E,writeMask:P})}const D=m.get(u).module,O=m.get(f).module,G=this._getPrimitiveState(n,s,i),U=this._getDepthCompare(i),j=_.getCurrentDepthStencilFormat(e.context),V=this._getSampleCount(e.context),Q={label:`renderPipeline_${i.name||i.type}_${i.id}`,vertex:Object.assign({},D,{buffers:S}),fragment:Object.assign({},O,{targets:L}),primitive:G,multisample:{count:V,alphaToCoverageEnabled:i.alphaToCoverage&&V>1},layout:y.createPipelineLayout({bindGroupLayouts:w})},Z={},K=e.context.depth,Y=e.context.stencil;if((K===!0||Y===!0)&&(K===!0&&(Z.format=j,Z.depthWriteEnabled=i.depthWrite,Z.depthCompare=U),Y===!0&&(Z.stencilFront=R,Z.stencilBack={},Z.stencilReadMask=i.stencilFuncMask,Z.stencilWriteMask=i.stencilWriteMask),Q.depthStencil=Z),t===null)b.pipeline=y.createRenderPipeline(Q);else{const ne=new Promise(ae=>{y.createRenderPipelineAsync(Q).then(J=>{b.pipeline=J,ae()})});t.push(ne)}}createBundleEncoder(e){const t=this.backend,{utils:n,device:i}=t,s=n.getCurrentDepthStencilFormat(e),a=n.getCurrentColorFormat(e),u=this._getSampleCount(e),f={label:"renderBundleEncoder",colorFormats:[a],depthStencilFormat:s,sampleCount:u};return i.createRenderBundleEncoder(f)}createComputePipeline(e,t){const n=this.backend,i=n.device,s=n.get(e.computeProgram).module,a=n.get(e),u=[];for(const f of t){const m=n.get(f);u.push(m.layout)}a.pipeline=i.createComputePipeline({compute:s,layout:i.createPipelineLayout({bindGroupLayouts:u})})}_getBlending(e){let t,n;const i=e.blending,s=e.blendSrc,a=e.blendDst,u=e.blendEquation;if(i===Ym){const f=e.blendSrcAlpha!==null?e.blendSrcAlpha:s,m=e.blendDstAlpha!==null?e.blendDstAlpha:a,y=e.blendEquationAlpha!==null?e.blendEquationAlpha:u;t={srcFactor:this._getBlendFactor(s),dstFactor:this._getBlendFactor(a),operation:this._getBlendOperation(u)},n={srcFactor:this._getBlendFactor(f),dstFactor:this._getBlendFactor(m),operation:this._getBlendOperation(y)}}else{const f=e.premultipliedAlpha,m=(y,_,b,w)=>{t={srcFactor:y,dstFactor:_,operation:Aa.Add},n={srcFactor:b,dstFactor:w,operation:Aa.Add}};if(f)switch(i){case qo:m(ft.One,ft.OneMinusSrcAlpha,ft.One,ft.OneMinusSrcAlpha);break;case T1:m(ft.One,ft.One,ft.One,ft.One);break;case b1:m(ft.Zero,ft.OneMinusSrc,ft.Zero,ft.One);break;case x1:m(ft.Zero,ft.Src,ft.Zero,ft.SrcAlpha);break}else switch(i){case qo:m(ft.SrcAlpha,ft.OneMinusSrcAlpha,ft.One,ft.OneMinusSrcAlpha);break;case T1:m(ft.SrcAlpha,ft.One,ft.SrcAlpha,ft.One);break;case b1:m(ft.Zero,ft.OneMinusSrc,ft.Zero,ft.One);break;case x1:m(ft.Zero,ft.Src,ft.Zero,ft.Src);break}}if(t!==void 0&&n!==void 0)return{color:t,alpha:n};console.error("THREE.WebGPURenderer: Invalid blending: ",i)}_getBlendFactor(e){let t;switch(e){case km:t=ft.Zero;break;case Um:t=ft.One;break;case Om:t=ft.Src;break;case $m:t=ft.OneMinusSrc;break;case Gm:t=ft.SrcAlpha;break;case Hm:t=ft.OneMinusSrcAlpha;break;case zm:t=ft.Dst;break;case Wm:t=ft.OneMinusDstColor;break;case jm:t=ft.DstAlpha;break;case Qm:t=ft.OneMinusDstAlpha;break;case Vm:t=ft.SrcAlphaSaturated;break;case pL:t=ft.Constant;break;case mL:t=ft.OneMinusConstant;break;default:console.error("THREE.WebGPURenderer: Blend factor not supported.",e)}return t}_getStencilCompare(e){let t;const n=e.stencilFunc;switch(n){case IT:t=Ar.Never;break;case qT:t=Ar.Always;break;case LT:t=Ar.Less;break;case DT:t=Ar.LessEqual;break;case FT:t=Ar.Equal;break;case BT:t=Ar.GreaterEqual;break;case PT:t=Ar.Greater;break;case CT:t=Ar.NotEqual;break;default:console.error("THREE.WebGPURenderer: Invalid stencil function.",n)}return t}_getStencilOperation(e){let t;switch(e){case $T:t=wo.Keep;break;case jT:t=wo.Zero;break;case zT:t=wo.Replace;break;case VT:t=wo.Invert;break;case GT:t=wo.IncrementClamp;break;case OT:t=wo.DecrementClamp;break;case UT:t=wo.IncrementWrap;break;case kT:t=wo.DecrementWrap;break;default:console.error("THREE.WebGPURenderer: Invalid stencil operation.",t)}return t}_getBlendOperation(e){let t;switch(e){case AA:t=Aa.Add;break;case qm:t=Aa.Subtract;break;case Im:t=Aa.ReverseSubtract;break;case WT:t=Aa.Min;break;case HT:t=Aa.Max;break;default:console.error("THREE.WebGPUPipelineUtils: Blend equation not supported.",e)}return t}_getPrimitiveState(e,t,n){const i={},s=this.backend.utils;switch(i.topology=s.getPrimitiveTopology(e,n),t.index!==null&&e.isLine
397===!0&&e.isLineSegments!==!0&&(i.stripIndexFormat=t.index.array instanceof Uint16Array?OA.Uint16:OA.Uint32),n.side){case Vf:i.frontFace=Cf.CCW,i.cullMode=Pf.Back;break;case Xi:i.frontFace=Cf.CCW,i.cullMode=Pf.Front;break;case Qi:i.frontFace=Cf.CCW,i.cullMode=Pf.None;break;default:console.error("THREE.WebGPUPipelineUtils: Unknown material.side value.",n.side);break}return i}_getColorWriteMask(e){return e.colorWrite===!0?rm.All:rm.None}_getDepthCompare(e){let t;if(e.depthTest===!1)t=Ar.Always;else{const n=e.depthFunc;switch(n){case r7:t=Ar.Never;break;case n7:t=Ar.Always;break;case t7:t=Ar.Less;break;case e7:t=Ar.LessEqual;break;case Jm:t=Ar.Equal;break;case Zm:t=Ar.GreaterEqual;break;case Km:t=Ar.Greater;break;case Xm:t=Ar.NotEqual;break;default:console.error("THREE.WebGPUPipelineUtils: Invalid depth function.",n)}}return t}}class TG extends b_{constructor(e,t,n=2048){super(n),this.device=e,this.type=t,this.querySet=this.device.createQuerySet({type:"timestamp",count:this.maxQueries,label:`queryset_global_timestamp_${t}`});const i=this.maxQueries*8;this.resolveBuffer=this.device.createBuffer({label:`buffer_timestamp_resolve_${t}`,size:i,usage:GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC}),this.resultBuffer=this.device.createBuffer({label:`buffer_timestamp_result_${t}`,size:i,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ})}allocateQueriesForContext(e){if(!this.trackTimestamp||this.isDisposed)return null;if(this.currentQueryIndex+2>this.maxQueries)return Q0(`WebGPUTimestampQueryPool [${this.type}]: Maximum number of queries exceeded, when using trackTimestamp it is necessary to resolves the queries via renderer.resolveTimestampsAsync( THREE.TimestampQuery.${this.type.toUpperCase()} ).`),null;const t=this.currentQueryIndex;return this.currentQueryIndex+=2,this.queryOffsets.set(e.id,t),t}async resolveQueriesAsync(){if(!this.trackTimestamp||this.currentQueryIndex===0||this.isDisposed)return this.lastValue;if(this.pendingResolve)return this.pendingResolve;this.pendingResolve=this._resolveQueries();try{return await this.pendingResolve}finally{this.pendingResolve=null}}async _resolveQueries(){if(this.isDisposed)return this.lastValue;try{if(this.resultBuffer.mapState!=="unmapped")return this.lastValue;const e=new Map(this.queryOffsets),t=this.currentQueryIndex,n=t*8;this.currentQueryIndex=0,this.queryOffsets.clear();const i=this.device.createCommandEncoder();i.resolveQuerySet(this.querySet,0,t,this.resolveBuffer,0),i.copyBufferToBuffer(this.resolveBuffer,0,this.resultBuffer,0,n);const s=i.finish();if(this.device.queue.submit([s]),this.resultBuffer.mapState!=="unmapped")return this.lastValue;if(await this.resultBuffer.mapAsync(GPUMapMode.READ,0,n),this.isDisposed)return this.resultBuffer.mapState==="mapped"&&this.resultBuffer.unmap(),this.lastValue;const a=new BigUint64Array(this.resultBuffer.getMappedRange(0,n));let u=0;for(const[,f]of e){const m=a[f],y=a[f+1],_=Number(y-m)/1e6;u+=_}return this.resultBuffer.unmap(),this.lastValue=u,u}catch(e){return console.error("Error resolving queries:",e),this.resultBuffer.mapState==="mapped"&&this.resultBuffer.unmap(),this.lastValue}}async dispose(){if(!this.isDisposed){if(this.isDisposed=!0,this.pendingResolve)try{await this.pendingResolve}catch(e){console.error("Error waiting for pending resolve:",e)}if(this.resultBuffer&&this.resultBuffer.mapState==="mapped")try{this.resultBuffer.unmap()}catch(e){console.error("Error unmapping buffer:",e)}this.querySet&&(this.querySet.destroy(),this.querySet=null),this.resolveBuffer&&(this.resolveBuffer.destroy(),this.resolveBuffer=null),this.resultBuffer&&(this.resultBuffer.destroy(),this.resultBuffer=null),this.queryOffsets.clear(),this.pendingResolve=null}}}class wG extends x_{constructor(e={}){super(e),this.isWebGPUBackend=!0,this.parameters.alpha=e.alpha===void 0?!0:e.alpha,this.parameters.requiredLimits=e.requiredLimits===void 0?{}:e.requiredLimits,this.trackTimestamp=e.trackTimestamp===!0,this.device=null,this.context=null,this.colorBuffer=null,this.defaultRenderPassdescriptor=null,this.utils=new mG(this),this.attributeUtils=new _G(this),this.bindingUtils=new xG(this),this.pipelineUtils=new bG(this),this.textureUtils=new oG(this),this.occludedResolveCache=new Map}async init(e){await super.init(e);const t=this.parameters;let n;if(t.device===void 0){const a={powerPreference:t.powerPreference},u=typeof navigator<"u"?await navigator.gpu.requestAdapter(a):null;if(u===null)throw new Error("WebGPUBackend: Unable to create WebGPU adapter.");const f=Object.values(gd),m=[];for(const _ of f)u.features.has(_)&&m.push(_);const y={requiredFeatures:m,requiredLimits:t.requiredLimits};n=await u.requestDevice(y)}else n=t.device;n.lost.then(a=>{const u={api:"WebGPU",message:a.message||"Unknown reason",reason:a.reason||null,originalEvent:a};e.onDeviceLost(u)});const i=t.context!==void 0?t.context:e.domElement.getContext("webgpu");this.device=n,this.context=i;const s=t.alpha?"premultiplied":"opaque";this.trackTimestamp=this.trackTimestamp&&this.hasFeature(gd.TimestampQuery),this.context.configure({device:this.device,format:this.utils.getPreferredCanvasF
397ormat(),usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,alphaMode:s}),this.updateSize()}get coordinateSystem(){return VA}async getArrayBufferAsync(e){return await this.attributeUtils.getArrayBufferAsync(e)}getContext(){return this.context}_getDefaultRenderPassDescriptor(){let e=this.defaultRenderPassdescriptor;if(e===null){const n=this.renderer;e={colorAttachments:[{view:null}]},(this.renderer.depth===!0||this.renderer.stencil===!0)&&(e.depthStencilAttachment={view:this.textureUtils.getDepthBuffer(n.depth,n.stencil).createView()});const i=e.colorAttachments[0];this.renderer.samples>0?i.view=this.colorBuffer.createView():i.resolveTarget=void 0,this.defaultRenderPassdescriptor=e}const t=e.colorAttachments[0];return this.renderer.samples>0?t.resolveTarget=this.context.getCurrentTexture().createView():t.view=this.context.getCurrentTexture().createView(),e}_getRenderPassDescriptor(e,t={}){const n=e.renderTarget,i=this.get(n);let s=i.descriptors;if(s===void 0||i.width!==n.width||i.height!==n.height||i.dimensions!==n.dimensions||i.activeMipmapLevel!==n.activeMipmapLevel||i.activeCubeFace!==e.activeCubeFace||i.samples!==n.samples||i.loadOp!==t.loadOp){s={},i.descriptors=s;const f=()=>{n.removeEventListener("dispose",f),this.delete(n)};n.addEventListener("dispose",f)}const a=e.getCacheKey();let u=s[a];if(u===void 0){const f=e.textures,m=[];let y;for(let _=0;_<f.length;_++){const b=this.get(f[_]),w={label:`colorAttachment_${_}`,baseMipLevel:e.activeMipmapLevel,mipLevelCount:1,baseArrayLayer:e.activeCubeFace,arrayLayerCount:1,dimension:jr.TwoD};n.isRenderTarget3D?(y=e.activeCubeFace,w.baseArrayLayer=0,w.dimension=jr.ThreeD,w.depthOrArrayLayers=f[_].image.depth):n.isRenderTargetArray&&(w.dimension=jr.TwoDArray,w.depthOrArrayLayers=f[_].image.depth);const S=b.texture.createView(w);let E,R;b.msaaTexture!==void 0?(E=b.msaaTexture.createView(),R=S):(E=S,R=void 0),m.push({view:E,depthSlice:y,resolveTarget:R,loadOp:Pn.Load,storeOp:xr.Store,...t})}if(u={colorAttachments:m},e.depth){const b={view:this.get(e.depthTexture).texture.createView()};u.depthStencilAttachment=b}s[a]=u,i.width=n.width,i.height=n.height,i.samples=n.samples,i.activeMipmapLevel=e.activeMipmapLevel,i.activeCubeFace=e.activeCubeFace,i.dimensions=n.dimensions,i.depthSlice=y,i.loadOp=m[0].loadOp}return u}beginRender(e){const t=this.get(e),n=this.device,i=e.occlusionQueryCount;let s;i>0&&(t.currentOcclusionQuerySet&&t.currentOcclusionQuerySet.destroy(),t.currentOcclusionQueryBuffer&&t.currentOcclusionQueryBuffer.destroy(),t.currentOcclusionQuerySet=t.occlusionQuerySet,t.currentOcclusionQueryBuffer=t.occlusionQueryBuffer,t.currentOcclusionQueryObjects=t.occlusionQueryObjects,s=n.createQuerySet({type:"occlusion",count:i,label:`occlusionQuerySet_${e.id}`}),t.occlusionQuerySet=s,t.occlusionQueryIndex=0,t.occlusionQueryObjects=new Array(i),t.lastOcclusionObject=null);let a;e.textures===null?a=this._getDefaultRenderPassDescriptor():a=this._getRenderPassDescriptor(e,{loadOp:Pn.Load}),this.initTimestampQuery(e,a),a.occlusionQuerySet=s;const u=a.depthStencilAttachment;if(e.textures!==null){const y=a.colorAttachments;for(let _=0;_<y.length;_++){const b=y[_];e.clearColor?(b.clearValue=_===0?e.clearColorValue:{r:0,g:0,b:0,a:1},b.loadOp=Pn.Clear,b.storeOp=xr.Store):(b.loadOp=Pn.Load,b.storeOp=xr.Store)}}else{const y=a.colorAttachments[0];e.clearColor?(y.clearValue=e.clearColorValue,y.loadOp=Pn.Clear,y.storeOp=xr.Store):(y.loadOp=Pn.Load,y.storeOp=xr.Store)}e.depth&&(e.clearDepth?(u.depthClearValue=e.clearDepthValue,u.depthLoadOp=Pn.Clear,u.depthStoreOp=xr.Store):(u.depthLoadOp=Pn.Load,u.depthStoreOp=xr.Store)),e.stencil&&(e.clearStencil?(u.stencilClearValue=e.clearStencilValue,u.stencilLoadOp=Pn.Clear,u.stencilStoreOp=xr.Store):(u.stencilLoadOp=Pn.Load,u.stencilStoreOp=xr.Store));const f=n.createCommandEncoder({label:"renderContext_"+e.id}),m=f.beginRenderPass(a);if(t.descriptor=a,t.encoder=f,t.currentPass=m,t.currentSets={attributes:{},bindingGroups:[],pipeline:null,index:null},t.renderBundles=[],e.viewport&&this.updateViewport(e),e.scissor){const{x:y,y:_,width:b,height:w}=e.scissorValue;
397m.setScissorRect(y,_,b,w)}}finishRender(e){const t=this.get(e),n=e.occlusionQueryCount;if(t.renderBundles.length>0&&t.currentPass.executeBundles(t.renderBundles),n>t.occlusionQueryIndex&&t.currentPass.endOcclusionQuery(),t.currentPass.end(),n>0){const i=n*8;let s=this.occludedResolveCache.get(i);s===void 0&&(s=this.device.createBuffer({size:i,usage:GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC}),this.occludedResolveCache.set(i,s));const a=this.device.createBuffer({size:i,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ});t.encoder.resolveQuerySet(t.occlusionQuerySet,0,n,s,0),t.encoder.copyBufferToBuffer(s,0,a,0,i),t.occlusionQueryBuffer=a,this.resolveOccludedAsync(e)}if(this.device.queue.submit([t.encoder.finish()]),e.textures!==null){const i=e.textures;for(let s=0;s<i.length;s++){const a=i[s];a.generateMipmaps===!0&&this.textureUtils.generateMipmaps(a)}}}isOccluded(e,t){const n=this.get(e);return n.occluded&&n.occluded.has(t)}async resolveOccludedAsync(e){const t=this.get(e),{currentOcclusionQueryBuffer:n,currentOcclusionQueryObjects:i}=t;if(n&&i){const s=new WeakSet;t.currentOcclusionQueryObjects=null,t.currentOcclusionQueryBuffer=null,await n.mapAsync(GPUMapMode.READ);const a=n.getMappedRange(),u=new BigUint64Array(a);for(let f=0;f<i.length;f++)u[f]===BigInt(0)&&s.add(i[f]);n.destroy(),t.occluded=s}}updateViewport(e){const{currentPass:t}=this.get(e),{x:n,y:i,width:s,height:a,minDepth:u,maxDepth:f}=e.viewportValue;t.setViewport(n,i,s,a,u,f)}clear(e,t,n,i=null){const s=this.device,a=this.renderer;let u=[],f,m,y,_;if(e){const S=this.getClearColor();if(this.renderer.alpha===!0){const E=S.a;m={r:S.r*E,g:S.g*E,b:S.b*E,a:E}}else m={r:S.r,g:S.g,b:S.b,a:S.a}}if(i===null){y=a.depth,_=a.stencil;const S=this._getDefaultRenderPassDescriptor();if(e){u=S.colorAttachments;const E=u[0];E.clearValue=m,E.loadOp=Pn.Clear,E.storeOp=xr.Store}(y||_)&&(f=S.depthStencilAttachment)}else y=i.depth,_=i.stencil,e&&(u=this._getRenderPassDescriptor(i,{loadOp:Pn.Clear,clearValue:m}).colorAttachments),(y||_)&&(f={view:this.get(i.depthTexture).texture.createView()});y&&(t?(f.depthLoadOp=Pn.Clear,f.depthClearValue=a.getClearDepth(),f.depthStoreOp=xr.Store):(f.depthLoadOp=Pn.Load,f.depthStoreOp=xr.Store)),_&&(n?(f.stencilLoadOp=Pn.Clear,f.stencilClearValue=a.getClearStencil(),f.stencilStoreOp=xr.Store):(f.stencilLoadOp=Pn.Load,f.stencilStoreOp=xr.Store));const b=s.createCommandEncoder({label:"clear"});b.beginRenderPass({colorAttachments:u,depthStencilAttachment:f}).end(),s.queue.submit([b.finish()])}beginCompute(e){const t=this.get(e),n={label:"computeGroup_"+e.id};this.initTimestampQuery(e,n),t.cmdEncoderGPU=this.device.createCommandEncoder({label:"computeGroup_"+e.id}),t.passEncoderGPU=t.cmdEncoderGPU.beginComputePass(n)}compute(e,t,n,i){const{passEncoderGPU:s}=this.get(e),a=this.get(i).pipeline;s.setPipeline(a);for(let y=0,_=n.length;y<_;y++){const b=n[y],w=this.get(b);s.setBindGroup(y,w.group)}const u=this.device.limits.maxComputeWorkgroupsPerDimension,f=this.get(t);f.dispatchSize===void 0&&(f.dispatchSize={x:0,y:1,z:1});const{dispatchSize:m}=f;t.dispatchCount>u?(m.x=Math.min(t.dispatchCount,u),m.y=Math.ceil(t.dispatchCount/u)):m.x=t.dispatchCount,s.dispatchWorkgroups(m.x,m.y,m.z)}finishCompute(e){const t=this.get(e);t.passEncoderGPU.end(),this.device.queue.submit([t.cmdEncoderGPU.finish()])}async waitForGPU(){await this.device.queue.onSubmittedWorkDone()}draw(e,t){const{object:n,context:i,pipeline:s}=e,a=e.getBindings(),u=this.get(i),f=this.get(s).pipeline,m=u.currentSets,y=u.currentPass,_=e.getDrawParameters();if(_===null)return;m.pipeline!==f&&(y.setPipeline(f),m.pipeline=f);const b=m.bindingGroups;for(let P=0,L=a.length;P<L;P++){const D=a[P],O=this.get(D);b[D.index]!==D.id&&(y.setBindGroup(D.index,O.group),b[D.index]=D.id)}const w=e.getIndex(),S=w!==null;if(S===!0&&m.index!==w){const P=this.get(w).buffer,L=w.array instanceof Uint16Array?OA.Uint16:OA.Uint32;y.setIndexBuffer(P,L),m.index=w}const E=e.getVertexBuffers();for(let P=0,L=E.length;P<L;P++){const D=E[P];if(m.attributes[P]!==D){const O=this.get(D).buffer;y.setVertexBuffer(P,O),m.attributes[P]=D}}if(u.occlusionQuerySet!==void 0){const P=u.lastOcclusionObject;P!==n&&(P!==null&&P.occlusionTest===!0&&(y.endOcclusionQuery(),u.occlusionQueryIndex++),n.occlusionTest===!0&&(y.beginOcclusionQuery(u.occlusionQueryIndex),u.occlusionQueryObjects[u.occlusionQueryIndex]=n),u.lastOcclusionObject=n)}const R=()=>
397{if(n.isBatchedMesh===!0){const P=n._multiDrawStarts,L=n._multiDrawCounts,D=n._multiDrawCount,O=n._multiDrawInstances;for(let G=0;G<D;G++){const U=O?O[G]:1,j=U>1?0:G;S===!0?y.drawIndexed(L[G],U,P[G]/w.array.BYTES_PER_ELEMENT,0,j):y.draw(L[G],U,P[G],j)}}else if(S===!0){const{vertexCount:P,instanceCount:L,firstVertex:D}=_,O=e.getIndirect();if(O!==null){const G=this.get(O).buffer;y.drawIndexedIndirect(G,0)}else y.drawIndexed(P,L,D,0,0);t.update(n,P,L)}else{const{vertexCount:P,instanceCount:L,firstVertex:D}=_,O=e.getIndirect();if(O!==null){const G=this.get(O).buffer;y.drawIndirect(G,0)}else y.draw(P,L,D,0);t.update(n,P,L)}};if(e.camera.isArrayCamera&&e.camera.cameras.length>0){const P=this.get(e.camera),L=e.camera.cameras,D=e.getBindingGroup("cameraIndex");if(P.indexesGPU===void 0||P.indexesGPU.length!==L.length){const G=this.get(D),U=[],j=new Uint32Array([0,0,0,0]);for(let V=0,Q=L.length;V<Q;V++){j[0]=V;const Z=this.bindingUtils.createBindGroupIndex(j,G.layout);U.push(Z)}P.indexesGPU=U}const O=this.renderer.getPixelRatio();for(let G=0,U=L.length;G<U;G++){const j=L[G];if(n.layers.test(j.layers)){const V=j.viewport;y.setViewport(Math.floor(V.x*O),Math.floor(V.y*O),Math.floor(V.width*O),Math.floor(V.height*O),i.viewportValue.minDepth,i.viewportValue.maxDepth),y.setBindGroup(D.index,P.indexesGPU[G]),R()}}}else R()}needsRenderUpdate(e){const t=this.get(e),{object:n,material:i}=e,s=this.utils,a=s.getSampleCountRenderContext(e.context),u=s.getCurrentColorSpace(e.context),f=s.getCurrentColorFormat(e.context),m=s.getCurrentDepthStencilFormat(e.context),y=s.getPrimitiveTopology(n,i);let _=!1;return(t.material!==i||t.materialVersion!==i.version||t.transparent!==i.transparent||t.blending!==i.blending||t.premultipliedAlpha!==i.premultipliedAlpha||t.blendSrc!==i.blendSrc||t.blendDst!==i.blendDst||t.blendEquation!==i.blendEquation||t.blendSrcAlpha!==i.blendSrcAlpha||t.blendDstAlpha!==i.blendDstAlpha||t.blendEquationAlpha!==i.blendEquationAlpha||t.colorWrite!==i.colorWrite||t.depthWrite!==i.depthWrite||t.depthTest!==i.depthTest||t.depthFunc!==i.depthFunc||t.stencilWrite!==i.stencilWrite||t.stencilFunc!==i.stencilFunc||t.stencilFail!==i.stencilFail||t.stencilZFail!==i.stencilZFail||t.stencilZPass!==i.stencilZPass||t.stencilFuncMask!==i.stencilFuncMask||t.stencilWriteMask!==i.stencilWriteMask||t.side!==i.side||t.alphaToCoverage!==i.alphaToCoverage||t.sampleCount!==a||t.colorSpace!==u||t.colorFormat!==f||t.depthStencilFormat!==m||t.primitiveTopology!==y||t.clippingContextCacheKey!==e.clippingContextCacheKey)&&(t.material=i,t.materialVersion=i.version,t.transparent=i.transparent,t.blending=i.blending,t.premultipliedAlpha=i.premultipliedAlpha,t.blendSrc=i.blendSrc,t.blendDst=i.blendDst,t.blendEquation=i.blendEquation,t.blendSrcAlpha=i.blendSrcAlpha,t.blendDstAlpha=i.blendDstAlpha,t.blendEquationAlpha=i.blendEquationAlpha,t.colorWrite=i.colorWrite,t.depthWrite=i.depthWrite,t.depthTest=i.depthTest,t.depthFunc=i.depthFunc,t.stencilWrite=i.stencilWrite,t.stencilFunc=i.stencilFunc,t.stencilFail=i.stencilFail,t.stencilZFail=i.stencilZFail,t.stencilZPass=i.stencilZPass,t.stencilFuncMask=i.stencilFuncMask,t.stencilWriteMask=i.stencilWriteMask,t.side=i.side,t.alphaToCoverage=i.alphaToCoverage,t.sampleCount=a,t.colorSpace=u,t.colorFormat=f,t.depthStencilFormat=m,t.primitiveTopology=y,t.clippingContextCacheKey=e.clippingContextCacheKey,_=!0),_}getRenderCacheKey(e){const{object:t,material:n}=e,i=this.utils,s=e.context;return[n.transparent,n.blending,n.premultipliedAlpha,n.blendSrc,n.blendDst,n.blendEquation,n.blendSrcAlpha,n.blendDstAlpha,n.blendEquationAlpha,n.colorWrite,n.depthWrite,n.depthTest,n.depthFunc,n.stencilWrite,n.stencilFunc,n.stencilFail,n.stencilZFail,n.stencilZPass,n.stencilFuncMask,n.stencilWriteMask,n.side,i.getSampleCountRenderContext(s),i.getCurrentColorSpace(s),i.getCurrentColorFormat(s),i.getCurrentDepthStencilFormat(s),i.getPrimitiveTopology(t,n),e.getGeometryCacheKey(),e.clippingContextCacheKey].join()}createSampler(e){this.textureUtils.createSampler(e)}destroySampler(e){this.textureUtils.destroySampler(e)}createDefaultTexture(e){this.textureUtils.createDefaultTexture(e)}createTexture(e,t){this.textureUtils.createTexture(e,t)}updateTexture(e,t){this.textureUtils.updateTexture(e,t)}generateMipmaps(e){this.textureUtils.generateMipmaps(e)}destroyTexture(e){this.textureUtils.destroyTexture(e)}async copyTextureToBuffer(e,t,n,i,s,a){return this.textureUtils.copyTextureToBuffer(e,t,n,i,s,a)}initTimestampQuery(e,t){if(!this.trackTimestamp)return;const n=e.isComputeNode?"compute":"render";this.timestampQueryPool[n]||(this.timestampQueryPool[n]=new TG(this.device,n,2048));const i=this.timestampQueryPool[n],s=i.allocateQueriesForContext(e);t.timestampWrites={querySet:i.querySet,beginningOfPassWriteIndex:s,endOfPassWriteIndex:s+1}}createNodeBuilder(e,t){return new pG(e,t)}createProgram(e){const t=this.get(e);t.module={module:this.device.createShaderModule({code:e.code,label:e.stage+(e.name!==""?`_${e.name}`:"")}),entryPoint:"main"}}destroyProgram(e){this.delete(e)}createRenderPipeline(e,t){this.pipelineUtils.createRenderPipeline(e,t)}createComputePipeline(e,t){this.pipelineUtils.createComputePipeline(e,t)}beginBundle(e){const t=this.get(e);t._currentPass=t.currentPass,t._currentSets=t.currentSets,t.currentSets={attributes:{},bindingGroups:[],pipeline:null,index:null},t.currentPass=this.pipelineUtils.createBundleEncoder(e)}finishBundle(e,t){const n=this.get(e),s=n.currentPass.finish();this.get(t).bundleGPU=s,n.currentSets=n._currentSets,n.currentPass=n._currentPass}addBundle(e,t){this.get(e).renderBundles.push(this.get(t).bundleGPU)}createBindings(e,t,n,i){this.bindingUtils.createBindings(e,t,n,i)}updateBindings(e,t,n,i){this.bindingUtils.createBindings(e,t,n,i)}updateBinding(e){this.bindingUtils.updateBinding(e)}createIndexAttribute(e){this.attributeUtils.createAttribute(e,GPUBufferUsage.INDEX|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST)}createAttribute(e){this.attributeUtils.createAttribute(e,GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST)}createStorageAttribute(e){this.attributeUtils.createAttribute(e,GPUBufferUsage.STORAGE|GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST)}createIndirectStorageAttribute(e){this.attributeUtils.createAttribute(e,GPUBufferUsage.STORAGE|GPUBufferUsage.INDIRECT|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST)}updateAttribute(e){this.attributeUtils.updateAttribute(e)}destroyAttribute(e){this.attributeUtils.destroyAttribute(e)}updateSize(){this.colorBuffer=this.textureUtils.getColorBuffer(),this.defaultRenderPassdescriptor=null}getMaxAnisotropy(){return 16}hasFeature(e){return this.device.features.has(e)}
397copyTextureToTexture(e,t,n=null,i=null,s=0){let a=0,u=0,f=0,m=0,y=0,_=0,b=e.image.width,w=e.image.height;n!==null&&(m=n.x,y=n.y,_=n.z||0,b=n.width,w=n.height),i!==null&&(a=i.x,u=i.y,f=i.z||0);const S=this.device.createCommandEncoder({label:"copyTextureToTexture_"+e.id+"_"+t.id}),E=this.get(e).texture,R=this.get(t).texture;S.copyTextureToTexture({texture:E,mipLevel:s,origin:{x:m,y,z:_}},{texture:R,mipLevel:s,origin:{x:a,y:u,z:f}},[b,w,1]),this.device.queue.submit([S.finish()])}copyFramebufferToTexture(e,t,n){const i=this.get(t);let s=null;t.renderTarget?e.isDepthTexture?s=this.get(t.depthTexture).texture:s=this.get(t.textures[0]).texture:e.isDepthTexture?s=this.textureUtils.getDepthBuffer(t.depth,t.stencil):s=this.context.getCurrentTexture();const a=this.get(e).texture;if(s.format!==a.format){console.error("WebGPUBackend: copyFramebufferToTexture: Source and destination formats do not match.",s.format,a.format);return}let u;if(i.currentPass?(i.currentPass.end(),u=i.encoder):u=this.device.createCommandEncoder({label:"copyFramebufferToTexture_"+e.id}),u.copyTextureToTexture({texture:s,origin:[n.x,n.y,0]},{texture:a},[n.z,n.w]),e.generateMipmaps&&this.textureUtils.generateMipmaps(e),i.currentPass){const{descriptor:f}=i;for(let m=0;m<f.colorAttachments.length;m++)f.colorAttachments[m].loadOp=Pn.Load;if(t.depth&&(f.depthStencilAttachment.depthLoadOp=Pn.Load),t.stencil&&(f.depthStencilAttachment.stencilLoadOp=Pn.Load),i.currentPass=u.beginRenderPass(f),i.currentSets={attributes:{},bindingGroups:[],pipeline:null,index:null},t.viewport&&this.updateViewport(t),t.scissor){const{x:m,y,width:_,height:b}=t.scissorValue;i.currentPass.setScissorRect(m,y,_,b)}}else this.device.queue.submit([u.finish()])}}class SG extends Dm{constructor(e,t,n,i,s,a){super(e,t,n,i,s,a),this.iesMap=null}copy(e,t){return super.copy(e,t),this.iesMap=e.iesMap,this}}class MG extends d_{constructor(){super(),this.addMaterial(dD,"MeshPhongMaterial"),this.addMaterial(cv,"MeshStandardMaterial"),this.addMaterial(HD,"MeshPhysicalMaterial"),this.addMaterial(XD,"MeshToonMaterial"),this.addMaterial(aD,"MeshBasicMaterial"),this.addMaterial(fD,"MeshLambertMaterial"),this.addMaterial(tD,"MeshNormalMaterial"),this.addMaterial(JD,"MeshMatcapMaterial"),this.addMaterial(QF,"LineBasicMaterial"),this.addMaterial(XF,"LineDashedMaterial"),this.addMaterial(rL,"PointsMaterial"),this.addMaterial(hv,"SpriteMaterial"),this.addMaterial(oL,"ShadowMaterial"),this.addLight(dk,Gb),this.addLight(oO,Vb),this.addLight(aO,zb),this.addLight(f_,Dm),this.addLight(lO,jb),this.addLight(uO,$b),this.addLight(cO,Hb),this.addLight(AO,SG),this.addToneMapping(Fv,Wb),this.addToneMapping(Dv,Qb),this.addToneMapping(Lv,Yb),this.addToneMapping(qv,Xb),this.addToneMapping(Iv,Kb),this.addToneMapping(kv,Zb)}}class EG extends RO{constructor(e={}){let t;e.forceWebGL?t=nm:(t=wG,e.getFallback=()=>(console.warn("THREE.WebGPURenderer: WebGPU is not available, running under WebGL2 backend."),new nm(e)));const n=new t(e);super(n,e),this.library=new MG,this.isWebGPURenderer=!0}}/** 398 * @license 399 * Copyright 2010-2025 Three.js Authors 400 * SPDX-License-Identifier: MIT 401 */C.BRDF_GGX;C.BRDF_Lambert;C.BasicShadowFilter;C.Break;C.Continue;C.DFGApprox;C.D_GGX;C.Discard;C.EPSILON;C.F_Schlick;const NG=C.Fn;C.INFINITY;const RG=C.If,CG=C.Loop;C.NodeShaderStage;C.NodeType;C.NodeUpdateType;C.NodeAccess;C.PCFShadowFilter;C.PCFSoftShadowFilter;C.PI;C.PI2;C.Return;C.Schlick_to_F0;C.ScriptableNodeResources;C.ShaderNode;C.TBNViewMatrix;C.VSMShadowFilter;C.V_GGX_SmithCorrelated;C.abs;C.acesFilmicToneMapping;C.acos;C.add;C.addNodeElement;C.agxToneMapping;C.all;C.alphaT;C.and;C.anisotropy;C.anisotropyB;C.anisotropyT;C.any;C.append;C.array;C.arrayBuffer;const PG=C.asin;C.assign;C.atan;C.atan2;C.atomicAdd;C.atomicAnd;C.atomicFunc;C.atomicMax;C.atomicMin;C.atomicOr;C.atomicStore;C.atomicSub;C.atomicXor;C.atomicLoad;C.attenuationColor;C.attenuationDistance;C.attribute;C.attributeArray;C.backgroundBlurriness;C.backgroundIntensity;C.backgroundRotation;C.batch;C.billboarding;C.bitAnd;C.bitNot;C.bitOr;C.bitXor;C.bitangentGeometry;C.bitangentLocal;C.bitangentView;C.bitangentWorld;C.bitcast;C.blendBurn;C.blendColor;C.blendDodge;C.blendOverlay;C.blendScreen;C.blur;C.bool;C.buffer;C.bufferAttribute;C.bumpMap;C.burn;C.bvec2;C.bvec3;C.bvec4;C.bypass;C.cache;C.call;C.cameraFar;C.cameraIndex;C.cameraNear;C.cameraNormalMatrix;C.cameraPosition;C.cameraProjectionMatrix;C.cameraProjectionMatrixInverse;C.cameraViewMatrix;C.cameraWorldMatrix;C.cbrt;C.cdl;C.ceil;C.checker;C.cineonToneMapping;C.clamp;C.clearcoat;C.clearcoatRoughness;C.code;C.color;C.colorSpaceToWorking;C.colorToDirection;C.compute;C.cond;C.Const;C.context;C.convert;C.convertColorSpace;C.convertToTexture;const BG=C.cos;C.cross;C.cubeTexture;C.dFdx;C.dFdy;C.dashSize;C.defaultBuildStages;C.defaultShaderStages;C.defined;C.degrees;
401C.deltaTime;C.densityFog;C.densityFogFactor;C.depth;C.depthPass;C.difference;C.diffuseColor;C.directPointLight;C.directionToColor;C.dispersion;C.distance;C.div;C.dodge;C.dot;C.drawIndex;C.dynamicBufferAttribute;C.element;C.emissive;C.equal;C.equals;C.equirectUV;const FG=C.exp;C.exp2;C.expression;C.faceDirection;C.faceForward;C.faceforward;const DG=C.float;C.floor;C.fog;C.fract;C.frameGroup;C.frameId;C.frontFacing;C.fwidth;C.gain;C.gapSize;C.getConstNodeType;C.getCurrentStack;C.getDirection;C.getDistanceAttenuation;C.getGeometryRoughness;C.getNormalFromDepth;C.getParallaxCorrectNormal;C.getRoughness;C.getScreenPosition;C.getShIrradianceAt;C.getTextureIndex;C.getViewPosition;C.glsl;C.glslFn;C.grayscale;C.greaterThan;C.greaterThanEqual;C.hash;C.highpModelNormalViewMatrix;C.highpModelViewMatrix;C.hue;C.instance;const LG=C.instanceIndex;C.instancedArray;C.instancedBufferAttribute;C.instancedDynamicBufferAttribute;C.instancedMesh;C.int;C.inverseSqrt;C.inversesqrt;C.invocationLocalIndex;C.invocationSubgroupIndex;C.ior;C.iridescence;C.iridescenceIOR;C.iridescenceThickness;C.ivec2;C.ivec3;C.ivec4;C.js;C.label;C.length;C.lengthSq;C.lessThan;C.lessThanEqual;C.lightPosition;C.lightTargetDirection;C.lightTargetPosition;C.lightViewPosition;C.lightingContext;C.lights;C.linearDepth;C.linearToneMapping;C.localId;C.globalId;C.log;C.log2;C.logarithmicDepthToViewZ;C.loop;C.luminance;C.mediumpModelViewMatrix;C.mat2;C.mat3;C.mat4;C.matcapUV;C.materialAO;C.materialAlphaTest;C.materialAnisotropy;C.materialAnisotropyVector;C.materialAttenuationColor;C.materialAttenuationDistance;C.materialClearcoat;C.materialClearcoatNormal;C.materialClearcoatRoughness;C.materialColor;C.materialDispersion;C.materialEmissive;C.materialIOR;C.materialIridescence;C.materialIridescenceIOR;C.materialIridescenceThickness;C.materialLightMap;C.materialLineDashOffset;C.materialLineDashSize;C.materialLineGapSize;C.materialLineScale;C.materialLineWidth;C.materialMetalness;C.materialNormal;C.materialOpacity;C.materialPointSize;C.materialReference;C.materialReflectivity;C.materialRefractionRatio;C.materialRotation;C.materialRoughness;C.materialSheen;C.materialSheenRoughness;C.materialShininess;C.materialSpecular;C.materialSpecularColor;C.materialSpecularIntensity;C.materialSpecularStrength;C.materialThickness;C.materialTransmission;C.max;C.maxMipLevel;C.metalness;C.min;C.mix;C.mixElement;C.mod;C.modInt;C.modelDirection;C.modelNormalMatrix;C.modelPosition;C.modelScale;C.modelViewMatrix;C.modelViewPosition;C.modelViewProjection;C.modelWorldMatrix;C.modelWorldMatrixInverse;C.morphReference;C.mrt;C.mul;C.mx_aastep;C.mx_cell_noise_float;C.mx_contrast;C.mx_fractal_noise_float;C.mx_fractal_noise_vec2;C.mx_fractal_noise_vec3;C.mx_fractal_noise_vec4;C.mx_hsvtorgb;C.mx_noise_float;C.mx_noise_vec3;C.mx_noise_vec4;C.mx_ramplr;C.mx_ramptb;C.mx_rgbtohsv;C.mx_safepower;C.mx_splitlr;C.mx_splittb;C.mx_srgb_texture_to_lin_rec709;C.mx_transform_uv;C.mx_worley_noise_float;C.mx_worley_noise_vec2;C.mx_worley_noise_vec3;const qG=C.negate;C.neutralToneMapping;C.nodeArray;C.nodeImmutable;C.nodeObject;C.nodeObjects;C.nodeProxy;C.normalFlat;C.normalGeometry;C.normalLocal;C.normalMap;C.normalView;C.normalWorld;C.normalize;C.not;C.notEqual;C.numWorkgroups;C.objectDirection;C.objectGroup;C.objectPosition;C.objectScale;C.objectViewPosition;C.objectWorldMatrix;C.oneMinus;C.or;C.orthographicDepthToViewZ;C.oscSawtooth;C.oscSine;C.oscSquare;C.oscTriangle;C.output;C.outputStruct;C.overlay;C.overloadingFn;C.parabola;C.parallaxDirection;C.parallaxUV;C.parameter;C.pass;C.passTexture;C.pcurve;C.perspectiveDepthToViewZ;C.pmremTexture;C.pointUV;C.pointWidth;C.positionGeometry;C.positionLocal;C.positionPrevious;C.positionView;C.positionViewDirection;C.positionWorld;C.positionWorldDirection;C.posterize;C.pow;C.pow2;C.pow3;C.pow4;C.property;C.radians;C.rand;C.range;C.rangeFog;
401C.rangeFogFactor;C.reciprocal;C.reference;C.referenceBuffer;C.reflect;C.reflectVector;C.reflectView;C.reflector;C.refract;C.refractVector;C.refractView;C.reinhardToneMapping;C.remainder;C.remap;C.remapClamp;C.renderGroup;C.renderOutput;C.rendererReference;C.rotate;C.rotateUV;C.roughness;C.round;C.rtt;C.sRGBTransferEOTF;C.sRGBTransferOETF;C.sampler;C.saturate;C.saturation;C.screen;C.screenCoordinate;C.screenSize;C.screenUV;C.scriptable;C.scriptableValue;C.select;C.setCurrentStack;C.shaderStages;C.shadow;C.shadowPositionWorld;C.sharedUniformGroup;C.shapeCircle;C.sheen;C.sheenRoughness;C.shiftLeft;C.shiftRight;C.shininess;C.sign;const IG=C.sin;C.sinc;C.skinning;C.skinningReference;C.smoothstep;C.smoothstepElement;C.specularColor;C.specularF90;C.spherizeUV;C.split;C.spritesheetUV;const kG=C.sqrt;C.stack;C.step;const UG=C.storage;C.storageBarrier;C.storageObject;C.storageTexture;C.string;C.struct;C.sub;C.subgroupIndex;C.subgroupSize;C.tan;C.tangentGeometry;C.tangentLocal;C.tangentView;C.tangentWorld;C.temp;C.texture;C.texture3D;C.textureBarrier;C.textureBicubic;C.textureCubeUV;C.textureLoad;C.textureSize;C.textureStore;C.thickness;C.threshold;C.time;C.timerDelta;C.timerGlobal;C.timerLocal;C.toOutputColorSpace;C.toWorkingColorSpace;C.toneMapping;C.toneMappingExposure;C.toonOutlinePass;C.transformDirection;C.transformNormal;C.transformNormalToView;C.transformedBentNormalView;C.transformedBitangentView;C.transformedBitangentWorld;C.transformedClearcoatNormalView;C.transformedNormalView;C.transformedNormalWorld;C.transformedTangentView;C.transformedTangentWorld;C.transmission;C.transpose;C.tri;C.tri3;C.triNoise3D;C.triplanarTexture;C.triplanarTextures;C.trunc;C.tslFn;C.uint;const OG=C.uniform;C.uniformArray;C.uniformGroup;C.uniforms;C.userData;C.uv;C.uvec2;C.uvec3;C.uvec4;C.Var;C.varying;C.varyingProperty;C.vec2;C.vec3;C.vec4;C.vectorComponents;C.velocity;C.vertexColor;C.vertexIndex;C.vibrance;C.viewZToLogarithmicDepth;C.viewZToOrthographicDepth;C.viewZToPerspectiveDepth;C.viewport;C.viewportBottomLeft;C.viewportCoordinate;C.viewportDepthTexture;C.viewportLinearDepth;C.viewportMipTexture;C.viewportResolution;C.viewportSafeUV;C.viewportSharedTexture;C.viewportSize;C.viewportTexture;C.viewportTopLeft;C.viewportUV;C.wgsl;C.wgslFn;C.workgroupArray;C.workgroupBarrier;C.workgroupId;C.workingToColorSpace;C.xor;const lm=new Id,$u=new ke;class w_ extends JT{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new Uo(e,3)),this.setAttribute("uv",new Uo(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new w1(t,6,1);return this.setAttribute("instanceStart",new Fo(n,3,0)),this.setAttribute("instanceEnd",new Fo(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new w1(t,6,1);return this.setAttribute("instanceColorStart",new Fo(n,3,0)),this.setAttribute("instanceColorEnd",new Fo(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new ew(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Id);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),lm.setFromBufferAttribute(t),this.boundingBox.union(lm))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new _7),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let s=0,a=e.count;s<a;s++)$u.fromBufferAttribute(e,s),i=Math.max(i,n.distanceToSquared($u)),$u.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared($u));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}i1.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Wt(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};s1.line={uniforms:x7.merge([i1.common,i1.fog,i1.line]),vertexShader:` 402 #include <common> 403 #include <color_pars_vertex> 404 #include <fog_pars_vertex> 405 #include <logdepthbuf_pars_vertex> 406 #include <clipping_planes_pars_vertex> 407 408 uniform float linewidth; 409 uniform vec2 resolution; 410 411 attribute vec3 instanceStart; 412 attribute vec3 instanceEnd; 413 414 attribute vec3 instanceColorStart; 415 attribute vec3 instanceColorEnd; 416
417 #ifdef WORLD_UNITS 418 419 varying vec4 worldPos; 420 varying vec3 worldStart; 421 varying vec3 worldEnd; 422 423 #ifdef USE_DASH 424 425 varying vec2 vUv; 426 427 #endif 428 429 #else 430 431 varying vec2 vUv; 432 433 #endif 434 435 #ifdef USE_DASH 436 437 uniform float dashScale; 438 attribute float instanceDistanceStart; 439 attribute float instanceDistanceEnd; 440 varying float vLineDistance; 441 442 #endif 443 444 void trimSegment( const in vec4 start, inout vec4 end ) { 445 446 // trim end segment so it terminates between the camera plane and the near plane 447 448 // conservative estimate of the near plane 449 float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column 450 float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column 451 float nearEstimate = - 0.5 * b / a; 452 453 float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); 454 455 end.xyz = mix( start.xyz, end.xyz, alpha ); 456 457 } 458 459 void main() { 460 461 #ifdef USE_COLOR 462 463 vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; 464 465 #endif 466 467 #ifdef USE_DASH 468 469 vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; 470 vUv = uv; 471 472 #endif 473 474 float aspect = resolution.x / resolution.y; 475 476 // camera space 477 vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); 478 vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); 479 480 #ifdef WORLD_UNITS 481 482 worldStart = start.xyz; 483 worldEnd = end.xyz; 484 485 #else 486 487 vUv = uv; 488 489 #endif 490 491 // special case for perspective projection, and segments that terminate either in, or behind, the camera plane 492 // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space 493 // but we need to perform ndc-space calculations in the shader, so we must address this issue directly 494 // perhaps there is a more elegant solution -- WestLangley 495 496 bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column 497 498 if ( perspective ) { 499 500 if ( start.z < 0.0 && end.z >= 0.0 ) { 501 502 trimSegment( start, end ); 503 504 } else if ( end.z < 0.0 && start.z >= 0.0 ) { 505 506 trimSegment( end, start ); 507 508 } 509 510 } 511 512 // clip space 513 vec4 clipStart = projectionMatrix * start; 514 vec4 clipEnd = projectionMatrix * end; 515 516 // ndc space 517 vec3 ndcStart = clipStart.xyz / clipStart.w; 518 vec3 ndcEnd = clipEnd.xyz / clipEnd.w; 519 520 // direction 521 vec2 dir = ndcEnd.xy - ndcStart.xy; 522 523 // account for clip-space aspect ratio 524 dir.x *= aspect; 525 dir = normalize( dir ); 526 527 #ifdef WORLD_UNITS 528 529 vec3 worldDir = normalize( end.xyz - start.xyz ); 530 vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); 531 vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); 532 vec3 worldFwd = cross( worldDir, worldUp ); 533 worldPos = position.y < 0.5 ? start: end; 534 535 // height offset 536 float hw = linewidth * 0.5; 537 worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; 538 539 // don't extend the line if we're rendering dashes because we 540 // won't be rendering the endcaps 541 #ifndef USE_DASH 542 543 // cap extension 544 worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; 545 546 // add width to the box 547 worldPos.xyz += worldFwd * hw; 548 549 // endcaps 550 if ( position.y > 1.0 || position.y < 0.0 ) { 551 552 worldPos.xyz -= worldFwd * 2.0 * hw; 553 554 } 555 556 #endif 557 558 // project the worldpos 559 vec4 clip = projectionMatrix * worldPos; 560 561 // shift the depth of the projected points so the line 562 // segments overlap neatly 563 vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; 564 clip.z = clipPose.z * clip.w; 565 566 #else 567 568 vec2 offset = vec2( dir.y, - dir.x ); 569 // undo aspect ratio adjustment 570 dir.x /= aspect; 571 offset.x /= aspect; 572 573 // sign flip 574 if ( position.x < 0.0 ) offset *= - 1.0; 575 576 // endcaps 577 if ( position.y < 0.0 ) { 578 579 offset += - dir; 580 581 } else if ( position.y > 1.0 ) { 582 583 offset += dir; 584 585 } 586 587 // adjust for linewidth 588 offset *= linewidth; 589 590 // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... 591 offset /= resolution.y; 592 593 // select end 594 vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; 595 596 // back to clip space 597 offset *= clip.w; 598 599 clip.xy += offset; 600 601 #endif 602 603 gl_Position = clip; 604 605 vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation 606 607 #include <logdepthbuf_vertex> 608 #include <clipping_planes_vertex> 609 #include <fog_vertex> 610 611 } 612 `,fragmentShader:` 613 uniform vec3 diffuse; 614 uniform float opacity; 615 uniform float linewidth; 616 617 #ifdef USE_DASH 618 619 uniform float dashOffset; 620 uniform float dashSize; 621 uniform float gapSize; 622 623 #endif 624 625 varying float vLineDistance; 626 627 #ifdef WORLD_UNITS 628 629 varying vec4 worldPos; 630 varying vec3 worldStart; 631 varying vec3 worldEnd; 632 633 #ifdef USE_DASH 634 635 varying vec2 vUv; 636 637 #endif 638 639 #else 640 641 varying vec2 vUv; 642 643 #endif 644 645 #include <common> 646 #include <color_pars_fragment> 647 #include <fog_pars_fragment> 648 #include <logdepthbuf_pars_fragment> 649 #include <clipping_planes_pars_fragment> 650 651 vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { 652 653 float mua; 654 float mub; 655 656 vec3 p13 = p1 - p3; 657 vec3 p43 = p4 - p3; 658 659 vec3 p21 = p2 - p1; 660 661 float d1343 = dot( p13, p43 );
662 float d4321 = dot( p43, p21 ); 663 float d1321 = dot( p13, p21 ); 664 float d4343 = dot( p43, p43 ); 665 float d2121 = dot( p21, p21 ); 666 667 float denom = d2121 * d4343 - d4321 * d4321; 668 669 float numer = d1343 * d4321 - d1321 * d4343; 670 671 mua = numer / denom; 672 mua = clamp( mua, 0.0, 1.0 ); 673 mub = ( d1343 + d4321 * ( mua ) ) / d4343; 674 mub = clamp( mub, 0.0, 1.0 ); 675 676 return vec2( mua, mub ); 677 678 } 679 680 void main() { 681 682 #include <clipping_planes_fragment> 683 684 #ifdef USE_DASH 685 686 if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps 687 688 if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX 689 690 #endif 691 692 float alpha = opacity; 693 694 #ifdef WORLD_UNITS 695 696 // Find the closest points on the view ray and the line segment 697 vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; 698 vec3 lineDir = worldEnd - worldStart; 699 vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); 700 701 vec3 p1 = worldStart + lineDir * params.x; 702 vec3 p2 = rayEnd * params.y; 703 vec3 delta = p1 - p2; 704 float len = length( delta ); 705 float norm = len / linewidth; 706 707 #ifndef USE_DASH 708 709 #ifdef USE_ALPHA_TO_COVERAGE 710 711 float dnorm = fwidth( norm ); 712 alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); 713 714 #else 715 716 if ( norm > 0.5 ) { 717 718 discard; 719 720 } 721 722 #endif 723 724 #endif 725 726 #else 727 728 #ifdef USE_ALPHA_TO_COVERAGE 729 730 // artifacts appear on some hardware if a derivative is taken within a conditional 731 float a = vUv.x; 732 float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; 733 float len2 = a * a + b * b; 734 float dlen = fwidth( len2 ); 735 736 if ( abs( vUv.y ) > 1.0 ) { 737 738 alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); 739 740 } 741 742 #else 743 744 if ( abs( vUv.y ) > 1.0 ) { 745 746 float a = vUv.x; 747 float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; 748 float len2 = a * a + b * b; 749 750 if ( len2 > 1.0 ) discard; 751 752 } 753 754 #endif 755 756 #endif 757 758 vec4 diffuseColor = vec4( diffuse, alpha ); 759 760 #include <logdepthbuf_fragment> 761 #include <color_fragment> 762 763 gl_FragColor = vec4( diffuseColor.rgb, alpha ); 764 765 #include <tonemapping_fragment> 766 #include <colorspace_fragment> 767 #include <fog_fragment> 768 #include <premultiplied_alpha_fragment> 769 770 } 771 `};class _3 extends Cc{constructor(e){super({type:"LineMaterial",uniforms:x7.clone(s1.line.uniforms),vertexShader:s1.line.vertexShader,fragmentShader:s1.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const Lf=new Qt,um=new ke,cm=new ke,lr=new Qt,ur=new Qt,os=new Qt,qf=new ke,If=new Bn,cr=new tw,fm=new ke,Hu=new Id,Wu=new _7,as=new Qt;let ds,Sa;function hm(r,e,t){return as.set(0,0,-e,1).applyMatrix4(r.projectionMatrix),as.multiplyScalar(1/as.w),as.x=Sa/t.width,as.y=Sa/t.height,as.applyMatrix4(r.projectionMatrixInverse),as.multiplyScalar(1/as.w),Math.abs(Math.max(as.x,as.y)
771)}function GG(r,e){const t=r.matrixWorld,n=r.geometry,i=n.attributes.instanceStart,s=n.attributes.instanceEnd,a=Math.min(n.instanceCount,i.count);for(let u=0,f=a;u<f;u++){cr.start.fromBufferAttribute(i,u),cr.end.fromBufferAttribute(s,u),cr.applyMatrix4(t);const m=new ke,y=new ke;ds.distanceSqToSegment(cr.start,cr.end,y,m),y.distanceTo(m)<Sa*.5&&e.push({point:y,pointOnLine:m,distance:ds.origin.distanceTo(y),object:r,face:null,faceIndex:u,uv:null,uv1:null})}}function VG(r,e,t){const n=e.projectionMatrix,s=r.material.resolution,a=r.matrixWorld,u=r.geometry,f=u.attributes.instanceStart,m=u.attributes.instanceEnd,y=Math.min(u.instanceCount,f.count),_=-e.near;ds.at(1,os),os.w=1,os.applyMatrix4(e.matrixWorldInverse),os.applyMatrix4(n),os.multiplyScalar(1/os.w),os.x*=s.x/2,os.y*=s.y/2,os.z=0,qf.copy(os),If.multiplyMatrices(e.matrixWorldInverse,a);for(let b=0,w=y;b<w;b++){if(lr.fromBufferAttribute(f,b),ur.fromBufferAttribute(m,b),lr.w=1,ur.w=1,lr.applyMatrix4(If),ur.applyMatrix4(If),lr.z>_&&ur.z>_)continue;if(lr.z>_){const D=lr.z-ur.z,O=(lr.z-_)/D;lr.lerp(ur,O)}else if(ur.z>_){const D=ur.z-lr.z,O=(ur.z-_)/D;ur.lerp(lr,O)}lr.applyMatrix4(n),ur.applyMatrix4(n),lr.multiplyScalar(1/lr.w),ur.multiplyScalar(1/ur.w),lr.x*=s.x/2,lr.y*=s.y/2,ur.x*=s.x/2,ur.y*=s.y/2,cr.start.copy(lr),cr.start.z=0,cr.end.copy(ur),cr.end.z=0;const E=cr.closestPointToPointParameter(qf,!0);cr.at(E,fm);const R=Nd.lerp(lr.z,ur.z,E),P=R>=-1&&R<=1,L=qf.distanceTo(fm)<Sa*.5;if(P&&L){cr.start.fromBufferAttribute(f,b),cr.end.fromBufferAttribute(m,b),cr.start.applyMatrix4(a),cr.end.applyMatrix4(a);const D=new ke,O=new ke;ds.distanceSqToSegment(cr.start,cr.end,O,D),t.push({point:O,pointOnLine:D,distance:ds.origin.distanceTo(O),object:r,face:null,faceIndex:b,uv:null,uv1:null})}}}class zG extends zn{constructor(e=new w_,t=new _3({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let a=0,u=0,f=t.count;a<f;a++,u+=2)um.fromBufferAttribute(t,a),cm.fromBufferAttribute(n,a),i[u]=u===0?0:i[u-1],i[u+1]=i[u]+um.distanceTo(cm);const s=new w1(i,2,1);return e.setAttribute("instanceDistanceStart",new Fo(s,1,0)),e.setAttribute("instanceDistanceEnd",new Fo(s,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const s=e.params.Line2!==void 0&&e.params.Line2.threshold||0;ds=e.ray;const a=this.matrixWorld,u=this.geometry,f=this.material;Sa=f.linewidth+s,u.boundingSphere===null&&u.computeBoundingSphere(),Wu.copy(u.boundingSphere).applyMatrix4(a);let m;if(n)m=Sa*.5;else{const _=Math.max(i.near,Wu.distanceToPoint(ds.origin));m=hm(i,_,f.resolution)}if(Wu.radius+=m,ds.intersectsSphere(Wu)===!1)return;u.boundingBox===null&&u.computeBoundingBox(),Hu.copy(u.boundingBox).applyMatrix4(a);let y;if(n)y=Sa*.5;else{const _=Math.max(i.near,Hu.distanceToPoint(ds.origin));y=hm(i,_,f.resolution)}Hu.expandByScalar(y),ds.intersectsBox(Hu)!==!1&&(n?GG(this,t):VG(this,i,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Lf),this.material.uniforms.resolution.value.set(Lf.z,Lf.w))}}class S_ extends w_{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){const t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class jG extends zG{constructor(e=new S_,t=new _3({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}class dm extends nw{constructor(e,t={}){const n=t.font;if(n===void 0)super();else{const i=n.generateShapes(e,t.size);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(i,t)}
771this.type="TextGeometry"}}class $G{constructor(e){this.isFont=!0,this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],i=HG(e,t,this.data);for(let s=0,a=i.length;s<a;s++)n.push(...i[s].toShapes());return n}}function HG(r,e,t){const n=Array.from(r),i=e/t.resolution,s=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*i,a=[];let u=0,f=0;for(let m=0;m<n.length;m++){const y=n[m];if(y===` 772`)u=0,f-=s;else{const _=WG(y,i,u,f,t);u+=_.offsetX,a.push(_.path)}}return a}function WG(r,e,t,n,i){const s=i.glyphs[r]||i.glyphs["?"];if(!s){console.error('THREE.Font: character "'+r+'" does not exists in font family '+i.familyName+".");return}const a=new rw;let u,f,m,y,_,b,w,S;if(s.o){const E=s._cachedOutline||(s._cachedOutline=s.o.split(" "));for(let R=0,P=E.length;R<P;)switch(E[R++]){case"m":u=E[R++]*e+t,f=E[R++]*e+n,a.moveTo(u,f);break;case"l":u=E[R++]*e+t,f=E[R++]*e+n,a.lineTo(u,f);break;case"q":m=E[R++]*e+t,y=E[R++]*e+n,_=E[R++]*e+t,b=E[R++]*e+n,a.quadraticCurveTo(_,b,m,y);break;case"b":m=E[R++]*e+t,y=E[R++]*e+n,_=E[R++]*e+t,b=E[R++]*e+n,w=E[R++]*e+t,S=E[R++]*e+n,a.bezierCurveTo(_,b,w,S,m,y);break}}return{offsetX:s.ha*e,path:a}}class QG extends Rc{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Wt(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}new ke;new Bn;new Bn;new ke;new ke;function vd(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function YG(r){if(Array.isArray(r))return r}function XG(r){if(Array.isArray(r))return vd(r)}function M_(r,e,t){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function KG(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function pm(r,e,t,n,i,s,a){try{var u=r[s](a),f=u.value}catch(m){return void t(m)}u.done?e(f):Promise.resolve(f).then(n,i)}function ZG(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var s=r.apply(e,t);function a(f){pm(s,n,i,a,u,"next",f)}function u(f){pm(s,n,i,a,u,"throw",f)}a(void 0)})}}function s2(r,e,t){return e=GA(e),aV(r,b3()?Reflect.construct(e,t||[],GA(r).constructor):e.apply(r,t))}function JG(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o2(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function S0(r,e){return r.get(M_(r,e))}function kf(r,e,t){JG(r,e),e.set(r,t)}function Uf(r,e,t){return r.set(M_(r,e),t),t}function x3(r,e,t){if(b3())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(r.bind.apply(r,n));return i}function eV(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,E_(n.key),n)}}function a2(r,e,t){return e&&eV(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function ir(r,e,t){return(e=E_(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _d(){return _d=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,e,t){var n=AV(r,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?r:t):i.value}},_d.apply(null,arguments)}function GA(r){return GA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},GA(r)}function A2(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&bd(r,e)}function b3(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b3=function(){return!!r})()}function tV(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function nV(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,s,a,u=[],f=!0,m=!1;try{if(s=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;f=!1}else for(;
772!(f=(n=s.call(t)).done)&&(u.push(n.value),u.length!==e);f=!0);}catch(y){m=!0,i=y}finally{try{if(!f&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(m)throw i}}return u}}function rV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 773In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 774In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Vt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mm(Object(t),!0).forEach(function(n){ir(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):mm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function sV(r,e){if(r==null)return{};var t,n,i=oV(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function oV(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function aV(r,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KG(r)}function xd(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var r,e,t=typeof Symbol=="function"?Symbol:{},n=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function s(w,S,E,R){var P=S&&S.prototype instanceof u?S:u,L=Object.create(P.prototype);return oi(L,"_invoke",function(D,O,G){var U,j,V,Q=0,Z=G||[],K=!1,Y={p:0,n:0,v:r,a:ne,f:ne.bind(r,4),d:function(ae,J){return U=ae,j=0,V=r,Y.n=J,a}};function ne(ae,J){for(j=ae,V=J,e=0;!K&&Q&&!fe&&e<Z.length;e++){var fe,pe=Z[e],Re=Y.p,Se=pe[2];ae>3?(fe=Se===J)&&(V=pe[(j=pe[4])?5:(j=3,3)],pe[4]=pe[5]=r):pe[0]<=Re&&((fe=ae<2&&Re<pe[1])?(j=0,Y.v=J,Y.n=pe[1]):Re<Se&&(fe=ae<3||pe[0]>J||J>Se)&&(pe[4]=ae,pe[5]=J,Y.n=Se,j=0))}if(fe||ae>1)return a;throw K=!0,J}return function(ae,J,fe){if(Q>1)throw TypeError("Generator is already running");for(K&&J===1&&ne(J,fe),j=J,V=fe;(e=j<2?r:V)||!K;){U||(j?j<3?(j>1&&(Y.n=-1),ne(j,V)):Y.n=V:Y.v=V);try{if(Q=2,U){if(j||(ae="next"),e=U[ae]){if(!(e=e.call(U,V)))throw TypeError("iterator result is not an object");if(!e.done)return e;V=e.value,j<2&&(j=0)}else j===1&&(e=U.return)&&e.call(U),j<2&&(V=TypeError("The iterator does not provide a '"+ae+"' method"),j=1);U=r}else if((e=(K=Y.n<0)?V:D.call(O,Y))!==a)break}catch(pe){U=r,j=1,V=pe}finally{Q=1}}return{value:e,done:K}}}(w,E,R),!0),L}var a={};function u(){}function f(){}function m(){}e=Object.getPrototypeOf;var y=[][n]?e(e([][n]())):(oi(e={},n,function(){return this}),e),_=m.prototype=u.prototype=Object.create(y);function b(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,m):(w.__proto__=m,oi(w,i,"GeneratorFunction")),w.prototype=Object.create(_),w}return f.prototype=m,oi(_,"constructor",m),oi(m,"constructor",f),f.displayName="GeneratorFunction",oi(m,i,"GeneratorFunction"),oi(_),oi(_,i,"Generator"),oi(_,n,function(){return this}),oi(_,"toString",function(){return"[object Generator]"}),(xd=function(){return{w:s,m:b}})()}function oi(r,e,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}oi=function(s,a,u,f){function m(y,_){oi(s,y,function(b){return this._invoke(y,_,b)})}a?i?i(s,a,{value:u,enumerable:!f,configurable:!f,writable:!f}):s[a]=u:(m("next",0),m("throw",1),m("return",2))},oi(r,e,t,n)}function bd(r,e){return bd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},bd(r,e)}function fn(r,e){return YG(r)||nV(r,e)||N_(r,e)||rV()}function AV(r,e){for(;!{}.hasOwnProperty.call(r,e)&&(r=GA(r))!==null;);return r}function Of(r,e,t,n){var i=_d(GA(r.prototype),e,t);return typeof i=="function"?function(s){return i.apply(t,s)}:i}function Yt(r){return XG(r)||tV(r)||N_(r)||iV()}function lV(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function E_(r){var e=lV(r,"string");return typeof e=="symbol"?e:e+""}function N_(r,e){if(r){if(typeof r=="string")return vd(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vd(r,e):void 0}}var R_=function(e){e instanceof Array?e.forEach(R_):(e.map&&e.map.dispose(),e.dispose())},Lo=function(e){e.geometry&&e.geometry.dispose(),e.material&&R_(e.material),e.texture&&e.texture.dispose(),e.children&&e.children.forEac
774h(Lo)},vn=function(e){if(e&&e.children)for(;e.children.length;){var t=e.children[0];e.remove(t),Lo(t)}};function Ir(r,e){var t=new e;return{linkProp:function(i){return{default:t[i](),onChange:function(a,u){u[r][i](a)},triggerUpdate:!1}},linkMethod:function(i){return function(s){for(var a=s[r],u=arguments.length,f=new Array(u>1?u-1:0),m=1;m<u;m++)f[m-1]=arguments[m];var y=a[i].apply(a,f);return y===a?this:y}}}}var on=100;function gm(){return on}function Ci(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(90-r)*Math.PI/180,i=(90-e)*Math.PI/180,s=on*(1+t),a=Math.sin(n);return{x:s*a*Math.cos(i),y:s*Math.cos(n),z:s*a*Math.sin(i)}}function C_(r){var e=r.x,t=r.y,n=r.z,i=Math.sqrt(e*e+t*t+n*n),s=Math.acos(t/i),a=Math.atan2(n,e);return{lat:90-s*180/Math.PI,lng:90-a*180/Math.PI-(a<-Math.PI/2?360:0),altitude:i/on-1}}function da(r){return r*Math.PI/180}var bl=window.THREE?window.THREE:{BackSide:Xi,BufferAttribute:Wi,Color:Yn,Mesh:zn,ShaderMaterial:Cc},uV=` 775uniform float hollowRadius; 776 777varying vec3 vVertexWorldPosition; 778varying vec3 vVertexNormal; 779varying float vCameraDistanceToObjCenter; 780varying float vVertexAngularDistanceToHollowRadius; 781 782void main() { 783 vVertexNormal = normalize(normalMatrix * normal); 784 vVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz; 785 786 vec4 objCenterViewPosition = modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); 787 vCameraDistanceToObjCenter = length(objCenterViewPosition); 788 789 float edgeAngle = atan(hollowRadius / vCameraDistanceToObjCenter); 790 float vertexAngle = acos(dot(normalize(modelViewMatrix * vec4(position, 1.0)), normalize(objCenterViewPosition))); 791 vVertexAngularDistanceToHollowRadius = vertexAngle - edgeAngle; 792 793 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 794}`,cV=` 795uniform vec3 color; 796uniform float coefficient; 797uniform float power; 798uniform float hollowRadius; 799 800varying vec3 vVertexNormal; 801varying vec3 vVertexWorldPosition; 802varying float vCameraDistanceToObjCenter; 803varying float vVertexAngularDistanceToHollowRadius; 804 805void main() { 806 if (vCameraDistanceToObjCenter < hollowRadius) discard; // inside the hollowRadius 807 if (vVertexAngularDistanceToHollowRadius < 0.0) discard; // frag position is within the hollow radius 808 809 vec3 worldCameraToVertex = vVertexWorldPosition - cameraPosition; 810 vec3 viewCameraToVertex = (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz; 811 viewCameraToVertex = normalize(viewCameraToVertex); 812 float intensity = pow( 813 coefficient + dot(vVertexNormal, viewCameraToVertex), 814 power 815 ); 816 gl_FragColor = vec4(color, intensity); 817}`;function fV(r,e,t,n){return new bl.ShaderMaterial({depthWrite:!1,transparent:!0,vertexShader:uV,fragmentShader:cV,uniforms:{coefficient:{value:r},color:{value:new bl.Color(e)},power:{value:t},hollowRadius:{value:n}}})}function hV(r,e){for(var t=r.clone(),n=new Float32Array(r.attributes.position.count*3),i=0,s=n.length;i<s;i++){var a=r.attributes.normal.array[i],u=r.attributes.position.array[i];n[i]=u+a*e}return t.setAttribute("position",new bl.BufferAttribute(n,3)),t}var dV=function(r){function e(t){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.color,a=s===void 0?"gold":s,u=i.size,f=u===void 0?2:u,m=i.coefficient,y=m===void 0?.5:m,_=i.power,b=_===void 0?1:_,w=i.hollowRadius,S=w===void 0?0:w,E=i.backside,R=E===void 0?!0:E;o2(this,e),n=s2(this,e);var P=hV(t,f),L=fV(y,a,b,S);return R&&(L.side=bl.BackSide),n.geometry=P,n.material=L,n}return A2(e,r),a2(e)}(bl.Mesh),As=window.THREE?window.THREE:{Color:Yn,Group:Fs,LineBasicMaterial:Nc,LineSegments:T7,Mesh:zn,MeshPhongMaterial:p7,SphereGeometry:Ca,SRGBColorSpace:dt,TextureLoader:Bm},P_=Mr({props:{globeImageUrl:{},bumpImageUrl:{},showGlobe:{default:!0,onChange:function(e,t){t.globeGroup.visible=!!e},triggerUpdate:!1},showGraticules:{default:!1,onChange:function(e,t){t.graticulesObj.visible=!!e},triggerUpdate:!1},showAtmosphere:{default:!0,onChange:function(e,t){t.atmosphereObj&&(t.atmosphereObj.visible=!!e)},triggerUpdate:!1},atmosphereColor:{default:"lightskyblue"},atmosphereAltitude:{default:.15},globeCurvatureResolution:{default:4},globeTileEngineUrl:{onChange:function(e,t){t.tileEngine.tileUrl=e}},globeTileEngineMaxLevel:{default:17,onChange:function(e,t){t.tileEngine.maxLevel=e},triggerUpdate:!1},updatePov:{onChange:function(e,t){t.tileEngine.updatePov(e)},triggerUpdate:!1},onReady:{default:function(){},triggerUpdate:!1}},methods:{globeMaterial:function(e,t){return t!==void 0?(e.globeObj.material=t||e.defaultGlobeMaterial,this):e.globeObj.material},globeTileEngineClearCache:function(e){e.tileEngine.clearTiles()},_destructor:function(e){Lo(e.globeObj),Lo(e.tileEngine),Lo(e.graticulesObj)}},stateInit:function(){var e=new As.MeshPhongMaterial({color:0}),t=new As.Mesh(void 0,e);t.rotation.y=-Math.PI/2;var n=new iN(on),i=new As.Group;
817i.__globeObjType="globe",i.add(t),i.add(n);var s=new As.LineSegments(new Tg(xE(),on,2),new As.LineBasicMaterial({color:"lightgrey",transparent:!0,opacity:.1}));return{globeGroup:i,globeObj:t,graticulesObj:s,defaultGlobeMaterial:e,tileEngine:n}},init:function(e,t){vn(e),t.scene=e,t.scene.add(t.globeGroup),t.scene.add(t.graticulesObj),t.ready=!1},update:function(e,t){var n=e.globeObj.material;if(e.tileEngine.visible=!(e.globeObj.visible=!e.globeTileEngineUrl),t.hasOwnProperty("globeCurvatureResolution")){var i;(i=e.globeObj.geometry)===null||i===void 0||i.dispose();var s=Math.max(4,Math.round(360/e.globeCurvatureResolution));e.globeObj.geometry=new As.SphereGeometry(on,s,s/2),e.tileEngine.curvatureResolution=e.globeCurvatureResolution}if(t.hasOwnProperty("globeImageUrl")&&(e.globeImageUrl?new As.TextureLoader().load(e.globeImageUrl,function(u){var f;u.colorSpace=As.SRGBColorSpace,(f=n.map)===null||f===void 0||f.dispose(),n.map=u,n.color=null,n.needsUpdate=!0,!e.ready&&(e.ready=!0)&&setTimeout(e.onReady)}):!n.color&&(n.color=new As.Color(0))),t.hasOwnProperty("bumpImageUrl")&&(e.bumpImageUrl?e.bumpImageUrl&&new As.TextureLoader().load(e.bumpImageUrl,function(u){var f;(f=n.bumpMap)===null||f===void 0||f.dispose(),n.bumpMap=u,n.needsUpdate=!0}):(n.bumpMap=null,n.needsUpdate=!0)),(t.hasOwnProperty("atmosphereColor")||t.hasOwnProperty("atmosphereAltitude"))&&(e.atmosphereObj&&(e.scene.remove(e.atmosphereObj),Lo(e.atmosphereObj)),e.atmosphereColor&&e.atmosphereAltitude)){var a=e.atmosphereObj=new dV(e.globeObj.geometry,{color:e.atmosphereColor,size:on*e.atmosphereAltitude,hollowRadius:on,coefficient:.1,power:3.5});a.visible=!!e.showAtmosphere,a.__globeObjType="atmosphere",e.scene.add(a)}!e.ready&&(!e.globeImageUrl||e.globeTileEngineUrl)&&(e.ready=!0,e.onReady())}}),Ps=function(e){return isNaN(e)?parseInt(Xe(e).toHex(),16):e},Yi=function(e){return e&&isNaN(e)?Ma(e).opacity:1},zo=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i,s=1,a=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.eE+-]+)\s*\)$/.exec(e.trim().toLowerCase());if(a){var u=a.slice(1),f=fn(u,4),m=f[0],y=f[1],_=f[2],b=f[3];i=new Yn("rgb(".concat(+m,",").concat(+y,",").concat(+_,")")),s=Math.min(+b,1)}else i=new Yn(e);n&&i.convertLinearToSRGB();var w=i.toArray();return t?[].concat(Yt(w),[s]):w};function pV(r,e,t){return r.opacity=e,r.transparent=e<1,r.depthWrite=e>=1,r}var ym=window.THREE?window.THREE:{BufferAttribute:Wi};function Bs(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float32Array;if(e===1)return new ym.BufferAttribute(new t(r),e);for(var n=new ym.BufferAttribute(new t(r.length*e),e),i=0,s=r.length;i<s;i++)n.set(r[i],i*e);return n}function mV(r){for(var e=r.itemSize,t=[],n=0;n<r.count;n++)t.push(r.array.slice(n*e,(n+1)*e));return t}var Gf=new WeakMap,Qu=new WeakMap,Yu=new WeakMap,ei=function(r){function e(t){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.dataBindAttr,a=s===void 0?"__data":s,u=i.objBindAttr,f=u===void 0?"__threeObj":u,m=i.removeDelay,y=m===void 0?0:m;return o2(this,e),n=s2(this,e),ir(n,"scene",void 0),kf(n,Gf,void 0),kf(n,Qu,void 0),kf(n,Yu,void 0),n.scene=t,Uf(Gf,n,a),Uf(Qu,n,f),Uf(Yu,n,y),n.onRemoveObj(function(){}),n}return A2(e,r),a2(e,[{key:"onCreateObj",value:function(n){var i=this;return Of(e,"onCreateObj",this)([function(s){var a=n(s);
vendor: 5,608 bytes, lines 817-895
817return s[S0(Qu,i)]=a,a[S0(Gf,i)]=s,i.scene.add(a),a}]),this}},{key:"onRemoveObj",value:function(n){var i=this;return Of(e,"onRemoveObj",this)([function(s,a){var u=Of(e,"getData",i)([s]);n(s,a);var f=function(){i.scene.remove(s),Lo(s),delete u[S0(Qu,i)]};S0(Yu,i)?setTimeout(f,S0(Yu,i)):f()}]),this}}])}(LR),Ii=window.THREE?window.THREE:{BufferGeometry:Pi,CylinderGeometry:iw,Matrix4:Bn,Mesh:zn,MeshLambertMaterial:Ao,Object3D:Rc,Vector3:ke},vm=Object.assign({},Zd),_m=vm.BufferGeometryUtils||vm,B_=Mr({props:{pointsData:{default:[]},pointLat:{default:"lat"},pointLng:{default:"lng"},pointColor:{default:function(){return"#ffffaa"}},pointAltitude:{default:.1},pointRadius:{default:.25},pointResolution:{default:12,triggerUpdate:!1},pointsMerge:{default:!1},pointsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjPoint"})},update:function(e,t){var n=Ce(e.pointLat),i=Ce(e.pointLng),s=Ce(e.pointAltitude),a=Ce(e.pointRadius),u=Ce(e.pointColor),f=new Ii.CylinderGeometry(1,1,1,e.pointResolution);f.applyMatrix4(new Ii.Matrix4().makeRotationX(Math.PI/2)),f.applyMatrix4(new Ii.Matrix4().makeTranslation(0,0,-.5));var m=2*Math.PI*on/360,y={};if(!e.pointsMerge&&t.hasOwnProperty("pointsMerge")&&vn(e.scene),e.dataMapper.scene=e.pointsMerge?new Ii.Object3D:e.scene,e.dataMapper.onCreateObj(w).onUpdateObj(S).digest(e.pointsData),e.pointsMerge){var _=e.pointsData.length?(_m.mergeGeometries||_m.mergeBufferGeometries)(e.pointsData.map(function(E){var R=e.dataMapper.getObj(E),P=R.geometry.clone();R.updateMatrix(),P.applyMatrix4(R.matrix);var L=zo(u(E));return P.setAttribute("color",Bs(Array(P.getAttribute("position").count).fill(L),4)),P})):new Ii.BufferGeometry,b=new Ii.Mesh(_,new Ii.MeshLambertMaterial({color:16777215,transparent:!0,vertexColors:!0}));b.__globeObjType="points",b.__data=e.pointsData,e.dataMapper.clear(),vn(e.scene),e.scene.add(b)}function w(){var E=new Ii.Mesh(f);return E.__globeObjType="point",E}function S(E,R){var P=function(V){var Q=E.__currentTargetD=V,Z=Q.r,K=Q.alt,Y=Q.lat,ne=Q.lng;Object.assign(E.position,Ci(Y,ne));var ae=e.pointsMerge?new Ii.Vector3(0,0,0):e.scene.localToWorld(new Ii.Vector3(0,0,0));E.lookAt(ae),E.scale.x=E.scale.y=Math.min(30,Z)*m,E.scale.z=Math.max(K*on,.1)},L={alt:+s(R),r:+a(R),lat:+n(R),lng:+i(R)},D=E.__currentTargetD||Object.assign({},L,{alt:-.001});if(Object.keys(L).some(function(j){return D[j]!==L[j]})&&(e.pointsMerge||!e.pointsTransitionDuration||e.pointsTransitionDuration<0?P(L):e.tweenGroup.add(new fi(D).to(L,e.pointsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(P).onComplete(function(){e.tweenGroup.remove(this)}).start())),!e.pointsMerge){var O=u(R),G=O?Yi(O):0,U=!!G;E.visible=U,U&&(y.hasOwnProperty(O)||(y[O]=new Ii.MeshLambertMaterial({color:Ps(O),transparent:G<1,opacity:G})),E.material=y[O])}}}}),F_=function(){return{uniforms:{dashOffset:{value:0},dashSize:{value:1},gapSize:{value:0},dashTranslate:{value:0}},vertexShader:` 818 `.concat(n0.common,` 819 `).concat(n0.logdepthbuf_pars_vertex,` 820 821 uniform float dashTranslate; 822 823 attribute vec4 color; 824 varying vec4 vColor; 825 826 attribute float relDistance; 827 varying float vRelDistance; 828 829 void main() { 830 // pass through colors and distances 831 vColor = color; 832 vRelDistance = relDistance + dashTranslate; 833 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 834 835 `).concat(n0.logdepthbuf_vertex,` 836 } 837 `),fragmentShader:` 838 `.concat(n0.logdepthbuf_pars_fragment,` 839 840 uniform float dashOffset; 841 uniform float dashSize; 842 uniform float gapSize; 843 844 varying vec4 vColor; 845 varying float vRelDistance; 846 847 void main() { 848 // ignore pixels in the gap 849 if (vRelDistance < dashOffset) discard; 850 if (mod(vRelDistance - dashOffset, dashSize + gapSize) > dashSize) discard; 851 852 // set px color: [r, g, b, a], interpolated between vertices 853 gl_FragColor = vColor; 854 855 `).concat(n0.logdepthbuf_fragment,` 856 } 857 `)}},Td=function(e){return e.uniforms.uSurfaceRadius={type:"float",value:0},e.vertexShader=(`attribute float surfaceRadius; 858varying float vSurfaceRadius; 859varying vec3 vPos; 860`+e.vertexShader).replace("void main() {",["void main() {","vSurfaceRadius = surfaceRadius;","vPos = position;"].join(` 861`)),e.fragmentShader=(`uniform float uSurfaceRadius; 862varying float vSurfaceRadius; 863varying vec3 vPos; 864`+e.fragmentShader).replace("void main() {",["void main() {","if (length(vPos) < max(uSurfaceRadius, vSurfaceRadius)) discard;"].join(` 865`)),e},gV=function(e){return e.vertexShader=` 866 attribute float r; 867 868 const float PI = 3.1415926535897932384626433832795; 869 float toRad(in float a) { 870 return a * PI / 180.0; 871 } 872 873 vec3 Polar2Cartesian(in vec3 c) { // [lat, lng, r] 874 float phi = toRad(90.0 - c.x); 875 float theta = toRad(90.0 - c.y); 876 float r = c.z; 877 return vec3( // x,y,z 878 r * sin(phi) * cos(theta), 879 r * cos(phi), 880 r * sin(phi) * sin(theta) 881 ); 882 } 883 884 vec2 Cartesian2Polar(in vec3 p) { 885 float r = sqrt(p.x * p.x + p.y * p.y + p.z * p.z); 886 float phi = acos(p.y / r); 887 float theta = atan(p.z, p.x); 888 return vec2( // lat,lng 889 90.0 - phi * 180.0 / PI, 890 90.0 - theta * 180.0 / PI - (theta < -PI / 2.0 ? 360.0 : 0.0) 891 ); 892 } 893 `.concat(e.vertexShader.replace("}",` 894 vec3 pos = Polar2Cartesian(vec3(Cartesian2Polar(position), r)); 895 gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0
895); 896 } 897 `),` 898 `),e},T3=function(e,t){return e.onBeforeCompile=function(n){e.userData.shader=t(n)},e},yV=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(i){return i};if(e.userData.shader)t(e.userData.shader.uniforms);else{var n=e.onBeforeCompile;e.onBeforeCompile=function(i){n(i),t(i.uniforms)}}},vV=["stroke"],ki=window.THREE?window.THREE:{BufferGeometry:Pi,CubicBezierCurve3:sw,Curve:ow,Group:Fs,Line:kd,Mesh:zn,NormalBlending:qo,ShaderMaterial:Cc,TubeGeometry:aw,Vector3:ke},_V=DA.default||DA,D_=Mr({props:{arcsData:{default:[]},arcStartLat:{default:"startLat"},arcStartLng:{default:"startLng"},arcStartAltitude:{default:0},arcEndLat:{default:"endLat"},arcEndLng:{default:"endLng"},arcEndAltitude:{default:0},arcColor:{default:function(){return"#ffffaa"}},arcAltitude:{},arcAltitudeAutoScale:{default:.5},arcStroke:{},arcCurveResolution:{default:64,triggerUpdate:!1},arcCircularResolution:{default:6,triggerUpdate:!1},arcDashLength:{default:1},arcDashGap:{default:0},arcDashInitialGap:{default:0},arcDashAnimateTime:{default:0},arcsTransitionDuration:{default:1e3,triggerUpdate:!1}},methods:{pauseAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.pause()},resumeAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.resume()},_destructor:function(e){var t;e.sharedMaterial.dispose(),(t=e.ticker)===null||t===void 0||t.dispose()}},stateInit:function(e){var t=e.tweenGroup;return{tweenGroup:t,ticker:new _V,sharedMaterial:new ki.ShaderMaterial(Vt(Vt({},F_()),{},{transparent:!0,blending:ki.NormalBlending}))}},init:function(e,t){vn(e),t.scene=e,t.dataMapper=new ei(e,{objBindAttr:"__threeObjArc"}).onCreateObj(function(){var n=new ki.Group;return n.__globeObjType="arc",n}),t.ticker.onTick.add(function(n,i){t.dataMapper.entries().map(function(s){var a=fn(s,2),u=a[1];return u}).filter(function(s){return s.children.length&&s.children[0].material&&s.children[0].__dashAnimateStep}).forEach(function(s){var a=s.children[0],u=a.__dashAnimateStep*i,f=a.material.uniforms.dashTranslate.value%1e9;a.material.uniforms.dashTranslate.value=f+u})})},update:function(e){var t=Ce(e.arcStartLat),n=Ce(e.arcStartLng),i=Ce(e.arcStartAltitude),s=Ce(e.arcEndLat),a=Ce(e.arcEndLng),u=Ce(e.arcEndAltitude),f=Ce(e.arcAltitude),m=Ce(e.arcAltitudeAutoScale),y=Ce(e.arcStroke),_=Ce(e.arcColor),b=Ce(e.arcDashLength),w=Ce(e.arcDashGap),S=Ce(e.arcDashInitialGap),E=Ce(e.arcDashAnimateTime);e.dataMapper.onUpdateObj(function(D,O){var G=y(O),U=G!=null;if(!D.children.length||U!==(D.children[0].type==="Mesh")){vn(D);var j=U?new ki.Mesh:new ki.Line(new ki.BufferGeometry);j.material=e.sharedMaterial.clone(),D.add(j)}var V=D.children[0];Object.assign(V.material.uniforms,{dashSize:{value:b(O)},gapSize:{value:w(O)},dashOffset:{value:S(O)}});var Q=E(O);V.__dashAnimateStep=Q>0?1e3/Q:0;var Z=P(_(O),e.arcCurveResolution,U?e.arcCircularResolution+1:1),K=L(e.arcCurveResolution,U?e.arcCircularResolution+1:1,!0);V.geometry.setAttribute("color",Z),V.geometry.setAttribute("relDistance",K);var Y=function(fe){var pe=D.__currentTargetD=fe,Re=pe.stroke,Se=sV(pe,vV),qe=R(Se);U?(V.geometry&&V.geometry.dispose(),V.geometry=new ki.TubeGeometry(qe,e.arcCurveResolution,Re/2,e.arcCircularResolution),V.geometry.setAttribute("color",Z),V.geometry.setAttribute("relDistance",K)):V.geometry.setFromPoints(qe.getPoints(e.arcCurveResolution))},ne={stroke:G,alt:f(O),altAutoScale:+m(O),startLat:+t(O),startLng:+n(O),startAlt:+i(O),endLat:+s(O),endLng:+a(O),endAlt:+u(O)},ae=D.__currentTargetD||Object.assign({},ne,{altAutoScale:-.001});Object.keys(ne).some(function(J){return ae[J]!==ne[J]})&&(!e.arcsTransitionDuration||e.arcsTransitionDuration<0?Y(ne):e.tweenGroup.add(new fi(ae).to(ne,e.arcsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(Y).onComplete(function(){e.tweenGroup.remove(this)}).start()))}).digest(e.arcsData);function R(D){var O=D.alt,G=D.altAutoScale,U=D.startLat,j=D.startLng,V=D.startAlt,Q=D.endLat,Z=D.endLng,K=D.endAlt,Y=function(yt){var Tt=fn(yt,3),Xt=Tt[0],sn=Tt[1],Ut=Tt[2],Ot=Ci(sn,Xt,Ut),$t=Ot.x,en=Ot.y,Kn=Ot.z;return new ki.Vector3($t,en,Kn)},ne=[j,U],ae=[Z,Q],J=O;if(J==null&&(J=Go(ne,ae)/2*G+Math.max(V,K)),J||V||K){var fe=Wd(ne,ae),pe=function(yt,Tt){return Tt+(Tt-yt)*(yt<Tt?.5:.25)},Re=[.25,.75].map(function(it){return[].concat(Yt(fe(it)),[pe(it<.5?V:K,J)]
898)}),Se=fn(Re,2),qe=Se[0],je=Se[1],Qe=x3(ki.CubicBezierCurve3,Yt([[].concat(ne,[V]),qe,je,[].concat(ae,[K])].map(Y)));return Qe}else{var He=.001;return vt.apply(void 0,Yt([[].concat(ne,[He]),[].concat(ae,[He])].map(Y)))}function vt(it,yt){var Tt=it.angleTo(yt),Xt=Tt===0?function(){return it.clone()}:function(Ut){return new ki.Vector3().addVectors(it.clone().multiplyScalar(Math.sin((1-Ut)*Tt)),yt.clone().multiplyScalar(Math.sin(Ut*Tt))).divideScalar(Math.sin(Tt))},sn=new ki.Curve;return sn.getPoint=Xt,sn}}function P(D,O){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,U=O+1,j;if(D instanceof Array||D instanceof Function){var V=D instanceof Array?to().domain(D.map(function(J,fe){return fe/(D.length-1)})).range(D):D;j=function(fe){return zo(V(fe),!0,!0)}}else{var Q=zo(D,!0,!0);j=function(){return Q}}for(var Z=[],K=0,Y=U;K<Y;K++)for(var ne=j(K/(Y-1)),ae=0;ae<G;ae++)Z.push(ne);return Bs(Z,4)}function L(D){for(var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,U=D+1,j=[],V=0,Q=U;V<Q;V++)for(var Z=V/(Q-1),K=0;K<O;K++)j.push(Z);return G&&j.reverse(),Bs(j,1)}}}),So=window.THREE?window.THREE:{BufferGeometry:Pi,DoubleSide:Qi,Mesh:zn,MeshLambertMaterial:Ao,Object3D:Rc},xm=Object.assign({},Zd),bm=xm.BufferGeometryUtils||xm,L_=Mr({props:{hexBinPointsData:{default:[]},hexBinPointLat:{default:"lat"},hexBinPointLng:{default:"lng"},hexBinPointWeight:{default:1},hexBinResolution:{default:4},hexMargin:{default:.2},hexTopCurvatureResolution:{default:5},hexTopColor:{default:function(){return"#ffffaa"}},hexSideColor:{default:function(){return"#ffffaa"}},hexAltitude:{default:function(e){var t=e.sumWeight;return t*.01}},hexBinMerge:{default:!1},hexTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjHexbin"})},update:function(e,t){var n=Ce(e.hexBinPointLat),i=Ce(e.hexBinPointLng),s=Ce(e.hexBinPointWeight),a=Ce(e.hexAltitude),u=Ce(e.hexTopColor),f=Ce(e.hexSideColor),m=Ce(e.hexMargin),y=tP(e.hexBinPointsData.map(function(L){return Vt(Vt({},L),{},{h3Idx:UP(n(L),i(L),e.hexBinResolution)})}),"h3Idx"),_=Object.entries(y).map(function(L){var D=fn(L,2),O=D[0],G=D[1];return{h3Idx:O,points:G,sumWeight:G.reduce(function(U,j){return U+ +s(j)},0)}}),b={};if(!e.hexBinMerge&&t.hasOwnProperty("hexBinMerge")&&vn(e.scene),e.dataMapper.scene=e.hexBinMerge?new So.Object3D:e.scene,e.dataMapper.id(function(L){return L.h3Idx}).onCreateObj(R).onUpdateObj(P).digest(_),e.hexBinMerge){var w=_.length?(bm.mergeGeometries||bm.mergeBufferGeometries)(_.map(function(L){var D=e.dataMapper.getObj(L),O=D.geometry.toNonIndexed();D.updateMatrix(),O.applyMatrix4(D.matrix);var G=zo(u(L)),U=zo(f(L)),j=O.getAttribute("position").count,V=O.groups[0].count;return O.setAttribute("color",Bs(Yt(new Array(j)).map(function(Q,Z){return Z>=V?G:U}),4)),O})):new So.BufferGeometry,S=new So.MeshLambertMaterial({color:16777215,transparent:!0,vertexColors:!0,side:So.DoubleSide});S.onBeforeCompile=function(L){S.userData.shader=Td(L)};var E=new So.Mesh(w,S);E.__globeObjType="hexBinPoints",E.__data=_,e.dataMapper.clear(),vn(e.scene),e.scene.add(E)}function R(L){var D=new So.Mesh;D.__hexCenter=jg(L.h3Idx),D.__hexGeoJson=$g(L.h3Idx,!0).reverse();var O=D.__hexCenter[1];return D.__hexGeoJson.forEach(function(G){var U=G[0];Math.abs(O-U)>170&&(G[0]+=O>U?360:-360)}),D.__globeObjType="hexbin",D}function P(L,D){var O=function(pe,Re,Se){return pe-(pe-Re)*Se},G=Math.max(0,Math.min(1,+m(D))),U=fn(L.__hexCenter,2),j=U[0],V=U[1],Q=G===0?L.__hexGeoJson:L.__hexGeoJson.map(function(fe){var pe=fn(fe,2),Re=pe[0],Se=pe[1];return[[Re,V],[Se,j]].map(function(qe){var je=fn(qe,2),Qe=je[0],He=je[1];return O(Qe,He,G)})}),Z=e.hexTopCurvatureResolution;L.geometry&&L.geometry.dispose(),L.geometry=new rp([Q],0,on,!1,!0,!0,Z);var K={alt:+a(D)},Y=function(pe){var Re=L.__currentTargetD=pe,Se=Re.alt;L.scale.x=L.scale.y=L.scale.z=1+Se;var qe=on/(Se+1);L.geometry.setAttribute("surfaceRadius",Bs(Array(L.geometry.getAttribute("position").count).fill(qe),1))},ne=L.__currentTargetD||Object.assign({},K,{alt:-.001});if(Object.keys(K).some(function(fe){return ne[fe]!==K[fe]})&&(e.hexBinMerge||!e.hexTransitionDuration||e.hexTransitionDuration<0?Y(K):e.tweenGroup.add(new fi(ne).to(K,e.hexTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(Y).onComplete(function(){e.tweenGroup.remove(this)}).start())),!e.hexBinMerge){var ae=f(D),J=u(D);[ae,J].forEach(function(fe){if(!b.hasOwnProperty(fe)){var pe=Yi(fe);b[fe]=T3(new So.MeshLambertMaterial({color:Ps(fe),transparent:pe<1,opacity:pe,side:So.DoubleSide}),Td)}}),L.material=[ae,J].map(function(fe){return b[fe]})}}}}),q_=function(e){return e*e},Ys=function(e){return e*Math.PI/180};function xV(r,e){var t=Math.sqrt,n=Math.cos,i=function(y){return q_(Math.sin(y/2))},s=Ys(r[1]),a=Ys(e[1]),u=Ys(r[0]),f=Ys(e[0]);return 2*Math.asin(t(i(a-s)+n(s)*n(a)*i(f-u)))}var bV=Math.sqrt(2*Math.PI);function TV(r,e){return Math.exp(-q_(r/e)/2)/(e*bV)}var wV=function(e){var t=fn(e,2),n=t[0],i=t[1],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=a.lngAccessor,f=u===void 0?function(R){return R[0]}:u,m=a.latAccessor,y=m===void 0?function(R){return R[1]}:m,_=a.weightAccessor,b=_===void 0?function(){return 1}:_,w=a.bandwidth,S=[n,i],E=w*Math.PI/180;return KS(s.map(function(R){var P=b(R);if(!P)return 0;var L=xV(S,[f(R),y(R)]);return TV(L,E)*P}))},SV=function(){var r=ZG(xd().m(function e(t){var n,i,s,a,u,f,m,y,_,b,w,S,E,R,P,L,D,O,G,U,j,V,Q,Z,K,Y,ne,ae,J,fe,pe,Re,Se,qe,je,Qe,He,vt,it,yt,Tt=arguments,Xt,sn,Ut;return xd().w(function(Ot){for(;;)switch(Ot.n){case 0:if(i=Tt.length>1&&Tt[1]!==void 0?Tt[1]:[],s=Tt.length>2&&Tt[2]!==void 0?Tt[2]:{},a=s.lngAccessor,u=a===void 0?function($t){return $t[0]}:a,f=s.latAccessor,m=f===void 0?function($t){return $t[1]}:f,y=s.weightAccessor,_=y===void 0?function(){return 1}:y,b=s.bandwidth,(n=navigator)!==null&&n!==void 0&&n.gpu){Ot.n=1;break}return console.warn("WebGPU not enabled in browser. Please consider enabling it to improve performance."),Ot.a(2,t.map(function($t){return wV($t,i,{lngAccessor:u,latAccessor:m,weightAccessor:_,bandwidth:b})}));case 1:return w=4,S=NG,E=RG,R=OG,P=UG,L=DG,D=LG,O=CG,G=kG,U=IG,j=BG,V=PG,Q=FG,Z=qG,K=P(new g1(new Float32Array(t.flat().map(Ys)),2),"vec2",t.length),Y=P(new g1(new Float32Array(i.map(function($t){return[Ys(u($t)),Ys(m($t)),_($t)]}).flat()),3),"vec3",i.length),ne=new g1(t.length,1),ae=P(ne,"float",t.length),J=L(Math.PI),fe=G(J.mul(2)),pe=function(en){return en.mul(en)},Re=function(en){return pe(U(en.div(2)))},Se=function(en,Kn){var Nr=L(en[1]),kr=L(Kn[1]),In=L(en[0]),$n=L(Kn[0]);return L(2).mul(V(G(Re(kr.sub(Nr)).add(j(Nr).mul(j(kr)).mul(Re($n.sub(In)))))))},qe=function(en,Kn){return Q(Z(pe(en.div(Kn)).div(2))).div(Kn.mul(fe))},je=R(Ys(b)),Qe=R(Ys(b*w)),He=R(i.length),vt=S(function(){var $t=K.element
vendor: 4,221 bytes, line 898
898(D),en=ae.element(D);en.assign(0),O(He,function(Kn){var Nr=Kn.i,kr=Y.element(Nr),In=kr.z;E(In,function(){var $n=Se(kr.xy,$t.xy);E($n&&$n.lessThan(Qe),function(){en.addAssign(qe($n,je).mul(In))})})})}),it=vt().compute(t.length),yt=new EG,Ot.n=2,yt.computeAsync(it);case 2:return Xt=Array,sn=Float32Array,Ot.n=3,yt.getArrayBufferAsync(ne);case 3:return Ut=Ot.v,Ot.a(2,Xt.from.call(Xt,new sn(Ut)))}},e)}));return function(t){return r.apply(this,arguments)}}(),Xu=window.THREE?window.THREE:{Mesh:zn,MeshLambertMaterial:Ao,SphereGeometry:Ca},MV=3.5,EV=.1,Tm=100,NV=function(e){var t=Ma(GP(e));return t.opacity=Math.cbrt(e),t.formatRgb()},I_=Mr({props:{heatmapsData:{default:[]},heatmapPoints:{default:function(e){return e}},heatmapPointLat:{default:function(e){return e[0]}},heatmapPointLng:{default:function(e){return e[1]}},heatmapPointWeight:{default:1},heatmapBandwidth:{default:2.5},heatmapColorFn:{default:function(){return NV}},heatmapColorSaturation:{default:1.5},heatmapBaseAltitude:{default:.01},heatmapTopAltitude:{},heatmapsTransitionDuration:{default:0,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjHeatmap"}).onCreateObj(function(){var s=new Xu.Mesh(new Xu.SphereGeometry(on),T3(new Xu.MeshLambertMaterial({vertexColors:!0,transparent:!0}),gV));return s.__globeObjType="heatmap",s})},update:function(e){var t=Ce(e.heatmapPoints),n=Ce(e.heatmapPointLat),i=Ce(e.heatmapPointLng),s=Ce(e.heatmapPointWeight),a=Ce(e.heatmapBandwidth),u=Ce(e.heatmapColorFn),f=Ce(e.heatmapColorSaturation),m=Ce(e.heatmapBaseAltitude),y=Ce(e.heatmapTopAltitude);e.dataMapper.onUpdateObj(function(_,b){var w=a(b),S=u(b),E=f(b),R=m(b),P=y(b),L=t(b).map(function(j){var V=n(j),Q=i(j),Z=Ci(V,Q),K=Z.x,Y=Z.y,ne=Z.z;return{x:K,y:Y,z:ne,lat:V,lng:Q,weight:s(j)}}),D=Math.max(EV,w/MV),O=Math.ceil(360/(D||-1));_.geometry.parameters.widthSegments!==O&&(_.geometry.dispose(),_.geometry=new Xu.SphereGeometry(on,O,O/2));var G=mV(_.geometry.getAttribute("position")),U=G.map(function(j){var V=fn(j,3),Q=V[0],Z=V[1],K=V[2],Y=C_({x:Q,y:Z,z:K}),ne=Y.lng,ae=Y.lat;return[ne,ae]});SV(U,L,{latAccessor:function(V){return V.lat},lngAccessor:function(V){return V.lng},weightAccessor:function(V){return V.weight},bandwidth:w}).then(function(j){var V=Yt(new Array(Tm)).map(function(Y,ne){return zo(S(ne/(Tm-1)))}),Q=function(ne){var ae=_.__currentTargetD=ne,J=ae.kdeVals,fe=ae.topAlt,pe=ae.saturation,Re=QS(J.map(Math.abs))||1e-15,Se=z7([0,Re/pe],V);_.geometry.setAttribute("color",Bs(J.map(function(je){return Se(Math.abs(je))}),4));var qe=to([0,Re],[on*(1+R),on*(1+(fe||R))]);_.geometry.setAttribute("r",Bs(J.map(qe)))},Z={kdeVals:j,topAlt:P,saturation:E},K=_.__currentTargetD||Object.assign({},Z,{kdeVals:j.map(function(){return 0}),topAlt:P&&R,saturation:.5});K.kdeVals.length!==j.length&&(K.kdeVals=j.slice()),Object.keys(Z).some(function(Y){return K[Y]!==Z[Y]})&&(!e.heatmapsTransitionDuration||e.heatmapsTransitionDuration<0?Q(Z):e.tweenGroup.add(new fi(K).to(Z,e.heatmapsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(Q).onComplete(function(){e.tweenGroup.remove(this)}).start()))})}).digest(e.heatmapsData)}}),Mo=window.THREE?window.THREE:{DoubleSide:Qi,Group:Fs,LineBasicMaterial:Nc,LineSegments:T7,Mesh:zn,MeshBasicMaterial:wc},k_=Mr({props:{polygonsData:{default:[]},polygonGeoJsonGeometry:{default:"geometry"},polygonSideColor:{default:function(){return"#ffffaa"}},polygonSideMaterial:{},polygonCapColor:{default:function(){return"#ffffaa"}},polygonCapMaterial:{},polygonStrokeColor:{},polygonAltitude:{default:.01},polygonCapCurvatureResolution:{default:5},polygonsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjPolygon"}).id(function(s){return s.id}).onCreateObj(function(){var s=new Mo.Group;return s.__defaultSideMaterial=T3(new Mo.MeshBasicMaterial({side:Mo.DoubleSide,depthWrite:!0}),Td),s.__defaultCapMaterial=new Mo.MeshBasicMaterial({side:Mo.DoubleSide,depthWrite:!0}),s.add(new Mo.Mesh(void 0,[s.__defaultSideMaterial,s.__defaultCapMaterial])),s.add(new Mo.LineSegments(void 0,new Mo.LineBasicMaterial)),s.__globeOb
898jType="polygon",s})},update:function(e){var t=Ce(e.polygonGeoJsonGeometry),n=Ce(e.polygonAltitude),i=Ce(e.polygonCapCurvatureResolution),s=Ce(e.polygonCapColor),a=Ce(e.polygonCapMaterial),u=Ce(e.polygonSideColor),f=Ce(e.polygonSideMaterial),m=Ce(e.polygonStrokeColor),y=[];e.polygonsData.forEach(function(_){var b={data:_,capColor:s(_),capMaterial:a(_),sideColor:u(_),sideMaterial:f(_),strokeColor:m(_),altitude:+n(_),capCurvatureResolution:+i(_)},w=t(_),S=_.__id||"".concat(Math.round(Math.random()*1e9));_.__id=S,w.type==="Polygon"?y.push(Vt({id:"".concat(S,"_0"),coords:w.coordinates},b)):w.type==="MultiPolygon"?y.push.apply(y,Yt(w.coordinates.map(function(E,R){return Vt({id:"".concat(S,"_").concat(R),coords:E},b)}))):console.warn("Unsupported GeoJson geometry type: ".concat(w.type,". Skipping geometry..."))}),e.dataMapper.onUpdateObj(function(_,b){var w=b.coords,S=b.capColor,E=b.capMaterial,R=b.sideColor,P=b.sideMaterial,L=b.strokeColor,D=b.altitude,O=b.capCurvatureResolution,G=fn(_.children,2),U=G[0],j=G[1],V=!!L;j.visible=V;var Q=!!(S||E),Z=!!(R||P);RV(U.geometry.parameters||{},{polygonGeoJson:w,curvatureResolution:O,closedTop:Q,includeSides:Z})||(U.geometry&&U.geometry.dispose(),U.geometry=new rp(w,0,on,!1,Q,Z,O)),V&&(!j.geometry.parameters||j.geometry.parameters.geoJson.coordinates!==w||j.geometry.parameters.resolution!==O)&&(j.geometry&&j.geometry.dispose(),j.geometry=new Tg({type:"Polygon",coordinates:w},on,O));var K=Z?0:-1,Y=Q?Z?1:0:-1;if(K>=0&&(U.material[K]=P||_.__defaultSideMaterial),Y>=0&&(U.material[Y]=E||_.__defaultCapMaterial),[[!P&&R,K],[!E&&S,Y]].forEach(function(Re){var Se=fn(Re,2),qe=Se[0],je=Se[1];if(!(!qe||je<0)){var Qe=U.material[je],He=Yi(qe);Qe.color.set(Ps(qe)),Qe.transparent=He<1,Qe.opacity=He}}),V){var ne=j.material,ae=Yi(L);ne.color.set(Ps(L)),ne.transparent=ae<1,ne.opacity=ae}var J={alt:D},fe=function(Se){var qe=_.__currentTargetD=Se,je=qe.alt;U.scale.x=U.scale.y=U.scale.z=1+je,V&&(j.scale.x=j.scale.y=j.scale.z=1+je+1e-4),yV(_.__defaultSideMaterial,function(Qe){return Qe.uSurfaceRadius.value=on/(je+1)})},pe=_.__currentTargetD||Object.assign({},J,{alt:-.001});Object.keys(J).some(function(Re){return pe[Re]!==J[Re]})&&(!e.polygonsTransitionDuration||e.polygonsTransitionDuration<0||pe.alt===J.alt?fe(J):e.tweenGroup.add(new fi(pe).to(J,e.polygonsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(fe).onComplete(function(){e.tweenGroup.remove(this)}).start()))}).digest(y)}});function RV(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return function(n,i){return n===i}};return Object.entries(e).every(function(n){var i=fn(n,2),s=i[0],a=i[1];return r.hasOwnProperty(s)&&t(s)(r[s],a)})}var sA=window.THREE?window.THREE:{BufferGeometry:Pi,DoubleSide:Qi,Mesh:zn,MeshLambertMaterial:Ao,Vector3:ke},wm=Object.assign({},Zd),Sm=wm.BufferGeometryUtils||wm,U_=Mr({props:{hexPolygonsData:{default:[]},hexPolygonGeoJsonGeometry:{default:"geometry"},hexPolygonColor:{default:function(){return"#ffffaa"}},hexPolygonAltitude:{default:.001},hexPolygonResolution:{default:3},hexPolygonMargin:{default:.2},hexPolygonUseDots:{default:!1},hexPolygonCurvatureResolution:{default:5},hexPolygonDotResolution:{default:12},hexPolygonsTransitionDuration:{default:0,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjHexPolygon"}).onCreateObj(function(){var s=new sA.Mesh(void 0,new sA.MeshLambertMaterial({side:sA.DoubleSide}));return s.__globeObjType="hexPolygon",s})},update:function(e){var t=Ce(e.hexPolygonGeoJsonGeometry),n=Ce(e.hexPolygonColor),i=Ce(e.hexPolygonAltitude),s=Ce(e.hexPolygonResolution),a=Ce(e.hexPolygonMargin),u=Ce(e.hexPolygonUseDots),f=Ce(e.hexPolygonCurvatureResolution),m=Ce(e.hexPolygonDotResolution);e.dataMapper.onUpdateObj(function(y,_){var b=t(_),w=s(_),S=i(_),E=Math.max(0,Math.min(1,+a(_))),R=u(_),P=f(_),L=m(_),D=n(_),O=Yi(D);y.material.color.set(Ps(D)),y.material.transparent=O<1,y.material.opacity=O;var G={alt:S,margin:E,curvatureResolution:P},U={geoJson:b,h3Res:w},j=y.__currentTargetD||Object.assign({},G,{alt:-.001}),V=y.__currentMemD||U;if(Object.keys(G).some(function(Y){return j[Y]!==G[Y]})||Object.keys(U).some(function(Y){return V[Y]!==U[Y]}
898)){y.__currentMemD=U;var Q=[];b.type==="Polygon"?Z5(b.coordinates,w,!0).forEach(function(Y){return Q.push(Y)}):b.type==="MultiPolygon"?b.coordinates.forEach(function(Y){return Z5(Y,w,!0).forEach(function(ne){return Q.push(ne)})}):console.warn("Unsupported GeoJson geometry type: ".concat(b.type,". Skipping geometry..."));var Z=Q.map(function(Y){var ne=jg(Y),ae=$g(Y,!0).reverse(),J=ne[1];return ae.forEach(function(fe){var pe=fe[0];Math.abs(J-pe)>170&&(fe[0]+=J>pe?360:-360)}),{h3Idx:Y,hexCenter:ne,hexGeoJson:ae}}),K=function(ne){var ae=y.__currentTargetD=ne,J=ae.alt,fe=ae.margin,pe=ae.curvatureResolution;y.geometry&&y.geometry.dispose(),y.geometry=Z.length?(Sm.mergeGeometries||Sm.mergeBufferGeometries)(Z.map(function(Re){var Se=fn(Re.hexCenter,2),qe=Se[0],je=Se[1];if(R){var Qe=Ci(qe,je,J),He=Ci(Re.hexGeoJson[0][1],Re.hexGeoJson[0][0],J),vt=.85*(1-fe)*new sA.Vector3(Qe.x,Qe.y,Qe.z).distanceTo(new sA.Vector3(He.x,He.y,He.z)),it=new b7(vt,L);return it.rotateX(da(-qe)),it.rotateY(da(je)),it.translate(Qe.x,Qe.y,Qe.z),it}else{var yt=function(sn,Ut,Ot){return sn-(sn-Ut)*Ot},Tt=fe===0?Re.hexGeoJson:Re.hexGeoJson.map(function(Xt){var sn=fn(Xt,2),Ut=sn[0],Ot=sn[1];return[[Ut,je],[Ot,qe]].map(function($t){var en=fn($t,2),Kn=en[0],Nr=en[1];return yt(Kn,Nr,fe)})});return new rp([Tt],on,on*(1+J),!1,!0,!1,pe)}})):new sA.BufferGeometry};!e.hexPolygonsTransitionDuration||e.hexPolygonsTransitionDuration<0?K(G):e.tweenGroup.add(new fi(j).to(G,e.hexPolygonsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(K).onComplete(function(){e.tweenGroup.remove(this)}).start())}}).digest(e.hexPolygonsData)}}),CV=window.THREE?window.THREE:{Vector3:ke};function PV(r,e){var t=function(a,u){var f=a[a.length-1];return[].concat(Yt(a),Yt(Array(u-a.length).fill(f)))},n=Math.max(r.length,e.length),i=hM.apply(void 0,Yt([r,e].map(function(s){return s.map(function(a){var u=a.x,f=a.y,m=a.z;return[u,f,m]})}).map(function(s){return t(s,n)})));return function(s){return s===0?r:s===1?e:i(s).map(function(a){var u=fn(a,3),f=u[0],m=u[1],y=u[2];return new CV.Vector3(f,m,y)})}}var la=window.THREE?window.THREE:{BufferGeometry:Pi,Color:Yn,Group:Fs,Line:kd,NormalBlending:qo,ShaderMaterial:Cc,Vector3:ke},BV=DA.default||DA,O_=Mr({props:{pathsData:{default:[]},pathPoints:{default:function(e){return e}},pathPointLat:{default:function(e){return e[0]}},pathPointLng:{default:function(e){return e[1]}},pathPointAlt:{default:.001},pathResolution:{default:2},pathColor:{default:function(){return"#ffffaa"}},pathStroke:{},pathDashLength:{default:1},pathDashGap:{default:0},pathDashInitialGap:{default:0},pathDashAnimateTime:{default:0},pathTransitionDuration:{default:1e3,triggerUpdate:!1},rendererSize:{}},methods:{pauseAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.pause()},resumeAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.resume()},_destructor:function(e){var t;(t=e.ticker)===null||t===void 0||t.dispose()}},stateInit:function(e){var t=e.tweenGroup;return{tweenGroup:t,ticker:new BV,sharedMaterial:new la.ShaderMaterial(Vt(Vt({},F_()),{},{transparent:!0,blending:la.NormalBlending}))}},init:function(e,t){vn(e),t.scene=e,t.dataMapper=new ei(e,{objBindAttr:"__threeObjPath"}).onCreateObj(function(){var n=new la.Group;return n.__globeObjType="path",n}),t.ticker.onTick.add(function(n,i){t.dataMapper.entries().map(function(s){var a=fn(s,2),u=a[1];return u}).filter(function(s){return s.children.length&&s.children[0].material&&s.children[0].__dashAnimateStep}).forEach(function(s){var a=s.children[0],u=a.__dashAnimateStep*i;if(a.type==="Line"){var f=a.material.uniforms.dashTranslate.value%1e9;a.material.uniforms.dashTranslate.value=f+u}else if(a.type==="Line2"){for(var m=a.material.dashOffset-u,y=a.material.dashSize
898+a.material.gapSize;m<=-y;)m+=y;a.material.dashOffset=m}})})},update:function(e){var t=Ce(e.pathPoints),n=Ce(e.pathPointLat),i=Ce(e.pathPointLng),s=Ce(e.pathPointAlt),a=Ce(e.pathStroke),u=Ce(e.pathColor),f=Ce(e.pathDashLength),m=Ce(e.pathDashGap),y=Ce(e.pathDashInitialGap),_=Ce(e.pathDashAnimateTime);e.dataMapper.onUpdateObj(function(R,P){var L=a(P),D=L!=null;if(!R.children.length||D===(R.children[0].type==="Line")){vn(R);var O=D?new jG(new S_,new _3):new la.Line(new la.BufferGeometry,e.sharedMaterial.clone());R.add(O)}var G=R.children[0],U=w(t(P),n,i,s,e.pathResolution),j=_(P);if(G.__dashAnimateStep=j>0?1e3/j:0,D){G.material.resolution=e.rendererSize;{var Z=f(P),K=m(P),Y=y(P);G.material.dashed=K>0,G.material.dashed?G.material.defines.USE_DASH="":delete G.material.defines.USE_DASH,G.material.dashed&&(G.material.dashScale=1/b(U),G.material.dashSize=Z,G.material.gapSize=K,G.material.dashOffset=-Y)}{var ne=u(P);if(ne instanceof Array){var ae=S(u(P),U.length-1,1,!1);G.geometry.setColors(ae.array),G.material.vertexColors=!0}else{var J=ne,fe=Yi(J);G.material.color=new la.Color(Ps(J)),G.material.transparent=fe<1,G.material.opacity=fe,G.material.vertexColors=!1}}G.material.needsUpdate=!0}else{Object.assign(G.material.uniforms,{dashSize:{value:f(P)},gapSize:{value:m(P)},dashOffset:{value:y(P)}});var V=S(u(P),U.length),Q=E(U.length,1,!0);G.geometry.setAttribute("color",V),G.geometry.setAttribute("relDistance",Q)}var pe=PV(R.__currentTargetD&&R.__currentTargetD.points||[U[0]],U),Re=function(Qe){var He=R.__currentTargetD=Qe,vt=He.stroke,it=He.interpolK,yt=R.__currentTargetD.points=pe(it);if(D){var Tt;G.geometry.setPositions((Tt=[]).concat.apply(Tt,Yt(yt.map(function(Xt){var sn=Xt.x,Ut=Xt.y,Ot=Xt.z;return[sn,Ut,Ot]})))),G.material.linewidth=vt,G.material.dashed&&G.computeLineDistances()}else G.geometry.setFromPoints(yt),G.geometry.computeBoundingSphere()},Se={stroke:L,interpolK:1},qe=Object.assign({},R.__currentTargetD||Se,{interpolK:0});Object.keys(Se).some(function(je){return qe[je]!==Se[je]})&&(!e.pathTransitionDuration||e.pathTransitionDuration<0?Re(Se):e.tweenGroup.add(new fi(qe).to(Se,e.pathTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(Re).onComplete(function(){e.tweenGroup.remove(this)}).start()))}).digest(e.pathsData);function b(R){var P=0,L;return R.forEach(function(D){L&&(P+=L.distanceTo(D)),L=D}),P}function w(R,P,L,D,O){var G=function(Q,Z,K){for(var Y=[],ne=1;ne<=K;ne++)Y.push(Q+(Z-Q)*ne/(K+1));return Y},U=function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=[],Y=null;return Q.forEach(function(ne){if(Y){for(;Math.abs(Y[1]-ne[1])>180;)Y[1]+=360*(Y[1]<ne[1]?1:-1);var ae=Math.sqrt(Math.pow(ne[0]-Y[0],2)+Math.pow(ne[1]-Y[1],2));if(ae>Z)for(var J=Math.floor(ae/Z),fe=G(Y[0],ne[0],J),pe=G(Y[1],ne[1],J),Re=G(Y[2],ne[2],J),Se=0,qe=fe.length;Se<qe;Se++)K.push([fe[Se],pe[Se],Re[Se]])}K.push(Y=ne)}),K},j=function(Q){var Z=fn(Q,3),K=Z[0],Y=Z[1],ne=Z[2],ae=Ci(K,Y,ne),J=ae.x,fe=ae.y,pe=ae.z;return new la.Vector3(J,fe,pe)};return U(R.map(function(V){return[P(V),L(V),D(V)]}),O).map(j)}function S(R,P){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,O=P+1,G;if(R instanceof Array||R instanceof Function){var U=R instanceof Array?to().domain(R.map(function(ne,ae){return ae/(R.length-1)})).range(R):R;G=function(ae){return zo(U(ae),D,!0)}}else{var j=zo(R,D,!0);G=function(){return j}}for(var V=[],Q=0,Z=O;Q<Z;Q++)for(var K=G(Q/(Z-1)),Y=0;Y<L;Y++)V.push(K);return Bs(V,D?4:3)}function E(R){for(var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,D=R+1,O=[],G=0,U=D;G<U;G++)for(var j=G/(U-1),V=0;V<P;V++)O.push(j);return L&&O.reverse(),Bs(O,1)}}}),Ku=window.THREE?window.THREE:{Euler:_1,Mesh:zn,MeshLambertMaterial:Ao,SphereGeometry:Ca},G_=Mr({props:{tilesData:{default:[]},tileLat:{default:"lat"},tileLng:{default:"lng"},tileAltitude:{default:.01},tileWidth:{default:1},tileHeight:{default:1},tileUseGlobeProjection:{default:!0},tileMaterial:{default:function(){return new Ku.MeshLambertMaterial({color:"#ffbb88",opacity:.4,transparent:!0})}},tileCurvatureResolution:{default:5},tilesTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjTile"}).onCreateObj(function(){var s=new Ku.Mesh;
vendor: 4,275 bytes, line 898
898return s.__globeObjType="tile",s})},update:function(e){var t=Ce(e.tileLat),n=Ce(e.tileLng),i=Ce(e.tileAltitude),s=Ce(e.tileWidth),a=Ce(e.tileHeight),u=Ce(e.tileUseGlobeProjection),f=Ce(e.tileMaterial),m=Ce(e.tileCurvatureResolution);e.dataMapper.onUpdateObj(function(y,_){y.material=f(_);var b=u(_),w=m(_),S=function(L){var D=y.__currentTargetD=L,O=D.lat,G=D.lng,U=D.alt,j=D.width,V=D.height,Q=oA(G),Z=oA(-O);y.geometry&&y.geometry.dispose(),y.geometry=new Ku.SphereGeometry(on*(1+U),Math.ceil(j/(w||-1)),Math.ceil(V/(w||-1)),oA(90-j/2)+(b?Q:0),oA(j),oA(90-V/2)+(b?Z:0),oA(V)),b||y.setRotationFromEuler(new Ku.Euler(Z,Q,0,"YXZ"))},E={lat:+t(_),lng:+n(_),alt:+i(_),width:+s(_),height:+a(_)},R=y.__currentTargetD||Object.assign({},E,{width:0,height:0});Object.keys(E).some(function(P){return R[P]!==E[P]})&&(!e.tilesTransitionDuration||e.tilesTransitionDuration<0?S(E):e.tweenGroup.add(new fi(R).to(E,e.tilesTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(S).onComplete(function(){e.tweenGroup.remove(this)}).start()))}).digest(e.tilesData)}}),oA=function(e){return e*Math.PI/180},M0=window.THREE?window.THREE:{BufferGeometry:Pi,Color:Yn,Points:Aw,PointsMaterial:m7},V_=Mr({props:{particlesData:{default:[]},particlesList:{default:function(e){return e}},particleLat:{default:"lat"},particleLng:{default:"lng"},particleAltitude:{default:.01},particlesSize:{default:.5},particlesSizeAttenuation:{default:!0},particlesColor:{default:function(){return"white"}},particlesTexture:{}},init:function(e,t){vn(e),t.scene=e,t.dataMapper=new ei(e,{objBindAttr:"__threeObjParticles"}).onCreateObj(function(){var n=new M0.Points(new M0.BufferGeometry,new M0.PointsMaterial);return n.__globeObjType="particles",n}).onUpdateObj(function(n,i){var s=Ce(t.particlesList),a=Ce(t.particleLat),u=Ce(t.particleLng),f=Ce(t.particleAltitude);n.geometry.setAttribute("position",Bs(s(i).map(function(m){return Object.values(Ci(a(m),u(m),f(m)))}),3))})},update:function(e,t){["particlesData","particlesList","particleLat","particleLng","particleAltitude"].some(function(u){return t.hasOwnProperty(u)})&&e.dataMapper.digest(e.particlesData);var n=Ce(e.particlesColor),i=Ce(e.particlesSize),s=Ce(e.particlesSizeAttenuation),a=Ce(e.particlesTexture);e.dataMapper.entries().forEach(function(u){var f=fn(u,2),m=f[0],y=f[1];if(y.material.size=i(m),y.material.sizeAttenuation=s(m),e.particlesTexture)y.material.color=new M0.Color(16777215),y.material.transparent=!1,y.material.alphaTest=.5,y.material.map=a(m);else{var _=n(m),b=Yi(_);y.material.color=new M0.Color(Ps(_)),y.material.transparent=b<1,y.material.opacity=b,y.material.alphaTest=0}})}}),FV=window.THREE?window.THREE:{BufferGeometry:Pi},DV=function(r){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:32;o2(this,e),t=s2(this,e),t.type="CircleLineGeometry",t.parameters={radius:n,segmentCount:i};for(var s=[],a=0;a<=i;a++){var u=(a/i-.25)*Math.PI*2;s.push({x:Math.cos(u)*n,y:Math.sin(u)*n,z:0})}return t.setFromPoints(s),t}return A2(e,r),a2(e)}(FV.BufferGeometry),aA=window.THREE?window.THREE:{Color:Yn,Group:Fs,Line:kd,LineBasicMaterial:Nc,Vector3:ke},LV=DA.default||DA,z_=Mr({props:{ringsData:{default:[]},ringLat:{default:"lat"},ringLng:{default:"lng"},ringAltitude:{default:.0015},ringColor:{default:function(){return"#ffffaa"},triggerUpdate:!1},ringResolution:{default:64,triggerUpdate:!1},ringMaxRadius:{default:2,triggerUpdate:!1},ringPropagationSpeed:{default:1,triggerUpdate:!1},ringRepeatPeriod:{default:700,triggerUpdate:!1}},methods:{pauseAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.pause()},resumeAnimation:function(e){var t;(t=e.ticker)===null||t===void 0||t.resume()},_destructor:function(e){var t;(t=e.ticker)===null||t===void 0||t.dispose()}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjRing",removeDelay:3e4}).onCreateObj(function(){var s=new aA.Group;return s.__globeObjType="ring",s}),t.ticker=new LV,t.ticker.onTick.add(function(s){if(t.ringsData.length){var a=Ce(t.ringColor),u=Ce(t.ringAltitude),f=Ce(t.ringMaxRadius),m=Ce(t.ringPropagationSpeed),y=Ce(t.ringRepeatPeriod);t.dataMapper.entries().filter(function(_){var b=fn(_,2),w=b[1];return w}
898).forEach(function(_){var b=fn(_,2),w=b[0],S=b[1];if((S.__nextRingTime||0)<=s){var E=y(w)/1e3;S.__nextRingTime=s+(E<=0?1/0:E);var R=new aA.Line(new DV(1,t.ringResolution),new aA.LineBasicMaterial),P=a(w),L=P instanceof Array||P instanceof Function,D;L?P instanceof Array?(D=to().domain(P.map(function(K,Y){return Y/(P.length-1)})).range(P),R.material.transparent=P.some(function(K){return Yi(K)<1})):(D=P,R.material.transparent=!0):(R.material.color=new aA.Color(Ps(P)),pV(R.material,Yi(P)));var O=on*(1+u(w)),G=f(w),U=G*Math.PI/180,j=m(w),V=j<=0,Q=function(Y){var ne=Y.t,ae=(V?1-ne:ne)*U;if(R.scale.x=R.scale.y=O*Math.sin(ae),R.position.z=O*(1-Math.cos(ae)),L){var J=D(ne);R.material.color=new aA.Color(Ps(J)),R.material.transparent&&(R.material.opacity=Yi(J))}};if(j===0)Q({t:0}),S.add(R);else{var Z=Math.abs(G/j)*1e3;t.tweenGroup.add(new fi({t:0}).to({t:1},Z).onUpdate(Q).onStart(function(){return S.add(R)}).onComplete(function(){t.tweenGroup.remove(this),S.remove(R),Lo(R)}).start())}}})}})},update:function(e){var t=Ce(e.ringLat),n=Ce(e.ringLng),i=Ce(e.ringAltitude),s=e.scene.localToWorld(new aA.Vector3(0,0,0));e.dataMapper.onUpdateObj(function(a,u){var f=t(u),m=n(u),y=i(u);Object.assign(a.position,Ci(f,m,y)),a.lookAt(s)}).digest(e.ringsData)}}),qV={0:{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},1:{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},2:{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},3:{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},4:{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},5:{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},6:{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},7:{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},8:{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},9:{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},ο:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "}
898,"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},Τ:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},Î :{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},Î:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"â":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},Î:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},Æ:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},Ï:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},Ï:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "}
898,"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"â":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},ÿ:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},µ:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},Î:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},Î:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"â":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},Î:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},Ï:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},Ψ:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "}
898,"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},ι:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},Î:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},ε:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},Î:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"â°":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"â":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},Ï:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"¯":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},Î:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803
8981013 l 803 0 "},Î:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"â¦":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},ν:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},β:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644
898603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},Î:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},Î:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},Î:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"â¢":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"Â¥":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},γ:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},α:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"Â":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},Χ:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"â ":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},Î:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{x_min:0,x_max:0,ha:853},Ϋ:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"â":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},Î:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},Î:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},Ï
:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "}
898,"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},Ï:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},ί:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},Î:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"â¹":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"â":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},δ:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},Î:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 43
8986 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},Ï:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},Ï:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},Ω:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},Ï:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"â¢":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},ή:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},Î:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 28
8980 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},Î:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},Ï:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},ζ:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},θ:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},Î:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},Î:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 8
89810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},Î:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},Î:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},Ϊ:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},Ρ:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},ª:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"Î
":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},Φ:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"â":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},Σ:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"âº":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},λ:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},Ï:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 43
8986 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},ξ:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},Î:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},ΰ:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},Î¥:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},μ:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},Ï:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"â":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"â":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},Ï:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257
898-5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},Ï:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},ά:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "}
898,"¤":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},κ:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"â¡":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},Ï:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},η:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},IV="normal",kV=1189,UV=-100,OV="normal",GV={yMin:-334,xMin:-111,yMax:1189,xMax:1672},VV=1e3,zV={postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) Îagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"Îagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r 899\r 900Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r 901\r 902The above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r 903\r 904The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "MgOpen", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r 905\r 906This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "MgOpen" name.\r 907\r 908The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r 909\r 910THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"Îagenta ltd",font_sub_family_name:"Regular"},jV=-334,$V="Helvetiker",HV=1522,WV=50,QV={glyphs:qV,cssFontWeight:
vendor: 10,970 bytes, line 910
910IV,ascender:kV,underlinePosition:UV,cssFontStyle:OV,boundingBox:GV,resolution:VV,original_font_information:zV,descender:jV,familyName:$V,lineHeight:HV,underlineThickness:WV},Ui=Vt(Vt({},window.THREE?window.THREE:{BoxGeometry:qd,CircleGeometry:b7,DoubleSide:Qi,Group:Fs,Mesh:zn,MeshLambertMaterial:Ao,TextGeometry:dm,Vector3:ke}),{},{Font:$G,TextGeometry:dm}),j_=Mr({props:{labelsData:{default:[]},labelLat:{default:"lat"},labelLng:{default:"lng"},labelAltitude:{default:.002},labelText:{default:"text"},labelSize:{default:.5},labelTypeFace:{default:QV,onChange:function(e,t){t.font=new Ui.Font(e)}},labelColor:{default:function(){return"lightgrey"}},labelRotation:{default:0},labelResolution:{default:3},labelIncludeDot:{default:!0},labelDotRadius:{default:.1},labelDotOrientation:{default:function(){return"bottom"}},labelsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i;var s=new Ui.CircleGeometry(1,32);t.dataMapper=new ei(e,{objBindAttr:"__threeObjLabel"}).onCreateObj(function(){var a=new Ui.MeshLambertMaterial;a.side=Qi;var u=new Ui.Group;u.add(new Ui.Mesh(s,a));var f=new Ui.Mesh(void 0,a);u.add(f);var m=new Ui.Mesh;return m.visible=!1,f.add(m),u.__globeObjType="label",u})},update:function(e){var t=Ce(e.labelLat),n=Ce(e.labelLng),i=Ce(e.labelAltitude),s=Ce(e.labelText),a=Ce(e.labelSize),u=Ce(e.labelRotation),f=Ce(e.labelColor),m=Ce(e.labelIncludeDot),y=Ce(e.labelDotRadius),_=Ce(e.labelDotOrientation),b=new Set(["right","top","bottom"]),w=2*Math.PI*on/360;e.dataMapper.onUpdateObj(function(S,E){var R=fn(S.children,2),P=R[0],L=R[1],D=fn(L.children,1),O=D[0],G=f(E),U=Yi(G);L.material.color.set(Ps(G)),L.material.transparent=U<1,L.material.opacity=U;var j=m(E),V=_(E);!j||!b.has(V)&&(V="bottom");var Q=j?+y(E)*w:1e-12;P.scale.x=P.scale.y=Q;var Z=+a(E)*w;if(L.geometry&&L.geometry.dispose(),L.geometry=new Ui.TextGeometry(s(E),{font:e.font,size:Z,depth:0,bevelEnabled:!0,bevelThickness:0,bevelSize:0,curveSegments:e.labelResolution}),O.geometry&&O.geometry.dispose(),L.geometry.computeBoundingBox(),O.geometry=x3(Ui.BoxGeometry,Yt(new Ui.Vector3().subVectors(L.geometry.boundingBox.max,L.geometry.boundingBox.min).clampScalar(0,1/0).toArray())),V!=="right"&&L.geometry.center(),j){var K=Q+Z/2;V==="right"&&(L.position.x=K),L.position.y={right:-Z/2,top:K+Z/2,bottom:-K-Z/2}[V]}var Y=function(fe){var pe=S.__currentTargetD=fe,Re=pe.lat,Se=pe.lng,qe=pe.alt,je=pe.rot,Qe=pe.scale;Object.assign(S.position,Ci(Re,Se,qe)),S.lookAt(e.scene.localToWorld(new Ui.Vector3(0,0,0))),S.rotateY(Math.PI),S.rotateZ(-je*Math.PI/180),S.scale.x=S.scale.y=S.scale.z=Qe},ne={lat:+t(E),lng:+n(E),alt:+i(E),rot:+u(E),scale:1},ae=S.__currentTargetD||Object.assign({},ne,{scale:1e-12});Object.keys(ne).some(function(J){return ae[J]!==ne[J]})&&(!e.labelsTransitionDuration||e.labelsTransitionDuration<0?Y(ne):e.tweenGroup.add(new fi(ae).to(ne,e.labelsTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(Y).onComplete(function(){e.tweenGroup.remove(this)}).start()))}).digest(e.labelsData)}}),YV=Vt(Vt({},window.THREE?window.THREE:{}),{},{CSS2DObject:QG}),$_=Mr({props:{htmlElementsData:{default:[]},htmlLat:{default:"lat"},htmlLng:{default:"lng"},htmlAltitude:{default:0},htmlElement:{},htmlElementVisibilityModifier:{triggerUpdate:!1},htmlTransitionDuration:{default:1e3,triggerUpdate:!1},isBehindGlobe:{onChange:function(){this.updateObjVisibility()},triggerUpdate:!1}},methods:{updateObjVisibility:function(e,t){if(e.dataMapper){var n=t?[t]:e.dataMapper.entries().map(function(i){var s=fn(i,2),a=s[1];return a}).filter(function(i){return i});n.forEach(function(i){var s=!e.isBehindGlobe||!e.isBehindGlobe(i.position);e.htmlElementVisibilityModifier?(i.visible=!0,e.htmlElementVisibilityModifier(i.element,s)):i.visible=s})}}},init:function(e,t,n){var i=n.tweenGroup;vn(e),t.scene=e,t.tweenGroup=i,t.dataMapper=new ei(e,{objBindAttr:"__threeObjHtml"}).onCreateObj(function(s){var a=Ce(t.htmlElement)(s),u=new YV.CSS2DObject(a);return u.__globeObjType="html",u})},update:function(e,t){var n=this,i=Ce(e.htmlLat),s=Ce(e.htmlLng),a=Ce(e.htmlAltitude);t.hasOwnProperty("htmlElement")&&e.dataMapper.clear(),e.dataMapper.onUpdateObj(function(u,f){var m=function(b){var w=u.__currentTargetD=b,S=w.alt,E=w.lat,R=w.lng;Object.assign(u.position,Ci(E,R,S)),n.updateObjVisibility(u)},y={lat:+i(f),lng:+s(f),alt:+a(f)};!e.htmlTransitionDuration||e.htmlTransitionDuration<0||!u.__currentTargetD?m(y):e.tweenGroup.add(new fi(u.__currentTargetD).to(y,e.htmlTransitionDuration).easing(pr.Quadratic.InOut).onUpdate(m).onComplete(function(){e.tweenGroup.remove(this)}).start())}).digest(e.htmlElementsData)}}),Zu=window.THREE?window.THREE:{Group:Fs,Mesh:zn,MeshLambertMaterial:Ao,SphereGeometry:Ca},H_=Mr({props:{objectsData:{default:[]},objectLat:{default:"lat"},objectLng:{default:"lng"},objectAltitude:{default:.01},objectFacesSurface:{default:!0},objectRotation:{},objectThreeObject:{default:new Zu.Mesh(new Zu.SphereGeometry(1,16,8),new Zu.MeshLambertMaterial({color:"#ffffaa",transparent:!0,opacity:.7}))}},init:function(e,t){vn(e),t.scene=e,t.dataMapper=new ei(e,{objBindAttr:"__threeObjObject"}).onCreateObj(function(n){var i=Ce(t.objectThreeObject)(n);t.objectThreeObject===i&&(i=i.clone());var s=new Zu.Group;return s.add(i),s.__globeObjType="object",s})},update:function(e,t){var n=Ce(e.objectLat),i=Ce(e.objectLng),s=Ce(e.objectAltitude),a=Ce(e.objectFacesSurface),u=Ce(e.objectRotation);t.hasOwnProperty("objectThreeObject")&&e.dataMapper.clear(),e.dataMapper.onUpdateObj(function(f,m){var y=+n(m),_=+i(m),b=+s(m);Object.assign(f.position,Ci(y,_,b)),a(m)?f.setRotationFromEuler(new _1(da(-y),da(_),0,"YXZ")):f.rotation.set(0,0,0);var w=f.children[0],S=u(m);S&&w.setRotationFromEuler(new _1(da(S.x||0),da(S.y||0),da(S.z||0)))}).digest(e.objectsData)}}),W_=Mr({props:{customLayerData:{default:[]},customThreeObject:{},customThreeObjectUpdate:{triggerUpdate:!1}},init:function(e,t){vn(e),t.scene=e,t.dataMapper=new ei(e,{objBindAttr:"__threeObjCustom"}).onCreateObj(function(n){var i=Ce(t.customThreeObject)(n,on);return i&&(t.customThreeObject===i&&(i=i.clone()),i.__globeObjType="custom"),i})},update:function(e,t){e.customThreeObjectUpdate||vn(e.scene);var n=Ce(e.customThreeObjectUpdate);t.hasOwnProperty("customThreeObject")&&e.dataMapper.clear(),e.dataMapper.onUpdateObj(function(i,s){return n(i,s,on)}).digest(e.customLayerData)}}),Ju=window.THREE?window.THREE:{Camera:Sd,Group:Fs,Vector2:Wt,Vector3:ke},XV=["globeLayer","pointsLayer","arcsLayer","hexBinLayer","heatmapsLayer","polygonsLayer","hexedPolygonsLayer","pathsLayer","tilesLayer","particlesLayer","ringsLayer","labelsLayer","htmlElementsLayer","objectsLayer","customLayer"],Q_=Ir("globeLayer",P_),KV=Object.assign.apply(Object,Yt(["globeImageUrl","bumpImageUrl","globeCurvatureResolution","globeTileEngineUrl","globeTileEngineMaxLevel","showGlobe","showGraticules","showAtmosphere","atmosphereColor","atmosphereAltitude"].map(function(r){return ir({},r,Q_.linkProp(r))}))),ZV=Object.assign.apply(Object,Yt(["globeMaterial","globeTileEngineClearCache"].map(function(r){return ir({},r,Q_.linkMethod(r))}))),JV=Ir("pointsLayer",B_),ez=Object.assign.apply(Object,Yt(["pointsData","pointLat","pointLng","pointColor","pointAltitude","pointRadius","pointResolution","pointsMerge","pointsTransitionDuration"].map(function(r){return ir({},r,JV.linkProp(r))}))),tz=Ir("arcsLayer",D_),nz=Object.assign.apply(Object,Yt(["arcsData","arcStartLat","arcStartLng","arcStartAltitude","arcEndLat","arcEndLng","arcEndAltitude","arcColor","arcAltitude","arcAltitudeAutoScale","arcStroke","arcCurveResolution","arcCircularResolution","arcDashLength","arcDashGap","arcDashInitialGap","arcDashAnimateTime","arcsTransitionDuration"].map(function(r){return ir({},r,tz.linkProp(r))}))),rz=Ir("hexBinLayer",L_),iz=Object.assign.apply(Object,Yt(["hexBinPointsData","hexBinPointLat","hexBinPointLng","hexBinPointWeight","hexBinResolution","hexMargin","hexTopCurvatureResolution","hexTopColor","hexSideColor","hexAltitude","hexBinMerge","hexTransitionDuration"].map(function(r){return ir({},r,rz.linkProp(r))}))),sz=Ir("heatmapsLayer",I_),oz=Object.assign.apply(Object,Yt(["heatmapsData","heatmapPoints","heatmapPointLat","heatmapPointLng","heatmapPointWeight","heatmapBandwidth","heatmapColorFn","heatmapColorSaturation","heatmapBaseAltitude","heatmapTopAltitude","heatmapsTransitionDuration"].map(function(r){return ir({},r,sz.linkProp(r))}))),az=Ir("hexedPolygonsLayer",U_),Az=Object.assign.apply(Object,Yt(["hexPolygonsData","hexPolygonGeoJsonGeometry","hexPolygonColor","hexPolygonAltitude","hexPolygonResolution","hexPolygonMargin","hexPolygonUseDots","hexPolygonCurvatureResolution","hexPolygonDotResolution","hexPolygonsTransitionDuration"].map(function(r){return ir({},r,az.linkProp(r))}))),lz=Ir("polygonsLayer",k_),uz=Object.assign.apply(Object,Yt(["polygonsData","polygonGeoJsonGeometry","polygonCapColor","polygonCapMaterial","polygonSideColor","polygonSideMaterial","polygonStrokeColor","polygonAltitude","polygonCapCurvatureResolution","polygonsTransitionDuration"].map(function(r){return ir({},r,lz.linkProp(r))}))),cz=Ir("pathsLayer",O_),fz=Object.assign.apply(Object,Yt(["pathsData","pathPoints","pathPointLat","pathPointLng","pathPointAlt","pathResolution","pathColor","pathStroke","pathDashLength","pathDashGap","pathDashInitialGap","pathDashAnimateTime","pathTransitionDuration"].map(function(r){return ir({},r,cz.linkProp(r))}))),hz=Ir("tilesLayer",G_),dz=Object.assign.apply(Object,Yt(["tilesData","tileLat","tileLng","tileAltitude","tileWidth","tileHeight","tileUseGlobeProjection","tileMaterial","tileCurvatureResolution","tilesTransitionDuration"].map(function(r){return ir({},r,hz.linkProp(r))}))),pz=Ir("particlesLayer",V_),mz=Object.assign.apply(Object,Yt(["particlesData","particlesList","particleLat","particleLng","particleAltitude","particlesSize","particlesSizeAttenuation","particlesColor","particlesTexture"].map(function(r){return ir({},r,pz.linkProp(r))}))),gz=Ir("ringsLayer",z_),yz=Object.assign.apply(Object,Yt(["ringsData","ringLat","ringLng","ringAltitude","ringColor","ringResolution","ringMaxRadius","ringPropagationSpeed","ringRepeatPeriod"].map(function(r){return ir({},r,gz.linkProp(r))}))),vz=Ir("labelsLayer",j_),_z=Object.assign.apply(Object,Yt(["labelsData","labelLat","labelLng","labelAltitude","labelRotation","labelText","labelSize","labelTypeFace","labelColor","labelResolution","labelIncludeDot","labelDotRadius","labelDotOrientation","labelsTransitionDuration"].map(function(r){return ir({},r,vz.linkProp(r))}))),xz=Ir("htmlElementsLayer",$_),bz=Object.assign.apply(Object,Yt(["htmlElementsData","htmlLat","htmlLng","htmlAltitude","htmlElement","htmlElementVisibilityModifier","htmlTransitionDuration"].map(function(r){return ir({},r,xz.linkProp(r))}))),Tz=Ir("objectsLayer",H_),wz=Object.assign.apply(Object,Yt(["objectsData","objectLat","objectLng","objectAltitude","objectRotation","objectFacesSurface","objectThreeOb
910ject"].map(function(r){return ir({},r,Tz.linkProp(r))}))),Sz=Ir("customLayer",W_),Mz=Object.assign.apply(Object,Yt(["customLayerData","customThreeObject","customThreeObjectUpdate"].map(function(r){return ir({},r,Sz.linkProp(r))}))),Ez=Mr({props:Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt({onGlobeReady:{triggerUpdate:!1},rendererSize:{default:new Ju.Vector2(window.innerWidth,window.innerHeight),onChange:function(e,t){t.pathsLayer.rendererSize(e)},triggerUpdate:!1}},KV),ez),nz),iz),oz),uz),Az),fz),dz),mz),yz),_z),bz),wz),Mz),methods:Vt({getGlobeRadius:gm,getCoords:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Ci.apply(void 0,n)},toGeoCoords:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return C_.apply(void 0,n)},setPointOfView:function(e,t){var n=t instanceof Ju.Camera?t.position:t,i=gm(),s=void 0;if(e.scene&&n){var a,u,f,m;s=function(_){a===void 0&&(a=n.clone().applyMatrix4(e.scene.matrixWorld.clone().invert())),u===void 0&&(u=a.length()),f===void 0&&(f=Math.sqrt(Math.pow(u,2)-Math.pow(i,2))),m===void 0&&(m=Math.acos(f/u));var b=a.distanceTo(_);if(b<f)return!1;var w=_.length(),S=Math.acos((Math.pow(u,2)+Math.pow(b,2)-Math.pow(w,2))/(2*u*b));return S<m}}e.layersThatNeedUpdatePov.forEach(function(y){return y.updatePov(t)}),e.layersThatNeedBehindGlobeChecker.forEach(function(y){return y.isBehindGlobe(s)})},pauseAnimation:function(e){return e.animationFrameRequestId!==null&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),e.pausableLayers.forEach(function(t){var n;return(n=t.pauseAnimation)===null||n===void 0?void 0:n.call(t)}),this},resumeAnimation:function(e){return e.animationFrameRequestId===null&&this._animationCycle(),e.pausableLayers.forEach(function(t){var n;return(n=t.resumeAnimation)===null||n===void 0?void 0:n.call(t)}),this},_animationCycle:function(e){e.animationFrameRequestId=requestAnimationFrame(this._animationCycle),e.tweenGroup.update()},_destructor:function(e){this.pauseAnimation(),e.destructableLayers.forEach(function(t){return t._destructor()})}},ZV),stateInit:function(){var e=new N7,t={tweenGroup:e},n={globeLayer:P_(t),pointsLayer:B_(t),arcsLayer:D_(t),hexBinLayer:L_(t),heatmapsLayer:I_(t),polygonsLayer:k_(t),hexedPolygonsLayer:U_(t),pathsLayer:O_(t),tilesLayer:G_(t),particlesLayer:V_(t),ringsLayer:z_(t),labelsLayer:j_(t),htmlElementsLayer:$_(t),objectsLayer:H_(t),customLayer:W_(t)};return Vt(Vt({tweenGroup:e},n),{},{layersThatNeedUpdatePov:Object.values(n).filter(function(i){return i.hasOwnProperty("updatePov")}),layersThatNeedBehindGlobeChecker:Object.values(n).filter(function(i){return i.hasOwnProperty("isBehindGlobe")}),destructableLayers:Object.values(n).filter(function(i){return i.hasOwnProperty("_destructor")}),pausableLayers:Object.values(n).filter(function(i){return i.hasOwnProperty("pauseAnimation")})})},init:function(e,t,n){var i=n.animateIn,s=i===void 0?!0:i,a=n.waitForGlobeReady,u=a===void 0?!0:a;vn(e),t.scene=e,t.scene.visible=!1,XV.forEach(function(m){var y=new Ju.Group;t.scene.add(y),t[m](y)});var f=function(){if(s){t.scene.scale.set(1e-6,1e-6,1e-6),t.tweenGroup.add(new fi({k:1e-6}).to({k:1},600).easing(pr.Quadratic.Out).onUpdate(function(_){var b=_.k;return t.scene.scale.set(b,b,b)}).onComplete(function(){t.tweenGroup.remove(this)}).start());var y=new Ju.Vector3(0,1,0);t.tweenGroup.add(new fi({rot:Math.PI*2}).to({rot:0},1200).easing(pr.Quintic.Out).onUpdate(function(_){var b=_.rot;return t.scene.setRotationFromAxisAngle(y,b)}).onComplete(function(){t.tweenGroup.remove(this)}).start())}t.scene.visible=!0,t.onGlobeReady&&t.onGlobeReady()};u?t.globeLayer.onReady(f):f(),this._animationCycle()},update:function(e){}});function Nz(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=function(i){function s(){var a;o2(this,s);for(var u=arguments.length,f=new Array(u),m=0;m<u;m++)f[m]=arguments[m];return a=s2(this,s,[].concat(f)),a.__kapsuleInstance=x3(r,[].concat(Yt(t?[a]:[]),f)),a}return A2(s,i),a2(s)}(e);
910return Object.keys(r()).forEach(function(i){return n.prototype[i]=function(){var s,a=(s=this.__kapsuleInstance)[i].apply(s,arguments);return a===this.__kapsuleInstance?this:a}}),n}var Rz=window.THREE?window.THREE:{Group:Fs},Cz=Nz(Ez,Rz.Group,!0),Pz=Object.defineProperty,Bz=(r,e,t)=>e in r?Pz(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Fz=(r,e,t)=>(Bz(r,typeof e!="symbol"?e+"":e,t),t);class Dz{constructor(){Fz(this,"_listeners")}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let s=0,a=i.length;s<a;s++)i[s].call(this,e);e.target=null}}}var Lz=Object.defineProperty,qz=(r,e,t)=>e in r?Lz(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,et=(r,e,t)=>(qz(r,typeof e!="symbol"?e+"":e,t),t);const e1=new lw,Mm=new Md,Iz=Math.cos(70*(Math.PI/180)),Em=(r,e)=>(r%e+e)%e;let kz=class extends Dz{constructor(e,t){super(),et(this,"object"),et(this,"domElement"),et(this,"enabled",!0),et(this,"target",new ke),et(this,"minDistance",0),et(this,"maxDistance",1/0),et(this,"minZoom",0),et(this,"maxZoom",1/0),et(this,"minPolarAngle",0),et(this,"maxPolarAngle",Math.PI),et(this,"minAzimuthAngle",-1/0),et(this,"maxAzimuthAngle",1/0),et(this,"enableDamping",!1),et(this,"dampingFactor",.05),et(this,"enableZoom",!0),et(this,"zoomSpeed",1),et(this,"enableRotate",!0),et(this,"rotateSpeed",1),et(this,"enablePan",!0),et(this,"panSpeed",1),et(this,"screenSpacePanning",!0),et(this,"keyPanSpeed",7),et(this,"zoomToCursor",!1),et(this,"autoRotate",!1),et(this,"autoRotateSpeed",2),et(this,"reverseOrbit",!1),et(this,"reverseHorizontalOrbit",!1),et(this,"reverseVerticalOrbit",!1),et(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),et(this,"mouseButtons",{LEFT:Va.ROTATE,MIDDLE:Va.DOLLY,RIGHT:Va.PAN}),et(this,"touches",{ONE:za.ROTATE,TWO:za.DOLLY_PAN}),et(this,"target0"),et(this,"position0"),et(this,"zoom0"),et(this,"_domElementKeyEvents",null),et(this,"getPolarAngle"),et(this,"getAzimuthalAngle"),et(this,"setPolarAngle"),et(this,"setAzimuthalAngle"),et(this,"getDistance"),et(this,"getZoomScale"),et(this,"listenToKeyEvents"),et(this,"stopListenToKeyEvents"),et(this,"saveState"),et(this,"reset"),et(this,"update"),et(this,"connect"),et(this,"dispose"),et(this,"dollyIn"),et(this,"dollyOut"),et(this,"getScale"),et(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>y.phi,this.getAzimuthalAngle=()=>y.theta,this.setPolarAngle=he=>{let Ge=Em(he,2*Math.PI),st=y.phi;st<0&&(st+=2*Math.PI),Ge<0&&(Ge+=2*Math.PI);let Ct=Math.abs(Ge-st);2*Math.PI-Ct<Ct&&(Ge<st?Ge+=2*Math.PI:st+=2*Math.PI),_.phi=Ge-st,n.update()},this.setAzimuthalAngle=he=>{let Ge=Em(he,2*Math.PI),st=y.theta;st<0&&(st+=2*Math.PI),Ge<0&&(Ge+=2*Math.PI);let Ct=Math.abs(Ge-st);2*Math.PI-Ct<Ct&&(Ge<st?Ge+=2*Math.PI:st+=2*Math.PI),_.theta=Ge-st,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=he=>{he.addEventListener("keydown",Bi),this._domElementKeyEvents=he},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Bi),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(i),n.update(),f=u.NONE},this.update=(()=>{const he=new ke,Ge=new ke(0,1,0),st=new S4().setFromUnitVectors(e.up,Ge),Ct=st.clone().invert(),_n=new ke,Fi=new S4,ts=2*Math.PI;return function(){const Zl=n.object.position;st.setFromUnitVectors(e.up,Ge),Ct.copy(st).invert(),he.copy(Zl).sub(n.target),he.applyQuaternion(st),y.setFromVector3(he),n.autoRotate&&f===u.NONE&&ae(Y()),n.enableDamping?(y.theta+=_.theta*n.dampingFactor,y.phi+=_.phi*n.dampingFactor):(y.theta+=_.theta,y.phi+=_.phi);let di=n.minAzimuthAngle,Di=n.maxAzimuthAngle;isFinite(di)&&isFinite(Di)&&(di<-Math.PI?di+=ts:di>Math.PI&&(di-=ts),Di<-Math.PI?Di+=ts:Di>Math.PI&&(Di-=ts),di<=Di?y.theta=Math.max(di,Math.min(Di,y.theta)):y.theta=y.theta>(di+Di)/2?Math.max(di,y.theta):Math.min(Di,y.theta)),y.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,y.phi)),y.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(w,n.dampingFactor):n.target.add(w),n.zoomToCursor&&Q||n.object.isOrthographicCamera?y.radius=He(y.radius):y.radius=He(y.radius*b),he.setFromSpherical(y),he.applyQuaternion(Ct),Zl.copy(n.target).add(he),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(_.theta*=1-n.dampingFactor,_.phi*=1-n.dampingFactor,w.multiplyScalar(1-n.dampingFactor)):(_.set(0,0,0),w.set(0,0,0));let Yo=!1;if(n.zoomToCursor&&Q){let Us=null;if(n.object instanceof Io&&n.object.isPerspectiveCamera){const co=he.length();Us=He(co*b);const Xo=co-Us;n.object.position.addScaledVector(j,Xo),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const co=new ke(V.x,V.y,0);co.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/b)),n.object.updateProjectionMatrix(),Yo=!0;const Xo=new ke(V.x,V.y,0);Xo.unproject(n.object),n.object.position.sub(Xo).add(co),n.object.updateMatrixWorld(),Us=he.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Us!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Us).add(n.object.position):(e1.origin.copy(n.object.position),e1.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(e1.direction))<Iz?e.lookAt(n.target):(Mm.setFromNormalAndCoplanarPoint(n.object.up,n.target),e1.intersectPlane(Mm,n.target))))}else n.object instanceof L0&&n.object.isOrthographicCamera&&(Yo=b!==1,Yo&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/b)),n.object.updateProjectionMatrix()));return b=1,Q=!1,Yo||_n.distanceToSquared(n.object.position)>m||8*(1-Fi.dot(n.object.quaternion))>m?(n.dispatchEvent(i),_n.copy(n.object.position),Fi.copy(n.object.quaternion),Yo=!1,!0):!1}})(),this.connect=he=>{n.domElement=he,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",Ia),n.domElement.addEventListener("pointerdown",ti),n.domElement.addEventListener("pointercancel",sr),n.domElement.addEventListener("wheel",Is)},this.dispose=()=>{var he,Ge,st,Ct,_n,Fi;n.domElement&&(n.domElement.style.touchAction="auto"),(he=n.domElement)==null||he.removeEventListener("contextmenu",Ia),(Ge=n.domElement)==null||Ge.removeEventListener("pointerdown",ti),(st=n.domElement)==null||st.removeEventListener("pointercancel",sr),(Ct=n.domElement)==null||Ct.removeEventListener("wheel",Is),(_n=n.domElement)==null||_n.ownerDocument.removeEventListener("pointermove",ni),(Fi=n.domElement)==null||Fi.ownerDocument.removeEventListener("pointerup",sr),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",Bi)};const n=this,i={type:"change"},s={type:"start"},a={type:"end"},u={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let f=u.NONE;const m=1e-6,y=new M4,_=new M4;let b=1;const w=new ke,S=new Wt,E=new Wt,R=new Wt,P=new Wt,L=new Wt,D=new Wt,O=new Wt,G=new Wt,U=new Wt,j=new ke,V=new Wt;let Q=!1;const Z=[],K={};function Y(){return 2*Math.PI/60/60*n.autoRotateSpeed}function ne(){return Math.pow(.95,n.zoomSpeed)}function ae(he){n.reverseOrbit||n.reverseHorizontalOrbit?_.theta+=he:_.theta-=he}function J(he){n.reverseOrbit||n.reverseVerticalOrbit?_.phi+=he:_.phi-=he}const fe=(()=>{const he=new ke;return function(st,Ct){he.setFromMatrixColumn(Ct,0),he.multiplyScalar(-st),w.add(he)}})(),pe=(()=>{const he=new ke;return function(st,Ct){n.screenSpacePanning===!0?he.setFromMatrixColumn(Ct,1):(he.setFromMatrixColumn(Ct,0),he.crossVectors(n.object.up,he)),he.multiplyScalar(st),w.add(he)}})(),Re=(()=>{const he=new ke;return function(st,Ct){const _n=n.domElement;if(_n&&n.object instanceof Io&&n.object.isPerspectiveCamera){const Fi=n.object.position;he.copy(Fi).sub(n.target);let ts=he.length();ts*=Math.tan(n.object.fov/2*Math.PI/180),fe(2*st*ts/_n.clientHeight,n.object.matrix),pe(2*Ct*ts/_n.clientHeight,n.object.matrix)}else _n&&n.object instanceof L0&&n.object.isOrthographicCamera?(fe(st*(n.object.right-n.object.left)/n.object.zoom/_n.clientWidth,n.object.matrix),pe(Ct*(n.object.top-n.object.bottom)/n.object.zoom/_n.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function Se(he){n.object instanceof Io&&n.object.isPerspectiveCamera||n.object instanceof L0&&n.object.isOrthographicCamera?b=he:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function qe(he){Se(b/he)}function je(he){Se(b*he)}function Qe(he){if(!n.zoomToCursor||!n.domElement)return;Q=!0;const Ge=n.domElement.getBoundingClientRect(),st=he.clientX-Ge.left,Ct=he.clientY-Ge.top,_n=Ge.width,Fi=Ge.height;
910V.x=st/_n*2-1,V.y=-(Ct/Fi)*2+1,j.set(V.x,V.y,1).unproject(n.object).sub(n.object.position).normalize()}function He(he){return Math.max(n.minDistance,Math.min(n.maxDistance,he))}function vt(he){S.set(he.clientX,he.clientY)}function it(he){Qe(he),O.set(he.clientX,he.clientY)}function yt(he){P.set(he.clientX,he.clientY)}function Tt(he){E.set(he.clientX,he.clientY),R.subVectors(E,S).multiplyScalar(n.rotateSpeed);const Ge=n.domElement;Ge&&(ae(2*Math.PI*R.x/Ge.clientHeight),J(2*Math.PI*R.y/Ge.clientHeight)),S.copy(E),n.update()}function Xt(he){G.set(he.clientX,he.clientY),U.subVectors(G,O),U.y>0?qe(ne()):U.y<0&&je(ne()),O.copy(G),n.update()}function sn(he){L.set(he.clientX,he.clientY),D.subVectors(L,P).multiplyScalar(n.panSpeed),Re(D.x,D.y),P.copy(L),n.update()}function Ut(he){Qe(he),he.deltaY<0?je(ne()):he.deltaY>0&&qe(ne()),n.update()}function Ot(he){let Ge=!1;switch(he.code){case n.keys.UP:Re(0,n.keyPanSpeed),Ge=!0;break;case n.keys.BOTTOM:Re(0,-n.keyPanSpeed),Ge=!0;break;case n.keys.LEFT:Re(n.keyPanSpeed,0),Ge=!0;break;case n.keys.RIGHT:Re(-n.keyPanSpeed,0),Ge=!0;break}Ge&&(he.preventDefault(),n.update())}function $t(){if(Z.length==1)S.set(Z[0].pageX,Z[0].pageY);else{const he=.5*(Z[0].pageX+Z[1].pageX),Ge=.5*(Z[0].pageY+Z[1].pageY);S.set(he,Ge)}}function en(){if(Z.length==1)P.set(Z[0].pageX,Z[0].pageY);else{const he=.5*(Z[0].pageX+Z[1].pageX),Ge=.5*(Z[0].pageY+Z[1].pageY);P.set(he,Ge)}}function Kn(){const he=Z[0].pageX-Z[1].pageX,Ge=Z[0].pageY-Z[1].pageY,st=Math.sqrt(he*he+Ge*Ge);O.set(0,st)}function Nr(){n.enableZoom&&Kn(),n.enablePan&&en()}function kr(){n.enableZoom&&Kn(),n.enableRotate&&$t()}function In(he){if(Z.length==1)E.set(he.pageX,he.pageY);else{const st=HA(he),Ct=.5*(he.pageX+st.x),_n=.5*(he.pageY+st.y);E.set(Ct,_n)}R.subVectors(E,S).multiplyScalar(n.rotateSpeed);const Ge=n.domElement;Ge&&(ae(2*Math.PI*R.x/Ge.clientHeight),J(2*Math.PI*R.y/Ge.clientHeight)),S.copy(E)}function $n(he){if(Z.length==1)L.set(he.pageX,he.pageY);else{const Ge=HA(he),st=.5*(he.pageX+Ge.x),Ct=.5*(he.pageY+Ge.y);L.set(st,Ct)}D.subVectors(L,P).multiplyScalar(n.panSpeed),Re(D.x,D.y),P.copy(L)}function qs(he){const Ge=HA(he),st=he.pageX-Ge.x,Ct=he.pageY-Ge.y,_n=Math.sqrt(st*st+Ct*Ct);G.set(0,_n),U.set(0,Math.pow(G.y/O.y,n.zoomSpeed)),qe(U.y),O.copy(G)}function uo(he){n.enableZoom&&qs(he),n.enablePan&&$n(he)}function yr(he){n.enableZoom&&qs(he),n.enableRotate&&In(he)}function ti(he){var Ge,st;n.enabled!==!1&&(Z.length===0&&((Ge=n.domElement)==null||Ge.ownerDocument.addEventListener("pointermove",ni),(st=n.domElement)==null||st.ownerDocument.addEventListener("pointerup",sr)),Xl(he),he.pointerType==="touch"?ks(he):Ji(he))}function ni(he){n.enabled!==!1&&(he.pointerType==="touch"?Yl(he):es(he))}function sr(he){var Ge,st,Ct;l2(he),Z.length===0&&((Ge=n.domElement)==null||Ge.releasePointerCapture(he.pointerId),(st=n.domElement)==null||st.ownerDocument.removeEventListener("pointermove",ni),(Ct=n.domElement)==null||Ct.ownerDocument.removeEventListener("pointerup",sr)),n.dispatchEvent(a),f=u.NONE}function Ji(he){let Ge;switch(he.button){case 0:Ge=n.mouseButtons.LEFT;break;case 1:Ge=n.mouseButtons.MIDDLE;break;case 2:Ge=n.mouseButtons.RIGHT;break;default:Ge=-1}switch(Ge){case Va.DOLLY:if(n.enableZoom===!1)return;it(he),f=u.DOLLY;break;case Va.ROTATE:if(he.ctrlKey||he.metaKey||he.shiftKey){if(n.enablePan===!1)return;yt(he),f=u.PAN}else{if(n.enableRotate===!1)return;vt(he),f=u.ROTATE}break;case Va.PAN:if(he.ctrlKey||he.metaKey||he.shiftKey){if(n.enableRotate===!1)return;vt(he),f=u.ROTATE}else{if(n.enablePan===!1)return;yt(he),f=u.PAN}break;default:f=u.NONE}f!==u.NONE&&n.dispatchEvent(s)}function es(he){if(n.enabled!==!1)switch(f){case u.ROTATE:if(n.enableRotate===!1)return;Tt(he);break;case u.DOLLY:if(n.enableZoom===!1)return;Xt(he);break;case u.PAN:if(n.enablePan===!1)return;sn(he);break}}function Is(he){n.enabled===!1||n.enableZoom===!1||f!==u.NONE&&f!==u.ROTATE||(he.preventDefault(),n.dispatchEvent(s),Ut(he),n.dispatchEvent(a))}function Bi(he){n.enabled===!1||n.enablePan===!1||Ot(he)}function ks(he){switch(Kl(he),Z.length){case 1:switch(n.touches.ONE){case za.ROTATE:if(n.enableRotate===!1)return;$t(),f=u.TOUCH_ROTATE;break;case za.PAN:if(n.enablePan===!1)return;en(),f=u.TOUCH_PAN;break;default:f=u.NONE}break;case 2:switch(n.touches.TWO){case za.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Nr(),f=u.TOUCH_DOLLY_PAN;break;case za.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;kr(),f=u.TOUCH_DOLLY_ROTATE;break;default:f=u.NONE}break;default:f=u.NONE}f!==u.NONE&&n.dispatchEvent(s)}function Yl(he){switch(Kl(he),f){case u.TOUCH_ROTATE:if(n.enableRotate===!1)return;In(he),n.update();break;case u.TOUCH_PAN:if(n.enablePan===!1)return;$n(he),n.update();break;case u.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;uo(he),n.update();break;case u.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;yr(he),n.update();break;default:f=u.NONE}}function Ia(he){n.enabled!==!1&&he.preventDefault()}function Xl(he){Z.push(he)}function l2(he){delete K[he.pointerId];for(let Ge=0;Ge<Z.length;Ge++)if(Z[Ge].pointerId==he.pointerId){Z.splice(Ge,1);return}}function Kl(he){let Ge=K[he.pointerId];Ge===void 0&&(Ge=new Wt,K[he.pointerId]=Ge),Ge.set(he.pageX,he.pageY)}function HA(he){const Ge=he.pointerId===Z[0].pointerId?Z[1]:Z[0];return K[Ge.pointerId]}this.dollyIn=(he=ne())=>{je(he),n.update()},this.dollyOut=(he=ne())=>{qe(he),n.update()}
910,this.getScale=()=>b,this.setScale=he=>{Se(he),n.update()},this.getZoomScale=()=>ne(),t!==void 0&&this.connect(t),this.update()}};const Uz=hr.forwardRef(({makeDefault:r,camera:e,regress:t,domElement:n,enableDamping:i=!0,keyEvents:s=!1,onChange:a,onStart:u,onEnd:f,...m},y)=>{const _=zs(U=>U.invalidate),b=zs(U=>U.camera),w=zs(U=>U.gl),S=zs(U=>U.events),E=zs(U=>U.setEvents),R=zs(U=>U.set),P=zs(U=>U.get),L=zs(U=>U.performance),D=e||b,O=n||S.connected||w.domElement,G=hr.useMemo(()=>new kz(D),[D]);return uw(()=>{G.enabled&&G.update()},-1),hr.useEffect(()=>(s&&G.connect(s===!0?O:s),G.connect(O),()=>void G.dispose()),[s,O,t,G,_]),hr.useEffect(()=>{const U=Q=>{_(),t&&L.regress(),a&&a(Q)},j=Q=>{u&&u(Q)},V=Q=>{f&&f(Q)};return G.addEventListener("change",U),G.addEventListener("start",j),G.addEventListener("end",V),()=>{G.removeEventListener("start",j),G.removeEventListener("end",V),G.removeEventListener("change",U)}},[a,u,f,G,_,E]),hr.useEffect(()=>{if(r){const U=P().controls;return R({controls:G}),()=>R({controls:U})}},[r,G]),hr.createElement("primitive",dw({ref:y,object:G,enableDamping:i},m))}),Oz="FeatureCollection",Gz=[{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},properties:{name:"Afghanistan"},id:"AF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},properties:{name:"Albania"},id:"AL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,32.1],[9.54,30.23],[9.95,27.82],[9.87,26.51],[9.4,26.15],[10.25,24.61],[11.56,24.3],[11.99,23.52],[5.81,19.45],[4.25,19.15],[3.33,18.98],[3.23,19.82],[1.8,20.31],[-4.81,25],[-6.66,26.13],[-8.67,27.29],[-8.67,27.67],[-8.67,28.71],[-3.63,30.97],[-3.82,31.7],[-1.18,32.11],[-1.75,34.75],[-2.21,35.09],[.95,36.45],[2.96,36.8]]]]},properties:{name:"Algeria"},id:"DZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-170.64,-14.29],[-170.83,-14.33],[-170.56,-14.27],[-170.64,-14.29]]],[[[-169.44,-14.26],[-169.51,-14.28],[-169.54,-14.23],[-169.44,-14.26]]]]},properties:{name:"Samoa"},id:"WS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[1.78,42.57],[1.72,42.51],[1.45,42.6],[1.78,42.57]]]]},properties:{name:"Andorra"},id:"AD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14,-5.85],[16.58,-5.9],[17.62,-8.1],[19.37,-8],[19.54,-7],[21.78,-7.28],[22.25,-11.21],[23.99,-10.87],[24.02,-13.01],[22,-13],[22,-16.17],[23.48,-17.63],[23.28,-1
9107.66],[20.85,-18.02],[18.45,-17.39],[13.99,-17.42],[13.16,-16.95],[11.75,-17.25],[12.51,-13.43],[13.79,-11.79],[12.98,-9.09],[13.39,-8.39],[12.24,-6.1],[13.18,-5.86],[14,-5.85]]],[[[13.09,-4.66],[12.21,-5.77],[12.03,-5.01],[12.78,-4.39],[13.09,-4.63],[13.09,-4.66]]]]},properties:{name:"Angola"},id:"AO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-61.69,17.02],[-61.89,17.11],[-61.79,17.16],[-61.69,17.02]]],[[[-61.73,17.61],[-61.85,17.58],[-61.87,17.7],[-61.73,17.61]]]]},properties:{name:"Antigua and Barbuda"},id:"AG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[45.08,39.77],[45.82,39.55],[46.18,38.84],[45,39.42],[44.81,39.63],[44.78,39.71],[45.08,39.77]]],[[[45.51,40.61],[45.52,40.67],[45.57,40.63],[45.51,40.61]]],[[[46.57,41.87],[47.77,41.2],[48.58,41.84],[50.37,40.26],[49.49,40.15],[48.89,38.44],[48.02,38.84],[48.36,39.39],[47.98,39.72],[46.54,38.88],[46.54,39.56],[45.6,39.98],[46,40.23],[45.15,41.2],[45.02,41.3],[46.52,41.05],[46.45,41.9],[46.57,41.87]]]]},properties:{name:"Azerbaijan"},id:"AZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-68.26,-52.99],[-68.54,-53.23],[-67.36,-54.03],[-65.14,-54.65],[
910-66.45,-55.05],[-68.64,-54.79],[-68.62,-52.64],[-68.26,-52.99]]],[[[-65.75,-22.11],[-65.19,-22.09],[-64.59,-22.21],[-64.32,-22.87],[-63.94,-22],[-62.64,-22.24],[-61.01,-23.81],[-57.76,-25.18],[-57.58,-25.55],[-58.6,-27.32],[-55.74,-27.44],[-54.7,-26.44],[-54.6,-25.57],[-53.86,-25.68],[-53.81,-27.13],[-55.77,-28.23],[-57.61,-30.18],[-57.81,-30.75],[-58.2,-32.45],[-58.15,-33.05],[-58.43,-33.1],[-58.53,-33.52],[-58.47,-34.54],[-57.19,-35.32],[-57.38,-35.96],[-56.66,-36.9],[-58.3,-38.49],[-62.38,-38.8],[-62.02,-39.38],[-62.39,-40.9],[-65.13,-40.85],[-65.01,-42.09],[-64.45,-42.45],[-63.75,-42.09],[-63.58,-42.62],[-64.96,-42.67],[-64.3,-42.99],[-65.32,-43.65],[-65.6,-45.02],[-66.95,-45.26],[-67.58,-46],[-66.82,-46.99],[-65.78,-47.19],[-66.24,-47.86],[-65.79,-47.96],[-67.58,-49.03],[-67.9,-49.99],[-69.01,-50.01],[-68.37,-50.15],[-69.41,-51.08],[-68.97,-51.57],[-69.61,-51.63],[-68.99,-51.62],[-68.44,-52.38],[-71.91,-52],[-72.4,-51.51],[-72.29,-50.65],[-73.17,-50.75],[-73.58,-49.54],[-72.56,-48.8],[-72.36,-47.47],[-71.67,-46.68],[-71.78,-45.65],[-71.3,-45.29],[-72.08,-44.77],[-71.11,-44.54],[-71.86,-44.37],[-72.13,-42.29],[-71.73,-42.1],[-71.7,-39.58],[-70.82,-38.57],[-71.19,-36.84],[-70.42,-36.14],[-70.57,-35.25],[-69.81,-34.24],[-70.53,-31.19],[-69.83,-30.19],[-69.66,-28.4],[-68.29,-26.92],[-68.57,-24.77],[-67.34,-24.02],[-67.18,-22.82],[-66.22,-21.78],[-65.75,-22.11]]]]},properties:{name:"Argentina"},id:"AR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[145.11,-40.82],[146.59,-41.19],[148.22,-40.85],[148,-43.23],[147.32,-42.85],[146.92,-43.62],[146.04,-43.5],[144.68,-41.22],[144.7,-40.76],[145.11,-40.82]]],[[[142.51,-10.87],[143.78,-14.41],[144.51,-14.17],[145.32,-14.95],[146.28,-18.88],[148.78,-20.23],[149.66,-22.5],[150.64,-22.34],[150.87,-23.51],[153.18,-25.95],[153.03,-27.18],[153.63,-28.67],[153.05,-31.04],[150.16,-35.94],[149.97,-37.52],[147.76,-37.98],[146.22,-38.71],[146.39,-39.15],[145.45,-38.23],[144.9,-38.5],[144.93,-37.87],[143.54,-38.86],[141.57,-38.42],[139.81,-37.3],[139.82,-36.55],[139.08,-35.68],[139.67,-36.23],[139.1,-35.62],[139.36,-35.37],[138.09,-35.62],[138.51,-35.03],[138.1,-34.14],[137.74,-35.14],[136.83,-35.25],[137.44,-34.93],[137.95,-33.56],[137.77,-32.52],[135.95,-35.01],[135.11,-34.6],[135.51,-34.62],[134.18,-32.49],[131.15,-31.47],[125.97,-32.27],[124.28,-32.99],[123.54,-33.91],[120,-33.93],[117.93,-35.13],[115.01,-34.26],[114.99,-33.52],[115.71,-33.27],[115.74,-31.87],[114.89,-29.2],[113.22,-26.24],[113.86,-26.51],[113.47,-25.54],[114.22,-26.31],[113.39,-24.43],[114.02,-21.85],[114.15,-22.53],[116.71,-20.65],[121.03,-19.59],[122.35,-18.11],[122.17,-17.24],[122.92,-16.42],[123.58,-17.6],[123.6,-16.99],[123.92,-17.2],[123.57,-16.17],[123.73,-16.14],[123.89,-16.38],[123.96,-16.25],[124.24,-16.41],[124.9,-16.42],[124.4,-16.33],[124.43,-16.1],[124.59,-16.11],[124.73,-15.81],[124.4,-15.87],[124.45,-15.49],[125.18,-15.52],[124.83,-15.16],[125.43,-15.14],[125.14,-14.74],[125.61,-14.22],[125.64,-14.64],[126.04,-14.52],[126.02,-13.92],[126.29,-14.23],[126.86,-13.75],[127.42,-13.95],[128.17,-14.7],[128.01,-15.5],[128.53,-14.76],[129.73,-15.2],[129.94,-14.77],[129.37,-14.33],[130.58,-12.4],[132.75,-12.13],[131.98,-11.13],[135.23,-12.29],[135.91,-11.76],[135.67,-12.2],[136.04,-12.47],[136.56,-11.93],[136.98,-12.36],[136.46,-13.25],[135.92,-13.28],[135.46,-14.94],[139.26,-17.34],[140.49,-17.64],[141.43,-16.08],[141.58,-12.99],[141.94,-12.88],[141.59,-12.55],[142.51,-10.87]]]]},properties:{name:"Australia"},id:"AU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[13.83,48.77],[14.7,48.58],[15.03,49.02],[16.95,48.62],[17.17,48.01],[16.45,47.7],[16.51,47.01],[16.11,46.87],[13.72,46.53],[12.13,47],[10.47,46.87],[9.6,47.06],[9.53,47.27],[9.57,47.54],[13.02,47.47],[12.76,48.12],[13.83,48.77]]]]},properties:{name:"Austria"},id:"AT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-73.04,21.14],[-73.69,20.94],[-73.02,21.33],[-73.04,21.14]]],[[[-77.74,24.03],[-77.68,24.3],[-77.57,23.74],[-77.74,24.03]]],[[[-78.19,25.2],[-77.72,24.51],[-78.02,24.27],[-78.44,24.61],[-78.19,25.2]]],[[[-77.92,26.75],[-78.71,26.49],[-78.98,26.7],[-77.92,26.75]]],[[[-77.74,26.91],[-77.04,26.51],[-77.2,25.88],[-77.15,26.55],[-77.74,26.91]]]]},properties:{name:"Bahamas, The"},id:"BS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[50.53,26.23],[50.57,25.81],[50.46,25.97],[50.53,26.23]]]]},properties:{name:"Bahrain"},id:"BH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[90.76,22.06],[90.6,22.78],[90.88,22.46],[90.76,22.06]]],[[[88.43,26.55],[89.74,26.16],[89.85,25.29],[92.41,25.03],[91.16,23.64],[91.61,22.94],[92.28,23.71],[92.6,21.98],[92.26,21.05],[92.32,20.74],[91.7,22.49],[90.83,22.69],[90.59,23.6],[90.27,21.85],[90.02,21.86],[90.07,22.16],[89.93,22],[90,22.48],[89.58,21.7],[89.62,22.32],[89.25,21.64],[89.06,22.12],[88.75,24.22],[88.04,24.68],[89.01,25.29],[88.11,25.84],[88.43,26.55]],[[90.24,22.19],[90.06,21.99],[90.22,22.11],[90.24,22.19]]]]},properties:{name:"Bangladesh"},id:"BD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[45.15,41.2],[46,40.23],[45.6,39.98],[46.54,39.56],[46.54,38.88],[46.18,38.84],[45.82,39.55],[45.08,39.77],[44.78,39.71],[43.66,40.11],[43.46,41.11],[45.02,41.3],[45.15,41.2]],[[45.57,40.63],[45.52,40.67],[45.51,40.61],[45.57,40.63]]]]},properties:{name:"Armenia"},id:"AM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-59.53,13.05],[-59.64,13.33],[-59.43,13.16],[-59.53,13.05]]]]},properties:{name:"Barbados"},id:"BB"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[4.3,51.26],[4.25,51.38],[5.04,51.49],[6.01,50.76],[6.13,50.13],[6.03,50.18],[5.81,49.55],[4.83,50.17],[4.15,49.98],[2.54,51.09],[3.37,51.37],[4.24,51.35],[4.3,51.26]]]]},properties:{name:"Belgium"},id:"BE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-64.78,32.27],[-64.86,32.27],[-64.67,32.38],[-64.78,32.27]]]]},properties:{name:"Bermuda"},id:"BM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[90.47,28.07],[91.66,27.76],[92.07,26.86],[89.64,26.72],[88.92,27.32],[89.59,28.14],[90.47,28.07]]]]},properties:{name:"Bhutan"},id:"BT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-65.19,-22.09],[-65.75,-22.11],[-66.22,-21.78],[-67.18,-22.82],[-67.88,-22.83],[-68.76,-20.41],[-68.44,-19.43],[-69.48,-17.64],[-69.5,-17.51],[-68.82,-16.34],[-69.42,-15.62],[-68.67,-12.5],[-69.57,-10.95],[-68.58,-11.11],[-66.63,-9.91],[-65.38,-9.7],[-64.99,-12.01],[-60.47,-13.81],[-60.16,-16.26],[-58.33,-16.28],[-58.4,-17.25],[-57.52,-18.2],[-58.16,-20.17],[-59.1,-19.35],[-61.74,-19.65],[-62.64,-22.24],[-63.94,-22],[-64.32,-22.87],[-64.59,-22.21],[-65.19,-22.09]]]]},properties:{name:"Bolivia"},id:"BO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[17.65,42.89],[17.58,42.94],[16.14,44.2],[15.79,45.17],[19.04,44.86],[19.62,44.05],[19.23,43.51],[18.46,42.57],[17.65,42.89]]]]},properties:{name:"Bosnia and Herzegovina"},id:"BA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[26.96,-23.75],[25.51,-25.68],[23.01,-25.3],[21.67,-26.86],[20.64,-26.83],[20.81,-25.88],[20,-24.77],[20,-22.01],[20.99,-22],[20.99,-18.32],[23.3,-18],[23.62,-18.49],[25.26,-17.8],[26.17,-19.53],[27.71,-20.51],[28.02,-21.57],[29.37,-22.19],[26.96,-23.75]]]]},properties:{name:"Botswana"},id:"BW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[3.36,-54.46],[3.37,-54.4],[3.48,-54.4],[3.36,-54.46]]]]},properties:{name:"Bouvet Island"},id:"BV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-51.9,-1.48],[-51.89,-1.18],[-51.66,-1.08],[-51.61,-.73],[-51.2,-.53],[-51.27,-1.01],[-51.9,-1.48]]],[[[-49.71,-.23],[-48.37,-.29],[-48.63,-1.06],[-49.17,-1.61],[-50.58,-1.8],[-50.66,-.28],[-49.71,-.23]]],[[[-60.1,5.22],[-60.15,4.52],[-59.57,3.9],[-59.99,2.69],[-59.64,1.73],[-58.81,1.19],[-56.47,1.94],[-55.9,1.89],[-55.97,2.53],[-54.6,2.33],[-52.91,2.2],[-51.68,4.03],[-51.54,4.39],[-51.09,3.91],[-50.68,2.16],[-49.93,1.71],[-49.9,1.17],[-51.26,-.14],[-51.7,-.75],[-51.71,-1.03],[-51.92,-1.17],[-51.94,-1.34],[-52.71,-1.6],[-52.21,-1.69],[-50.85,-.92],[-50.66,-1.77],[-51.34,-1.65],[-51.45,-2.27],[-51.31,-1.76],[-50.85,-2.51],[-50.68,-1.81],[-49.29,-1.71],[-49.49,-2.56],[-48.7,-1.47],[-48.18,-1.47],[-48.5,-1.46],[-48.24,-.87],[-47.43,-.58],[-45.33,-1.31],[-45.35,-1.74],[-44.86,-1.43],[-44.36,-2.34],[-44.79,-3.3],[-44.06,-2.41],[-44.34,-2.83],[-43.35,-2.37],[-41.25,-3.02],[-40,-2.85],[-37.17,-4.92],[-35.42,-5.21],[-34.8,-7.63],[-35.29,-9.18],[-37.15,-10.75],[-38.04,-12.63],[-38.49,-13.02],[-38.9,-12.71],[-39.13,-17.68],[-40.97,-21.99],[-42.03,-22.92],[-43.08,-22.67],[-44.66,-23.05],[-44.58,-23.36],[-46.38,-23.87],[-48.21,-25.46],[-48.72,-25.42],[-48.36,-25.58],[-48.8,-26.07],[-48.49,-27.21],[-48.77,-28.52],[-52.07,-32.17],[-50.57,-30.46],[-51.28,-30.01],[-51.27,-30.8],[-53.37,-33.74],[-53.52,-33.15],[
910-53.09,-32.73],[-53.88,-31.97],[-55.58,-30.85],[-56.01,-31.08],[-56.81,-30.11],[-57.61,-30.18],[-55.77,-28.23],[-53.81,-27.13],[-53.86,-25.68],[-54.6,-25.57],[-54.33,-24.68],[-54.41,-23.92],[-55.41,-23.96],[-55.85,-22.29],[-57.99,-22.09],[-58.16,-20.17],[-57.52,-18.2],[-58.4,-17.25],[-58.33,-16.28],[-60.16,-16.26],[-60.47,-13.81],[-64.99,-12.01],[-65.38,-9.7],[-66.63,-9.91],[-68.58,-11.11],[-69.57,-10.95],[-70.63,-11.01],[-70.51,-9.43],[-72.14,-10],[-72.37,-9.49],[-73.21,-9.41],[-72.96,-8.98],[-74.01,-7.54],[-73.12,-6.45],[-72.85,-5.12],[-70.77,-4.15],[-69.96,-4.24],[-69.38,-1.34],[-70.04,.59],[-69.12,.65],[-69.84,1.07],[-69.85,1.71],[-67.91,1.75],[-67.42,2.14],[-66.87,1.22],[-65.52,.65],[-63.39,2.15],[-64.05,2.48],[-64.8,4.28],[-62.88,3.56],[-62.75,4.03],[-60.99,4.52],[-60.73,5.2],[-60.1,5.22]]]]},properties:{name:"Brazil"},id:"BR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-88.38,18.48],[-88.3,18.48],[-88.21,16.97],[-88.91,15.89],[-89.22,15.89],[-89.14,17.82],[-88.38,18.48]]]]},properties:{name:"Belize"},id:"BZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[72.49,-7.38],[72.36,-7.27],[72.45,-7.23],[72.49,-7.38]]]]},properties:{name:"British Indian Ocean Territory"},id:"IO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[161.55,-10.28],[162.39,-10.84],[161.28,-10.33],[161.55,-10.28]]],[[[159.94,-9.43],[160.83,-9.86],[159.83,-9.8],[159.6,-9.32],[159.94,-9.43]]],[[[160.97,-8.85],[161.38,-9.64],[160.58,-8.33],[160.97,-8.85]]],[[[157.63,-8.24],[157.81,-8.62],[157.21,-8.24],[157.63,-8.24]]],[[[159.85,-8.33],[159.89,-8.57],[158.49,-7.55],[159.85,-8.33]]],[[[157.43,-7.32],[156.94,-7.22],[156.44,-6.64],[157.43,-7.32]]]]},properties:{name:"Solomon Islands"},id:"SB"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-64.42,18.44],[-64.41,18.51],[-64.32,18.51],[-64.42,18.44]]]]},properties:{name:"British Virgin Islands"},id:"VG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[115.22,4.8],[115.34,4.31],[115.03,4.82],[115.15,4.9],[115.22,4.8]]],[[[114.98,4.89],[115.02,4.9],[114.64,4.02],[114.1,4.59],[114.98,4.89]]]]},properties:{name:"Brunei"},id:"BN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[27.88,42.84],[27.45,42.47],[28.01,41.98],[27.39,42.01],[26.36,41.71],[26.29,41.71],[25.29,41.24],[22.94,41.34],[22.37,42.32],[23,43.19],[22.37,43.83],[22.68,44.22],[24.18,43.68],[27.04,44.15],[28.58,43.75],[27.88,42.84]]]]},properties:{name:"Bulgaria"},id:"BG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[97.81,28.34],[98.7,27.54],[98.78,26.64],[98.71,25.86],[97.55,24.74],[97.54,23.94],[98.89,24.16],[98.93,23.19],[99.57,22.94],[99.16,22.16],[99.96,22.05],[100.21,21.43],[101.15,21.57],[100.09,20.35],[100.08,20.35],[98.05,19.81],[97.77,18.57],[97.35,18.56],[98.93,16.39],[98.2,15.07],[99.17,13.73],[99.66,11.83],[98.74,10.35],[98.55,9.98],[98.89,11.7],[97.8,14.88],[97.74,16.56],[97.38,16.49],[96.88,17.45],[96.78,16.7],[96.24,16.8],[95.43,15.73],[95.36,16.14],[94.85,15.78],[94.99,16.25],[94.65,15.85],[94.63,16.34],[94.25,15.96],[94.61,17.55],[93.99,19.46],[93.73,19.93],[93.13,19.84],[93.08,20.55],[92.86,20.12],[92.26,21.05],[92.6,21.98],[93.2,22.26],[93.34,24.08],[94.15,23.86],[95.14,26.61],[96.19,27.27],[97.14,27.09],[96.89,27.61],[97.35,28.22],[97.81,28.34]]]]},properties:{name:"Burma"},id:"MM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[29.23,-3.75],[29.02,-2.74],[29.85,-2.76],[29.95,-2.31],[30.57,-2.4],[30.83,-3.26],[29.42,-4.45],[29.23,-3.75]]]]},properties:{name:"Burundi"},id:"BI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[26.61,55.67],[28.17,56.15],[30.93,55.6],[30.78,54.79],[32.74,53.46],[31.27,53.02],[31.78,52.11],[30.94,52.07],[30.55,51.25],[25.78,51.94],[23.6,51.53],[23.64,52.08],[23.17,52.28],[23.94,52.73],[23.5,53.95],[25.79,54.16],[25.79,54.87],[26.82,55.28],[26.61,55.67]]]]},properties:{name:"Belarus"},id:"BY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[107.49,14.45],[107.55,12.35],[105.85,11.66],[106.2,10.77],[105.1,10.96],[104.45,10.42],[103.62,10.5],[103.56,11.16],[103.13,10.88],[102.92,11.64],[102.38,13.57],[103.18,14.33],[105.21,14.35],[106.06,13.93],[106,14.37],[107.55,14.71],[107.49,14.45]]]]},properties:{name:"Cambodia"},id:"KH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14.58,12.74],[15.68,9.99],[13.96,9.64],[15.2,8.49],[15.5,7.53],[14.42,6.04],[14.73,4.62],[16.21,2.22],[16.07,1.65],[13.29,2.16],[12.52,2.28],[11.34,2.17],[10.03,2.17],[9.81,2.34],[9.72,3.87],[8.98,4.1],[8.59,4.81],[9.8,6.8],[10.62,7.07],[11.34,6.44],[11.86,7.08],[13.81,11.
91006],[14.65,11.58],[14.07,13.08],[14.5,13],[14.58,12.74]]]]},properties:{name:"Cameroon"},id:"CM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-127.23,50.64],[-125.45,50.32],[-123.29,48.41],[-125.11,48.73],[-124.81,49.24],[-125.48,48.92],[-125.9,49.44],[-126.54,49.37],[-126.09,49.66],[-127.9,50.11],[-127.41,50.59],[-128.42,50.77],[-127.23,50.64]]],[[[-53.76,48.5],[-52.98,48.6],[-53.95,48.18],[-53.55,47.53],[-52.83,48.1],[-53.27,47.61],[-52.61,47.52],[-53.1,46.64],[-53.62,46.64],[-53.59,47.16],[-54.19,46.82],[-53.87,47.4],[-54.2,47.86],[-55.69,46.86],[-55.98,46.95],[-54.94,47.78],[-55.59,47.4],[-56.17,47.5],[-55.77,47.96],[-56.84,47.52],[-59.41,47.89],[-58.42,48.49],[-59.26,48.48],[-58.4,49.13],[-57.88,48.97],[-58.22,49.39],[-57.7,49.46],[-57.38,50.69],[-55.9,51.63],[-55.41,51.56],[-56.09,51.37],[-55.73,51.08],[-56.85,49.54],[-56.15,50.15],[-55.49,50.01],[-56.13,49.43],[-55.14,49.55],[-55.38,49.04],[-53.78,49.4],[-53.49,49.22],[-54.1,48.81],[-53.76,48.5]],[[-53.76,48.5],[-54.09,48.43],[-54.14,48.36],[-53.76,48.5]]],[[[-85.48,65.79],[-84.92,65.21],[-84.44,65.46],[-81.76,64.5],[-81.99,63.99],[-80.17,63.77],[-81.08,63.45],[-83.07,64.19],[-85.27,63.12],[-85.72,63.72],[-87.19,63.59],[-86.19,64.1],[-86.1,65.53],[-85.48,65.79]]],[[[-95.9,66.95],[-95.22,66.97],[-95.71,67.73],[-95.47,68.06],[-93.55,68.59],[-93.67,68.97],[-94.63,68.76],[-94.3,69.3],[-93.36,69.37],[-96.53,70.13],[-95.79,70.54],[-96.61,70.79],[-96.5,71.28],[-94.61,71.86],[-95.22,71.94],[-93.71,71.76],[-92.97,71.34],[-93.03,70.85],[-91.51,70.17],[-92.92,69.67],[-90.31,69.45],[-91.45,69.35],[-90.44,68.87],[-90.27,68.24],[-89.31,69.25],[-88.05,68.82],[-87.79,68.33],[-88.37,67.96],[-87.51,67.11],[-86.52,67.35],[-85.66,68.73],[-84.53,69.02],[-85.47,69.27],[-85.57,69.86],[-82.26,69.64],[-83.23,69.54],[-81.33,69.18],[-82.06,68.87],[-81.27,68.63],[-82.64,68.5],[-81.24,67.47],[-81.5,67],[-83.4,66.35],[-83.92,66.88],[-84.27,66.72],[-84.37,66.97],[-84.92,67.06],[-84.64,66.98],[-85.23,66.88],[-84.6,66.94],[-83.69,66.19],[-86.78,66.53],[-85.9,66.17],[-87.4,65.32],[-91.43,65.95],[-86.93,65.14],[-88.11,64.14],[-90.12,64.13],[-89.81,63.94],[-90.28,64],[-90.21,63.61],[-92.48,63.81],[-90.63,63.06],[-92.42,62.83],[-91.89,62.6],[-93.62,61.94],[-93.24,61.78],[-93.98,61.46],[-94.82,59.64],[-94.23,58.78],[-94.36,58.22],[-94.14,58.76],[-93.15,58.74],[-92.42,57.34],[-92.88,56.91],[-90.82,57.26],[-85.71,55.63],[-85.12,55.34],[-85.42,54.99],[-82.31,55.15],[-82.3,53.02],[-81.55,52.44],[-81.88,52.19],[-80.44,51.46],[-81.02,51.03],[-80.12,51.3],[-79.33,50.72],[-79.75,51.18],[-79.32,51.66],[-78.85,51.17],[-79.04,51.77],[-78.51,52.46],[-79.05,54.18],[-79.76,54.65],[-77.75,55.3],[-76.53,56.32],[-76.86,57.72],[-78.57,58.64],[-77.77,59.71],[-77.31,59.56],[-77.43,59.91],[-76.76,60.16],[-77.59,60.06],[-77.41,60.54],[-77.83,60.64],[-77.51,60.84],[-78.19,60.79],[-77.47,61.54],[-78.16,62.28],[-77.51,62.56],[-74.57,62.1],[-73.68,62.48],[-72.01,61.68],[-72.3,61.57],[-71.58,61.61],[-71.89,61.43],[-71.39,61.14],[-69.52,61.07],[-69.62,60.07],[-70.95,60.06],[-69.6,59.83],[-69.76,59.32],[-69.23,59.23],[-70.15,58.78],[-69.82,58.59],[-68.36,58.78],[-68.34,58.13],[-69.37,57.77],[-68.4,58.04],[-68,58.58],[-68.13,58.07],[-67.72,58.46],[-67.71,57.92],[-66.39,58.85],[-66.06,58.32],[-65.99,58.9],[-65.32,59.04],[-65.56,59.49],[-64.98,59.38],[-65.53,59.72],[-64.47,60.28],[-64.83,59.99],[-64.17,60.02],[-63.72,59.51],[-64.06,59.38],[-63.36,59.2],[-64.04,59.02],[-62.85,58.69],[-63.59,58.3],[-62.56,58.48],[-63.34,57.98],[-62.45,58.18],[-62.67,57.93],[-61.88,57.63],[-62.55,57.5],[-61.36,57.09],[-61.67,56.62],[-62.57,56.79],[-60.67,55.59],[-60.33,55.78],[-60.68,54.99],[-59.78,55.33],[-59.43,55.14],[-59.94,54.75],[-59.16,55.24],[-59.39,54.98],[-57.35,54.58],[-60.13,53.53],[-60.86,53.79],[-60.1,53.5],[-60.42,53.27],[-57.79,54.07],[-58.18,54.24],[-57.38,54.15],[-57.34,53.44],[-56.46,53.78],[-55.81,53.34],[-56.17,53.03],[-55.76,52.61],[-56.5,52.59],[-55.65,52.44],[-56.2,52.44],[-55.7,52.08],[-56.95,51.42],[-58.63,51.28],[-60.01,50.25],[-66.47,50.26],[-67.38,49.33],[-69.06,48.77],[-71.3,46.74],[-68.21,48.64],[-65,49.22],[-64.22,48.9],[-64.55,48.88],[-64.25,48.49],[-66.84,47.99],[-64.8,47.81],[-65.37,47.09],[-64.8,47.08],[-64.5,46.24],[-62.46,45.61],[-61.92,45.89],[-60.96,45.31],[-64.2,44.58],[-65.48,43.46],[-66.17,43.86],[-65.84,44.58],[-66.19,44.42],[-64.49,45.34],[-64.16,44.98],[-63.36,45.36],[-64.94,45.33],[-64.28,45.8],[-64.75,46.09],[-64.78,45.61],[-67.21,45.18],[-67.8,45.7],[-67.79,47.07],[
910-69.23,47.47],[-70.88,45.24],[-74.99,44.99],[-76.8,43.63],[-78.72,43.63],[-79.18,43.47],[-78.99,42.82],[-82.7,41.68],[-83.17,42.05],[-82.13,43.59],[-82.54,45.36],[-84.13,46.53],[-88.37,48.31],[-91.42,48.04],[-94.61,48.72],[-95.08,49.36],[-95.15,49],[-122.76,49],[-123.21,49.13],[-122.85,49.44],[-123.24,49.34],[-123.16,49.7],[-123.96,49.51],[-123.53,49.7],[-123.83,50.16],[-123.98,49.8],[-124.77,49.99],[-124.35,50.5],[-125.08,50.32],[-124.81,50.92],[-125.71,50.43],[-126.27,50.63],[-125.62,50.75],[-125.63,51.1],[-126.13,50.68],[-126.56,50.84],[-126.18,50.95],[-127.18,50.93],[-127.03,50.82],[-127.54,51.01],[-126.66,51.19],[-127.79,51.17],[-126.62,51.68],[-127.88,51.67],[-127.17,52.31],[-126.67,51.98],[-126.73,52.37],[-127.19,52.38],[-127.02,52.85],[-128.39,52.29],[-128.13,52.88],[-128.97,53.55],[-127.87,53.24],[-128.81,53.62],[-128.6,54.03],[-129.27,53.38],[-130.05,53.89],[-129.47,54.24],[-130.48,54.36],[-129.96,54.32],[-130.37,54.65],[-129.91,54.61],[-130.17,54.85],[-129.47,55.47],[-130.11,55],[-130.16,55.09],[-129.94,55.28],[-130.1,55.56],[-130.13,55.72],[-130.02,55.91],[-131.82,56.6],[-133.43,58.46],[-135.47,59.8],[-137.48,58.91],[-139.07,60.35],[-141,60.31],[-141,69.64],[-134.31,68.68],[-134.55,69.09],[-132.89,69.65],[-129.4,70.12],[-133.49,68.83],[-132.92,68.69],[-133.35,68.83],[-127.52,70.22],[-128,70.59],[-125.43,69.31],[-124.82,69.71],[-125.2,70],[-124.44,70.15],[-124.5,69.73],[-124.04,69.7],[-124.45,69.37],[-121.68,69.79],[-114.07,68.48],[-115.54,67.92],[-115.1,67.8],[-110.08,68.01],[-108.02,67.29],[-108.62,67.15],[-107.25,66.35],[-107.75,66.92],[-107.08,66.82],[-107.89,68.08],[-106.43,68.15],[-106.47,68.34],[-105.74,68.42],[-105.64,68.63],[-106.54,68.51],[-106.54,68.29],[-107.89,68.27],[-107.6,68.17],[-108.82,68.27],[-106.23,68.94],[-105.49,68.73],[-105.54,68.41],[-104.61,68.24],[-104.5,68.03],[-102.25,67.73],[-98.35,67.8],[-98.62,68.07],[-97.51,67.6],[-97.12,67.79],[-98.71,68.37],[-95.98,68.25],[-96.46,67.48],[-95.33,67.03],[-95.9,66.95]],[[-95.9,66.95],[-96.46,67.06],[-95.63,66.68],[-95.9,66.95]],[[-93.52,63.84],[-92.51,63.82],[-93.78,64.19],[-93.52,63.84]],[[-70.78,48.38],[-69.83,48.17],[-71.05,48.45],[-70.78,48.38]]],[[[-114,72.8],[-114.6,72.6],[-113.03,73.01],[-111.22,72.72],[-111.66,72.28],[-109.78,72.43],[-110.76,72.97],[-109.66,72.92],[-108.62,72.55],[-107.83,71.6],[-107.25,71.9],[-108.29,73.15],[-106.76,73.29],[-105.33,72.75],[-104.36,71.57],[-104.59,71.07],[-101,70.17],[-100.87,69.79],[-103.48,69.69],[-103.02,69.49],[-103.19,69.11],[-102.31,69.5],[-101.75,69.18],[-102.89,68.8],[-105.14,68.9],[-106.6,69.5],[-109.1,68.71],[-113.27,68.45],[-113.52,69.18],[-116.53,69.41],[-117.44,69.99],[-111.49,70.34],[-117.56,70.6],[-118.42,70.99],[-115.06,71.52],[-118.11,71.37],[-117.7,71.67],[-119.13,71.77],[-117.35,72.92],[-114.56,73.38],[-114,72.8]]],[[[-73.35,68.33],[-74.82,69.08],[-76.66,68.7],[-75.59,69.22],[-77.2,69.65],[-76.98,69.94],[-77.63,69.74],[-77.68,70.19],[-79.01,70.68],[-79.59,70.4],[-78.79,69.89],[-81.76,70.12],[-80.95,69.71],[-82.1,70.11],[-83.01,70.3],[-81.71,69.93],[-81.74,69.87],[-82.02,69.87],[-82.14,69.78],[-83.07,70.01],[-85.82,70],[-86.55,70.23],[-86.37,70.53],[-87.92,70.24],[-89.55,71.09],[-87,70.99],[-89.83,71.33],[-90.05,71.95],[-88.41,73.52],[-85.07,73.8],[-86.73,72.72],[-86.24,72.42],[-86.42,72.01],[-84.83,71.27],[-86.82,70.99],[-84.8,70.92],[-84.63,71.67],[-86.05,72.01],[-84.16,72.02],[-85.69,72.89],[-83.95,72.75],[-85.45,73.12],[-83.63,72.98],[-85.19,73.23],[-81.55,73.72],[-80.25,72.73],[-81.38,72.24],[-80.52,72.5],[-80.97,71.88],[-79.67,72.13],[-80.17,72.32],[-79.8,72.5],[-79.01,72.27],[-79.2,71.96],[-77.79,71.79],[-78.87,72.23],[-77,72.13],[-78.56,72.44],[-77.61,72.75],[-75.19,72.49],[-74.95,72.25],[-76.35,71.89],[-74.12,71.98],[-75.39,71.68],[-74.63,71.66],[-75.08,71.18],[-73.75,71.78],[-74.24,71.2],[-73.62,71.58],[-73.38,71.39],[-73.9,71.06],[-73.05,71.27],[-73.38,70.98],[-72.54,71.66],[-71.12,71.26],[-72.57,70.61],[-70.6,71.05],[-71.8,70.43],[-71.16,70.53],[-71.54,70.02],[-69.9,70.88],[-70.5,70.48],[-68.31,70.56],[-70.47,69.84],[-67.79,70.26],[-67.13,69.73],[-70.03,69.54],[-66.8,69.34],[-69.02,69.35],[-68.08,69.22],[-69.03,68.97],[-68.18,69.15],[-67.71,69.02],[-68.56,68.96],[-67.77,68.78],[-69.4,68.86],[-68.04,68.68],[-68.9,68.6],[
910-68.47,68.61],[-68.71,68.57],[-67.5,68.54],[-67.61,68.38],[-66.71,68.44],[-67.88,68.27],[-67.23,68.36],[-67.01,68.32],[-67.6,68.16],[-67.01,68.29],[-66.77,68.24],[-66.95,68.01],[-66.18,68.02],[-66.73,67.87],[-66.36,67.82],[-65.91,68.16],[-66.01,67.63],[-64.72,67.99],[-65.2,67.65],[-64.51,67.81],[-63.9,67.31],[-64.8,67.36],[-63.96,67.27],[-64.69,67],[-63.11,67.33],[-63.77,66.81],[-62.1,67.05],[-61.26,66.63],[-62.9,66.33],[-61.95,66.02],[-62.97,66.15],[-62.32,65.81],[-63.72,65.68],[-63.32,65.59],[-63.55,64.89],[-65.51,65.74],[-64.36,66.35],[-65.92,65.95],[-65.47,66.39],[-66.07,66.12],[-67.05,66.64],[-67.74,66.57],[-67.28,66.28],[-67.99,66.51],[-67.19,65.91],[-68.85,66.19],[-64.66,64.03],[-64.99,63.82],[-64.53,63.25],[-65.3,63.81],[-64.63,62.9],[-65.25,62.99],[-65.19,62.56],[-66.64,63.37],[-66.55,62.99],[-67.91,63.76],[-67.69,63.37],[-69,63.75],[-65.99,62.24],[-66.07,61.87],[-71.4,63.05],[-72.15,63.45],[-71.23,63.6],[-72.32,63.68],[-73.38,64.27],[-73.3,64.66],[-74.06,64.33],[-74.64,64.9],[-74.99,64.8],[-74.69,64.37],[-75.82,64.61],[-76.67,64.18],[-78.18,64.57],[-77.42,65.46],[-75.77,65.22],[-75.37,64.71],[-75.19,65.1],[-75.95,65.32],[-73.5,65.47],[-74.47,66.15],[-72.26,67.25],[-73.35,68.33]],[[-73.35,68.33],[-73.21,68.38],[-73.32,68.39],[-73.35,68.33]]],[[[-99.8,73.89],[-96.96,73.74],[-98.45,72.87],[-96.52,72.71],[-96.3,72.42],[-96.87,72.04],[-96.49,71.91],[-98.27,71.9],[-98.04,71.53],[-98.73,71.27],[-102.74,72.72],[-102.14,73.09],[-100.41,72.74],[-100.03,72.93],[-100.58,73.17],[-99.77,73.21],[-101.62,73.49],[-100.43,73.41],[-101.12,73.73],[-99.8,73.89]]],[[[-92.64,74.1],[-90.19,73.9],[-92.1,72.74],[-94.32,72.76],[-93.46,72.46],[-94.06,71.98],[-95.21,71.99],[-94.75,72.15],[-95.67,72.81],[-95.67,73.72],[-92.64,74.1]]],[[[-120.15,74.27],[-117.42,74.23],[-115.32,73.48],[-119.14,72.63],[-120.25,72.26],[-120.54,71.52],[-122.78,71.09],[-126,71.97],[-123.77,73.76],[-124.77,74.34],[-120.15,74.27]]],[[[-94.36,75.59],[-93.49,75.26],[-93.47,74.7],[-96.62,74.99],[-94.36,75.59]]],[[[-98.42,76.67],[-97.51,76.19],[-97.94,75.74],[-97.28,75.4],[-98.17,75.33],[-97.58,75.14],[-100.15,74.99],[-100.78,75.35],[-98.95,75.71],[-102.88,75.62],[-101.18,75.78],[-101.91,76.08],[-101.39,76.25],[-102.17,76.24],[-101.89,76.44],[-99.89,75.89],[-99.44,75.97],[-100.15,76.13],[-99.41,76.16],[-100.98,76.5],[-98.42,76.67]]],[[[-108.65,76.81],[-108.08,76.28],[-108.4,76.05],[-107.63,75.99],[-108.02,75.78],[-106.34,76.05],[-105.39,75.64],[-106.01,75.05],[-112.75,74.4],[-114.45,74.67],[-110.91,75.23],[-117.68,75.25],[-115,75.69],[-117.25,75.6],[-114.82,75.88],[-116.73,75.92],[-114.66,76.16],[-115.93,76.29],[-114.9,76.52],[-112.45,76.18],[-111.25,75.52],[-108.9,75.48],[-110.06,75.89],[-109.31,76.11],[-110.39,76.39],[-108.65,76.81]]],[[[-95.66,77.06],[-93.18,76.74],[-93.55,76.39],[-91.41,76.69],[-89.29,76.3],[-91.61,76.26],[-88.95,75.43],[-81.54,75.81],[-79.57,75.45],[-80.44,75.04],[-79.33,74.89],[-81.81,74.46],[-83.51,74.9],[-83.47,74.58],[-84.29,74.5],[-88.5,74.5],[-88.55,74.91],[-91.54,74.65],[-92.49,75.21],[-92.11,75.86],[-93.08,76.36],[-95.38,76.23],[-94.8,76.32],[-96.96,76.73],[-95.66,77.06]]],[[[-116.35,77.54],[-115.39,77.31],[-116.28,77.18],[-115.9,76.69],[-117.1,76.3],[-118.06,76.41],[-117.84,76.82],[-118.97,76.51],[-118.57,76.34],[-119.08,76.08],[-119.65,76.3],[-119.48,75.97],[-119.87,75.86],[-123.04,76.08],[-119.15,77.33],[-116.35,77.54]]],[[[-96.77,78.68],[-94.89,78.1],[-97.1,77.8],[-97.78,78.03],[-96.87,78.13],[-98.41,78.5],[-96.77,78.68]]],[[[-103.59,79.33],[-99.95,78.73],[-98.95,78.06],[-99.91,77.78],[-104.47,78.27],[-105.05,78.49],[-103.32,78.73],[-105.63,79.16],[-103.59,79.33]]],[[[-92.73,81.31],[-88.78,80.13],[-87.68,80.41],[-88.07,80.12],[-86.96,79.9],[-87.46,79.53],[-84.9,79.27],[-87.62,78.65],[-88,78.81],[-87.72,79.08],[-88.16,78.99],[-87.91,78.55],[-88.8,78.61],[-88.82,78.15],[-89.98,78.61],[-89.45,78.16],[-92.06,78.21],[-92.99,78.47],[-91.64,78.55],[-94.29,78.99],[-90.36,79.25],[-95.09,79.27],[-95.78,79.43],[-94.28,79.76],[-95.85,79.65],[-96.8,80.09],[-94.38,79.98],[-94.75,80.08],[-94.08,80.18],[-96.68,80.34],[-93.79,80.53],[-95.53,80.82],[-93.09,81.16],[-94.27,81.35],[-92.73,81.31]]],[[[-70.
91011,83.11],[-66.3,82.93],[-68.64,82.63],[-64.73,82.9],[-61.08,82.32],[-64.36,81.73],[-69.29,81.72],[-66.61,81.51],[-70.21,81.17],[-64.44,81.48],[-69.43,80.38],[-70.83,80.56],[-70.15,80.19],[-72.42,80.21],[-70.5,80.08],[-71.46,79.9],[-71.18,79.78],[-78.05,79.35],[-74.44,79.06],[-78.89,79.06],[-74.72,78.71],[-76.69,78.51],[-75.06,78.31],[-76.91,78.2],[-75.58,78.11],[-75.92,77.96],[-78.26,78],[-77.72,77.61],[-78.69,77.32],[-81.93,77.68],[-81.17,77.34],[-82.17,77.29],[-81.83,77.16],[-77.78,76.79],[-81.05,76.13],[-80.77,76.42],[-82.73,76.82],[-82.13,76.44],[-89.68,76.57],[-86.74,77.17],[-88.07,77.82],[-84.48,77.29],[-84.61,77.39],[-83.46,77.35],[-83.84,77.46],[-82.32,78.07],[-83.9,77.49],[-84.78,77.52],[-84.43,77.72],[-84.95,77.6],[-85.35,77.73],[-85.05,77.83],[-85.4,77.82],[-84.33,77.9],[-85.68,77.93],[-84.13,78.17],[-84.97,78.2],[-84.64,78.59],[-85.49,78.1],[-87.54,78.14],[-86.86,78.73],[-82.34,78.57],[-83.25,78.83],[-81.48,79.05],[-84.75,79.03],[-83.36,79.05],[-86.49,79.76],[-85.26,79.92],[-86.51,80.3],[-79.9,79.65],[-83.2,80.32],[-78.04,80.57],[-79.96,80.61],[-76.48,80.87],[-78.93,80.88],[-76.75,81.44],[-80.92,80.66],[-85.07,80.51],[-86.74,80.6],[-82.36,81.18],[-87.59,80.63],[-89.47,80.91],[-84.73,81.28],[-89.82,81.01],[-90.35,81.17],[-87.24,81.49],[-91.96,81.66],[-88.08,82.1],[-84.6,81.89],[-86.88,82.2],[-85.05,82.48],[-79.23,81.82],[-82.73,82.4],[-80.58,82.55],[-81.47,82.82],[-78.5,82.68],[-80.43,82.89],[-79.79,82.96],[-75.89,82.59],[-76.23,82.44],[-75.4,82.61],[-77.38,82.99],[-72.63,82.69],[-73.65,82.93],[-70.11,83.11]]]]},properties:{name:"Canada"},id:"CA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-24.37,14.81],[-24.53,14.92],[-24.38,15.05],[-24.37,14.81]]],[[[-23.45,14.98],[-23.68,14.94],[-23.77,15.25],[-23.45,14.98]]],[[[-22.71,16.04],[-22.96,16.09],[-22.8,16.24],[-22.71,16.04]]],[[[-24.03,16.59],[-24.32,16.48],[-24.43,16.64],[-24.03,16.59]]],[[[-25.28,16.91],[-25.33,17.1],[-24.97,17.11],[-25.28,16.91]]]]},properties:{name:"Cape Verde"},id:"CV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-81.1,19.31],[-81.4,19.29],[-81.25,19.35],[-81.1,19.31]]]]},properties:{name:"Cayman Islands"},id:"KY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[19.06,8.58],[18.99,8.96],[20.37,9.11],[21.72,10.64],[22.87,10.92],[23.67,9.87],[23.52,8.71],[25.25,7.85],[27.46,5.02],[25.89,5.19],[22.9,4.82],[22.38,4.13],[20.59,4.41],[19.42,5.13],[18.54,4.34],[18.62,3.48],[16.66,3.53],[16.21,2.22],[14.73,4.62],[14.42,6.04],[15.5,7.53],[18.59,8.04],[19.06,8.58]]]]},properties:{name:"Central African Republic"},id:"CF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[80.27,9.78],[80.82,9.26],[81.13,8.5],[81.36,8.49],[81.88,7.29],[81.66,6.44],[80.59,5.92],[80.05,6.24],[79.7,8.08],[80.05,9.59],[80.61,9.44],[79.93,9.74],[80.27,9.78]]]]},properties:{name:"Sri Lanka"},id:"LK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14.5,13],[14.07,13.08],[13.63,13.72],[13.47,14.46],[15.49,16.91],[16,20.35],[15.2,21.5],[15,23],[16,23.45],[24,19.5],[24,15.7],[22.94,15.56],[21.83,12.8],[22.47,12.62],[22.87,10.92],[21.72,10.64],[20.37,9.11],[18.99,8.96],[19.06,8.58],[18.59,8.04],[15.5,7.53],[15.2,8.49],[13.96,9.64],[15.68,9.99],[14.58,12.74],[14.5,13]]]]},properties:{name:"Chad"},id:"TD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-68.4,-54.96],[-69.06,-55.06],[-68.21,-55.27],[-68.75,-55.27],[-68.16,-55.4],[-68.05,-55.71],[-68.38,-55.48],[-68.94,-55.46],[-68.78,-55.38],[-68.91,-55.34],[-68.8,-55.19],[-69.43,-55.16],[-69.17,-55.51],[-70.03,-55.16],[-68.4,-54.96]]],[[[-67.78,-54.92],[-67.05,-55.14],[-68.36,-54.94],[-67.78,-54.92]]],[[[-71.26,-54.08],[-71.12,-54.38],[-71.7,-54.16],[-71.26,-54.08]]],[[[-71.67,-53.94],[-71.85,-54.34],[-72.26,-53.94],[-71.67,-53.94]]],[[[-70.44,-53.86],[-70.37,-54.04],[-70.67,-53.93],[-70.52,-54.23],[-70.88,-54.05],[-70.53,-53.56],[-70.44,-53.86]]],[[[-72.91,-53.43],[-72.14,-53.8],[-72.87,-54.14],[-72.73,-53.84],[-73.59,-53.76],[-72.91,-53.43]]],[[[-74.36,-52.95],[-74.75,-52.76],[-73.09,-53.35],[-74.36,-52.95]]],[[[-70.92,-54.71],[-70.77,-54.68],[-70.87,-54.69],[-70.92,-54.71],[-72,-54.46],[-70.13,-54.55],[-70.88,-54.13],[-70.14,-54.43],[-70.06,-54.25],[-69.77,-54.56],[-69.86,-54.28],[-69.24,-54.45],[-69.38,-54.69],[-69.18,-54.58],[-69.16,-54.46],[-68.99,-54.43],[-70.04,-54.1],[-70.18,-53.81],[-69.36,-53.35],[-70.45,-53.37],[-70.1,-52.9],[-70.42,-52.77],[-68.62,-52.64],[-68.64,-54.79],[-70.92,-54.71]]],[[[-74.26,-51.25],[-74.32,-50.92],[-74.19,-51.2],[-74.26,-51.25]]],[[[-74.4,-50.86],[-74.41,-51.09],[-74.96,-50.97],[-74.4,-50.86]]],[[[-74.69,-50.89],[-74.95,-50.73],[-74.75,-50.7],[-74.69,-50.89]]],[[[-74.36,-50.49],[-74.19,-50.85],[-74.67,-50.48],[-74.36,-50.49]]],[[[-75.05,-50.17],[-75.46,-50.36],[-75.4,-50.04],[-75.05,-50.17]]],[[[-75.29,-49.1],[-75.66,-49.22],[-75.36,-48.99],[-75.29,-49.1]]],[[[-74.61,-48.46],[-74.41,-49.73],[-74.77,-50.06],[-74.65,-49.36],[-75.02,-49.9],[-75.47,-49.33],[-74.92,-49.34],[-75.05,-48.8],[-74.61,-48.7],[-75.03,-48.5],[-74.74,-48.12],[-74.61,-48.46]]],[[[-75.24,-48.27],[-75.23,-48.71],[-75.58,-48.09],[-75.24,-48.27]]],[[[-74.93,-48.16],[-75.04,-48.44],[-75.26,-48.07],[-74.93,-48.16]]],[[[-74.46,-45.78],[-74.39,-45.44],[-74.21,-45.64],[-74.46,-45.78]]],[[[-73.65,-45.76],[-73.78,-45.67],[
910-73.7,-45.44],[-73.65,-45.76]]],[[[-74.02,-45.43],[-73.82,-45.48],[-74.14,-45.58],[-74.02,-45.43]]],[[[-73.98,-45.27],[-73.78,-45.34],[-74.17,-45.25],[-73.98,-45.27]]],[[[-73.85,-45],[-73.73,-45.28],[-74.24,-45.16],[-73.85,-45]]],[[[-74.21,-44.78],[-74.41,-44.63],[-73.87,-44.69],[-74.21,-44.78]]],[[[-72.72,-44.55],[-72.98,-44.61],[-72.83,-44.69],[-73.22,-44.94],[-73.41,-44.82],[-73.21,-44.8],[-73.39,-44.79],[-73.46,-44.64],[-73.23,-44.42],[-72.72,-44.55]]],[[[-73.89,-41.82],[-73.37,-42.25],[-73.82,-42.51],[-73.49,-43.11],[-73.86,-43.4],[-74.41,-43.24],[-73.89,-41.82]]],[[[-69.48,-17.64],[-68.44,-19.43],[-68.76,-20.41],[-67.88,-22.83],[-67.18,-22.82],[-67.34,-24.02],[-68.57,-24.77],[-68.29,-26.92],[-69.66,-28.4],[-69.83,-30.19],[-70.53,-31.19],[-69.81,-34.24],[-70.57,-35.25],[-70.42,-36.14],[-71.19,-36.84],[-70.82,-38.57],[-71.7,-39.58],[-71.73,-42.1],[-72.13,-42.29],[-71.86,-44.37],[-71.11,-44.54],[-72.08,-44.77],[-71.3,-45.29],[-71.78,-45.65],[-71.67,-46.68],[-72.36,-47.47],[-72.56,-48.8],[-73.58,-49.54],[-73.17,-50.75],[-72.29,-50.65],[-72.4,-51.51],[-71.91,-52],[-68.44,-52.38],[-70.81,-52.73],[-71.28,-53.89],[-72.45,-53.4],[-71.8,-53.52],[-71.17,-52.81],[-72.55,-53.07],[-72.19,-53.18],[-72.65,-53.32],[-72.4,-53.54],[-73.22,-53.23],[-71.48,-52.63],[-72.8,-52.54],[-72.98,-53.07],[-73.45,-53.01],[-72.89,-52.52],[-73.69,-52.73],[-73.73,-52.03],[-73.33,-52.22],[-72.99,-52.07],[-72.86,-52.26],[-72.78,-52.06],[-72.94,-52.09],[-72.7,-51.98],[-72.9,-52.46],[-72.47,-51.79],[-73.24,-51.46],[-72.56,-51.78],[-73.28,-51.61],[-72.92,-51.86],[-73.24,-52.09],[-73.39,-51.66],[-73.28,-52.16],[-73.56,-52.05],[-73.64,-51.82],[-73.4,-52.02],[-73.46,-51.69],[-73.91,-51.62],[-73.89,-51.37],[-73.6,-51.62],[-73.71,-51.16],[-74.25,-50.94],[-73.53,-50.71],[-73.72,-50.56],[-73.57,-50.4],[-74.05,-50.83],[-74.29,-50.48],[-73.88,-50.54],[-74.69,-50.2],[-73.87,-50.29],[-74.33,-49.63],[-73.71,-49.76],[-74.11,-49.48],[-73.83,-49.03],[-74.37,-49.43],[-74.02,-48.41],[
910-74.65,-48.02],[-73.22,-48],[-73.72,-47.53],[-73.93,-47.85],[-74.74,-47.72],[-74.04,-47.62],[-74.53,-47.44],[-73.93,-47.04],[-74.27,-46.79],[-75.01,-46.75],[-74.94,-46.44],[-75.41,-46.93],[-75.72,-46.73],[-74.36,-45.79],[-74.14,-45.81],[-73.97,-46.09],[-74.08,-46.19],[-74.31,-46.25],[-74.49,-46.19],[-74.34,-46.27],[-74.05,-46.2],[-74,-46.29],[-73.85,-46.35],[-74.02,-46.22],[-73.88,-46.14],[-73.76,-46.24],[-73.77,-46.3],[-73.81,-46.39],[-74,-46.56],[-73.91,-46.6],[-73.84,-46.59],[-73.18,-45.67],[-73.59,-45.78],[-73.52,-45.46],[-72.83,-45.42],[-73.39,-44.98],[-73.14,-44.94],[-72.77,-44.75],[-72.61,-44.47],[-73.29,-44.14],[-72.54,-42.56],[-72.85,-42.28],[-72.42,-42.45],[-72.86,-41.91],[-72.31,-41.44],[-73.75,-41.75],[-73.49,-41.52],[-74,-40.97],[-73.22,-39.41],[-73.64,-37.21],[-73.19,-37.14],[-71.44,-32.64],[-71.52,-28.97],[-70.45,-25.36],[-70.62,-23.49],[-70.05,-21.43],[-70.41,-18.35],[-69.5,-17.51],[-69.48,-17.64]],[[-74.07,-46.01],[-74.16,-46.14],[-74.07,-46.1],[-74.07,-46.01]]]]},properties:{name:"Chile"},id:"CL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[110.72,20.06],[111.03,19.64],[110.05,18.38],[108.69,18.51],[108.63,19.28],[109.26,19.9],[110.72,20.06]]],[[[123.38,53.53],[126.1,52.76],[127.53,49.79],[130.67,48.86],[130.99,47.69],[134.74,48.27],[133.12,45.13],[131.86,45.35],[130.95,44.84],[131.31,43.39],[130.41,42.72],[130.6,42.42],[129.91,43.01],[129.71,42.44],[128.06,42],[128.16,41.38],[126.91,41.8],[124.37,40.09],[121.15,38.72],[121.75,39.35],[121.23,39.54],[122.3,40.51],[121.18,40.92],[118.92,39.13],[117.74,39.1],[117.67,38.39],[118.84,38.15],[119.23,37.14],[120.74,37.84],[122.56,37.4],[122.5,36.89],[120.09,36.2],[119.18,34.88],[120.25,34.31],[120.84,32.64],[121.9,31.75],[119.63,32.26],[121.88,30.97],[120.15,30.19],[122.13,29.89],[121.45,29.51],[121.98,29.59],[121.41,29.16],[121.61,28.72],[121.14,28.84],[121.58,28.27],[120.59,28.08],[120.84,27.88],[120.13,26.64],[119.55,26.75],[119.94,26.35],[119.09,26.14],[119.71,25.99],[119.65,25.36],[119.31,25.61],[118.62,24.54],[117.79,24.46],[118.12,24.26],[116.52,23.42],[116.48,22.94],[114.22,22.55],[114.03,22.51],[113.48,23.05],[113.55,22.21],[113.53,22.19],[113.17,22.57],[113.39,22.18],[112.94,21.87],[110.4,21.38],[110.28,20.25],[109.92,20.23],[109.57,21.72],[109.14,21.4],[108.48,21.94],[107.99,21.54],[106.69,22.03],[106.71,22.86],[105.58,23.06],[105.35,23.33],[103.96,22.5],[102.48,22.77],[102.14,22.4],[101.57,22.21],[101.79,21.14],[101.15,21.57],[100.21,21.43],[99.96,22.05],[99.16,22.16],[99.57,22.94],[98.93,23.19],[98.89,24.16],[97.54,23.94],[97.55,24.74],[98.71,25.86],[98.78,26.64],[98.7,27.54],[97.81,28.34],[97.35,28.22],[96.4,28.35],[96.62,28.79],[96.08,29.47],[95.39,29.04],[94.65,29.33],[92.54,27.86],[91.66,27.76],[90.47,28.07],[89.59,28.14],[88.92,27.32],[88.83,28.01],[88.14,27.87],[86.01,27.88],[82.1,30.34],[81.03,30.2],[78.77,31.31],[78.4,32.55],[79.53,32.75],[78.08,35.45],[77.82,35.5],[76.17,35.82],[75.86,36.66],[74.82,37.02],[74.57,37.03],[74.92,37.24],[74.86,38.47],[73.82,38.61],[73.66,39.45],[74.86,40.52],[76.35,40.35],[76.87,41.01],[78.08,41.04],[80.23,42.2],[80.38,43.03],[80.82,43.16],[80.52,44.73],[79.87,44.9],[82.56,45.13],[82.32,45.57],[83.04,47.21],[85.53,47.06],[85.76,48.39],[87.35,49.09],[87.84,49.17],[88.65,48.18],[90.07,47.89],[91.02,46.6],[90.9,45.25],[95.42,44.29],[96.38,42.73],[100.84,42.68],[105.01,41.58],[107.47,42.47],[110.44,42.78],[111.96,43.69],[111.42,44.38],[111.98,45.09],[113.64,44.75],[117.42,46.58],[119.9,46.68],[118.54,47.99],[117.37,47.65],[115.59,47.92],[116.71,49.83],[117.87,49.52],[119.21,50.02],[120.78,52.11],[120.03,52.77],[120.86,53.28],[123.38,53.53]]]]},properties:{name:"China"},id:"CN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[121.73,25.14],[121.84,24.48],[120.72,21.93],[120.11,23.62],[121.01,25.01],[121.73,25.14]]]]},properties:{name:"Taiwan"},id:"TW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[105.7,-10.51],[105.63,-10.44],[105.74,-10.38],[105.7,-10.51]]]]},properties:{name:"Christmas Island"},id:"CX"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[96.86,-12.2],[96.82,-12.18],[96.83,-12.13],[96.86,-12.2]]]]},properties:{name:"Cocos (Keeling) Islands"},id:"CC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-71.56,12.45],[-71.32,11.85],[-71.98,11.66],[-72.49,11.12],[-73.38,9.17],[-72.78,9.08],[-72,7.02],[-70.12,6.98],[-69.25,6.08],[-67.45,6.19],[-67.86,4.56],[-67.29,3.4],[-67.83,2.83],[-67.19,2.39],[-66.87,1.22],[-6
9107.42,2.14],[-67.91,1.75],[-69.85,1.71],[-69.84,1.07],[-69.12,.65],[-70.04,.59],[-69.38,-1.34],[-69.96,-4.24],[-70.72,-3.78],[-70.29,-2.51],[-71.7,-2.15],[-72.88,-2.51],[-73.56,-1.37],[-75.29,-.12],[-77.38,.38],[-78.59,1.24],[-78.81,1.44],[-78.57,2.43],[-77.74,2.6],[-77.03,3.92],[-77.43,4.03],[-77.34,6.57],[-77.89,7.23],[-77.22,7.94],[-77.37,8.67],[-76.76,7.92],[-76.93,8.57],[-75.63,9.45],[-75.27,10.8],[-74.86,11.13],[-74.39,10.74],[-74.16,11.33],[-73.28,11.3],[-71.56,12.45]]]]},properties:{name:"Colombia"},id:"CO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[44.49,-12.09],[44.51,-12.38],[44.21,-12.16],[44.49,-12.09]]],[[[43.46,-11.94],[43.22,-11.76],[43.28,-11.38],[43.46,-11.94]]]]},properties:{name:"Comoros"},id:"KM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[45.2,-12.85],[45.1,-12.99],[45.08,-12.66],[45.2,-12.85]]]]},properties:{name:"Mayotte"},id:"YT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[12.78,-4.39],[12.03,-5.01],[11.14,-3.93],[11.93,-3.64],[11.57,-2.33],[12.48,-2.33],[12.65,-1.82],[13,-2.37],[13.76,-2.09],[14.11,-2.49],[14.43,-1.89],[14.52,-.61],[13.85,-.2],[14.49,.91],[14.19,1.39],[13.19,1.22],[13.29,2.16],[16.07,1.65],[16.21,2.22],[16.66,3.53],[18.62,3.48],[17.71,-.54],[16.2,-2.18],[15.89,-3.94],[14.66,-4.91],[14.4,-4.28],[13.41,-4.88],[13.09,-4.63],[12.78,-4.39]]]]},properties:{name:"Congo, Republic of the"},id:"CG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[25.89,5.19],[27.46,5.02],[28.36,4.29],[29.64,4.64],[30.86,3.49],[30.73,2.45],[31.3,2.12],[29.96,.83],[29.6,-1.39],[29.02,-2.74],[29.23,-3.75],[29.42,-4.45],[29.55,-6.3],[30.77,-8.19],[28.9,-8.48],[28.37,-9.26],[28.7,-10.65],[28.36,-11.55],[29.03,-12.38],[29.81,-12.16],[29.8,-13.45],[29.02,-13.4],[27.2,-11.57],[26.87,-11.97],[26,-11.9],[25.33,-11.19],[24.45,-11.46],[23.99,-10.87],[22.25,-11.21],[21.78,-7.28],[19.54,-7],[19.37,-8],[17.62,-8.1],[16.58,-5.9],[14,-5.85],[13.18,-5.86],[12.21,-5.77],[13.09,-4.66],[13.09,-4.63],[13.41,-4.88],[14.4,-4.28],[14.66,-4.91],[15.89,-3.94],[16.2,-2.18],[17.71,-.54],[18.62,3.48],[18.54,4.34],[19.42,5.13],[20.59,4.41],[22.38,4.13],[22.9,4.82],[25.89,5.19]]]]},properties:{name:"Congo, Democratic Republic of the"},id:"CD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-157.89,-21.94],[-157.96,-21.9],[-157.92,-21.88],[-157.89,-21.94]]],[[[-159.74,-21.25],[-159.83,-21.2],[-159.75,-21.19],[-159.74,-21.25]]],[[[-157.32,-20.19],[-157.33,-20.13],[-157.31,-20.15],[-157.32,-20.19]]]]},properties:{name:"Cook Islands"},id:"CK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-85.09,11.01],[-83.65,10.92],[-82.56,9.56],[-82.93,9.47],[-82.9,8.03],[-84.74,9.97],[-85.24,10.2],[-85.14,9.59],[-85.66,9.91],[-85.69,11.08],[-85.09,11.01]]]]},properties:{name:"Costa Rica"},id:"CR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[17.3,43.01],[17.65,42.89],[18.46,42.57],[18.5,42.45],[17.3,43.01]]],[[[16.85,43.27],[16.4,43.33],[16.75,43.36],[16.85,43.27]]],[[[14.46,44.91],[14.49,44.61],[14.29,44.91],[14.4,44.92],[14.32,45.17],[14.46,44.91]]],[[[14.76,44.94],[14.43,45.08],[14.54,45.24],[14.76,44.94]]],[[[16.57,46.48],[16.61,46.48],[17.67,45.83],[18.82,45.91],[19.42,45.23],[19.04,44.86],[15.79,45.17],[16.14,44.2],[17.58,42.94],[16.88,43.4],[15.99,43.5],[14.48,45.31],[14.29,45.32],[14.17,44.98],[13.9,44.77],[13.59,45.48],[15.17,45.43],[15.65,46.22],[16.57,46.48]]]]},properties:{name:"Croatia"},id:"HR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-82.55,21.57],[-83.19,21.62],[-82.97,21.94],[-82.55,21.57]]],[[[-82,23.19],[-80.03,22.95],[-74.13,20.19],[-77.72,19.83],[-77.24,20.66],[-78.05,20.7],[-78.75,21.64],[-81.82,22.18],[-82.16,22.4],[-81.65,22.49],[-81.89,22.68],[-82.76,22.7],[-83.37,22.2],[-83.93,22.16],[-84.03,21.91],[-84.95,21.86],[-84.34,22.01],[-84.4,22.33],[-84.08,22.66],[-82,23.19]]]]},properties:{name:"Cuba"},id:"CU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[33.65,35.35
910],[34.59,35.69],[33.03,34.56],[32.27,35.04],[33.65,35.35]]]]},properties:{name:"Cyprus"},id:"CY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14.7,48.58],[13.83,48.77],[12.09,50.32],[14.83,50.87],[16.34,50.66],[16.64,50.11],[17.72,50.32],[18.85,49.52],[16.95,48.62],[15.03,49.02],[14.7,48.58]]]]},properties:{name:"Czech Republic"},id:"CZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[2.48,6.34],[1.64,6.22],[1.4,9.43],[.78,10.38],[.92,11],[2.4,11.9],[2.84,12.4],[3.6,11.69],[3.86,10.58],[2.79,9.04],[2.72,6.37],[2.48,6.34]]]]},properties:{name:"Benin"},id:"BJ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[10.75,55.48],[10.5,55.03],[9.68,55.5],[10.75,55.48]]],[[[12.57,55.99],[12.07,54.97],[10.87,55.73],[12.57,55.99]]],[[[8.92,56.92],[8.77,56.69],[8.51,56.74],[8.92,56.92]]],[[[9.97,57.07],[10.31,56.98],[10.31,56.75],[9.87,56.65],[10.96,56.44],[9.55,55.71],[9.77,54.89],[9.45,54.83],[8.66,54.91],[8.62,55.43],[8.09,55.55],[8.17,56.65],[8.73,56.48],[8.68,56.62],[9.08,56.81],[9.15,56.7],[9.06,56.57],[9.27,56.63],[9.32,56.53],[9.18,56.92],[9.97,57.07]]],[[[10.43,57.59],[10.34,56.99],[10.01,57.09],[9.12,57.05],[8.67,56.95],[8.42,56.68],[8.59,56.69],[8.55,56.58],[8.24,56.71],[8.62,57.12],[9.39,57.15],[9.95,57.58],[10.65,57.74],[10.43,57.59]]]]},properties:{name:"Denmark"},id:"DK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-61.36,15.2],[-61.45,15.63],[-61.25,15.46],[-61.36,15.2]]]]},properties:{name:"Dominica"},id:"DM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-70.78,19.85],[-69.22,19.36],[-69.63,19.1],[-68.73,18.95],[-68.45,18.36],[-70.69,18.43],[-71.42,17.6],[-71.77,18.04],[-71.75,19.71],[-70.78,19.85]]]]},properties:{name:"Dominican Republic"},id:"DO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-91.22,-.01],[-90.81,-.73],[-91.38,-1.03],[-91.08,-.59],[-91.61,0],[-91.22,-.01]]],[[[-78.59,1.24],[-77.38,.38],[-75.29,-.12],[-75.63,-.11],[-75.22,-.97],[-75.56,-1.53],[-78.34,-3.42],[-78.71,-4.58],[-79.05,-5.01],[-79.65,-4.43],[-80.47,-4.44],[-80.34,-3.38],[-79.76,-2.01],[-80.26,-2.74],[-80.89,-2.32],[-80.91,-1.03],[-80.26,-.63],[-80.06,.83],[-78.81,1.44],[-78.59,1.24]]]]},properties:{name:"Ecuador"},id:"EC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-89.34,14.42],[-87.75,13.86],[-87.82,13.41],[-88.54,13.19],[-90.1,13.75],[-89.35,14.43],[-89.34,14.42]]]]},properties:{name:"El Salvador"},id:"SV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[10.03,2.17],[11.34,2.17],[11.35,1],[9.8,1],[9.36,1.17],[9.81,2.34],[10.03,2.17]]]]},properties:{name:"Equatorial Guinea"},id:"GQ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[36.54,14.26],[37.29,14.45],[37.57,14.1],[37.91,14.88],[38.45,14.42],[40.23,14.44],[42.4,12.47],[41.79,11.01],[42.94,11],[42.85,10.22],[44.01,9.01],[47.99,8],[44.95,4.9],[43.69,4.89],[41.91,3.98],[40.78,4.29],[39.52,3.41],[35.94,4.62],[34.7,6.68],[32.99,7.92],[33.25,8.46],[34.12,8.58],[34.29,10.55],[34.86,10.73],[35.1,11.83],[36.14,12.71],[36.54,14.26]]]]},properties:{name:"Ethiopia"},id:"ET"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[38.8,17.65],[39.72,15.08],[39.88,15.49],[41.17,14.63],[43.12,12.71],[42.4,12.47],[40.23,14.44],[38.45,14.42],[37.91,14.88],[37.57,14.1],[37.29,14.45],[36.54,14.26],[37,17.07],[38.6,17.99],[38.8,17.65]]]]},properties:{name:"Eritrea"},id:"ER"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[22.99,58.6],[23.33,58.44],[21.99,57.92],[21.83,58.5],[22.99,58.6]]],[[[22.75,59],[23.05,58.84],[22.04,58.94],[22.75,59]]],[[[25.78,59.63],[28.02,59.48],[27.43,58.81],[27.82,57.87],[27.37,57.54],[25.29,58.08],[24.31,57.87],[24.56,58.33],[23.73,58.37],[23.46,59.21],[25.78,59.63]]]]},properties:{name:"Estonia"},id:"EE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-7.05,62.07],[-7.2,62.02],[-7.44,62.14],[-7.05,62.07]]],[[[-6.71,61.94],[-7.23,62.17],[-7.21,62.28],[-6.71,61.94]]],[[[-6.66,62.09],[-7.06,62.31],[-6.6,62.2],[-6.66,62.09]]]]},properties:{name:"Faroe Islands"},id:"FO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-59.21,-51.41],[-60.37,-52.16
910],[-60.98,-52.06],[-60.18,-51.76],[-60.64,-51.36],[-59.21,-51.41]]],[[[-58.7,-51.34],[-57.73,-51.69],[-59.72,-52.12],[-58.7,-51.34]]]]},properties:{name:"Falkland Islands (Islas Malvinas)"},id:"FK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-37.5,-54.01],[-35.78,-54.77],[-38.03,-54.05],[-37.5,-54.01]]]]},properties:{name:"South Georgia South Sandwich Islands"},id:"GS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.96,-16.2],[179.48,-16.7],[179.93,-16.46],[179.9,-16.77],[178.48,-16.78],[179.96,-16.2]]],[[[-179.97,-16.17],[-180,-16.15],[-179.94,-16.13],[-179.97,-16.17]]]]},properties:{name:"Fiji"},id:"FJ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[28.17,69.91],[29.18,69.64],[28.96,69.05],[28.43,68.9],[28.82,68.84],[28.69,68.2],[30.03,67.69],[29.07,66.9],[30.13,65.72],[29.64,64.93],[30.58,64.22],[29.99,63.74],[31.59,62.91],[27.81,60.55],[22.91,59.8],[23.34,60.02],[23.09,60.35],[21.36,60.65],[21.67,61.55],[21.06,62.61],[21.5,63.21],[25.45,64.95],[25.31,65.51],[24.17,65.81],[23.66,66.31],[24.01,66.8],[23.43,67.47],[23.67,67.94],[21.81,68.57],[20.58,69.06],[21.32,69.33],[22.4,68.71],[24.93,68.58],[26.45,69.93],[28.17,69.91]]]]},properties:{name:"Finland"},id:"FI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[20.08,60.35],[19.94,60.04],[19.65,60.26],[20.08,60.35]]]]},properties:{name:"Aland Islands"},id:"AX"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.45,42.68],[9.18,41.36],[8.58,42.38],[9.35,43],[9.45,42.68]]],[[[2.54,51.09],[4.15,49.98],[4.83,50.17],[5.81,49.55],[6.36,49.46],[8.23,48.96],[7.59,47.58],[6.99,47.5],[5.97,46.21],[6.79,46.43],[7.04,45.93],[7.13,45.26],[6.62,45.11],[6.98,44.28],[7.66,44.17],[7.53,43.79],[7.44,43.76],[7.42,43.77],[7.39,43.73],[6.17,43.05],[3.96,43.54],[3.08,43.07],[3.18,42.44],[1.72,42.51],[1.78,42.57],[1.45,42.6],[-1.78,43.36],[-1.04,44.68],[-1.25,44.66],[-1.08,45.56],[-.54,44.9],[-.78,45.46],[-1.24,45.7],[-1.11,46.32],[-2.13,46.84],[-2.13,47.28],[-1.73,47.21],[-4.37,47.8],[-4.73,48.04],[-4.19,48.3],[-4.78,48.51],[-1.37,48.64],[-1.94,49.72],[.42,49.45],[.07,49.53],[1.46,50.12],[1.63,50.88],[2.54,51.09]]]]},properties:{name:"France"},id:"FR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-53.49,5.57],[-52.29,4.94],[-52.04,4.33],[-51.85,4.65],[-51.68,4.03],[-52.91,2.2],[-54.6,2.33],[-54,3.45],[-54.48,4.75],[-54.17,5.35],[-53.94,5.74],[-53.49,5.57]]]]},properties:{name:"French Guiana"},id:"GF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-149.21,-17.73],[-149.18,-17.87],[-149.63,-17.55],[-149.21,-17.73]]],[[[-151.4,-16.89],[-151.48,-16.9],[-151.48,-16.74],[-151.4,-16.89]]],[[[-138.96,-9.74],[-138.81,-9.74],[-139.17,-9.78],[-138.96,-9.74]]],[[[-140.03,-8.9],[-140.19,-8.95],[-140.25,-8.8],[-140.03,-8.9]]]]},properties:{name:"French Polynesia"},id:"PF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[69,-48.8],[69.58,-49.3],[70.57,-49.25],[69.77,-49.39],[70.25,-49.69],[68.8,-49.72],[69,-48.8]]]]},properties:{name:"French Southern and Antarctic Lands"},id:"TF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[42.87,11.59],[43.25,11.47],[42.94,11],[41.79,11.01],[42.4,12.47],[43.12,12.71],[43.41,12.06],[42.51,11.57],[42.87,11.59]]]]},properties:{name:"Djibouti"},id:"DJ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[12.52,2.28],[13.29,2.16],[13.19,1.22],[14.19,1.39],[14.49,.91],[13.85,-.2],[14.52,-.61],[14.43,-1.89],[14.11,-2.49],[13.76,-2.09],[13,-2.37],[12.65,-1.82],[12.48,-2.33],[11.57,-2.33],[11.93,-3.64],[11.14,-3.93],[9.62,-2.38],[8.71,-.64],[9.3,-.37],[9.35,.36],[9.92,.19],[9.3,.53],[9.8,1],[11.35,1],[11.34,2.17],[12.52,2.28]]]]},properties:{name:"Gabon"},id:"GA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[41.55,42.41],[40,43.38],[42.85,43.18],[43.91,42.58],[44.93,42.76],[46.45,41.9],[46.52,41.05],[45.02,41.3],[43.46,41.11],[42.83,41.58],[41.53,41.52],[41.55,42.41]]]]},properties:{name:"Georgia"},id:"GE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-16.73,13.45],[-16.2,13.25],[-16.16,13.43],[-15.3,13.49],[-16.14,13.45],[-16.39,13.33],[-16.57,13.59],[-15.07,13.83],[-13.8,13.41],[-15.11,13.6],[
910-15.29,13.37],[-15.8,13.35],[-15.81,13.16],[-16.75,13.06],[-16.73,13.45]]]]},properties:{name:"Gambia, The"},id:"GM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[34.33,31.26],[34.27,31.22],[34.22,31.32],[34.49,31.6],[34.33,31.26]]],[[[35.28,32.52],[35.55,32.39],[35.48,31.5],[34.88,31.39],[35.28,32.52]],[[35.25,31.79],[35.26,31.79],[35.25,31.81],[35.25,31.79]]]]},properties:{name:"Palestine"},id:"PS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[10.98,54.38],[10.82,53.89],[12.53,54.47],[14.28,53.7],[14.83,50.87],[12.09,50.32],[13.83,48.77],[12.76,48.12],[13.02,47.47],[9.57,47.54],[7.7,47.54],[7.59,47.58],[8.23,48.96],[6.36,49.46],[6.13,50.13],[6.01,50.76],[5.96,51.81],[6.83,51.97],[7.07,52.39],[6.69,52.55],[7.21,53.24],[7.3,53.69],[8.5,53.35],[8.67,53.89],[9.83,53.54],[8.9,53.94],[8.6,54.33],[9.02,54.5],[8.28,54.75],[8.66,54.91],[9.45,54.83],[10.98,54.38]]]]},properties:{name:"Germany"},id:"DE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[.64,5.85],[.66,5.75],[.26,5.76],[-.8,5.21],[-1.61,5.02],[-2.06,4.73],[-2.93,5.1],[-3.25,6.61],[-2.49,8.2],[-2.69,9.48],[-2.83,11],[-.15,11.14],[.73,8.32],[.53,6.95],[1.2,6.1],[.69,5.75],[.63,5.95],[.51,6.06],[.41,6.08],[.37,6.04],[.26,6.1],[.21,6.09],[.36,6.02],[.42,6.07],[.49,6.04],[.61,5.95],[.64,5.85]]]]},properties:{name:"Ghana"},id:"GH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-5.33,36.16],[-5.34,36.11],[-5.36,36.16],[-5.33,36.16]]]]},properties:{name:"Gibraltar"},id:"GI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[175.59,-1.92],[175.55,-1.82],[175.59,-1.88],[175.59,-1.92]]],[[[175.04,-1.55],[175,-1.53],[175.05,-1.43],[175.04,-1.55]]],[[[173.62,.13],[173.6,.21],[173.63,.22],[173.62,.13]]],[[[173.02,1.01],[173.08,.95],[172.98,.82],[173.02,1.01]]],[[[173.01,1.71],[172.93,1.94],[173.03,1.82],[173.01,1.71]]],[[[172.87,3.06],[172.77,3],[172.75,3.02],[172.87,3.06]]]]},properties:{name:"Kiribati"},id:"KI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[23.86,35.52],[26.29,35.13],[24.75,34.94],[23.52,35.29],[23.86,35.52]]],[[[23.46,38.85],[24.56,37.99],[22.83,38.83],[23.46,38.85]]],[[[26.29,41.71],[26.36,41.71],[26.63,41.35],[26.04,40.74],[23.74,40.75],[24.4,40.15],[23.35,40.25],[23.71,39.91],[22.59,40.48],[23.34,39.18],[22.94,39.36],[23.07,39.04],[22.52,38.86],[24.07,38.2],[24.03,37.65],[23.52,38.04],[22.99,37.88],[23.51,37.43],[22.73,37.57],[23.2,36.43],[22.63,36.8],[22.49,36.39],[22.15,37.02],[21.7,36.82],[21.11,37.85],[21.86,38.34],[23.23,38.15],[22.4,38.45],[21.15,38.3],[20.73,38.8],[21.15,39],[20.01,39.69],[20.98,40.86],[22.94,41.34],[25.29,41.24],[26.29,41.71]]]]},properties:{name:"Greece"},id:"GR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-52.69,69.92],[-51.83,69.63],[-53.57,69.23],[-54.27,69.4],[-53.35,69.58],[-54.99,69.69],[-54.39,69.68],[-54.94,69.85],[-54.23,69.91],[-54.83,70.08],[-54.43,70.31],[-52.69,69.92]]],[[[-23.61,72.83],[-21.93,72.4],[-22.76,72.44],[-22.13,72.27],[-22.56,72.14],[-24.48,72.83],[-23.61,72.83]]],[[[-32.3,83.57],[-25.65,83.29],[-35.62,82.9],[-25.14,83.16],[-24.75,83],[-25.9,82.78],[-21.31,82.61],[-25.07,82.15],[-31.62,82.21],[-29.9,82.09],[-33.1,81.77],[-25.2,81.99],[-27.63,81.49],[-27.33,81.38],[-22.02,81.93],[-22.23,81.47],[-24.51,80.54],[-19.94,81.68],[-20.31,81.45],[-16.7,81.93],[-12.16,81.6],[-16.01,80.73],[-21.25,80.58],[-16.11,80.5],[-20.55,80.11],[-20.33,79.76],[-17.45,80.06],[-19.63,79.66],[-19.87,79.15],[-19.08,79.2],[-21.18,78.81],[-20.91,78.62],[-22.04,77.69],[-19.24,77.76],[-18.96,77.63],[-21.05,77.54],[-18.4,77.34],[-18.31,76.81],[-22.74,76.7],[-19.81,76.23],[-21.98,75.99],[-19.83,75.91],[-19.34,75.4],[-19.88,75.15],[-22.25,75.66],[-20.52,75.14],[-22.44,75.16],[-18.98,74.48],[-22.48,74.31],[-21.82,73.65],[-21.75,74.06],[-20.28,73.88],[-20.5,73.45],[-22.38,73.25],[-24.03,73.7],[-22.18,73.62],[-24.04,73.81],[-24.46,73.54],[-25.69,73.95],[-24.67,73.51],[-27.34,73.49],[-26.39,73.24],[-27.73,73.13],[-25.05,73.08],[-27.39,72.84],[-24.84,72.72],[-24.61,72.52],[-25.91,72.41],[-22.49,71.89],[-23.13,71.63],[-21.9,71.74],[-22.47,71.26],[-21.81,71.51],[-21.69,71.15],[-22.33,71.05],[-21.68,71.07],[
910-21.93,70.8],[-21.47,70.54],[-22.38,70.44],[-22.51,70.85],[-22.62,70.45],[-23.35,70.44],[-24.74,71.33],[-28.64,72.12],[-27.33,71.71],[-28.47,71.55],[-25.41,71.35],[-28.41,70.98],[-27.91,70.87],[-29.21,70.39],[-26.32,70.37],[-28.54,70.04],[-25.23,70.41],[-22.08,70.13],[-26.36,68.67],[-29.38,68.2],[-31.57,68.07],[-32.49,68.62],[-32.12,67.86],[-33.2,67.69],[-34.72,66.34],[-35.85,66.43],[-35.59,66.11],[-37.19,65.77],[-37.81,66.03],[-37.18,66.34],[-38.11,66.39],[-37.69,66.26],[-38.48,66.01],[-38.24,65.63],[-40.1,65.57],[-39.76,65.24],[-41.16,64.96],[-40.36,64.35],[-41.57,64.27],[-40.57,64.11],[-40.52,63.7],[-41.62,63.79],[-40.75,63.51],[-41.91,63.46],[-41.43,63.13],[-42.17,63.2],[-41.76,62.84],[-43.15,62.76],[-42.16,62.38],[-42.98,62.52],[-42.12,62.01],[-43.08,61.59],[-42.51,61.36],[-43.25,61.34],[-42.63,61.1],[-43.61,61.13],[-42.7,61.06],[-43.53,60.84],[-42.75,60.68],[-44.2,60.59],[-43.14,60.08],[-44.1,60.38],[-45.15,60.07],[-44.47,60.56],[-45.19,60.13],[-44.63,60.73],[-45.98,60.57],[-45.25,60.9],[-46.22,60.75],[-45.2,61.19],[-46.07,60.92],[-45.77,61.33],[-46.86,60.8],[-48.24,60.82],[-47.69,61],[-48.41,60.99],[-47.92,61.32],[-49.3,61.56],[-48.6,61.64],[-49.15,61.72],[-48.76,61.98],[-49.44,61.84],[-48.84,62.08],[-49.67,62],[-49.29,62.17],[-50.32,62.5],[-49.7,63.06],[-50.38,62.78],[-50.15,63.02],[-50.61,63.09],[-50.06,63.23],[-51.11,63.34],[-50.28,63.4],[-51.22,63.44],[-50.5,63.67],[-51.56,63.71],[-50.92,63.93],[-51.6,64.03],[-50.05,64.19],[-51.76,64.18],[-50.17,64.45],[-50.86,64.63],[-49.58,64.34],[-50,64.87],[-50.98,65.22],[-50.64,64.75],[-52.01,64.2],[-52.12,64.72],[-51.25,65.02],[-52.21,64.81],[-52.1,65.24],[-52.56,65.33],[-50.55,65.71],[-52.5,65.39],[-53.27,65.75],[-51.83,66.06],[-53.46,66.03],[-50,66.98],[-53.48,66.1],[-53.12,66.29],[-53.63,66.5],[-52.42,66.55],[-53.45,66.64],[-52.23,66.84],[-53.97,67.07],[-50.35,67.18],[-53.88,67.26],[-52.5,67.77],[-50.07,67.51],[-51.23,67.7],[-50.42,67.84],[-51.06,67.97],[-53.75,67.6],[-53.19,68.04],[-52.06,67.98],[-53.32,68.18],[-50.15,67.93],[-51.43,68.2],[-50.82,68.5],[-53.39,68.33],[-50.87,68.61],[-51.29,68.75],[-51.07,69.13],[-50.21,68.96],[-50.69,69.12],[-50.38,69.34],[-51.12,69.2],[-50.2,69.52],[-50.88,69.49],[-50.21,70.02],[-54.63,70.65],[-50.49,70.51],[-51.95,71.02],[-50.93,70.99],[-51.23,71.14],[-52.25,71.12],[-51.65,71.36],[-52.56,71.17],[-51.35,71.49],[-52.98,71.42],[-51.64,71.71],[-53.25,71.7],[-52.68,72],[-53.32,71.82],[-53.56,72.36],[-53.96,72.32],[-53.4,71.85],[-54.1,71.71],[-53.92,71.44],[-55.91,71.68],[-54.38,72.22],[-55.3,71.93],[-54.68,72.37],[-55.63,72.46],[-54.3,72.48],[-55.7,73.07],[-55.09,73.36],[-56.08,73.65],[-55.61,73.72],[-56.41,74.07],[-56.13,74.28],[-57.33,74.11],[-56.19,74.55],[-58.7,75.35],[-58.21,75.44],[-58.41,75.72],[-60.88,76.15],[-68.5,76.09],[-69.63,76.38],[-67.98,76.68],[-71.38,77.06],[-66.45,77.13],[-69.1,77.27],[-66.06,77.49],[-69.25,77.45],[-73.05,78.16],[-65.98,79.1],[-64.82,79.53],[-65.07,80.01],[-63.78,80.15],[-67.48,80.33],[-63.68,81.14],[-62.79,80.75],[-63.37,81.16],[-61.06,81.12],[-61.31,81.36],[-60.77,81.5],[-61.45,81.75],[-60.81,81.88],[-56.48,81.33],[-59.47,82],[-54.51,82.37],[-53.56,82.12],[-53.63,81.51],[-52.9,82.03],[-49.61,81.64],[-51.07,81.93],[-49.43,81.93],[-51.12,82.49],[-50.32,82.52],[-44.64,81.75],[-44.18,81.83],[-44.93,81.99],[-44.62,82.28],[-42.3,82.22],[-45.77,82.76],[-39.75,82.4],[-46.89,82.96],[-43.39,82.91],[-45.52,83.12],[-42.7,83.27],[-38.57,82.74],[-39.15,82.98],[-36.88,83.15],[-38.86,83.43],[-32.3,83.57]]]]},properties:{name:"Greenland"},id:"GL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-61.75,12],[-61.61,12.23],[-61.63,12.05],[-61.75,12]]],[[[-61.43,12.45],[-61.5,12.44],[-61.43,12.53],[-61.43,12.45]]]]},properties:{name:"Grenada"},id:"GD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-61.35,16.33],[-61.7,15.95],[-61.78,16.33],[-61.35,16.33]]]]},properties:{name:"Guadeloupe"},id:"GP"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[144.71,13.23],[144.66,13.43],[144.88,13.65],[144.71,13.23]]]]},properties:{name:"Guam"},id:"GU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-90.63,13.93],[-92.25,14.5
9105],[-91.73,16.07],[-90.44,16.09],[-91.44,17.24],[-90.98,17.26],[-90.98,17.82],[-89.14,17.82],[-89.22,15.89],[-88.91,15.89],[-88.21,15.72],[-89.35,14.43],[-90.1,13.75],[-90.63,13.93]]]]},properties:{name:"Guatemala"},id:"GT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-13.6,9.73],[-15.02,10.96],[-14.69,11.51],[-13.71,11.72],[-13.71,12.68],[-11.37,12.41],[-10.65,11.89],[-9.16,12.49],[-8.53,11.49],[-8.68,10.97],[-8.29,11.01],[-7.97,10.17],[-7.65,8.38],[-8.2,8.5],[-7.95,8.02],[-8.47,7.56],[-9.49,7.36],[-9.48,8.35],[-10.27,8.49],[-10.7,8.3],[-10.57,9.06],[-11.21,10],[-12.46,9.89],[-13.3,9.03],[-13.6,9.73]]]]},properties:{name:"Guinea"},id:"GN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-59.79,8.34],[-58.47,7.35],[-58.65,6.43],[-58.31,6.89],[-57.2,6.15],[-57.25,5.49],[-58.05,4.01],[-56.47,1.94],[-58.81,1.19],[-59.64,1.73],[-59.99,2.69],[-59.57,3.9],[-60.15,4.52],[-60.1,5.22],[-60.73,5.2],[-61.39,5.94],[-61.13,6.71],[-60.29,7.06],[-60.72,7.54],[-59.83,8.24],[-59.99,8.54],[-59.79,8.34]]]]},properties:{name:"Guyana"},id:"GY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-72.67,19.92],[-71.75,19.71],[-71.77,18.04],[-74.45,18.34],[-74.27,18.67],[-72.35,18.53],[-72.72,19.45],[-73.47,19.69],[-72.67,19.92]]]]},properties:{name:"Haiti"},id:"HT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[73.77,-53.13],[73.47,-53.19],[73.23,-52.99],[73.77,-53.13]]]]},properties:{name:"Heard Island and McDonald Islands"},id:"HM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[12.45,41.9],[12.45,41.91],[12.46,41.9],[12.45,41.9]]]]},properties:{name:"Holy See (Vatican City)"},id:"VA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-85.84,16.01],[-84.26,15.83],[-83.13,14.99],[-83.24,14.98],[-84.91,14.81],[-87.3,12.99],[-87.82,13.41],[-87.75,13.86],[-89.34,14.42],[-89.35,14.43],[-88.21,15.72],[-85.84,16.01]]]]},properties:{name:"Honduras"},id:"HN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[114.25,22.2],[114.12,22.28],[114.2,22.29],[114.25,22.2]]],[[[113.9,22.2],[113.83,22.23],[114.05,22.34],[113.9,22.2]]],[[[114.22,22.47],[114.03,22.51],[114.22,22.55],[114.22,22.47]]]]},properties:{name:"Hong Kong"},id:"HK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[18.82,45.91],[17.67,45.83],[16.61,46.48],[16.11,46.87],[16.51,47.01],[16.45,47.7],[17.17,48.01],[17.25,48.02],[18.66,47.76],[20.66,48.56],[22.15,48.41],[22.89,47.95],[20.73,46.18],[20.26,46.11],[18.82,45.91]]]]},properties:{name:"Hungary"},id:"HU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-15.07,66.14],[-14.34,65.78],[-14.56,65.49],[-13.61,65.51],[-14.03,65.19],[-13.5,65.07],[-14.93,64.26],[-18.71,63.39],[-21.05,63.95],[-22.69,63.81],[-21.51,64.65],[-24.06,64.89],[-21.84,65.03],[-22.56,65.17],[-21.7,65.45],[-24.54,65.5],[-23.23,65.74],[-23.87,65.87],[-23.21,65.84],[-23.82,66.01],[-23.47,66.2],[-22.42,65.85],[-22.94,66.47],[-21.4,66.03],[-21.78,65.77],[-21.08,65.16],[-20.18,66.13],[-19.45,65.73],[-18.78,66.19],[-18.07,65.64],[-18.3,66.17],[-16.59,66.09],[-16.53,66.51],[-14.71,66.37],[-15.07,66.14]]]]},properties:{name:"Iceland"},id:"IS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[78.08,35.45],[79.53,32.75],[78.4,32.55],[78.77,31.31],[81.03,30.2],[80.06,28.84],[82.07,27.91],[83.29,27.34],[84.15,27.51],[85.86,26.57],[88.01,26.36],[88.14,27.87],[88.83,28.01],[88.92,27.32],[89.64,26.72],[92.07,26.86],[91.66,27.76],[92.54,27.86],[94.65,29.33],[95.39,29.04],[96.08,29.47],[96.62,28.79],[96.4,28.35],[97.35,28.22],[96.89,27.61],[97.14,27.09],[96.19,27.27],[95.14,26.61],[94.15,23.86],[93.34,24.08],[93.2,22.26],[92.6,21.98],[92.28,23.71],[91.61,22.94],[91.16,23.64],[92.41,25.03],[89.85,25.29],[89.74,26.16],[88.43,26.55],[88.11,25.84],[89.01,25.29],[88.04,24.68],[88.75,24.22],[89.06,22.12],[89.07,21.61],[88.71,21.57],[88.67,22.2],[88.25,21.55],[88.2,22.16],[87.91,22.42],[88.17,22.09],[86.96,21.38],[87.03,20.67],[86.42,19.98],[85.43,19.89],[82.36,17.1],[82.3,16.58],[80.28,15.7],[79.86,10.29],[79.32,10.28],[78.91,9.48],[79.45,9.15],[78.4,9.09],[77.54,8.07],[76.58,8.88],[73.45,16.06],[72.66,19.87],[72.93,20.77],[72.56,21.38],[73.13,21.75],[72.5,21.98],[72.92,22.27],[72.15,22.28],[72.11,21.2],[70.82,20.7],[68.94,22.29],[70.17,22.55],[70.51,23.1],[69.22,22.84],[68.43,23.43],[68.74,23.84],[68.2,23.77],[68.78,24.33],[71.11,24.42],[69.58,27.17],[70.37,28.02],[71.9,27.96],[74.69,31.05],[74.61,31.88],[75.38,32.21],[74.02,33.19],[74.3,33.98],[73.94,34.65],[76.87,34.66],[77.82,35.5],[78.08,35.45]]]]},properties:{name:"India"},id:"IN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[120.03,-9.38],[120.72,-10.2],[118.93,-9.56],[120.03,-9.38]]],[[[125.16,-9.07],[125.13,-9.44],[124.44,-10.16],[123.49,-10.32],[124.05,-9.34],[124.34,-9.46],[124.45,-9.18],[124.95,-8.95],[125.16,-9.07]]],[[[116.55,-8.78],[115.84,-8.76],[116.39,-8.2],[116.55,-8.78]]],[[[124.58,-8.14],[125.14,-8.33],[124.35,-8.45],[124.58,-8.14]]],[[[118.31,-8.37],[119,-8.31],[119.18,-8.72],[116.75,-9.01],[117.12,-8.38],[117.97,-8.75],[118.28,-8.59],[117.74,-8.15],[118.31,-8.37]]],[[[122.98,-8.15],[122.83,-8.6],[121.77,-8.89],[119.8,-8.72],[120.52,-8.26],[122.29,-8.64],[122.98,-8.15]]],[[[115.5,-8.18],[115.13,-8.85],[114.45,-8.1],[115.5,-8.18]]],[[[126.72,-7.67],[125.77,-8.01],[125.97,-7.66],[126.72,-7.67]]],[[[138.97,-7.56],[138.44,-8.38],[137.
91064,-8.43],[138.15,-7.51],[138.97,-7.56]]],[[[131.74,-7.21],[131.11,-8],[131.24,-7.48],[131.74,-7.21]]],[[[113.99,-6.88],[113.5,-7.23],[112.69,-7.05],[113.99,-6.88]]],[[[106.16,-6.01],[108.31,-6.26],[108.73,-6.82],[110.39,-6.98],[110.92,-6.41],[112.56,-6.91],[112.85,-7.6],[114.45,-7.8],[114.37,-8.52],[114.62,-8.75],[108.16,-7.78],[105.24,-6.81],[106.16,-6.01]]],[[[134.58,-5.43],[134.73,-5.97],[134.3,-6.03],[134.58,-5.43]]],[[[123.21,-4.7],[122.65,-5.69],[122.9,-4.49],[123.21,-4.7]]],[[[126.99,-3.14],[127.24,-3.62],[126.7,-3.83],[126.02,-3.35],[126.99,-3.14]]],[[[129.81,-2.92],[130.58,-3.13],[130.83,-3.87],[128.17,-3.07],[127.91,-3.54],[128.17,-2.86],[129.81,-2.92]]],[[[107.83,-2.54],[108.27,-2.76],[108.07,-3.24],[107.61,-3.21],[107.83,-2.54]]],[[[133.59,-2.53],[133.5,-2.43],[133.61,-2.48],[133.59,-2.53]]],[[[134.57,-2.45],[134.52,-2.4],[134.57,-2.29],[134.57,-2.45]]],[[[134.37,-2.16],[134.33,-2.09],[134.39,-2],[134.37,-2.16]]],[[[130.19,-2.06],[129.72,-1.89],[130.35,-1.68],[130.19,-2.06]]],[[[125.01,-1.72],[125.32,-1.89],[124.33,-1.88],[125.01,-1.72]]],[[[136.29,-1.69],[136.9,-1.8],[135.42,-1.61],[136.29,-1.69]]],[[[106.09,-1.77],[106.72,-3.1],[105.13,-2.07],[105.57,-1.53],[106.09,-1.77]]],[[[127.88,-1.43],[128.15,-1.68],[127.38,-1.63],[127.88,-1.43]]],[[[133.11,-.54],[134.11,-.84],[134.16,-2.32],[135,-3.34],[137.86,-1.47],[141,-2.61],[141.01,-9.13],[139.99,-8.19],[140.15,-7.88],[138.91,-8.3],[139.1,-7.56],[138.66,-7.2],[139.22,-7.16],[138.56,-6.91],[139.19,-6.97],[138.06,-5.41],[134.22,-3.96],[133.64,-3.49],[133.83,-2.96],[132.9,-4.09],[132.82,-3.3],[131.96,-2.78],[133.24,-2.42],[133.68,-2.72],[133.94,-2.1],[132.3,-2.27],[130.96,-1.4],[132.27,-.38],[133.11,-.54]]],[[[130.88,-.02],[131.26,-.39],[130.21,-.21],[130.88,-.02]]],[[[97.53,1.42],[97.81,.55],[97.11,1.39],[97.53,1.42]]],[[[125.14,1.42],[124.25,.38],[120.24,.35],[120.07,-.61],[120.67,-1.4],[121.62,-.8],[123.45,-.84],[121.3,-1.8],[122.9,-4.4],[121.55,-4.75],[120.77,-2.61],[120.2,-2.96],[120.46,-5.62],[119.46,-5.56],[119.51,-3.53],[118.92,-3.57],[118.76,-2.77],[119.86,-.84],[119.62,-.01],[120.03,.71],[120.95,1.34],[123.84,.83],[124.97,1.69],[125.14,1.42]]],[[[127.89,1.8],[127.79,.8],[128.73,1.56],[128.21,.78],[128.91,.2],[127.88,.31],[128.4,-.89],[127.67,-.23],[127.39,1.05],[128.05,2.2],[127.89,1.8]]],[[[116.05,4.28],[117.59,4.17],[117.83,3.7],[117.03,3.59],[118.1,2.31],[117.87,1.88],[119.01,.98],[117.89,1.12],[117.62,-.78],[116.74,-1.02],[116.22,-1.78],[116.6,-2.23],[115.98,-3.59],[114.71,-4.18],[114.48,-3.5],[113.06,-2.99],[111.89,-3.57],[111.75,-2.74],[110.24,-2.98],[110.06,-1.33],[109.27,-.86],[108.85,.81],[109.65,2.07],[110.56,.85],[111.83,1],[112.47,1.57],[114.56,1.43],[116.05,4.28]]],[[[95.74,5.59],[97.52,5.25],[100,2.6],[100.94,1.82],[101.06,2.29],[102.93,.7],[102.54,.17],[103.74,.28],[103.36,-.7],[104.38,-1.04],[104.88,-2.15],[104.53,-2.77],[104.86,-2.29],[105.61,-2.39],[106.06,-3.03],[105.73,-5.9],[105.27,-5.44],[105.14,-5.8],[104.54,-5.51],[104.56,-5.93],[101.63,-3.25],[100.29,-.81],[99.14,.26],[98.77,1.75],[95.53,4.68],[95.23,5.57],[95.74,5.59]]]]},properties:{name:"Indonesia"},id:"ID"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[45,39.42],[46.18,38.84],[46.54,38.88],[47.98,39.72],[48.36,39.39],[48.02,38.84],[48.89,38.44],[49.1,37.64],[51.1,36.73],[53.94,36.8],[53.91,37.35],[57.21,38.28],[59.34,37.54],[60.33,36.66],[61.16,36.65],[61.28,35.61],[60.51,34.14],[60.94,33.52],[60.58,33.07],[60.84,31.5],[61.85,31.02],[60.87,29.86],[61.91,28.55],[62.78,28.27],[62.78,27.26],[63.34,27.12],[63.18,26.63],[61.86,26.23],[61.61,25.2],[57.32,25.77],[56.69,27.15],[54.79,26.49],[53.75,26.71],[51.43,27.94],[50.05,30.21],[49.55,30.01],[48.98,30.51],[48.55,29.96],[47.69,31],[47.86,31.8],[47.43,32.4],[46.11,32.97],[45.4,33.98],[45.8,34.91],[46.35,35.82],[45.41,35.99],[44.79,37.15],[44.03,39.38],[44.81,39.63],[45,39.42]]]]},properties:{name:"Iran"},id:"IR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[45.8,34.91],[45.4,33.98],[46.11,32.97],[47.43,32.4],[47.86,31.8],[47.69,31],[48.55,29.96],[47.94,30.02],[47.93,30.02],[47.17,30.02],[46.55,29.1],[44.72,29.2],[42.08,31.11],[39.2,32.15],[38.79,33.38],[41,34.42],[41.29,36.36],[42.36,37.11],[44.79,37.15],[45.41,35.99],[46.35,35.82],[45.8,34.91]]]]},properties:{name:"Iraq"},id:"IQ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-7.41,54.95],[-8.16,54.44],[-6.27,54.1],[-6.01,52.95],[-6.36,52.18],[-9.23,51.48],[-10.34,51.78],[-9.76,52.15],[-10.46,52.18],[-8.82,52.67],[-9.94,52.56],[-8.94,53.26],[-10.18,53.41],[-9.56,53.86],[-10.11,54.23],[-8.47,54.27],[-8.19,54.63],[-8.8,54.69],[-8.32,55.11],[-6.93,55.24],[-7.25,55.07],[-7.41,54.95]]]]},properties:{name:"Ireland"},id:"IE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[35.26,31.79],[35.25,31.79],[35.25,31.81],[35.26,31.79]]],[[[35.62,33.25],[35.65,32.69],[35.55,32.39],[35.28,32.52],[34.88,31.39],[35.48,31.5],[34.98,29.55],[34.9,29.49],[34.27,31.22],[34.33,31.26],[34.49,31.6],[35.1,33.09],[35.62,33.25]]]]},properties:{name:"Israel"},id:"IL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[15.53,38.14],[15.08,36.65],[12.42,37.8],[13.32,38.22],[15.53,38.14]]],[[[9.51,41.15],[9.57,39.15],[8.41,38.96],[8.19,40.91],[9.51,41.15]]],[[[12.13,47],[13.72,46.53],[13.38,46.3],[13.72,45.6],[12.28,45.47],[12.37,44.25],[13.62,43.55],[14.74,42.09],[16.14,41.91],[15.93,41.48],[18.51,40.14],[18.35,39.79],[16.91,40.45],[16.49,39.77],[17.17,38.96],[16.06,37.92],[15.63,38.01],[16.22,38.91],[15.67,40.03],[11.1,42.39],[10.11,44.01],[8.75,44.43],[7.53,43.79],[7.
91066,44.17],[6.98,44.28],[6.62,45.11],[7.13,45.26],[7.04,45.93],[7.86,45.92],[8.44,46.46],[9.04,45.84],[9.28,46.5],[10.13,46.23],[10.47,46.87],[12.13,47]],[[12.46,43.9],[12.51,43.99],[12.42,43.96],[12.46,43.9]],[[12.45,41.9],[12.46,41.9],[12.45,41.91],[12.45,41.9]]]]},properties:{name:"Italy"},id:"IT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-4.79,5.17],[-7.53,4.35],[-7.42,5.84],[-8.61,6.51],[-8.47,7.56],[-7.95,8.02],[-8.2,8.5],[-7.65,8.38],[-7.97,10.17],[-6.99,10.15],[-6.24,10.74],[-6.11,10.2],[-5.52,10.44],[-4.7,9.7],[-3.63,9.95],[-2.69,9.48],[-2.49,8.2],[-3.25,6.61],[-2.93,5.1],[-4.79,5.17]]]]},properties:{name:"Cote d'Ivoire"},id:"CI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-77.13,17.88],[-78.34,18.36],[-76.95,18.39],[-76.22,17.9],[-77.13,17.88]]]]},properties:{name:"Jamaica"},id:"JM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[131.21,33.6],[131.67,33.65],[131.99,32.83],[131.34,31.37],[130.67,31],[130.81,31.68],[130.64,31.18],[130.23,31.25],[130.16,32.01],[130.61,32.79],[130.21,33.17],[130.35,32.66],[129.75,32.56],[129.58,33.35],[130.69,33.94],[131.21,33.6]]],[[[134.22,34.34],[134.75,33.83],[134.19,33.24],[133.6,33.5],[132.8,32.74],[132.37,33.47],[132.02,33.34],[132.9,34.11],[134.22,34.34]]],[[[141.27,41.34],[142.07,39.55],[141.53,38.27],[140.95,38.15],[140.84,35.74],[140.33,35.13],[139.77,34.95],[139.97,35.66],[138.85,34.59],[138.74,35.12],[138.21,34.6],[137.04,34.56],[137.35,34.72],[136.85,35.08],[136.52,34.69],[136.9,34.27],[135.77,33.45],[135.06,33.88],[135.33,34.72],[132.37,34.36],[132.05,33.77],[130.89,33.92],[130.95,34.42],[133.09,35.58],[136.07,35.65],[136.79,37.36],[137.36,37.5],[136.86,37.09],[137.3,36.75],[138.58,37.4],[140.02,39.38],[139.85,40.6],[140.35,41.25],[141.15,40.86],[141.23,41.23],[140.76,41.17],[141.27,41.34]]],[[[142.05,45.4],[143.77,44.09],[144.78,43.91],[145.34,44.34],[145.26,43.31],[145.82,43.37],[143.99,42.91],[143.24,41.92],[141.79,42.61],[140.46,42.57],[140.28,42.25],[141.2,41.8],[140.07,41.42],[139.84,42.62],[140.47,43.37],[141.41,43.29],[141.58,45.23],[142.05,45.4]]]]},properties:{name:"Japan"},id:"JP"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[69.19,55.34],[70.84,55.3],[71.19,54.1],[73.76,54.07],[73.44,53.44],[76.81,54.45],[76.52,53.99],[77.91,53.27],[80.08,50.76],[80.69,51.31],[81.47,50.74],[83.46,51],[85.26,49.59],[86.77,49.79],[87.35,49.09],[85.76,48.39],[85.53,47.06],[83.04,47.21],[82.32,45.57],[82.56,45.13],[79.87,44.9],[80.52,44.73],[80.82,43.16],[80.38,43.03],[80.23,42.2],[79.19,42.8],[74.29,43.22],[73.58,43.04],[73.52,42.41],[71.75,42.82],[70.97,42.25],[69.06,41.38],[68.46,40.6],[67.94,41.18],[66.72,41.17],[66.53,42],[66.03,42],[66.12,43],[64.93,43.74],[62.03,43.48],[58.57,45.57],[56,45],[56,41.33],[54.17,42.34],[53.01,42.14],[52.44,41.74],[52.74,42.71],[51.27,43.15],[50.24,44.58],[51.57,44.51],[50.95,44.86],[51.41,45.37],[53.23,45.34],[52.73,45.55],[53.19,46.71],[51.19,47.11],[49.22,46.35],[48.56,46.56],[49.03,46.78],[48.2,47.7],[47.38,47.69],[46.5,48.42],[47.52,50.44],[48.8,49.94],[48.7,50.59],[50.77,51.77],[53.43,51.49],[54.52,50.53],[54.65,51.04],[55.69,50.53],[56.51,51.08],[58.34,51.16],[59.54,50.48],[61.38,50.78],[61.69,51.27],[60,51.96],[61.06,52.34],[60.69,52.68],[61.1,52.98],[62.12,53],[61.18,53.31],[61.58,53.51],[60.91,53.62],[61.01,53.95],[65.22,54.32],[69.19,55.34]]]]},properties:{name:"Kazakhstan"},id:"KZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[34.96,29.36],[34.98,29.55],[35.48,31.5],[35.55,32.39],[35.65,32.69],[36.84,32.31],[38.79,33.38],[39.2,32.15],[37.01,31.51],[38,30.5],[37.5,30],[36.07,29.19],[34.96,29.36]]]]},properties:{name:"Jordan"},id:"JO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[35.94,4.62],[39.52,3.41],[40.78,4.29],[41.91,3.98],[40.99,2.83],[41,-.87],[41.56,-1.67],[40.24,-2.66],[39.2,-4.67],[37.61,-3.5],[37.6,-3],[33.92,-1],[33.91,.1],[35.01,1.9],[34,4.22],[34.39,4.61],[35.94,4.62]]]]},properties:{name:"Kenya"},id:"KE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[130.64,42.41],[130.7,42.29],[129.7,41.65],[129.71,40.83],[127.51,39.72],[127.39,39.2],[128.36,38.63],[126.69,37.83],[125.59,38.03],[125.34,37.67],[124.66,38.12],[125.65,38.63],[125.14,38.8],[125.45,39.58],[124.62,39.59],[124.37,40.09],[126.91,41.8],[128.16,41.38],[128.06,42],[129.71,42.44],[129.91,43.01],[130.6,42.42],[130.64,42.41]]]]},properties:{name:"Korea, North"},id:"KP"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[128.53,38.33],[129.43,37.06],[129.44,35.48],[126.56,34.3],[126.25,35.
91012],[126.87,36.05],[126.12,36.71],[126.99,36.91],[126.69,37.83],[128.36,38.63],[128.53,38.33]]]]},properties:{name:"Korea, South"},id:"KR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[47.93,30.02],[47.94,30.02],[48.17,29.55],[47.71,29.38],[48.42,28.55],[46.55,29.1],[47.17,30.02],[47.93,30.02]]]]},properties:{name:"Kuwait"},id:"KW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[80.23,42.2],[78.08,41.04],[76.87,41.01],[76.35,40.35],[74.86,40.52],[73.66,39.45],[69.31,39.54],[69.54,40.13],[70.98,40.24],[73.17,40.82],[71.69,41.56],[71.42,41.12],[70.19,41.53],[71.28,42.2],[70.97,42.25],[71.75,42.82],[73.52,42.41],[73.58,43.04],[74.29,43.22],[79.19,42.8],[80.23,42.2]]]]},properties:{name:"Kyrgyzstan"},id:"KG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[107.55,14.71],[106,14.37],[106.06,13.93],[105.21,14.35],[105.64,15.66],[104.75,16.53],[104.72,17.5],[103.4,18.43],[102.68,17.82],[102.09,18.21],[100.92,17.57],[101.28,19.56],[100.5,19.53],[100.58,20.16],[100.09,20.35],[101.15,21.57],[101.79,21.14],[101.57,22.21],[102.14,22.4],[102.98,21.74],[103.17,20.85],[104.64,20.66],[104.38,20.44],[104.98,20],[103.88,19.29],[105.19,18.64],[106.69,16.46],[107.46,16.08],[107.18,15.78],[107.7,15.27],[107.55,14.71]]]]},properties:{name:"Laos"},id:"LA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[35.62,33.25],[35.1,33.09],[35.97,34.65],[36.62,34.2],[35.62,33.25]]]]},properties:{name:"Lebanon"},id:"LB"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[27.56,-30.4],[27.01,-29.63],[28.57,-28.61],[29.43,-29.28],[29.17,-29.91],[28.08,-30.65],[27.56,-30.4]]]]},properties:{name:"Lesotho"},id:"LS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[21.07,56.44],[21.73,57.58],[22.61,57.76],[23.79,56.97],[24.41,57.26],[24.31,57.87],[25.29,58.08],[27.37,57.54],[27.86,57.3],[28.17,56.15],[26.61,55.67],[25,56.3],[21.05,56.08],[21.07,56.44]]]]},properties:{name:"Latvia"},id:"LV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-10.81,6.4],[-11.49,6.93],[-10.27,8.49],[-9.48,8.35],[-9.49,7.36],[-8.47,7.56],[-8.61,6.51],[-7.42,5.84],[-7.53,4.35],[-10.81,6.4]]]]},properties:{name:"Liberia"},id:"LR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.95,27.82],[9.54,30.23],[10.21,30.73],[10.29,31.69],[11.57,32.44],[11.53,33.17],[15.17,32.4],[15.76,31.39],[19,30.27],[20.06,30.86],[20.08,32.18],[21.62,32.93],[25.15,31.65],[24.71,30.17],[25,22],[25,20],[24,20],[24,19.5],[16,23.45],[15,23],[14.23,22.61],[11.99,23.52],[11.56,24.3],[10.25,24.61],[9.4,26.15],[9.87,26.51],[9.95,27.82]]]]},properties:{name:"Libya"},id:"LY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.53,47.27],[9.6,47.06],[9.47,47.06],[9.53,47.27]]]]},properties:{name:"Liechtenstein"},id:"LI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[25,56.3],[26.61,55.67],[26.82,55.28],[25.79,54.87],[25.79,54.16],[23.5,53.95],[22.79,54.36],[22.84,54.9],[21.43,55.25],[21.26,55.25],[21.05,56.08],[25,56.3]]]]},properties:{name:"Lithuania"},id:"LT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[6.03,50.18],[6.13,50.13],[6.36,49.46],[5.81,49.55],[6.03,50.18]]]]},properties:{name:"Luxembourg"},id:"LU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[113.53,22.19],[113.55,22.21],[113.55,22.18],[113.53,22.19]]]]},properties:{name:"Macau"},id:"MO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[49.36,-12.09],[50.43,-15.58],[50.17,-15.98],[49.63,-15.56],[49.79,-16.83],[47.13,-24.93],[45.21,-25.59],[44.02,-24.99],[43.24,-22.28],[44.48,-19.97],[43.94,-17.48],[44.46,-16.18],[46.48,-15.97],[46.34,-15.62],[47.22,
910-15.45],[47.45,-14.67],[47.43,-15.11],[48,-14.77],[47.91,-13.6],[48.74,-13.43],[48.73,-12.43],[49.36,-12.09]]]]},properties:{name:"Madagascar"},id:"MG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[34.73,-12.1],[34.7,-12.08],[34.72,-12.03],[34.75,-12.04],[34.73,-12.1]]],[[[34.62,-12.04],[34.6,-12.01],[34.63,-12.01],[34.62,-12.04]]],[[[33.13,-9.49],[34.33,-9.73],[34.97,-11.57],[34.38,-12.16],[34.57,-13.34],[35.92,-14.89],[35.81,-16.02],[35.14,-16.55],[35.29,-17.13],[34.26,-15.9],[34.52,-14.57],[33.63,-14.54],[33.22,-14.01],[32.68,-13.61],[33.55,-12.36],[33.25,-10.89],[33.7,-10.56],[32.94,-9.41],[33.13,-9.49]]]]},properties:{name:"Malawi"},id:"MW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[100.65,6.45],[101.14,5.63],[102.1,6.24],[103.41,4.86],[103.44,2.93],[104.28,1.37],[103.96,1.65],[103.51,1.27],[101.28,2.84],[100.13,6.42],[100.65,6.45]]],[[[116.79,6.58],[117.18,6.99],[117.74,6.39],[117.5,5.9],[118.01,6.06],[117.96,5.68],[119.28,5.34],[118.14,4.89],[118.55,4.35],[117.59,4.17],[116.05,4.28],[114.56,1.43],[112.47,1.57],[111.83,1],[110.56,.85],[109.65,2.07],[111.38,1.34],[111,1.58],[111.44,2.69],[113.01,3.16],[114.1,4.59],[114.64,4.02],[115.02,4.9],[115.03,4.82],[115.34,4.31],[115.22,4.8],[115.15,4.9],[116.76,7.02],[116.79,6.58]]]]},properties:{name:"Malaysia"},id:"MY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[73.18,-.69],[73.16,-.68],[73.17,-.68],[73.18,-.69]]],[[[73.2,-.68],[73.19,-.68],[73.2,-.67],[73.2,-.68]]],[[[73.13,-.67],[73.13,-.67],[73.12,-.65],[73.13,-.67]]],[[[73.23,-.65],[73.23,-.63],[73.24,-.62],[73.23,-.65]]],[[[73.12,-.64],[73.09,-.61],[73.09,-.58],[73.12,-.64]]],[[[73.25,-.61],[73.24,-.59],[73.25,-.58],[73.25,-.61]]]]},properties:{name:"Maldives"},id:"MV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-8.53,11.49],[-9.16,12.49],[-10.65,11.89],[-11.37,12.41],[-12.24,14.76],[-11.49,15.65],[-10.9,15.11],[-9.34,15.7],[-5.5,15.5],[-6.58,25],[-4.81,25],[1.8,20.31],[3.23,19.82],[3.33,18.98],[4.25,19.15],[4.25,18.65],[4.2,16.39],[3.52,15.36],[.24,14.92],[-.73,15.08],[-2.47,14.29],[-3.44,13.17],[-3.96,13.5],[-4.42,12.3],[-5.27,11.84],[-5.52,10.44],[-6.11,10.2],[-6.24,10.74],[-6.99,10.15],[-7.97,10.17],[-8.29,11.01],[-8.68,10.97],[-8.53,11.49]]]]},properties:{name:"Mali"},id:"ML"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14.56,35.82],[14.37,35.85],[14.33,35.98],[14.56,35.82]]],[[[14.27,36.01],[14.18,36.06],[14.34,36.03],[14.27,36.01]]]]},properties:{name:"Malta"},id:"MT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-60.86,14.4],[-61.17,14.88],[-60.94,14.74],[-60.86,14.4]]]]},properties:{name:"Martinique"},id:"MQ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-6.66,26.13],[-4.81,25],[-6.58,25],[-5.5,15.5],[-9.34,15.7],[-10.9,15.11],[-11.49,15.65],[-12.24,14.76],[-14.35,16.64],[-16.28,16.52],[-16.53,16.06],[-16.04,17.73],[-16.51,19.35],[-16.2,20.22],[-16.92,21.16],[-17.05,20.76],[-16.95,21.34],[-15.74,21.34],[-13,21.34],[-13.11,22.89],[-12,23.45],[-12,26],[-8.67,26],[-8.67,27.29],[-6.66,26.13]]]]},properties:{name:"Mauritania"},id:"MR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[57.57,-20.51],[57.3,-20.45],[57.62,-19.99],[57.57,-20.51]]]]},properties:{name:"Mauritius"},id:"MU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-113.05,31.97],[-111.05,31.33],[-106.4,31.75],[-103.38,29.02],[-102.31,29.89],[-101.41,29.77],[-99.51,27.57],[-99.1,26.43],[-97.14,25.97],[-97.89,22.6],[-95.91,18.83],[-94.48,18.15],[-92,18.73],[-91.48,18.44],[-90.45,19.98],[-90.33,21.03],[-87.03,21.59],[-86.77,21.15],[-87.74,19.67],[-87.41,19.58],[-87.85,18.19],[-88.04,18.87],[-88.3,18.48],[-88.38,18.48],[-89.14,17.82],[-90.98,17.82],[-90.98,17.26],[-91.44,17.24],[-90.44,16.09],[-91.73,16.07],[-92.25,14.55],[-92.77,15.17],[-93.93,16.09],[-94.37,16.29],[-94.06,16.04],[-94.72,16.2],[-94.58,16.32],[-94.79,16.26],[-94.86,16.43],[-96.48,15.64],[-97.79,15.97],[-104.98,19.34],[-105.68,20.39],[-105.24,20.57],[-105.54,20.79],[-105.19,21.44],[-105.82,22.66],[-108.04,25.07],[-109.11,25.53],[-108.83,25.8],[-109.39,25.76],[-109.1,26.28],[-110.53,27.37],[-110.51,27.87],[-112.16,28.97],[-113.09,31.23],[-115.03,31.97],[-114.55,30],[-111.56,26.72],[-110.66,24.34],[-109.41,23.47],[-110,22.89],[-112.09,24.76],[-112.4,26.27],[-114.99,27.72],[-113.98,27.7],[-114.31,27.87],[-114.06,28.53],[-115.69,29.77],[-117.12,32.54],[-114.72,32.72],[-113.05,31.97]]]]},properties:{name:"Mexico"},id:"MX"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[7.44,43.76],[7.39,43.73],[7.42,43.77],[7.44,43.76]]]]},properties:{name:"Monaco"},id:"MC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[91.02,46.6],[90.07,47.89],[88.65,48.18],[87.84,49.17],[92.32,50.81],[97.34,49.73],[98.29,50.29],[97.83,51],[98.93,52.14],[102.22,51.33],[102.33,50.57],[102.92,50.32],[106.66,50.34],[108.57,49.33],[110.79,49.15],[114.31,50.28],[116.71,49.83],[115.59,47.92],[117.37,47.65],[118.54,47.99],[119.9,46.68],[117.42,46.58],[113.64,44.75],[111.98,45.09],[111.42,44.38],[111.96,43.69],[110.44,42.78],[107.47,42.47],[105.01,41.58],[100.84,42.68],[96.38,42.73],[95.42,44.29],[90.9,45.25],[91.02,46.6]]]]},properties:{name:"Mongolia"},id:"MN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[28.12,46.85],[26.63,48.26],[27.76,48.45],[29.14,47.99],[29.95,46.81],[30.12,46.39],[28.99,46.48],[28.21,45.45],[28.12,46.85]]]]},properties:{name:"Moldova"},id:"MD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[18.46,42.57],[19.23,43.51],[20.35,42.89],[20.07,42.56],[19.65,42.62],[19.37,41.85],[18.5,42.45],[18.46,42.57]]]]},properties:{name:"Montenegro"},id:"ME"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-62.17,16.67],[
910-62.24,16.71],[-62.2,16.81],[-62.17,16.67]]]]},properties:{name:"Montserrat"},id:"MS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-9.05,32.73],[-6.81,34.05],[-5.92,35.79],[-5.4,35.92],[-4.42,35.15],[-2.99,35.42],[-2.21,35.09],[-1.75,34.75],[-1.18,32.11],[-3.82,31.7],[-3.63,30.97],[-8.67,28.71],[-8.67,27.67],[-13.17,27.67],[-10.14,29.43],[-9.64,30.17],[-9.81,31.45],[-9.05,32.73]]]]},properties:{name:"Morocco"},id:"MA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[40.5,-11.03],[40.59,-15.48],[39.09,-16.99],[36.84,-17.88],[36.25,-18.89],[34.9,-19.86],[34.62,-19.62],[35.55,-22.23],[35.5,-24.11],[32.81,-25.61],[32.89,-26.85],[32.13,-26.84],[31.97,-25.96],[32.02,-24.46],[31.3,-22.41],[32.49,-21.34],[33.02,-19.94],[32.7,-18.94],[32.99,-17.27],[32.98,-16.71],[30.42,-16.01],[30.42,-15.63],[30.21,-14.98],[33.22,-14.01],[33.63,-14.54],[34.52,-14.57],[34.26,-15.9],[35.29,-17.13],[35.14,-16.55],[35.81,-16.02],[35.92,-14.89],[34.57,-13.34],[34.38,-12.16],[34.97,-11.57],[37.46,-11.73],[40.44,-10.48],[40.5,-11.03]],[[34.6,-12.01],[34.62,-12.04],[34.63,-12.01],[34.6,-12.01]],[[34.72,-12.03],[34.7,-12.08],[34.73,-12.1],[34.75,-12.04],[34.72,-12.03]]]]},properties:{name:"Mozambique"},id:"MZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[56.04,24.94],[56.37,24.98],[57.16,23.94],[58.61,23.63],[59.81,22.23],[58.52,20.41],[57.83,20.22],[57.8,18.97],[56.81,18.75],[56.35,17.93],[55.44,17.83],[55.04,17.02],[53.11,16.64],[52,19],[55,20],[55.67,22],[55.2,22.7],[56.04,24.94]]],[[[56.37,26.38],[56.27,25.64],[56.18,25.65],[56.08,26.07],[56.37,26.38]]]]},properties:{name:"Oman"},id:"OM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[23.28,-17.66],[23.48,-17.63],[24.97,-17.56],[25.26,-17.8],[23.62,-18.49],[23.3,-18],[20.99,-18.32],[20.99,-22],[20,-22.01],[20,-24.77],[20,-28.42],[18.18,-28.91],[17.4,-28.71],[17.06,-28.03],[16.49,-28.58],[15.29,-27.32],[14.51,-22.55],[11.8,-18.08],[11.75,-17.25],[13.16,-16.95],[13.99,-17.42],[18.45,-17.39],[20.85,-18.02],[23.28,-17.66]]]]},properties:{name:"Namibia"},id:"NA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[166.93,-.55],[166.93,-.49],[166.96,-.51],[166.93,-.55]]]]},properties:{name:"Nauru"},id:"NR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[82.07,27.91],[80.06,28.84],[81.03,30.2],[82.1,30.34],[86.01,27.88],[88.14,27.87],[88.01,26.36],[85.86,26.57],[84.15,27.51],[83.29,27.34],[82.07,27.91]]]]},properties:{name:"Nepal"},id:"NP"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[3.76,51.35],[3.37,51.37],[4.24,51.35],[3.76,51.35]]],[[[5.76,52.42],[5.43,52.26],[5.14,52.38],[5.64,52.6],[5.86,52.54],[5.76,52.42]]],[[[5.42,52.64],[5.05,52.39],[5.04,52.63],[5.42,52.64]]],[[[6.87,53.42],[7.21,53.24],[6.69,52.55],[7.07,52.39],[6.83,51.97],[5.96,51.81],[6.01,50.76],[5.04,51.49],[4.25,51.38],[3.44,51.54],[4.29,51.45],[3.69,51.71],[4.17,51.69],[3.87,51.81],[4.58,52.46],[5.42,52.25],[5.77,52.41],[5.88,52.51],[5.86,52.61],[5.6,52.66],[5.6,52.76],[5.72,52.84],[5.37,52.88],[5.42,52.96],[5.36,53.07],[5.1,52.95],[5.3,52.71],[5.03,52.63],[5.03,52.38],[4.58,52.47],[4.73,52.96],[6.87,53.42]]]]},properties:{name:"Netherlands"},id:"NL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-68.2,12.22],[-68.25,12.02],[-68.42,12.26],[-68.2,12.22]]],[[[-68.97,12.2],[-69.16,12.37],[-68.75,12.04],[-68.97,12.2]]]]},properties:{name:"Netherlands Antilles"},id:"AN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-69.88,12.41],[-70.06,12.54],[-70.06,12.63],[-69.88,12.41]]]]},properties:{name:"Aruba"},id:"AW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[164.32,-20.33],[167.01,-22.32],[165.26,-21.56],[163.99,-20.09],[164.32,-20.33]]]]},properties:{name:"New Caledonia"},id:"NC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[167.42,-16.11],[167.77,-16.54],[167.18,-15.9],[167.42,-16.11]]],[[[166.8,-15.16],[167.06,-14.95],[167.24,-15.52],[166.76,-15.64],[166.59,-14.62],[166.8,-15.16]]]]},properties:{name:"Vanuatu"},id:"VU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[172.86,-40.51],[173.11,-41.31],[174.32,-41],[174.29,-41.75],[172.76,-43.24],[173.09,-43.86],[171.29,-44.34],[170.78,-45.88],[169.01,-46.68],[166.48,-46.01],[168.37,-44.04],[170.79,-42.9],[172.11,-40.89],[172.86,-40.51]]],[[[173.04,-34.44],[173.27,-35.02],[174.32,-35.23],[174.85,-36.85],[175.58,-37.24],[175.35,-36.48],[175.84,-36.75],[175.99,-37.64],[177.16,-38.01],[178.57,-37.71],[177.91,-39.26],[177.05,-39.2],[176.83,-40.18],[175.32,-41.61],[174.59,-41.28],[175.16,-40.1],[173.75,-39.29],[174.59,-38.82],[174.97,-37.75],[174.55,-37.07],[174.89,-37.06],[174.19,-36.5],[174.51,-36.23],[173.91,-35.87],[174.08,-36.41],[173.4,-35.57],[173.66,-35.31],[173.09,-35.21],[172.72,-34.5],[173.04,-34.44]]]]},properties:{name:"New Zealand"},id:"NZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-83.24,14.98],[-83.13,14.99],[-83.83,11.87],[-83.65,10.92],[-85.09,11.01],[-85.69,11.08],[-87.69,12.91],[-87.3,12.99],[-84.91,14.81],[-83.24,14.98]]]]},properties:{name:"Nicaragua"},id:"NI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[4.25,
91018.65],[4.25,19.15],[5.81,19.45],[11.99,23.52],[14.23,22.61],[15,23],[15.2,21.5],[16,20.35],[15.49,16.91],[13.47,14.46],[13.63,13.72],[12.46,13.07],[10.72,13.39],[9.63,12.8],[7.82,13.35],[6.93,13],[5.87,13.75],[4.14,13.48],[3.6,11.69],[2.84,12.4],[2.4,11.9],[2.14,12.69],[.99,13.05],[1.29,13.35],[.6,13.7],[.24,14.92],[3.52,15.36],[4.2,16.39],[4.25,18.65]]]]},properties:{name:"Niger"},id:"NE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[5.87,13.75],[6.93,13],[7.82,13.35],[9.63,12.8],[10.72,13.39],[12.46,13.07],[13.63,13.72],[14.07,13.08],[14.65,11.58],[13.81,11.06],[11.86,7.08],[11.34,6.44],[10.62,7.07],[9.8,6.8],[8.59,4.81],[6.96,4.73],[7.01,4.37],[6.77,4.77],[6.85,4.35],[6.1,4.27],[5.45,4.92],[5.64,5.54],[5.26,5.44],[5.5,5.62],[4.53,6.3],[2.72,6.37],[2.79,9.04],[3.86,10.58],[3.6,11.69],[4.14,13.48],[5.87,13.75]]]]},properties:{name:"Nigeria"},id:"NG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-169.89,-19.15],[-169.93,-19.02],[-169.82,-18.97],[-169.89,-19.15]]]]},properties:{name:"Niue"},id:"NU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[167.96,-29.08],[167.91,-29.01],[168,-29.03],[167.96,-29.08]]]]},properties:{name:"Norfolk Island"},id:"NF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[13.97,68.24],[14.14,68.24],[13.45,68.07],[13.97,68.24]]],[[[15.03,68.35],[14.2,68.15],[15.17,68.45],[15.03,68.35]]],[[[15.38,68.85],[15.06,68.57],[14.37,68.68],[15.38,68.85]]],[[[15.99,68.75],[15.74,68.53],[16.57,68.65],[14.99,68.25],[15.64,68.95],[15.99,68.75]]],[[[17.64,69.52],[18.07,69.43],[17.88,69.24],[18,69.19],[16.78,69.06],[17.64,69.52]]],[[[18.89,69.69],[18,69.59],[18.69,69.88],[18.89,69.69]]],[[[23.6,70.58],[23.23,70.28],[22.85,70.41],[23.6,70.58]]],[[[23.45,70.78],[22.78,70.52],[21.95,70.65],[23.45,70.78]]],[[[5.34,61.59],[4.94,61.68],[6.76,61.87],[5.15,61.89],[5.15,62.21],[6.36,62.06],[5.92,62.22],[6.31,62.37],[6.54,62.1],[6.39,62.37],[6.7,62.45],[6.87,62.42],[7,62.25],[6.94,62.11],[7.04,62.09],[7.42,62.23],[6.98,62.31],[6.92,62.36],[6.97,62.37],[6.78,62.48],[6.26,62.45],[6.65,62.5],[6.25,62.57],[8.15,62.69],[7.04,62.97],[8.55,62.65],[7.88,63.01],[8.53,62.84],[8.16,63.12],[9.65,63.62],[10.26,63.26],[10.05,63.41],[10.91,63.45],[11.49,64.02],[11.31,64.12],[10.57,63.8],[11.08,63.84],[10.94,63.74],[10.05,63.5],[9.79,63.66],[10.1,63.76],[9.54,63.76],[12.94,65.31],[12.25,65.23],[12.67,65.92],[13.18,65.85],[12.67,66.07],[14.15,66.32],[13.03,66.19],[13.54,66.3],[12.97,66.52],[13.73,66.6],[13.23,66.71],[13.99,66.78],[13.55,66.93],[15.74,67.17],[14.36,67.23],[15.9,67.56],[14.76,67.81],[15.97,68.25],[16.22,67.89],[16.5,67.79],[16.21,68],[16.52,67.95],[16.36,68.03],[16.72,68.07],[16.1,68.28],[16.81,68.13],[16.32,68.37],[17.35,68.17],[17.55,68.52],[16.46,68.51],[17.68,68.65],[17.24,68.75],[17.79,68.76],[17.43,68.91],[18.15,69.15],[18,69.28],[18.26,69.49],[19.44,69.23],[18.94,69.61],[19.76,69.81],[19.68,69.43],[20.3,69.97],[19.95,69.26],[21.31,70.02],[22.1,69.74],[21.8,70.03],[22.1,70.11],[21.3,70.25],[23.31,69.94],[24.73,70.62],[24.25,70.78],[24.59,70.96],[25.91,70.89],[25.07,70.5],[25.23,70.09],[26.57,70.94],[26.5,70.36],[27.03,70.47],[27.65,71.11],[28.55,70.97],[27.65,70.61],[28.3,70.71],[27.85,70.48],[28.34,70.51],[28.04,70.06],[29.04,70.87],[31.08,70.29],[28.61,70.11],[29.67,69.97],[29.49,69.66],[30.85,69.79],[28.96,69.05],[29.18,69.64],[28.17,69.91],[26.45,69.93],[24.93,68.58],[22.4,68.71],[21.32,69.33],[20.58,69.06],[20.1,69.04],[20.35,68.79],[19.94,68.34],[18.09,68.51],[17.88,67.95],[16.73,67.9],[15.47,66.28],[14.5,66.13],[14.49,65.31],[13.66,64.58],[14.12,64.47],[13.99,64.02],[12.14,63.58],[12.12,61.73],[12.86,61.36],[12.21,61],[12.49,60.11],[11.82,59.85],[11.43,58.99],[10.8,59.19],[10.53,59.88],[10.23,59.04],[9.54,59.11],[8.21,58.12],[6.6,58.07],[5.46,58.74],[6.62,59.05],[5.87,59.07],[6.47,59.56],[5.18,59.51],[7.11,60.49],[5.75,59.99],[5.73,60.39],[5.14,60.35],[5.7,60.69],[4.93,60.8],[6.59,61.15],[7.11,60.86],[7.57,61.48],[5.4,61.07],[4.95,61.26],[5.63,61.36],[4.95,61.41],[5.8,61.45],[5.34,61.59]],[[5.34,61.59],[5.35,61.59],[5.28,61.59],[5.34,61.59]]]]},properties:{name:"Norway"},id:"NO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[145.28,14.16],[145.12,14.12],[145.24,14.19],[145.28,14.16]]],[[[145.62,14.91],[145.57,15.01],[145.63,15.08],[145.62,14.91]]],[[[145.74,15.13],[145.68,15.11],[145.82,15.27],[145.74,15.13]]],[[[145.74,18.04],[145.78,18.17],[145.82,18.16],[145.74,18.04]]],[[[145.68,18.72],[145.66,18.81],[145.71,18.77],[145.68,18.72]]]]},properties:{name:"Northern Mariana Islands"},id:"MP"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[163.01,5.26],[162.9,5.31],[163.02,5.38],[163.01,5.26]]],[[[158.3,6.79],[158.12,6.93],[158.32,6.93],[158.3,6.79]]],[[[138.21,9.52],[138.06,9.42],[138.13,9.57],[138.21,9.52]]]]},properties:{name:"Micronesia, Federated States of"},id:"FM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[168.77,7.3],[168.79,7.29],[168.67,7.33],[168.77,7.3]]],[[[168.57,7.4],[168.55,7.42],[168.56,7.47],[168.57,7.4]]],[[[168.97,7.57],[168.94,7.62],[168.97,7.6],[168.97,7.57]]]]},properties:{name:"Marshall Islands"},id:"MH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[134.56,7.37],[134.49,7.44],[134.63,7.73],[134.56,7.37]]]]},properties:{name:"Palau"},id:"PW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[74.82,37.02],[7
9105.86,36.66],[76.17,35.82],[77.82,35.5],[76.87,34.66],[73.94,34.65],[74.3,33.98],[74.02,33.19],[75.38,32.21],[74.61,31.88],[74.69,31.05],[71.9,27.96],[70.37,28.02],[69.58,27.17],[71.11,24.42],[68.78,24.33],[68.2,23.77],[67.49,23.89],[66.36,25.61],[64.65,25.16],[61.61,25.2],[61.86,26.23],[63.18,26.63],[63.34,27.12],[62.78,27.26],[62.78,28.27],[61.91,28.55],[60.87,29.86],[62.48,29.41],[66.26,29.85],[66.72,31.21],[69.33,31.94],[69.51,33.03],[70.33,33.33],[69.91,34.04],[71.08,34.06],[71.65,35.42],[71.24,36.13],[72.56,36.82],[74.57,37.03],[74.82,37.02]]]]},properties:{name:"Pakistan"},id:"PK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-79.46,9.57],[-77.37,8.67],[-77.22,7.94],[-77.89,7.23],[-78.43,8.05],[-78.14,8.4],[-77.78,8.15],[-78.98,9.14],[-80.47,8.21],[-79.99,7.52],[-80.43,7.24],[-81.74,8.16],[-82.9,8.03],[-82.93,9.47],[-82.56,9.56],[-82.24,9],[-81.2,8.78],[-79.46,9.57]]]]},properties:{name:"Panama"},id:"PA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[152.24,-4.21],[152.1,-5.46],[150.47,-6.28],[148.32,-5.68],[149.88,-5.54],[150.09,-5.01],[150.16,-5.55],[150.92,-5.49],[151.68,-4.91],[151.51,-4.2],[152.24,-4.21]]],[[[141.89,-2.97],[144.51,-3.82],[145.74,-4.8],[145.77,-5.49],[147.48,-5.97],[147.87,-6.66],[146.96,-6.75],[147.18,-7.46],[148.14,-8.07],[148.6,-9.08],[149.31,-9.02],[149.22,-9.47],[150.01,-9.63],[149.91,-10.05],[150.88,-10.23],[150.21,-10.7],[147.95,-10.15],[146.09,-8.09],[144.52,-7.5],[144.21,-7.8],[143.66,-7.47],[143.96,-7.98],[143.36,-7.9],[143.61,-8.24],[142.14,-8.23],[143.11,-8.47],[143.33,-9.03],[141.01,-9.13],[141,-2.61],[141.89,-2.97]]]]},properties:{name:"Papua New Guinea"},id:"PG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-54.33,-24.68],[-54.6,-25.57],[-54.7,-26.44],[-55.74,-27.44],[-58.6,-27.32],[-57.58,-25.55],[-57.76,-25.18],[-61.01,-23.81],[-62.64,-22.24],[-61.74,-19.65],[-59.1,-19.35],[-58.16,-20.17],[-57.99,-22.09],[-55.85,-22.29],[-55.41,-23.96],[-54.41,-23.92],[-54.33,-24.68]]]]},properties:{name:"Paraguay"},id:"PY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-78.71,-4.58],[-78.34,-3.42],[-75.56,-1.53],[-75.22,-.97],[-75.63,-.11],[-75.29,-.12],[-73.56,-1.37],[-72.88,-2.51],[-71.7,-2.15],[-70.29,-2.51],[-70.72,-3.78],[-69.96,-4.24],[-70.77,-4.15],[-72.85,-5.12],[-73.12,-6.45],[-74.01,-7.54],[-72.96,-8.98],[-73.21,-9.41],[-72.37,-9.49],[-72.14,-10],[-70.51,-9.43],[-70.63,-11.01],[-69.57,-10.95],[-68.67,-12.5],[-69.42,-15.62],[-68.82,-16.34],[-69.5,-17.51],[-70.41,-18.35],[-75.93,-14.66],[-78.99,-8.23],[-79.98,-6.76],[-81.17,-6.09],[-80.87,-5.65],[-81.29,-4.31],[-80.34,-3.38],[-80.47,-4.44],[-79.65,-4.43],[-79.05,-5.01],[-78.71,-4.58]]]]},properties:{name:"Peru"},id:"PE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[126.05,9.23],[126.59,7.28],[126.19,6.27],[125.65,7.24],[125.41,5.56],[125.26,6.09],[124.19,6.21],[124.27,7.37],[123.68,7.81],[122.83,7.28],[122.62,7.77],[121.92,6.99],[122.22,7.96],[123.38,8.73],[123.82,8.48],[123.67,7.95],[124.73,8.49],[124.8,9],[125.51,9.01],[125.44,9.81],[126.05,9.23]]],[[[124.48,10.05],[124.37,9.63],[123.79,9.73],[124.48,10.05]]],[[[123.56,10.79],[123.01,9.03],[122.45,9.97],[122.95,10.89],[123.56,10.79]]],[[[124.02,11.12],[124.03,10.38],[123.31,9.41],[124.02,11.12]]],[[[119.51,11.34],[119.71,10.5],[117.19,8.33],[119.31,10.58],[119.22,10.96],[119.46,10.72],[119.51,11.34]]],[[[124.64,11.29],[125.03,11.2],[125.01,10.03],[124.29,11.54],[124.64,11.29]]],[[[122.23,11.8],[123.15,11.6],[123.13,11.17],[121.94,10.42],[121.85,11.76],[122.23,11.8]]],[[[124.46,12.52],[125.3,12.46],[125.76,11.01],[124.84,11.47],[124.46,12.52]]],[[[123.67,12.35],[124.08,11.72],[123.53,12.21],[123.16,11.91],[123.24,12.61],[123.67,12.35]]],[[[120.72,13.48],[121.5,13.15],[121.22,12.23],[120.3,13.44],[120.72,13.48]]],[[[121.26,18.57],[122.24,18.51],[122.53,17.1],[121.38,15.33],[121.73,14.17],[122.23,13.9],[122.71,14.34],[123.1,13.67],[123.34,14.09],[123.92,13.79],[123.53,13.58],[124.2,13.06],[124.08,12.54],[122.56,13.94],[122.61,13.16],[121.75,13.96],[120.66,13.77],[120.96,14.64],[120.09,14.79],[119.79,16.32],[120.42,16.16],[120.57,18.49],[121.26,18.57]]]]},properties:{name:"Philippines"},id:"PH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-128.29,-24.41],[-128.34,
910-24.33],[-128.3,-24.33],[-128.29,-24.41]]]]},properties:{name:"Pitcairn Islands"},id:"PN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[18.85,49.52],[17.72,50.32],[16.64,50.11],[16.34,50.66],[14.83,50.87],[14.28,53.7],[17.9,54.82],[19.8,54.44],[22.79,54.36],[23.5,53.95],[23.94,52.73],[23.17,52.28],[23.64,52.08],[23.6,51.53],[24.11,50.57],[22.56,49.08],[18.85,49.52]]]]},properties:{name:"Poland"},id:"PL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-8.2,41.87],[-6.59,41.95],[-6.19,41.58],[-6.93,41.02],[-7.02,39.67],[-7.53,39.67],[-6.95,39.03],[-7.43,37.25],[-8.99,37.02],[-8.67,38.41],[-9.18,38.42],[-8.98,38.95],[-9.48,38.71],[-8.66,40.69],[-8.75,41.95],[-8.2,41.87]]]]},properties:{name:"Portugal"},id:"PT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-14.52,12.68],[-13.71,12.68],[-13.71,11.72],[-14.69,11.51],[-15.02,10.96],[-15.51,11.34],[-15.03,11.59],[-15.56,11.72],[-15,11.97],[-15.96,11.73],[-15.7,12],[-16.25,11.93],[-16.11,12.33],[-16.72,12.32],[-14.52,12.68]]]]},properties:{name:"Guinea-Bissau"},id:"GW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[124.45,-9.18],[124.34,-9.46],[124.05,-9.34],[124.45,-9.18]]],[[[127.25,-8.48],[125.13,-9.44],[125.16,-9.07],[124.95,-8.95],[127.25,-8.48]]]]},properties:{name:"Timor-Leste"},id:"TL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-67,18.5],[-65.6,18.23],[-67.19,17.93],[-67,18.5]]]]},properties:{name:"Puerto Rico"},id:"PR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[51.52,25.38],[51.22,24.62],[50.83,24.75],[51.04,26.05],[51.57,25.91],[51.52,25.38]]]]},properties:{name:"Qatar"},id:"QA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[55.71,-21],[55.67,-21.37],[55.22,-21.03],[55.71,-21]]]]},properties:{name:"Reunion"},id:"RE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[20.73,46.18],[22.89,47.95],[24.92,47.71],[26.63,48.26],[28.12,46.85],[28.21,45.45],[29.66,45.21],[29.55,44.82],[28.87,44.94],[28.58,43.75],[27.04,44.15],[24.18,43.68],[22.68,44.22],[22.48,44.71],[21.4,44.78],[21.51,45.15],[20.26,46.11],[20.73,46.18]]]]},properties:{name:"Romania"},id:"RO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[143.66,49.31],[143.02,49.14],[142.53,48],[143.09,46.8],[143.49,46.81],[143.47,46.09],[142.71,46.74],[142.08,45.89],[141.85,48.75],[142.27,51.12],[141.64,52.32],[141.77,53.37],[142.8,53.7],[142.39,54.24],[142.7,54.42],[143.29,53.13],[143.22,51.52],[144.75,48.64],[143.66,49.31]],[[143.66,49.31],[143.25,49.38],[143.32,49.31],[143.66,49.31]]],[[[21.43,55.25],[22.84,54.9],[22.79,54.36],[19.8,54.44],[20.4,54.68],[19.87,54.64],[19.97,54.96],[20.94,55.29],[20.53,54.97],[21.09,54.89],[21.26,55.25],[21.43,55.25]]],[[[-179.63,68.91],[-175.46,67.71],[-174.83,67.38],[-175,66.67],[-174.46,66.3],[-173.76,66.45],[-174.65,67.06],[-173.67,67.13],[-171.73,66.96],[-169.69,66.07],[-170.64,65.61],[-171.54,65.83],[-171.12,65.48],[-172.8,65.68],[-172.13,65.09],[-173.2,64.79],[-172.36,64.46],[-173.19,64.25],[-173.41,64.62],[-175.45,64.78],[-176.08,65.47],[-178.56,65.52],[-178.91,65.99],[-178.52,66.4],[-179.7,66.18],[-179.32,65.54],[-180,65.07],[-180,68.98],[-179.63,68.91]]],[[[55.33,73.33],[56.59,73.14],[55.62,72.96],[56.26,72.96],[55.43,72.78],[55.95,72.67],[55.12,72.45],[55.58,72.2],[55.22,71.93],[57.64,70.73],[53.46,70.81],[54.24,71.13],[51.42,71.74],[53.22,72.65],[52.38,72.72],[53.38,72.88],[53.15,73.16],[55.33,73.33]]],[[[139.19,76.07],[140.48,75.64],[141.62,76.01],[141.36,76.18],[145.39,75.52],[143.95,75.03],[142.9,75.13],[142.5,75.36],[142.51,75.45],[143.04,75.67],[142.45,75.71],[142.16,75.38],[142.61,75.1],[143.71,74.94],[139.1,74.65],[136.86,75.35],[137.4,75.35],[136.96,75.6],[137.74,75.75],[137.45,75.95],[139.19,76.07]]],[[[68.27,76.96],[68.86,76.54],[61.29,75.33],[59.15,74.44],[58.18,74.57],[58.74,74.27],[57.26,74.08],[57.72,73.71],[56.56,73.88],[57.61,73.66],[56.72,73.67],[57.25,73.49],[56.76,73.25],[55.91,73.44],[54.22,73.32],[55.18,73.71],[53.63,73.76],[55.87,74.1],[55.07,74.26],[56.98,74.69],[55.83,74.8],[56.68,74.95],[55.8,75.15],[58,75.67],[68.27,76.96]]],[[[104.27,77.68],[106.29,77.36],[104.12,77.09],[107.5,76.92],[106.4,76.51],[111.1,76.76],[113.89,75.85],[113.51,75.53],[112.34,75.85],[113.72,75.41],[105.21,72.76],[110.91,73.7],[109.53,73.77],[110.2,74.02],[112.89,73.96],[113.5,73.33],[113.49,72.96],[113.1,72.85],[113.18,72.72],[113.53,72.63],[114.04,72.6],[113.36,72.69],[113.23,72.74],[113.15,72.83],[113.53,72.96],[113.55,73.24],[114.03,73.34],[113.48,73.5],[118.63,73.57],[118.99,73.49],[118.39,73.24],[119.82,72.94],[126.37,72.35],[127.22,71.39],[127.33,71.9],[126.72,72.39],[127.66,72.35],[131.13,70.73],[132.73,71.94],[133.68,71.43],[135.86,71.64],[137.85,71.11],[138.07,71.57],[139.93,71.48],[139.34,71.95],[140.2,72.2],[139.09,72.23],[141.02,72.59],[140.75,72.89],[146.85,72.35],[144.39,72.17],[146.93,72.31],[144.96,71.96],[145.32,71.66],[147.14,72.32],[149.19,72.22],[150.08,71.88],[148.82,71.67],[152.54,70.84],[159.05,70.87],[160.04,70.41],[159.73,69.83],[161,69.59],[161.41,68.98],[160.85,68.52],[161.58,68.91],[161.45,69.39],[164.01,69.77],[167.79,69.78],[168.28,69.24],[170.61,68.76],[171.03,69.04],[170.12,69.61],[170.47,70.13],[176.
91011,69.89],[180,68.98],[180,65.07],[178.52,64.59],[176.9,65.08],[176.3,65.05],[177.3,64.83],[174.44,64.69],[177.49,64.76],[179.56,62.62],[179.06,62.28],[176.98,62.87],[177.27,62.57],[172.71,61.43],[170.25,59.91],[169.21,60.62],[166.14,59.82],[166.35,60.49],[164.83,59.78],[163.64,60.05],[163.19,59.05],[161.94,58.07],[162.35,57.68],[163.21,57.84],[162.74,57.36],[163.35,56.2],[162.39,56.4],[161.71,55.5],[162.11,54.76],[160.01,54.14],[160.06,53.09],[158.43,53.02],[158.28,51.94],[156.67,50.88],[155.54,55.3],[155.95,56.67],[156.98,57.41],[156.75,57.73],[158.23,58.02],[161.91,60.42],[163.66,60.87],[164.13,62.28],[165.64,62.45],[163.26,62.54],[162.95,61.81],[163.29,61.66],[160.14,60.58],[160.39,61.03],[159.78,60.94],[159.83,61.26],[160.35,61.95],[157.49,61.8],[154.23,59.88],[154.11,59.46],[155.19,59.36],[154.74,59.13],[151.31,58.84],[151.07,59.11],[152.29,59.23],[149.6,59.77],[148.9,59.24],[142.16,59.07],[135.15,54.86],[136.82,54.65],[136.76,53.77],[137.74,54.32],[137.31,53.53],[138.55,53.99],[138.44,53.51],[138.64,54.3],[139.75,54.31],[141.42,53.29],[140.71,53.11],[141.51,52.21],[140.46,50.71],[140.7,50.09],[140.18,48.45],[135.13,43.5],[133.15,42.68],[131.81,43.33],[130.7,42.29],[130.64,42.41],[130.6,42.42],[130.41,42.72],[131.31,43.39],[130.95,44.84],[131.86,45.35],[133.12,45.13],[134.74,48.27],[130.99,47.69],[130.67,48.86],[127.53,49.79],[126.1,52.76],[123.38,53.53],[120.86,53.28],[120.03,52.77],[120.78,52.11],[119.21,50.02],[117.87,49.52],[116.71,49.83],[114.31,50.28],[110.79,49.15],[108.57,49.33],[106.66,50.34],[102.92,50.32],[102.33,50.57],[102.22,51.33],[98.93,52.14],[97.83,51],[98.29,50.29],[97.34,49.73],[92.32,50.81],[87.84,49.17],[87.35,49.09],[86.77,49.79],[85.26,49.59],[83.46,51],[81.47,50.74],[80.69,51.31],[80.08,50.76],[77.91,53.27],[76.52,53.99],[76.81,54.45],[73.44,53.44],[73.76,54.07],[71.19,54.1],[70.84,55.3],[69.19,55.34],[65.22,54.32],[61.01,53.95],[60.91,53.62],[61.58,53.51],[61.18,53.31],[62.12,53],[61.1,52.98],[60.69,52.68],[61.06,52.34],[60,51.96],[61.69,51.27],[61.38,50.78],[59.54,50.48],[58.34,51.16],[56.51,51.08],[55.69,50.53],[54.65,51.04],[54.52,50.53],[53.43,51.49],[50.77,51.77],[48.7,50.59],[48.8,49.94],[47.52,50.44],[46.5,48.42],[47.38,47.69],[48.2,47.7],[49.03,46.78],[48.56,46.56],[49.22,46.35],[48.71,45.83],[47.38,45.74],[46.68,44.52],[47.41,43.5],[47.7,43.87],[47.46,43.02],[48.58,41.84],[47.77,41.2],[46.57,41.87],[46.45,41.9],[44.93,42.76],[43.91,42.58],[42.85,43.18],[40,43.38],[36.58,45.18],[37.74,45.3],[37.94,46.03],[38.57,46.09],[37.73,46.67],[39.3,47.08],[38.24,47.11],[38.85,47.86],[39.8,47.86],[39.66,48.62],[40.08,48.87],[39.7,49.01],[40.14,49.6],[38.02,49.9],[37.46,50.44],[35.61,50.37],[35.37,51.04],[34.38,51.26],[34.1,51.65],[34.42,51.81],[33.42,52.36],[31.78,52.11],[31.27,53.02],[32.74,53.46],[30.78,54.79],[30.93,55.6],[28.17,56.15],[27.86,57.3],[27.37,57.54],[27.82,57.87],[27.43,58.81],[28.02,59.48],[30.25,59.98],[28.6,60.38],[28.69,60.74],[27.81,60.55],[31.59,62.91],[29.99,63.74],[30.58,64.22],[29.64,64.93],[30.13,65.72],[29.07,66.9],[30.03,67.69],[28.69,68.2],[28.82,68.84],[28.43,68.9],[28.96,69.05],[30.85,69.79],[33.09,69.75],[32.03,69.64],[33.52,69.42],[33.02,68.95],[33.72,69.33],[35.97,69.17],[40.99,67.72],[41.22,66.84],[38.61,66.05],[31.85,67.15],[34.85,65.9],[34.38,65.38],[34.79,64.55],[37.41,63.8],[37.98,64.32],[36.44,64.94],[37.03,65.21],[38.41,64.86],[38.05,64.64],[40.51,64.54],[39.75,65.55],[42.17,66.52],[44.17,65.87],[44.5,66.91],[43.75,67.32],[44.25,68.27],[43.31,68.68],[46.52,68.14],[46.71,67.81],[44.91,67.37],[46.39,66.74],[47.7,66.99],[47.99,67.65],[49.1,67.63],[48.59,67.93],[52.27,68.31],[52.73,68.47],[52.49,68.59],[52.65,68.65],[52.29,68.61
910],[53.78,68.97],[54.56,68.99],[53.59,68.9],[54.02,68.86],[53.95,68.4],[53.21,68.26],[54.79,68.16],[58.9,69],[59.43,68.75],[59.07,68.42],[59.84,68.37],[60.91,68.9],[60.14,69.57],[60.87,69.86],[64.15,69.54],[68.44,68.22],[69.22,68.96],[66.8,69.57],[67.34,70.75],[66.62,71.05],[68.47,71.82],[69.33,72.95],[71.56,72.91],[72.83,72.71],[72.88,72.28],[71.8,71.47],[72.84,70.87],[72.42,70.27],[72.55,68.98],[73.65,68.46],[71.41,66.97],[71.56,66.65],[68.97,66.8],[72,66.22],[74.74,67.69],[74.33,68.38],[74.64,68.77],[76.59,68.97],[77.32,68.52],[77.09,67.78],[79.04,67.57],[77.46,67.76],[78.17,68.26],[77.63,68.91],[73.75,69.17],[73.52,69.76],[74.31,70.67],[73.02,71.42],[74.96,72.11],[74.83,72.83],[75.72,72.56],[75.24,71.38],[76.92,71.07],[79.11,71],[76.1,71.93],[78.1,71.88],[77.37,72.1],[78.54,72.4],[83.26,71.72],[82.26,71.26],[82.08,70.57],[82.35,70.2],[82.16,70.58],[83.12,70.89],[82.64,70.17],[83.11,70.07],[83.75,70.46],[83.15,71.24],[83.63,71.62],[80.72,72.53],[80.82,72.97],[80.23,73.17],[80.51,73.57],[87.09,73.86],[85.78,73.46],[86.78,72.99],[85.85,73.48],[87.66,73.89],[85.95,74.28],[87.13,74.37],[85.79,74.63],[86.03,74.81],[86.91,74.61],[87.79,75.02],[86.99,75.15],[94.16,75.94],[92.87,75.95],[93.16,76.1],[99.28,76.21],[99.77,76.03],[99.09,75.55],[100.19,75.17],[99.17,75.57],[99.88,76.09],[98.81,76.49],[102.23,76.38],[100.85,76.88],[104.27,77.68]]],[[[102.97,79.33],[102.39,78.83],[103.95,79.13],[105.41,78.56],[99.34,78.02],[101.62,78.98],[100.99,79.06],[101.55,79.35],[102.97,79.33]]],[[[97.61,80.17],[98.03,80.07],[97.19,79.7],[100.02,79.82],[99.04,79.29],[99.94,78.95],[97.3,78.85],[92.85,79.55],[97.61,80.17]]]]},properties:{name:"Russia"},id:"RU"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[29.95,-2.31],[29.85,-2.76],[29.02,-2.74],[29.6,-1.39],[30.48,-1.06],[30.89,-2.08],[30.57,-2.4],[29.95,-2.31]]]]},properties:{name:"Rwanda"},id:"RW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-63.03,18.02],[-63.14,18.06],[-63.01,18.07],[-63.03,18.02]]]]},properties:{name:"Saint Barthelemy"},id:"BL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-5.66,-15.99],[-5.79,-15.99],[-5.7,-15.9],[-5.66,-15.99]]]]},properties:{name:"Saint Helena"},id:"SH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-62.55,17.09],[-62.62,17.11],[-62.6,17.2],[-62.55,17.09]]],[[[-62.7,17.34],[-62.63,17.22],[-62.86,17.37],[-62.7,17.34]]]]},properties:{name:"Saint Kitts and Nevis"},id:"KN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-63.17,18.16],[-62.97,18.27],[-62.99,18.23],[-63.17,18.16]]]]},properties:{name:"Anguilla"},id:"AI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-60.95,13.71],[-61.08,13.88],[-60.93,14.11],[-60.95,13.71]]]]},properties:{name:"Saint Lucia"},id:"LC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-63.01,18.08],[-63.01,18.07],[-63.14,18.06],[-63.01,18.08]]]]},properties:{name:"Saint Martin"},id:"MF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-56.15,46.76],[-56.24,46.76],[-56.17,46.81],[-56.15,46.76]]],[[[-56.27,46.99],[-56.37,46.78],[-56.39,47.12],[-56.27,46.99]]]]},properties:{name:"Saint Pierre and Miquelon"},id:"PM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-61.17,13.13],[-61.28,13.21],[-61.18,13.38],[-61.17,13.13]]]]},properties:{name:"Saint Vincent and the Grenadines"},id:"VC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[12.42,43.96],[12.51,43.99],[12.46,43.9],[12.42,43.96]]]]},properties:{name:"San Marino"},id:"SM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[6.52,.02],[6.47,.26],[6.69,.4],[6.52,.02]]],[[[7.42,1.56],[7.33,1.61],[7.41,1.7],[7.42,1.56]]]]},properties:{name:"Sao Tome and Principe"},id:"ST"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[44.72,29.2],[46.55,29.1],[48.42,28.55],[48.84,27.62],[50.16,26.66],[49.99,26.02],[50.83,24.75],[51.22,24.62],[51.58,24.26],[52.58,22.94],[55.2,22.7],[55.67,22],[55,20],[52,19],[48.77,18.27],[46.33,15.62],[46.33,16.67],[44.47,17.41],[43.31,17.46],[42.79,16.38],[40.76,19.76],[39.18,21.1],[38.45,23.78],[37.44,24.37],[35.16,28.06],[34.57,28.09],[34.96,29.36],[36.07,29.19],[37.5,30],[38,30.5],[37.01,31.51],[39.2,32.15],[42.08,31.11],[44.72,29.2]]]]},properties:{name:"Saudi Arabia"},id:"SA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-17.15,14.61],[-17.54,14.76],[-16.53,16.06],[-16.28,16.52],[-14.35,16.64],[-12.24,14.76],[-11.37,12.41],[-13.71,12.68],[-14.52,12.68],[-16.72,12.32],[-15.39,12.83],[-16.76,12.56],[-16.75,13.06],[-15.81,13.16],[-15.8,13.35],[-15.29,13.37],[-15.11,13.6],[
910-13.8,13.41],[-15.07,13.83],[-16.57,13.59],[-16.36,14.17],[-16.78,14.01],[-17.15,14.61]]]]},properties:{name:"Senegal"},id:"SN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[20.07,42.56],[20.35,42.89],[19.23,43.51],[19.62,44.05],[19.04,44.86],[19.42,45.23],[18.82,45.91],[20.26,46.11],[21.51,45.15],[21.4,44.78],[22.48,44.71],[22.68,44.22],[22.37,43.83],[23,43.19],[22.37,42.32],[20.59,41.88],[20.07,42.56]]]]},properties:{name:"Serbia"},id:"RS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[55.54,-4.76],[55.38,-4.63],[55.46,-4.55],[55.54,-4.76]]]]},properties:{name:"Seychelles"},id:"SC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-11.21,10],[-10.57,9.06],[-10.7,8.3],[-10.27,8.49],[-11.49,6.93],[-12.96,7.9],[-13.3,9.03],[-12.46,9.89],[-11.21,10]]]]},properties:{name:"Sierra Leone"},id:"SL"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[103.99,1.38],[103.64,1.32],[103.71,1.43],[103.99,1.38]]]]},properties:{name:"Singapore"},id:"SG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[17.25,48.02],[17.17,48.01],[16.95,48.62],[18.85,49.52],[22.56,49.08],[22.15,48.41],[20.66,48.56],[18.66,47.76],[17.25,48.02]]]]},properties:{name:"Slovakia"},id:"SK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[105.58,23.06],[106.71,22.86],[106.69,22.03],[107.99,21.54],[106.64,21.02],[105.61,18.98],[108.83,15.42],[109.47,12.89],[109.27,11.89],[108,10.7],[107.27,10.38],[106.74,10.67],[106.42,10.31],[106.78,10.08],[106.29,10.25],[106.62,9.81],[106.12,10.24],[106.54,9.58],[105.82,10],[106.19,9.37],[105.02,8.59],[105.11,9.95],[104.45,10.42],[105.1,10.96],[106.2,10.77],[105.85,11.66],[107.55,12.35],[107.49,14.45],[107.55,14.71],[107.7,15.27],[107.18,15.78],[107.46,16.08],[106.69,16.46],[105.19,18.64],[103.88,19.29],[104.98,20],[104.38,20.44],[104.64,20.66],[103.17,20.85],[102.98,21.74],[102.14,22.4],[102.48,22.77],[103.96,22.5],[105.35,23.33],[105.58,23.06]]]]},properties:{name:"Vietnam"},id:"VN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[13.72,46.53],[16.11,46.87],[16.61,46.48],[16.57,46.48],[15.65,46.22],[15.17,45.43],[13.59,45.48],[13.72,45.6],[13.38,46.3],[13.72,46.53]]]]},properties:{name:"Slovenia"},id:"SI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[42.94,11],[43.25,11.47],[44.28,10.45],[44.9,10.42],[50.77,11.98],[51.28,11.84],[51.01,10.44],[51.41,10.45],[50.9,10.32],[50.84,9.43],[47.95,4.46],[43.49,.65],[41.56,-1.67],[41,-.87],[40.99,2.83],[41.91,3.98],[43.69,4.89],[44.95,4.9],[47.99,8],[44.01,9.01],[42.85,10.22],[42.94,11]]]]},properties:{name:"Somalia"},id:"SO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[29.89,-22.19],[31.3,-22.41],[32.02,-24.46],[31.97,-25.96],[31.33,-25.75],[30.9,-26.31],[31.16,-27.2],[31.99,-27.32],[32.13,-26.84],[32.89,-26.85],[32.39,-28.54],[27.9,-33.04],[25.7,-34.03],[22.54,-34.01],[20,-34.82],[18.79,-34.09],[18.4,-34.3],[17.85,-32.83],[18.29,-32.62],[18.28,-31.89],[16.49,-28.58],[17.06,-28.03],[17.4,-28.71],[18.18,-28.91],[20,-28.42],[20,-24.77],[20.81,-25.88],[20.64,-26.83],[21.67,-26.86],[23.01,-25.3],[25.51,-25.68],[26.96,-23.75],[29.37,-22.19],[29.89,-22.19]],[[28.57,-28.61],[27.01,-29.63],[27.56,-30.4],[28.08,-30.65],[29.17,-29.91],[29.43,-29.28],[28.57,-28.61]]]]},properties:{name:"South Africa"},id:"ZA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[32.99,-17.27],[32.7,-18.94],[33.02,-19.94],[32.49,-21.34],[31.3,-22.41],[29.89,-22.19],[29.37,-22.19],[28.02,-21.57],[27.71,-20.51],[26.17,-19.53],[25.26,-17.8],[27.04,-17.96],[28.93,-15.97],[30.42,-15.63],[30.42,-16.01],[32.98,-16.71],[32.99,-17.27]]]]},properties:{name:"Zimbabwe"},id:"ZW"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-16.34,28.37],[-16.67,27.98],[-16.91,28.34],[-16.34,28.37]]],[[[3.25,39.73],[3.06,39.26],[2.36,39.56],[3.25,39.73]]],[[[-7.86,43.76],[-1.78,43.36],[1.45,42.6],[1.72,42.51],[3.18,42.44],[3.18,41.87],[.96,41.03],[.05,40.04],[-.34,39.44],[.21,38.73],[-.72,37.61],[-2.13,36.73],[-4.4,36.72],[-5.33,36.16],[-5.36,36.16],[-6.04,36.18],[-6.36,36.86],[-7.43,37.25],[-6.95,39.03],[-7.53,39.67],[-7.02,39.67],[-6.93,41.02],[-6.19,41.58],[-6.59,41.95],[-8.2,41.87],[-8.75,41.95],[-9.21,43.15],[
910-7.86,43.76]]]]},properties:{name:"Spain"},id:"ES"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-15.74,21.34],[-16.95,21.34],[-17.05,20.76],[-16.92,21.94],[-16.49,22.33],[-16.36,22.57],[-16.28,22.9],[-16.16,22.99],[-16.18,23.08],[-16.08,23.32],[-15.77,23.78],[-15.78,23.91],[-16.01,23.67],[-15.84,23.9],[-15.58,24.06],[-15.18,24.49],[-15.03,24.54],[-14.9,24.69],[-14.48,26.17],[-13.57,26.73],[-13.17,27.67],[-8.67,27.67],[-8.67,27.29],[-8.67,26],[-12,26],[-12,23.45],[-13.11,22.89],[-13,21.34],[-15.74,21.34]]]]},properties:{name:"Western Sahara"},id:"EH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[31.45,22],[36.89,22],[37.43,18.86],[38.6,17.99],[37,17.07],[36.54,14.26],[36.14,12.71],[35.1,11.83],[34.86,10.73],[34.29,10.55],[34.12,8.58],[33.25,8.46],[32.99,7.92],[34.7,6.68],[35.94,4.62],[34.39,4.61],[34,4.22],[33.52,3.75],[30.86,3.49],[29.64,4.64],[28.36,4.29],[27.46,5.02],[25.25,7.85],[23.52,8.71],[23.67,9.87],[22.87,10.92],[22.47,12.62],[21.83,12.8],[22.94,15.56],[24,15.7],[24,19.5],[24,20],[25,20],[25,22],[31.45,22]]]]},properties:{name:"Sudan"},id:"SD"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-55.13,5.82],[-54.03,5.82],[-54.17,5.35],[-54.48,4.75],[-54,3.45],[-54.6,2.33],[-55.97,2.53],[-55.9,1.89],[-56.47,1.94],[-58.05,4.01],[-57.25,5.49],[-56.97,6],[-55.13,5.82]]]]},properties:{name:"Suriname"},id:"SR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[23.34,78.2],[23.06,78.02],[24.91,77.75],[22.64,77.25],[22.78,77.55],[20.86,77.46],[21.64,77.91],[20.9,78.11],[23.34,78.2]]],[[[21.5,78.57],[22.27,78.26],[20.12,78.47],[21.5,78.57]]],[[[16.82,79.87],[18.1,79.72],[17.64,79.37],[18.36,79.63],[18.92,79.16],[21.55,78.77],[18.97,78.46],[19.09,78.1],[16.61,76.57],[15.5,76.88],[16.52,77],[13.91,77.53],[16.22,77.43],[14.74,77.66],[17.01,77.93],[13.94,77.72],[13.59,78.05],[17.3,78.42],[16.33,78.45],[16.83,78.67],[15.46,78.45],[15.38,78.84],[13.01,78.2],[12.36,78.48],[13.2,78.54],[11.33,78.96],[12.51,78.91],[11.76,79.08],[12.11,79.3],[11.24,79.09],[10.68,79.54],[13.82,79.88],[12.45,79.57],[14.06,79.26],[13.89,79.54],[14.58,79.8],[16.45,78.9],[15.64,79.83],[16.82,79.87]]],[[[20.04,80.46],[22.23,79.98],[22.89,80.49],[23.36,80.43],[23.1,80.12],[24.84,80.35],[27.24,79.9],[23.51,79.18],[19.64,79.6],[22.31,79.8],[18.77,79.72],[17.78,80.13],[20.04,80.46]]]]},properties:{name:"Svalbard"},id:"SJ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[30.9,-26.31],[31.33,-25.75],[31.97,-25.96],[32.13,-26.84],[31.99,-27.32],[31.16,-27.2],[30.9,-26.31]]]]},properties:{name:"Swaziland"},id:"SZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[21.81,68.57],[23.67,67.94],[23.43,67.47],[24.01,66.8],[23.66,66.31],[24.17,65.81],[21.77,65.72],[22.2,65.55],[21.26,65.34],[21.62,65.14],[21.04,64.82],[21.58,64.44],[20.78,63.87],[18.21,62.78],[17.7,62.99],[18.05,62.6],[17.33,62.49],[17.65,62.23],[17.15,60.95],[19.08,59.76],[17.94,59.34],[17.59,59.81],[17.73,59.44],[16.02,59.49],[17.38,59.25],[18.65,59.32],[16.19,58.63],[16.94,58.48],[16.41,58.47],[16.82,58.2],[16.42,57.89],[16.69,57.47],[15.87,56.09],[14.7,56.16],[14.19,55.39],[12.98,55.4],[12.45,56.3],[12.89,56.64],[11.7,57.7],[11.8,58.32],[11.2,58.4],[11.11,59],[11.43,58.99],[11.82,59.85],[12.49,60.11],[12.21,61],[12.86,61.36],[12.12,61.73],[12.14,63.58],[13.99,64.02],[14.12,64.47],[13.66,64.58],[14.49,65.31],[14.5,66.13],[15.47,66.28],[16.73,67.9],[17.88,67.95],[18.09,68.51],[19.94,68.34],[20.35,68.79],[20.1,69.04],[20.58,69.06],[21.81,68.57]]]]},properties:{name:"Sweden"},id:"SE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[7.7,47.54],[9.57,47.54],[9.53,47.27],[9.47,47.06],[9.6,47.06],[10.47,46.87],[10.13,46.23],[9.28,46.5],[9.04,45.84],[8.44,46.46],[7.86,45.92],[7.04,45.93],[6.79,46.43],[5.97,46.21],[6.99,47.5],[7.59,47.58],[7.7,47.54]]],[[[8.71,47.7],[8.68,47.69],[8.67,47.71],[8.71,47.7]]]]},properties:{name:"Switzerland"},id:"CH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[42.36,37.11],[41.29,36.36],[41,34.42],[38.79,33.38],[36.84,32.31],[35.65,32.69],[35.62,33.25],[36.62,34.2],[35.97,34.65],[35.92,35.93],[36.69,36.24],[36.66,36.83],[42.36,37.11]]]]},properties:{name:"Syria"},id:"SY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[74.92,37.24],[73.31,37.46],[71.68,36.68],[71.59,37.9],[70.97,38.47],[69.32,37.12],[67.78,37.19],[68.38,38.2],[67.44,39.48],[68.54,39.55],[69.01,40.09],[68.6,40.18],[70.42,41.05],[70.8,40.73],[70.38,40.38],[70.98,40.24],[69.54,40.13],[69.31,39.54],[73.66,39.45],[73.82,38.61],[74.86,38.47],[74.92,37.24]]]]},properties:{name:"Tajikistan"},id:"TJ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[100.08,20.35],[100.09,20.35],[100.58,20.16],[100.5,19.53],[101.28,19.56],[100.92,17.57],[102.09,18.21],[102.68,17.82],[103.4,18.43],[104.72,17.5
910],[104.75,16.53],[105.64,15.66],[105.21,14.35],[103.18,14.33],[102.38,13.57],[102.92,11.64],[102.06,12.57],[100.85,12.68],[100.98,13.46],[100.07,13.42],[100.02,12.19],[99.15,10.37],[99.24,9.25],[99.85,9.3],[100.42,7.16],[102.1,6.24],[101.14,5.63],[100.65,6.45],[100.13,6.42],[98.66,8.38],[98.27,8.27],[98.74,10.35],[99.66,11.83],[99.17,13.73],[98.2,15.07],[98.93,16.39],[97.35,18.56],[97.77,18.57],[98.05,19.81],[100.08,20.35]]]]},properties:{name:"Thailand"},id:"TH"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[1.4,9.43],[1.64,6.22],[1.2,6.1],[.53,6.95],[.73,8.32],[-.15,11.14],[.92,11],[.78,10.38],[1.4,9.43]]]]},properties:{name:"Togo"},id:"TG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-171.84,-9.21],[-171.86,-9.21],[-171.85,-9.17],[-171.84,-9.21]]]]},properties:{name:"Tokelau"},id:"TK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-175.15,-21.18],[-175.36,-21.1],[-175.05,-21.14],[-175.15,-21.18]]]]},properties:{name:"Tonga"},id:"TO"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-60.92,10.8],[-61.01,10.14],[-61.92,10.04],[-61.46,10.28],[-61.66,10.71],[-60.92,10.8]]],[[[-60.64,11.2],[-60.85,11.16],[-60.53,11.35],[-60.64,11.2]]]]},properties:{name:"Trinidad and Tobago"},id:"TT"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[56.18,25.65],[56.27,25.64],[56.37,24.98],[56.04,24.94],[55.2,22.7],[52.58,22.94],[51.58,24.26],[54.12,24.14],[56.08,26.07],[56.18,25.65]]]]},properties:{name:"United Arab Emirates"},id:"AE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.85,37.14],[10.38,36.72],[11.07,37.05],[10.46,36.12],[11.13,35.24],[10.01,34.17],[11.53,33.17],[11.57,32.44],[10.29,31.69],[10.21,30.73],[9.54,30.23],[9.06,32.1],[7.49,33.89],[8.25,34.64],[8.18,36.52],[8.62,36.94],[9.85,37.14]]]]},properties:{name:"Tunisia"},id:"TN"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[35.1,41.96],[38.36,40.91],[40.15,40.92],[41.53,41.52],[42.83,41.58],[43.46,41.11],[43.66,40.11],[44.78,39.71],[44.81,39.63],[44.03,39.38],[44.79,37.15],[42.36,37.11],[36.66,36.83],[36.69,36.24],[35.92,35.93],[36.02,36.93],[32.81,36.03],[31.05,36.85],[29.68,36.12],[28.45,36.88],[27.38,36.68],[28.33,37.04],[27.25,36.97],[27.6,37.23],[27.19,37.35],[27.27,37.96],[26.28,38.26],[26.37,38.66],[27.16,38.44],[26.73,38.65],[26.95,39.55],[26.07,39.48],[26.71,40.38],[29.94,40.72],[29.17,41.23],[31.23,41.09],[33.33,42.02],[35.1,41.96]]],[[[27.39,42.01],[28.01,41.98],[29.04,41.06],[27.51,40.98],[26.18,40.05],[26.83,40.59],[26.04,40.74],[26.63,41.35],[26.36,41.71],[27.39,42.01]]]]},properties:{name:"Turkey"},id:"TR"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[58.78,42.66],[60.01,42.22],[60.14,41.38],[61.87,41.13],[62.55,39.93],[64.38,38.95],[66.64,38],[66.54,37.37],[64.8,37.12],[64.5,36.28],[63.12,35.86],[62.72,35.25],[61.28,35.61],[61.16,36.65],[60.33,36.66],[59.34,37.54],[57.21,38.28],[53.91,37.35],[53.98,38.92],[53.16,39.18],[53.26,39.66],[53.73,39.52],[53.58,39.97],[53,39.76],[52.72,40.45],[52.92,41.08],[53.75,40.62],[54.73,41.1],[53.8,42.12],[52.95,41.97],[52.88,41.05],[52.44,41.74],[53.01,42.14],[54.17,42.34],[56,41.33],[57.04,41.26],[56.99,41.89],[58.78,42.66]]]]},properties:{name:"Turkmenistan"},id:"TM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-71.66,21.82],[-71.66,21.74],[-71.85,21.85],[-71.66,21.82]]],[[[-71.88,21.85],[-72.03,21.94],[-71.91,21.94],[-71.88,21.85]]]]},properties:{name:"Turks and Caicos Islands"},id:"TC"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.22,-8.55],[179.2,-8.46],[179.23,-8.5],[179.22,-8.55]]]]},properties:{name:"Tuvalu"},id:"TV"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[34,4.22],[35.01,1.9],[33.91,.1],[33.92,-1],[31.68,-1],[30.48,-1.06],[29.6,-1.39],[29.96,.83],[31.3,2.12],[30.73,2.45],[30.86,3.49],[33.52,3.75],[34,4.22]]]]},properties:{name:"Uganda"},id:"UG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[33.42,52.36],[34.42,51.81],[34.1,51.65],[34.38,51.26],[35.37,51.04],[35.61,50.37],[37.46,50.44],[38.02,49.9],[40.14,49.6],[39.7,49.01],[40.08,48.87],[39.66,48.62],[39.8,47.86],[38.85,47.86],[38.24,47.11],[35.91,46.65],[34.99,46.08],[35.34,46.32],[35.2,46.44],[35.21,46.39],[35.05,46.26],[34.7,46.18],[34.56,45.98],[33.67,46.22],[35.13,45.33],[35.34,45.33],[35.05,45.61],[34.76,46.02],[34.67,46.09],[34.83,46.07],[34.9,45.88],[35.05,45.65],[35.31,45.38],[35.48,45.29],[36.64,45.38],[33.96,44.38],[33.37,44.58],[33.54,45.11],[32.48,45.4],[33.61,46.15],[31.79,46.28],[32.06,46.4],[31.51,46.58],[32.36,46.46],[32.65,46.64],[32.02,46.63],[31.75,47.25],[3
9101.91,46.65],[31.48,46.63],[31.59,46.8],[30.83,46.55],[30.25,45.88],[29.75,45.62],[29.63,45.82],[29.66,45.21],[28.21,45.45],[28.99,46.48],[30.12,46.39],[29.95,46.81],[29.14,47.99],[27.76,48.45],[26.63,48.26],[24.92,47.71],[22.89,47.95],[22.15,48.41],[22.56,49.08],[24.11,50.57],[23.6,51.53],[25.78,51.94],[30.55,51.25],[30.94,52.07],[31.78,52.11],[33.42,52.36]]]]},properties:{name:"Ukraine"},id:"UA"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[20.82,40.91],[20.59,41.88],[22.37,42.32],[22.94,41.34],[20.98,40.86],[20.82,40.91]]]]},properties:{name:"Macedonia"},id:"MK"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[25.32,31.5],[29.07,30.82],[31.03,31.6],[31.92,31.53],[32.14,31.07],[34.22,31.32],[34.27,31.22],[34.9,29.49],[34.25,27.73],[33.24,28.55],[32.57,30.01],[32.34,29.6],[35.81,23.92],[35.48,23.94],[35.67,22.97],[36.89,22],[31.45,22],[25,22],[24.71,30.17],[25.15,31.65],[25.32,31.5]]]]},properties:{name:"Egypt"},id:"EG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-6.35,55.24],[-5.43,54.48],[-6.27,54.1],[-8.16,54.44],[-7.41,54.95],[-7.25,55.07],[-6.35,55.24]]],[[[-5.78,56.51],[-6.37,56.31],[-6.32,56.6],[-5.78,56.51]]],[[[-6.14,57.57],[-5.66,57.2],[-6.79,57.45],[-6.14,57.57]]],[[[-6.2,58.36],[-7.12,57.82],[-7.04,58.23],[-6.2,58.36]]],[[[-3.01,58.63],[-4.44,57.57],[-1.77,57.46],[-3.28,56.36],[-2.58,56.27],[-3.73,56.03],[-1.63,55.58],[-1.3,54.76],[-.07,54.11],[.12,53.56],[-.72,53.7],[.24,53.4],[37000000134e-15,52.88],[1.68,52.75],[1.59,52.08],[.38,51.45],[1.41,51.18],[-5.68,50.04],[-4.23,51.19],[-3.03,51.21],[-2.38,51.76],[-3.35,51.38],[-5.25,51.73],[-4.13,52.33],[-4.13,52.91],[-4.76,52.79],[-4.2,53.21],[-2.7,53.35],[-3.11,53.55],[-2.81,54.22],[-3.63,54.51],[-3.04,54.98],[-4.95,54.65],[-5.17,55],[-4.61,55.49],[-4.92,55.7],[-4.88,55.94],[-4.48,55.92],[-4.83,56.11],[-5.3,55.85],[-5.03,56.23],[-5.78,55.3],[-5.12,56.82],[-6.24,56.71],[-5.4,57.11],[-5.82,57.82],[-5.1,57.85],[-5.46,58.08],[-5,58.62],[-3.01,58.63]]],[[[-2.79,58.95],[-3.19,58.91],[-3.35,59.11],[-2.79,58.95]]],[[[-1.3,60.49],[-1.27,59.85],[-1.69,60.28],[-1.3,60.49]]]]},properties:{name:"United Kingdom"},id:"GB"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-2.59,49.42],[-2.67,49.43],[-2.5,49.51],[-2.59,49.42]]]]},properties:{name:"Guernsey"},id:"GG"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-2.01,49.21],[-2.21,49.18],[-2.25,49.25],[-2.01,49.21]]]]},properties:{name:"Jersey"},id:"JE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-4.78,54.06],[-4.35,54.41],[-4.39,54.19],[-4.78,54.06]]]]},properties:{name:"Isle of Man"},id:"IM"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[31.68,-1],[33.92,-1],[37.6,-3],[37.61,-3.5],[39.2,-4.67],[38.78,-6.05],[39.55,-6.99],[39.39,-8.9],[40.44,-10.48],[37.46,-11.73],[34.97,-11.57],[34.33,-9.73],[33.13,-9.49],[32.94,-9.41],[30.77,-8.19],[29.55,-6.3],[29.42,-4.45],[30.83,-3.26],[30.57,-2.4],[30.89,-2.08],[30.48,-1.06],[31.68,-1]]]]},properties:{name:"Tanzania"},id:"TZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-155.01,19.33],[-155.86,19.03],[-155.86,20.27],[-155.16,19.96],[-155.01,19.33]]],[[[-156.47,20.9],[-155.99,20.75],[-156.42,20.59],[-156.47,20.9]]],[[[-157.73,21.41],[-158.1,21.3],[-158.27,21.58],[-157.73,21.41]]],[[[-159.43,21.88],[-159.79,22.06],[-159.35,22.22],[-159.43,21.88]]],[[[-95.08,49.36],[-94.61,48.72],[-91.42,48.04],[-88.37,48.31],[-84.13,46.53],[-82.54,45.36],[-82.13,43.59],[-83.17,42.05],[-82.7,41.68],[-78.99,42.82],[-79.18,43.47],[-78.72,43.63],[-76.8,43.63],[-74.99,44.99],[-70.88,45.24],[-69.23,47.47],[-67.79,47.07],[-67.8,45.7],[-67.21,45.18],[-67.19,44.66],[-68.8,44.58],[-70.73,43.12],[-70.58,42.65],[-71.04,42.31],[-69.94,41.67],[-71.19,41.47],[-71.39,41.81],[-71.51,41.37],[-74,40.71],[-73.96,41.31],[-74.42,39.36],[-74.96,38.92],[-75.56,39.62],[-75.03,40.01],[-75.59,39.65],[-75.04,38.42],[-75.96,37.15],[-75.64,37.96],[-76.36,38.86],[-75.83,39.58],[-76.62,39.25],[-76.31,38.05],[-77.24,38.4],[-77.06,38.91],[-77.32,38.35],[-76.24,37.9],[-76.35,37.62],[-77.13,38.17],[-76.27,37.08],[-77.23,37.3],[-75.99,36.91],[-75.53,35.8],[-75.94,36.72],[-75.79,36.07],[-76.71,36.26],[-76.73,35.94],[-75.72,35.81],[-76.15,35.34],[-77.05,35.53],[-76.47,35.27],[-76.94,34.98],[-76.34,34.89],[-77.43,34.74],[-77.93,33.93],[-78.83,33.73],[-80.47,32.32],[-80.84,32.52],[-81.5,31.13],[-80.03,26.79],[-80.4,25.18],[-81.09,25.12],[-81.74,25.96],[-81.78,26.71],[-82.06,26.54],[-82.66,27.46],[-82.42,27.92],[-82.85,27.86],[-82.63,28.88],[-83.67,29.91],[-85.35,29.68],[-86.26,30.5],[-88.02,30.22],[-88.02,30.7],[-88.13,30.31],[-90.42,30.2],[-89.4,30.05],[-89.75,29.63],[-89.01,29.18],[-89.4,28.93],[-90.18,29.57],[-90.21,29.09],[-91.25,29.24],[-91.84,29.83],[-92.31,29.54],[-93.85,29.99],[-93.86,29.68],[-94.77,29.36],[-94.48,29.56],[-95.06,29.72],[-95.14,29.06],[-96.21,28.49],[-96.64,28.72],[-96.4,28.44],[-97.52,27.87],[-97.41,27.33],[-97.77,27.46],[-97.14,25.97],[-99.1,26.43],[-99.51,27.57],[-101.41,29.77],[-102.31,29.89],[-103.38,29.02],[-106.4,31.75],[-111.05,31.33],[-113.05,31.97],[-114.72,32.72],[-117.12,32.54],[-118.53,34.05],[-120.62,34.57],[-120.61,35.14],[-122.49,37.52],[-122.39,37.82],[-122.01,37.47],[-122.39,37.96],[-122.24,38.06],[-121.42,38.01],[-122.37,38.16],[-122.49,37.83],[-123,38.01],[-124.33,40.27],[-124.04,41.43],[-124.52,42.87],[-123.95,46.18],[-123.16,46.2],[-124,46.32],[-123.8,46.98],[-124.16,46.94],[-124.72,48.4],[-122.75,48.16],[-123.15,47.37],[-122.45,47.77],[-122.88,47.06],[-122.31,47.4],[-122.76,49],[-95.15,49],[-95.08,49.36]]],[[[-156.45,71.26],[-155.59,71.16],[-155.97,70.76],[-155.09,71.15],[-152.25,70.84],[-152.5,70.65],[-152.08,70.57],[-152.63,70.56],[-151.97,70.44],[-143.28,70.12],[-141,69.64],[-141,60.31],[-139.07,60.35],[-137.48,58.91],[-135.47,59.8],[-133.43,58.46],[
910-131.82,56.6],[-130.02,55.91],[-130.17,55.75],[-130.14,55.54],[-129.99,55.28],[-130.36,54.91],[-130.69,54.76],[-131.01,55],[-130.46,55.33],[-131.06,55.12],[-130.61,55.3],[-131.01,56.11],[-132.16,55.58],[-131.77,56.2],[-133.51,57.19],[-133.06,57.35],[-133.64,57.7],[-133,57.51],[-133.56,57.9],[-133.12,57.86],[-134.05,58.07],[-133.77,58.52],[-134.76,58.38],[-135.34,59.47],[-135.09,58.23],[-135.92,58.38],[-135.77,58.9],[-137.06,59.07],[-136.03,58.39],[-136.65,58.22],[-139.71,59.5],[-139.49,59.98],[-139.29,59.57],[-138.89,59.81],[-139.5,60.03],[-140.4,59.7],[-141.39,60.14],[-143.92,59.99],[-144.94,60.3],[-144.61,60.72],[-145.29,60.35],[-146.65,60.7],[-146.12,60.84],[-146.76,60.96],[-146.3,61.13],[-147.87,60.83],[-147.72,61.28],[-148.7,60.79],[-148.2,60.63],[-148.68,60.45],[-147.94,60.46],[-148.44,59.95],[-149.42,60.12],[-150.91,59.24],[-151.98,59.28],[-150.99,59.78],[-151.88,59.75],[-151.41,60.73],[-149.03,60.85],[-150.06,61.15],[-149.42,61.51],[-153.1,60.29],[-152.58,60.06],[-154.26,59.14],[-153.27,58.85],[-156.55,56.98],[-158.42,56.44],[-158.12,56.23],[-158.51,55.99],[-161.25,55.35],[-161.56,55.62],[-161.97,55.1],[-162.63,55.3],[-162.56,54.96],[-163.36,54.81],[-161.8,55.89],[-160.25,55.77],[-160.35,56.29],[-157.4,57.49],[-157.61,58.09],[-157.14,58.16],[-157.55,58.38],[-156.78,59.15],[-158.19,58.61],[-158.49,59],[-157.99,58.9],[-158.54,59.18],[-158.9,58.4],[-160.33,59.06],[-162.17,58.65],[-161.57,59.1],[-161.99,59.14],[-161.71,59.5],[-162.24,60.06],[-162.15,60.25],[-162.37,60.18],[-161.88,60.7],[-162.57,60.32],[-162.52,59.99],[-164.07,59.82],[-165.43,60.56],[-163.55,60.9],[-165.15,60.93],[-164.82,61.11],[-165.12,61.08],[-165.14,61.26],[-165.16,61.17],[-165.37,61.2],[-165.29,61.25],[-165.15,61.42],[-165.06,61.42],[-165,61.47],[-164.85,61.49],[-164.72,61.63],[-164.76,61.63],[-165.02,61.5],[-165.08,61.43],[-165.16,61.43],[-165.29,61.33],[-165.27,61.31],[-165.31,61.26],[-165.41,61.21],[-165.34,61.16],[-165.39,61.07],[-166.2,61.59],[-165.25,62.45],[-164.64,62.42],[-164.48,62.75],[-164.88,62.84],[-164.41,63.21],[-161.15,63.51],[-160.78,63.87],[-161.53,64.42],[-160.78,64.72],[-162.79,64.34],[-166.12,64.57],[-166.96,65.19],[-166.06,65.26],[-168.13,65.67],[-164.35,66.59],[-163.63,66.57],[-164.19,66.2],[-163.66,66.07],[-161,66.2],[-161.91,66.27],[-162.64,66.87],[-162.34,66.96],[-161.6,66.45],[-160.23,66.4],[-161.51,66.53],[-161.9,66.73],[-161.5,66.98],[-162.35,67.16],[-163.73,67.11],[-164.12,67.61],[-166.83,68.35],[-166.22,68.88],[-163.65,69.11],[-161.94,70.31],[-159.94,70.59],[-159.84,70.27],[-159.29,70.53],[-160.12,70.62],[-159.67,70.8],[-156.45,71.26]]]]},properties:{name:"United States"},id:"US"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-64.76,17.77],[-64.56,17.75],[-64.9,17.68],[-64.76,17.77]]]]},properties:{name:"Virgin Islands"},id:"VI"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-2.83,11],[-2.69,9.48],[-3.63,9.95],[-4.7,9.7],[-5.52,10.44],[-5.27,11.84],[-4.42,12.3],[-3.96,13.5],[-3.44,13.17],[-2.47,14.29],[-.73,15.08],[.24,14.92],[.6,13.7],[1.29,13.35],[.99,13.05],[2.14,12.69],[2.4,11.9],[.92,11],[-.15,11.14],[-2.83,11]]]]},properties:{name:"Burkina Faso"},id:"BF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-57.81,-30.75],[-57.61,-30.18],[-56.81,-30.11],[-56.01,-31.08],[-55.58,-30.85],[-53.88,-31.97],[-53.09,-32.73],[-53.52,-33.15],[-53.37,-33.74],[-54.15,-34.67],[-56.32,-34.91],[-57.12,-34.46],[-57.84,-34.49],[-58.4,-33.93],[-58.36,-33.13],[-58.15,-33.1],[-58.05,-32.93],[-58.2,-32.45],[-57.81,-30.75]]]]},properties:{name:"Uruguay"},id:"UY"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[64.38,38.95],[62.55,39.93],[61.87,41.13],[60.14,41.38],[60.01,42.22],[58.78,42.66],[56.99,41.89],[57.04,41.26],[56,41.33],[56,45],[58.57,45.57],[62.03,43.48],[64.93,43.74],[66.12,43],[66.03,42],[66.53,42],[66.72,41.17],[67.94,41.18],[68.46,40.6],[69.06,41.38],[70.97,42.25],[71.28,42.2],[70.19,41.53],[71.42,41.12],[71.69,41.56],[73.17,40.82],[70.98,40.24],[70.38,40.38],[70.8,40.73],[70.42,41.05],[68.6,40.18],[69.01,40.09],[68.54,39.55],[67.44,39.48],[68.38,38.2],[67.78,37.19],[66.54,37.37],[66.64,38],[64.38,38.95]]]]},properties:{name:"Uzbekistan"},id:"UZ"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-69.77,11.7],[-68.42,11.18],[-68.16,10.5],[-66.24,10.64],[-65.08,10.06],[-63.7,10.49],[-64.26,10.66],[-61.88,10.73],[-62.92,10.53],[-62.62,10.12],[-63.02,10.1],[-60.85,9.44],[-61.6,8.55],[-59.99,8.54],[-59.83,8.24],[-60.72,7.54],[-60.29,7.06],[-61.13,6.71],[-61.39,5.94],[-60.73,5.2],[-60.99,4.52],[-62.75,4.03],[-62.88,3.56],[-64.8,4.28],[-64.05,2.48],[-63.39,2.15],[-65.52,.65],[-66.87,1.22],[-6
9107.19,2.39],[-67.83,2.83],[-67.29,3.4],[-67.86,4.56],[-67.45,6.19],[-69.25,6.08],[-70.12,6.98],[-72,7.02],[-72.78,9.08],[-73.38,9.17],[-72.49,11.12],[-71.98,11.66],[-71.32,11.85],[-71.97,11.56],[-71.58,10.71],[-72.13,9.81],[-71.62,9.04],[-71.06,9.34],[-71.5,10.96],[-69.8,11.43],[-70.24,11.63],[-70.03,12.2],[-69.77,11.7]]]]},properties:{name:"Venezuela"},id:"VE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-178.04,-14.32],[-178.14,-14.32],[-178.19,-14.24],[-178.04,-14.32]]],[[[-176.16,-13.35],[-176.16,-13.21],[-176.12,-13.26],[-176.16,-13.35]]]]},properties:{name:"Wallis and Futuna"},id:"WF"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-171.43,-14.02],[-172.06,-13.87],[-171.82,-13.81],[-171.43,-14.02]]],[[[-172.29,-13.49],[-172.21,-13.81],[-172.78,-13.53],[-172.29,-13.49]]]]},properties:{name:"Samoa"},id:"WS"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[52.23,15.67],[43.96,12.59],[43.25,13.21],[42.79,16.38],[43.31,17.46],[44.47,17.41],[46.33,16.67],[46.33,15.62],[48.77,18.27],[52,19],[53.11,16.64],[52.3,16.27],[52.23,15.67]]]]},properties:{name:"Yemen"},id:"YE"},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[24.97,-17.56],[23.48,-17.63],[22,-16.17],[22,-13],[24.02,-13.01],[23.99,-10.87],[24.45,-11.46],[25.33,-11.19],[26,-11.9],[26.87,-11.97],[27.2,-11.57],[29.02,-13.4],[29.8,-13.45],[29.81,-12.16],[29.03,-12.38],[28.36,-11.55],[28.7,-10.65],[28.37,-9.26],[28.9,-8.48],[30.77,-8.19],[32.94,-9.41],[33.7,-10.56],[33.25,-10.89],[33.55,-12.36],[32.68,-13.61],[33.22,-14.01],[30.21,-14.98],[30.42,-15.63],[28.93,-15.97],[27.04,-17.96],[25.26,-17.8],[24.97,-17.56]]]]},properties:{name:"Zambia"},id:"ZM"}],Vz={type:Oz,features:Gz};cw({ThreeGlobe:Cz});const zz=3,jz=1.2,Nm=300;let Rm=[0];function $z({globeConfig:r,data:e}){const[t,n]=hr.useState(null),i=hr.useRef(null),s={pointSize:1,atmosphereColor:"#ffffff",showAtmosphere:!0,atmosphereAltitude:.1,polygonColor:"rgba(255,255,255,0.7)",globeColor:"#1d072e",emissive:"#000000",emissiveIntensity:.1,shininess:.9,arcTime:2e3,arcLength:.9,rings:1,maxRings:3,...r};hr.useEffect(()=>{i.current&&(u(),a())},[i.current]);const a=()=>{if(!i.current)return;const m=i.current.globeMaterial();m.color=new Yn(r.globeColor),m.emissive=new Yn(r.emissive),m.emissiveIntensity=r.emissiveIntensity||.1,m.shininess=r.shininess||.9},u=()=>{const m=e;let y=[];for(let b=0;b<m.length;b++){const w=m[b],S=Qz(w.color);y.push({size:s.pointSize,order:w.order,color:E=>`rgba(${S.r}, ${S.g}, ${S.b}, ${1-E})`,lat:w.startLat,lng:w.startLng}),y.push({size:s.pointSize,order:w.order,color:E=>`rgba(${S.r}, ${S.g}, ${S.b}, ${1-E})`,lat:w.endLat,lng:w.endLng})}const _=y.filter((b,w,S)=>S.findIndex(E=>["lat","lng"].every(R=>E[R]===b[R]))===w);n(_)};hr.useEffect(()=>{i.current&&t&&(i.current.hexPolygonsData(Vz.features).hexPolygonResolution(3).hexPolygonMargin(.7).showAtmosphere(s.showAtmosphere).atmosphereColor(s.atmosphereColor).atmosphereAltitude(s.atmosphereAltitude).hexPolygonColor(m=>s.polygonColor),f())},[t]);const f=()=>{!i.current||!t||(i.current.arcsData(e).arcStartLat(m=>m.startLat*1).arcStartLng(m=>m.startLng*1).arcEndLat(m=>m.endLat*1).arcEndLng(m=>m.endLng*1).arcColor(m=>m.color).arcAltitude(m=>m.arcAlt*1).arcStroke(m=>[.32,.28,.3][Math.round(Math.random()*2)]).arcDashLength(s.arcLength).arcDashInitialGap(m=>m.order*1).arcDashGap(15).arcDashAnimateTime(m=>s.arcTime),i.current.ringsData([]).ringColor(m=>y=>m.color(y)).ringMaxRadius(s.maxRings).ringPropagationSpeed(zz).ringRepeatPeriod(s.arcTime*s.arcLength/s.rings))};return hr.useEffect(()=>{if(!i.current||!t)return;const m=setInterval(()=>{!i.current||!t||(Rm=Yz(0,e.length,Math.floor(e.length*4/5)),i.current.ringsData(t.filter((y,_)=>Rm.includes(_))))},2e3);return()=>{clearInterval(m)}},[i.current,t]),gt.jsx(gt.Fragment,{children:gt.jsx("threeGlobe",{ref:i})})}function Hz(){const r=wd.c(5),{gl:e,size:t}=zs();let n;r[0]!==e||r[1]!==t.height||r[2]!==t.width?(n=()=>{e.setPixelRatio(window.devicePixelRatio),e.setSize(t.width,t.height),e.setClearColor(16755455,0)},r[0]=e,r[1]=t.height,r[2]=t.width,r[3]=n):n=r[3];let i;return r[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],r[4]=i):i=r[4],hr.useEffect(n,i),null}function Wz(r){const e=wd.c(23),{globeConfig:t}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=new Sc,n.fog=new fw(16777215,400,2e3),e[0]=n):n=e[0];let i,s;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=new Io(50,jz,180,1800),s=gt.jsx(Hz,{}),e[1]=i,e[2]=s):(i=e[1],s=e[2]);let a;e[3]!==t.ambientLight?(a=gt.jsx("ambientLight",{color:t.ambientLight,intensity:.6}),e[3]=t.ambientLight,e[4]=a):a=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=new ke(-400,100,400),e[5]=u):u=e[5];let f;e[6]!==t.directionalLeftLight?(f=gt.jsx("directionalLight",{color:t.directionalLeftLight,position:u}),e[6]=t.directionalLeftLight,e[7]=f):f=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=new ke(-200,500,200),e[8]=m):m=e[8];let y;e[9]!==t.directionalTopLight?(y=gt.jsx("directionalLight",{color:t.directionalTopLight,position:m}),e[9]=t.directionalTopLight,e[10]=y):y=e[10];let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=new ke(-200,500,200),e[11]=_):_=e[11];let b;e[12]!==t.pointLight?(b=gt.jsx("pointLight",{color:t.pointLight,position:_,intensity:.8}),e[12]=t.pointLight,e[13]=b):b=e[13];let w;e[14]!==r?(w=gt.jsx($z,{...r}),e[14]=r,e[15]=w):w=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S=gt.jsx(Uz,{enablePan:!1,enableZoom:!1,minDistance:Nm,maxDistance:Nm,autoRotateSpeed:1,autoRotate:!0,minPolarAngle:Math.PI/3.5,maxPolarAngle:Math.PI-Math.PI/3}),e[16]=S):S=e[16];let E;return e[17]!==a||e[18]!==f||e[19]!==y||e[20]!==b||e[21]!==w?(E=gt.jsxs(hw,{scene:n,camera:i,children:[s,a,f,y,b,w,S]}),e[17]=a,e[18]=f,e[19]=y,e[20]=b,e[21]=w,e[22]=E):E=e[22],E}function Qz(r){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;r=r.replace(e,function(n,i,s,a){return i+i+s+s+a+a});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function Yz(r,e,t){const n=[];for(;n.length<t;){const i=Math.floor(Math.random()*(e-r))+r;n.indexOf(i)===-1&&n.push(i)}return n}function ij(){const r=wd.c(64);hr.useState(!1);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[{label:"Total Users",value:0},{label:"Satellites",value:0}],r[0]=e):e=r[0];const[t,n]=hr.useState(e);let i,s;r[1]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{(async()=>{const Ia=await Db();n(Ia)})()},s=[],r[1]=i,r[2]=s):(i=r[1],s=r[2]),hr.useEffect(i,s),hr.useState(0);let a;r[3]===Symbol.for("react.memo_cache_sentinel")?(a={pointSize:4,globeColor:"#262828",showAtmosphere:!0,atmosphereColor:"#FFFFFF",atmosphereAltitude:.15,emissive:"#04BF8A",emissiveIntensity:.1,shininess:.8,polygonColor:"#FFFFFF",ambientLight:"#FFFFFF",directionalLeftLight:"#ffffff",directionalTopLight:"#ffffff",pointLight:"#ffffff",arcTime:1e3,arcLength:.9,rings:1,maxRings:4,
910initialPosition:{lat:22.3193,lng:114.1694},autoRotate:!0,autoRotateSpeed:.5},r[3]=a):a=r[3];const u=a;let f;r[4]===Symbol.for("react.memo_cache_sentinel")?(f=["#F4EEE6","#A79F94","#9A9B9D"],r[4]=f):f=r[4];const m=f;let y;r[5]===Symbol.for("react.memo_cache_sentinel")?(y={order:1,startLat:-19.885592,startLng:-43.951191,endLat:-22.9068,endLng:-43.1729,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[5]=y):y=r[5];let _;r[6]===Symbol.for("react.memo_cache_sentinel")?(_={order:1,startLat:28.6139,startLng:77.209,endLat:3.139,endLng:101.6869,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[6]=_):_=r[6];let b;r[7]===Symbol.for("react.memo_cache_sentinel")?(b={order:1,startLat:-19.885592,startLng:-43.951191,endLat:-1.303396,endLng:36.852443,arcAlt:.5,color:m[Math.floor(Math.random()*m.length)]},r[7]=b):b=r[7];let w;r[8]===Symbol.for("react.memo_cache_sentinel")?(w={order:2,startLat:1.3521,startLng:103.8198,endLat:35.6762,endLng:139.6503,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[8]=w):w=r[8];let S;r[9]===Symbol.for("react.memo_cache_sentinel")?(S={order:2,startLat:51.5072,startLng:-.1276,endLat:3.139,endLng:101.6869,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[9]=S):S=r[9];let E;r[10]===Symbol.for("react.memo_cache_sentinel")?(E={order:2,startLat:-15.785493,startLng:-47.909029,endLat:36.162809,endLng:-115.119411,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[10]=E):E=r[10];let R;r[11]===Symbol.for("react.memo_cache_sentinel")?(R={order:3,startLat:-33.8688,startLng:151.2093,endLat:22.3193,endLng:114.1694,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[11]=R):R=r[11];let P;r[12]===Symbol.for("react.memo_cache_sentinel")?(P={order:3,startLat:21.3099,startLng:-157.8581,endLat:40.7128,endLng:-74.006,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[12]=P):P=r[12];let L;r[13]===Symbol.for("react.memo_cache_sentinel")?(L={order:3,startLat:-6.2088,startLng:106.8456,endLat:51.5072,endLng:-.1276,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[13]=L):L=r[13];let D;r[14]===Symbol.for("react.memo_cache_sentinel")?(D={order:4,startLat:11.986597,startLng:8.571831,endLat:-15.595412,endLng:-56.05918,arcAlt:.5,color:m[Math.floor(Math.random()*m.length)]},r[14]=D):D=r[14];let O;r[15]===Symbol.for("react.memo_cache_sentinel")?(O={order:4,startLat:-34.6037,startLng:-58.3816,endLat:22.3193,endLng:114.1694,arcAlt:.7,color:m[Math.floor(Math.random()*m.length)]},r[15]=O):O=r[15];let G;r[16]===Symbol.for("react.memo_cache_sentinel")?(G={order:4,startLat:51.5072,startLng:-.1276,endLat:48.8566,endLng:-2.3522,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[16]=G):G=r[16];let U;r[17]===Symbol.for("react.memo_cache_sentinel")?(U={order:5,startLat:14.5995,startLng:120.9842,endLat:51.5072,endLng:-.1276,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[17]=U):U=r[17];let j;r[18]===Symbol.for("react.memo_cache_sentinel")?(j={order:5,startLat:1.3521,startLng:103.8198,endLat:-33.8688,endLng:151.2093,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[18]=j):j=r[18];let V;r[19]===Symbol.for("react.memo_cache_sentinel")?(V={order:5,startLat:34.0522,startLng:-118.2437,endLat:48.8566,endLng:-2.3522,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[19]=V):V=r[19];let Q;r[20]===Symbol.for("react.memo_cache_sentinel")?(Q={order:6,startLat:-15.432563,startLng:28.315853,endLat:1.094136,endLng:-63.34546,arcAlt:.7,color:m[Math.floor(Math.random()*m.length)]},r[20]=Q):Q=r[20];let Z;r[21]===Symbol.for("react.memo_cache_sentinel")?(Z={order:6,startLat:37.5665,startLng:126.978,endLat:35.6762,endLng:139.6503,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[21]=Z):Z=r[21];let K;r[22]===Symbol.for("react.memo_cache_sentinel")?(K={order:6,startLat:22.3193,startLng:114.1694,endLat:51.5072,endLng:-.1276,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[22]=K):K=r[22];let Y;r[23]===Symbol.for("react.memo_cache_sentinel")?(Y={order:7,startLat:-19.885592,startLng:-43.951191,endLat:-15.595412,endLng:-56.05918,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[23]=Y):Y=r[23];let ne;r[24]===Symbol.for("react.memo_cache_sentinel")?(ne={order:7,startLat:48.8566,startLng:-2.3522,endLat:52.52,endLng:13.405,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[24]=ne):ne=r[24];let ae;r[25]===Symbol.for("react.memo_cache_sentinel")?(ae={order:7,startLat:52.52,startLng:13.405,endLat:34.0522,endLng:-118.2437,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[25]=ae):ae=r[25];let J;r[26]===Symbol.for("react.memo_cache_sentinel")?(J={order:8,startLat:-8.833221,startLng:13.264837,endLat:-33.936138,endLng:18.436529,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[26]=J):J=r[26];let fe;r[27]===Symbol.for("react.memo_cache_sentinel")?(fe={order:8,startLat:49.2827,startLng:-123.1207,endLat:52.3676,endLng:4.9041,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[27]=fe):fe=r[27];let pe;r[28]===Symbol.for("react.memo_cache_sentinel")?(pe={order:8,startLat:1.3521,startLng:103.8198,endLat:40.7128,endLng:-74.006,arcAlt:.5,color:m[Math.floor(Math.random()*m.length)]},r[28]=pe):pe=r[28];let Re;r[29]===Symbol.for("react.memo_cache_sentinel")?(Re={order:9,startLat:51.5072,startLng:-.1276,endLat:34.0522,endLng:-118.2437,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[29]=Re):Re=r[29];let Se;r[30]===Symbol.for("react.memo_cache_sentinel")?(Se={order:9,startLat:22.3193,startLng:114.1694,endLat:-22.9068,endLng:-43.1729,arcAlt:.7,color:m[Math.floor(Math.random()*m.length)]},r[30]=Se):Se=r[30];let qe;r[31]===Symbol.for("react.memo_cache_sentinel")?(qe={order:9,startLat:1.3521,startLng:103.8198,endLat:-34.6037,endLng:-58.3816,arcAlt:.5,color:m[Math.floor(Math.random()*m.length)]},r[31]=qe):qe=r[31];let je;r[32]===Symbol.for("react.memo_cache_sentinel")?(je={order:10,startLat:-22.9068,startLng:-43.1729,endLat:28.6139,endLng:77.209,arcAlt:.7,color:m[Math.floor(Math.random()*m.length)]},r[32]=je):je=r[32];let Qe;r[33]===Symbol.for("react.memo_cache_sentinel")?(Qe={order:10,startLat:34.0522,startLng:-118.2437,endLat:31.2304,endLng:121.4737,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[33]=Qe):Qe=r[33];let He;r[34]===Symbol.for("react.memo_cache_sentinel")?(He={order:10,startLat:-6.2088,startLng:106.8456,endLat:52.3676,endLng:4.9041,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]}
910,r[34]=He):He=r[34];let vt;r[35]===Symbol.for("react.memo_cache_sentinel")?(vt={order:11,startLat:41.9028,startLng:12.4964,endLat:34.0522,endLng:-118.2437,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[35]=vt):vt=r[35];let it;r[36]===Symbol.for("react.memo_cache_sentinel")?(it={order:11,startLat:-6.2088,startLng:106.8456,endLat:31.2304,endLng:121.4737,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[36]=it):it=r[36];let yt;r[37]===Symbol.for("react.memo_cache_sentinel")?(yt={order:11,startLat:22.3193,startLng:114.1694,endLat:1.3521,endLng:103.8198,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[37]=yt):yt=r[37];let Tt;r[38]===Symbol.for("react.memo_cache_sentinel")?(Tt={order:12,startLat:34.0522,startLng:-118.2437,endLat:37.7749,endLng:-122.4194,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[38]=Tt):Tt=r[38];let Xt;r[39]===Symbol.for("react.memo_cache_sentinel")?(Xt={order:12,startLat:35.6762,startLng:139.6503,endLat:22.3193,endLng:114.1694,arcAlt:.2,color:m[Math.floor(Math.random()*m.length)]},r[39]=Xt):Xt=r[39];let sn;r[40]===Symbol.for("react.memo_cache_sentinel")?(sn={order:12,startLat:22.3193,startLng:114.1694,endLat:34.0522,endLng:-118.2437,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[40]=sn):sn=r[40];let Ut;r[41]===Symbol.for("react.memo_cache_sentinel")?(Ut={order:13,startLat:52.52,startLng:13.405,endLat:22.3193,endLng:114.1694,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[41]=Ut):Ut=r[41];let Ot;r[42]===Symbol.for("react.memo_cache_sentinel")?(Ot={order:13,startLat:11.986597,startLng:8.571831,endLat:35.6762,endLng:139.6503,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]},r[42]=Ot):Ot=r[42];let $t;r[43]===Symbol.for("react.memo_cache_sentinel")?($t={order:13,startLat:-22.9068,startLng:-43.1729,endLat:-34.6037,endLng:-58.3816,arcAlt:.1,color:m[Math.floor(Math.random()*m.length)]},r[43]=$t):$t=r[43];let en;r[44]===Symbol.for("react.memo_cache_sentinel")?(en=[y,_,b,w,S,E,R,P,L,D,O,G,U,j,V,Q,Z,K,Y,ne,ae,J,fe,pe,Re,Se,qe,je,Qe,He,vt,it,yt,Tt,Xt,sn,Ut,Ot,$t,{order:14,startLat:-33.936138,startLng:18.436529,endLat:21.395643,endLng:39.883798,arcAlt:.3,color:m[Math.floor(Math.random()*m.length)]}],r[44]=en):en=r[44];const Kn=en;let Nr,kr;r[45]===Symbol.for("react.memo_cache_sentinel")?(Nr=gt.jsxs(Fb,{children:[gt.jsx("title",{children:"About | TorBox"}),gt.jsx("meta",{name:"description",content:"A little bit about TorBox and what we do."})]}),kr=gt.jsx(Lb,{}),r[45]=Nr,r[46]=kr):(Nr=r[45],kr=r[46]);let In,$n;r[47]===Symbol.for("react.memo_cache_sentinel")?(In=gt.jsx("div",{className:"absolute top-0 right-[-400px] lg:left-[-400px] 2xl:left-[-200px] min-[1800px]:left-[000px] h-[800px] w-[800px] lg:h-[1000px] lg:w-[1200px] sm:block hidden opacity-50 lg:opacity-100",children:gt.jsx(Wz,{data:Kn,globeConfig:u})}),$n=gt.jsx("div",{}),r[47]=In,r[48]=$n):(In=r[47],$n=r[48]);let qs;r[49]===Symbol.for("react.memo_cache_sentinel")?(qs=gt.jsx("h2",{className:"text-3xl text-white uppercase sm:text-6xl font-['TorBox_Dotted']",children:"About TorBox"}),r[49]=qs):qs=r[49];let uo;r[50]===Symbol.for("react.memo_cache_sentinel")?(uo=gt.jsx("p",{className:"text-base",children:"TorBox is your premium cloud VPS and privacy-first data-transfer service rivaling even the best providers on the market. With our free plan you can see what we have to offer, then upgrade to a paid plan with more storage on your server. We currently only have 3 server plans but we are quickly expanding to offer more options to our users."}),r[50]=uo):uo=r[50];let yr;r[51]===Symbol.for("react.memo_cache_sentinel")?(yr=gt.jsxs("div",{className:"pt-12 sm:pt-16 lg:pt-20",children:[qs,gt.jsxs("div",{className:"mt-6 space-y-6 text-gray-300",children:[uo,gt.jsxs("p",{className:"text-base leading-7",children:["TorBox also has an"," ",gt.jsx("a",{href:"https://join-discord.torbox.app",target:"_blank",className:"underline",children:"Discord"})," ","where you can get support, report bugs, and suggest features."]})]})]}),r[51]=yr):yr=r[51];let ti;r[52]!==t?(ti=t.map(Xz),r[52]=t,r[53]=ti):ti=r[53];let ni;r[54]!==ti?(ni=gt.jsx("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-8",children:ti}),r[54]=ti,r[55]=ni):ni=r[55];let sr;r[56]===Symbol.for("react.memo_cache_sentinel")?(sr=gt.jsxs(f4,{to:"/login",className:"text-base font-medium text-[#04BF8A] link-hover-effect",children:[" ","Try TorBox for free ",gt.jsx("span",{"aria-hidden":"true",children:"â"})," "]}),r[56]=sr):sr=r[56];let Ji;r[57]===Symbol.for("react.memo_cache_sentinel")?(Ji=gt.jsxs("div",{className:"grid grid-cols-2 mt-10 gap-x-4 gap-y-8",id:"c
910ountvis",children:[sr,gt.jsxs(f4,{to:"/pricing",className:"text-base font-medium text-[#04BF8A] link-hover-effect",children:[" ","View pricing ",gt.jsx("span",{"aria-hidden":"true",children:"â"})," "]})]}),r[57]=Ji):Ji=r[57];let es;r[58]!==ni?(es=gt.jsx("div",{className:"relative py-16 sm:py-24",children:gt.jsxs("div",{className:"lg:mx-auto lg:max-w-7xl lg:grid lg:grid-cols-2 lg:gap-24 lg:items-start",children:[In,$n,gt.jsxs("div",{className:"relative max-w-md px-4 mx-auto sm:max-w-3xl sm:px-6 lg:px-0",children:[yr,gt.jsxs("div",{className:"mt-10",children:[ni,Ji]})]})]})}),r[58]=ni,r[59]=es):es=r[59];let Is,Bi;r[60]===Symbol.for("react.memo_cache_sentinel")?(Is=gt.jsx("div",{className:"sm:mt-40 lg:mt-[300px]"}),Bi=gt.jsx(qb,{}),r[60]=Is,r[61]=Bi):(Is=r[60],Bi=r[61]);let ks;return r[62]!==es?(ks=gt.jsxs("div",{children:[Nr,kr,es,Is,Bi]}),r[62]=es,r[63]=ks):ks=r[63],ks}function Xz(r){return gt.jsxs("div",{className:"pt-6 border-t-2 border-gray-800",children:[gt.jsx("dt",{className:"text-xl font-medium text-white uppercase font-['TorBox_Dotted'] tracking-widest",children:r.label}),gt.jsx("dd",{className:"text-3xl font-extrabold tracking-tight text-[#04BF8A]",children:gt.jsx(Bw,{end:r.value,start:0})})]},r.label)}export{ij as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.