diff --git "a/assets/index-Ca5kstnp.js" "b/assets/index-Ca5kstnp.js" new file mode 100644--- /dev/null +++ "b/assets/index-Ca5kstnp.js" @@ -0,0 +1,3862 @@ +var t6e=Object.defineProperty;var KK=e=>{throw TypeError(e)};var r6e=(e,t,r)=>t in e?t6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ui=(e,t,r)=>r6e(e,typeof t!="symbol"?t+"":t,r),JK=(e,t,r)=>t.has(e)||KK("Cannot "+r);var H1=(e,t,r)=>(JK(e,t,"read from private field"),r?r.call(e):t.get(e)),QK=(e,t,r)=>t.has(e)?KK("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),eJ=(e,t,r,n)=>(JK(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function n6e(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var Mu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $d(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var sk={exports:{}},i_={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tJ;function a6e(){if(tJ)return i_;tJ=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return i_.Fragment=t,i_.jsx=r,i_.jsxs=r,i_}var rJ;function i6e(){return rJ||(rJ=1,sk.exports=a6e()),sk.exports}var ct=i6e(),lk={exports:{}};function o6e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l3e={exports:{}},ku=l3e.exports={},Zp,Kp;function YG(){throw new Error("setTimeout has not been defined")}function $G(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Zp=setTimeout:Zp=YG}catch{Zp=YG}try{typeof clearTimeout=="function"?Kp=clearTimeout:Kp=$G}catch{Kp=$G}})();function u3e(e){if(Zp===setTimeout)return setTimeout(e,0);if((Zp===YG||!Zp)&&setTimeout)return Zp=setTimeout,setTimeout(e,0);try{return Zp(e,0)}catch{try{return Zp.call(null,e,0)}catch{return Zp.call(this,e,0)}}}function s6e(e){if(Kp===clearTimeout)return clearTimeout(e);if((Kp===$G||!Kp)&&clearTimeout)return Kp=clearTimeout,clearTimeout(e);try{return Kp(e)}catch{try{return Kp.call(null,e)}catch{return Kp.call(this,e)}}}var H0=[],ux=!1,im,x3=-1;function l6e(){!ux||!im||(ux=!1,im.length?H0=im.concat(H0):x3=-1,H0.length&&f3e())}function f3e(){if(!ux){var e=u3e(l6e);ux=!0;for(var t=H0.length;t;){for(im=H0,H0=[];++x31)for(var r=1;r>>1,P=D[q];if(0>>1;qo(Q,N))Jo(ne,Q)?(D[q]=ne,D[J]=N,q=J):(D[q]=Q,D[$]=N,q=$);else if(Jo(ne,N))D[q]=ne,D[J]=N,q=J;else break e}}return z}function o(D,z){var N=D.sortIndex-z.sortIndex;return N!==0?N:D.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,f=a.now();e.unstable_now=function(){return a.now()-f}}var i=[],l=[],u=1,c=null,h=3,d=!1,v=!1,p=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function T(D){for(var z=r(l);z!==null;){if(z.callback===null)n(l);else if(z.startTime<=D)n(l),z.sortIndex=z.expirationTime,t(i,z);else break;z=r(l)}}function S(D){if(p=!1,T(D),!v)if(r(i)!==null)v=!0,A||(A=!0,k());else{var z=r(l);z!==null&&F(S,z.startTime-D)}}var A=!1,M=-1,w=5,C=-1;function x(){return m?!0:!(e.unstable_now()-CD&&x());){var q=c.callback;if(typeof q=="function"){c.callback=null,h=c.priorityLevel;var P=q(c.expirationTime<=D);if(D=e.unstable_now(),typeof P=="function"){c.callback=P,T(D),z=!0;break t}c===r(i)&&n(i),T(D)}else n(i);c=r(i)}if(c!==null)z=!0;else{var B=r(l);B!==null&&F(S,B.startTime-D),z=!1}}break e}finally{c=null,h=N,d=!1}z=void 0}}finally{z?k():A=!1}}}var k;if(typeof g=="function")k=function(){g(_)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,I=E.port2;E.port1.onmessage=_,k=function(){I.postMessage(null)}}else k=function(){y(_,0)};function F(D,z){M=y(function(){D(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125q?(D.sortIndex=N,t(l,D),r(i)===null&&D===r(l)&&(p?(b(M),M=-1):p=!0,F(S,N-q))):(D.sortIndex=P,t(i,D),v||d||(v=!0,A||(A=!0,k()))),D},e.unstable_shouldYield=x,e.unstable_wrapCallback=function(D){var z=h;return function(){var N=h;h=z;try{return D.apply(this,arguments)}finally{h=N}}}})(ck)),ck}var oJ;function d6e(){return oJ||(oJ=1,fk.exports=h6e()),fk.exports}var hk={exports:{}},th={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sJ;function v6e(){if(sJ)return th;sJ=1;var e=zx();function t(i){var l="https://react.dev/errors/"+i;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hk.exports=v6e(),hk.exports}var uJ;function p6e(){if(uJ)return o_;uJ=1;var e=d6e(),t=zx(),r=d3e();function n(O){var V="https://react.dev/errors/"+O;if(1P||(O.current=q[P],q[P]=null,P--)}function Q(O,V){P++,q[P]=O.current,O.current=V}var J=B(null),ne=B(null),te=B(null),Z=B(null);function G(O,V){switch(Q(te,V),Q(ne,O),Q(J,null),V.nodeType){case 9:case 11:O=(O=V.documentElement)&&(O=O.namespaceURI)?Vw(O):0;break;default:if(O=V.tagName,V=V.namespaceURI)V=Vw(V),O=Yw(V,O);else switch(O){case"svg":O=1;break;case"math":O=2;break;default:O=0}}$(J),Q(J,O)}function j(){$(J),$(ne),$(te)}function Y(O){O.memoizedState!==null&&Q(Z,O);var V=J.current,ae=Yw(V,O.type);V!==ae&&(Q(ne,O),Q(J,ae))}function K(O){ne.current===O&&($(J),$(ne)),Z.current===O&&($(Z),Rg._currentValue=N)}var X,ee;function le(O){if(X===void 0)try{throw Error()}catch(ae){var V=ae.stack.trim().match(/\n( *(at )?)/);X=V&&V[1]||"",ee=-1)":-1Be||kr[ve]!==un[Be]){var Dn=` +`+kr[ve].replace(" at new "," at ");return O.displayName&&Dn.includes("")&&(Dn=Dn.replace("",O.displayName)),Dn}while(1<=ve&&0<=Be);break}}}finally{oe=!1,Error.prepareStackTrace=ae}return(ae=O?O.displayName||O.name:"")?le(ae):""}function de(O,V){switch(O.tag){case 26:case 27:case 5:return le(O.type);case 16:return le("Lazy");case 13:return O.child!==V&&V!==null?le("Suspense Fallback"):le("Suspense");case 19:return le("SuspenseList");case 0:case 15:return fe(O.type,!1);case 11:return fe(O.type.render,!1);case 1:return fe(O.type,!0);case 31:return le("Activity");default:return""}}function _e(O){try{var V="",ae=null;do V+=de(O,ae),ae=O,O=O.return;while(O);return V}catch(ve){return` +Error generating stack: `+ve.message+` +`+ve.stack}}var we=Object.prototype.hasOwnProperty,Oe=e.unstable_scheduleCallback,be=e.unstable_cancelCallback,Te=e.unstable_shouldYield,ke=e.unstable_requestPaint,Ee=e.unstable_now,Le=e.unstable_getCurrentPriorityLevel,Fe=e.unstable_ImmediatePriority,qe=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,De=e.unstable_IdlePriority,me=e.log,Ce=e.unstable_setDisableYieldValue,et=null,st=null;function ot(O){if(typeof me=="function"&&Ce(O),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(et,O)}catch{}}var ut=Math.clz32?Math.clz32:Et,ht=Math.log,Ht=Math.LN2;function Et(O){return O>>>=0,O===0?32:31-(ht(O)/Ht|0)|0}var Jt=256,Tt=262144,rt=4194304;function gt(O){var V=O&42;if(V!==0)return V;switch(O&-O){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return O&261888;case 262144:case 524288:case 1048576:case 2097152:return O&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return O&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return O}}function mt(O,V,ae){var ve=O.pendingLanes;if(ve===0)return 0;var Be=0,Ze=O.suspendedLanes,kt=O.pingedLanes;O=O.warmLanes;var nr=ve&134217727;return nr!==0?(ve=nr&~Ze,ve!==0?Be=gt(ve):(kt&=nr,kt!==0?Be=gt(kt):ae||(ae=nr&~O,ae!==0&&(Be=gt(ae))))):(nr=ve&~Ze,nr!==0?Be=gt(nr):kt!==0?Be=gt(kt):ae||(ae=ve&~O,ae!==0&&(Be=gt(ae)))),Be===0?0:V!==0&&V!==Be&&(V&Ze)===0&&(Ze=Be&-Be,ae=V&-V,Ze>=ae||Ze===32&&(ae&4194048)!==0)?V:Be}function He(O,V){return(O.pendingLanes&~(O.suspendedLanes&~O.pingedLanes)&V)===0}function Ie(O,V){switch(O){case 1:case 2:case 4:case 8:case 64:return V+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return V+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function je(){var O=rt;return rt<<=1,(rt&62914560)===0&&(rt=4194304),O}function pe(O){for(var V=[],ae=0;31>ae;ae++)V.push(O);return V}function ye(O,V){O.pendingLanes|=V,V!==268435456&&(O.suspendedLanes=0,O.pingedLanes=0,O.warmLanes=0)}function Se(O,V,ae,ve,Be,Ze){var kt=O.pendingLanes;O.pendingLanes=ae,O.suspendedLanes=0,O.pingedLanes=0,O.warmLanes=0,O.expiredLanes&=ae,O.entangledLanes&=ae,O.errorRecoveryDisabledLanes&=ae,O.shellSuspendCounter=0;var nr=O.entanglements,kr=O.expirationTimes,un=O.hiddenUpdates;for(ae=kt&~ae;0"u")return null;try{return O.activeElement||O.body}catch{return O.body}}var Cr=/[\n"\\]/g;function Zr(O){return O.replace(Cr,function(V){return"\\"+V.charCodeAt(0).toString(16)+" "})}function jr(O,V,ae,ve,Be,Ze,kt,nr){O.name="",kt!=null&&typeof kt!="function"&&typeof kt!="symbol"&&typeof kt!="boolean"?O.type=kt:O.removeAttribute("type"),V!=null?kt==="number"?(V===0&&O.value===""||O.value!=V)&&(O.value=""+$t(V)):O.value!==""+$t(V)&&(O.value=""+$t(V)):kt!=="submit"&&kt!=="reset"||O.removeAttribute("value"),V!=null?Fn(O,kt,$t(V)):ae!=null?Fn(O,kt,$t(ae)):ve!=null&&O.removeAttribute("value"),Be==null&&Ze!=null&&(O.defaultChecked=!!Ze),Be!=null&&(O.checked=Be&&typeof Be!="function"&&typeof Be!="symbol"),nr!=null&&typeof nr!="function"&&typeof nr!="symbol"&&typeof nr!="boolean"?O.name=""+$t(nr):O.removeAttribute("name")}function Sn(O,V,ae,ve,Be,Ze,kt,nr){if(Ze!=null&&typeof Ze!="function"&&typeof Ze!="symbol"&&typeof Ze!="boolean"&&(O.type=Ze),V!=null||ae!=null){if(!(Ze!=="submit"&&Ze!=="reset"||V!=null)){mr(O);return}ae=ae!=null?""+$t(ae):"",V=V!=null?""+$t(V):ae,nr||V===O.value||(O.value=V),O.defaultValue=V}ve=ve??Be,ve=typeof ve!="function"&&typeof ve!="symbol"&&!!ve,O.checked=nr?O.checked:!!ve,O.defaultChecked=!!ve,kt!=null&&typeof kt!="function"&&typeof kt!="symbol"&&typeof kt!="boolean"&&(O.name=kt),mr(O)}function Fn(O,V,ae){V==="number"&&Pr(O.ownerDocument)===O||O.defaultValue===""+ae||(O.defaultValue=""+ae)}function ea(O,V,ae,ve){if(O=O.options,V){V={};for(var Be=0;Be"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wa=!1;if(Ga)try{var Ai={};Object.defineProperty(Ai,"passive",{get:function(){Wa=!0}}),window.addEventListener("test",Ai,Ai),window.removeEventListener("test",Ai,Ai)}catch{Wa=!1}var fo=null,Vi=null,Yi=null;function Ps(){if(Yi)return Yi;var O,V=Vi,ae=V.length,ve,Be="value"in fo?fo.value:fo.textContent,Ze=Be.length;for(O=0;O=Fo),Ku=" ",Ju=!1;function Qd(O,V){switch(O){case"keyup":return Xl.indexOf(V.keyCode)!==-1;case"keydown":return V.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zl(O){return O=O.detail,typeof O=="object"&&"data"in O?O.data:null}var $h=!1;function du(O,V){switch(O){case"compositionend":return Zl(V);case"keypress":return V.which!==32?null:(Ju=!0,Ku);case"textInput":return O=V.data,O===Ku&&Ju?null:O;default:return null}}function io(O,V){if($h)return O==="compositionend"||!Vo&&Qd(O,V)?(O=Ps(),Yi=Vi=fo=null,$h=!1,O):null;switch(O){case"paste":return null;case"keypress":if(!(V.ctrlKey||V.altKey||V.metaKey)||V.ctrlKey&&V.altKey){if(V.char&&1=V)return{node:ae,offset:V-O};O=ve}e:{for(;ae;){if(ae.nextSibling){ae=ae.nextSibling;break e}ae=ae.parentNode}ae=void 0}ae=Bv(ae)}}function nv(O,V){return O&&V?O===V?!0:O&&O.nodeType===3?!1:V&&V.nodeType===3?nv(O,V.parentNode):"contains"in O?O.contains(V):O.compareDocumentPosition?!!(O.compareDocumentPosition(V)&16):!1:!1}function av(O){O=O!=null&&O.ownerDocument!=null&&O.ownerDocument.defaultView!=null?O.ownerDocument.defaultView:window;for(var V=Pr(O.document);V instanceof O.HTMLIFrameElement;){try{var ae=typeof V.contentWindow.location.href=="string"}catch{ae=!1}if(ae)O=V.contentWindow;else break;V=Pr(O.document)}return V}function iv(O){var V=O&&O.nodeName&&O.nodeName.toLowerCase();return V&&(V==="input"&&(O.type==="text"||O.type==="search"||O.type==="tel"||O.type==="url"||O.type==="password")||V==="textarea"||O.contentEditable==="true")}var Pu=Ga&&"documentMode"in document&&11>=document.documentMode,Lf=null,$s=null,yc=null,Qu=!1;function cl(O,V,ae){var ve=ae.window===ae?ae.document:ae.nodeType===9?ae:ae.ownerDocument;Qu||Lf==null||Lf!==Pr(ve)||(ve=Lf,"selectionStart"in ve&&iv(ve)?ve={start:ve.selectionStart,end:ve.selectionEnd}:(ve=(ve.ownerDocument&&ve.ownerDocument.defaultView||window).getSelection(),ve={anchorNode:ve.anchorNode,anchorOffset:ve.anchorOffset,focusNode:ve.focusNode,focusOffset:ve.focusOffset}),yc&&Uc(yc,ve)||(yc=ve,ve=m1($s,"onSelect"),0>=kt,Be-=kt,gu=1<<32-ut(V)+Be|ae<to?(ko=ti,ti=null):ko=ti.sibling;var Jo=gn(Jr,ti,sn[to],Bn);if(Jo===null){ti===null&&(ti=ko);break}O&&ti&&Jo.alternate===null&&V(Jr,ti),qr=Ze(Jo,qr,to),Ko===null?hi=Jo:Ko.sibling=Jo,Ko=Jo,ti=ko}if(to===sn.length)return ae(Jr,ti),Gi&&Co(Jr,to),hi;if(ti===null){for(;toto?(ko=ti,ti=null):ko=ti.sibling;var Gp=gn(Jr,ti,Jo.value,Bn);if(Gp===null){ti===null&&(ti=ko);break}O&&ti&&Gp.alternate===null&&V(Jr,ti),qr=Ze(Gp,qr,to),Ko===null?hi=Gp:Ko.sibling=Gp,Ko=Gp,ti=ko}if(Jo.done)return ae(Jr,ti),Gi&&Co(Jr,to),hi;if(ti===null){for(;!Jo.done;to++,Jo=sn.next())Jo=Yn(Jr,Jo.value,Bn),Jo!==null&&(qr=Ze(Jo,qr,to),Ko===null?hi=Jo:Ko.sibling=Jo,Ko=Jo);return Gi&&Co(Jr,to),hi}for(ti=ve(ti);!Jo.done;to++,Jo=sn.next())Jo=xn(ti,Jr,to,Jo.value,Bn),Jo!==null&&(O&&Jo.alternate!==null&&ti.delete(Jo.key===null?to:Jo.key),qr=Ze(Jo,qr,to),Ko===null?hi=Jo:Ko.sibling=Jo,Ko=Jo);return O&&ti.forEach(function(tk){return V(Jr,tk)}),Gi&&Co(Jr,to),hi}function _s(Jr,qr,sn,Bn){if(typeof sn=="object"&&sn!==null&&sn.type===p&&sn.key===null&&(sn=sn.props.children),typeof sn=="object"&&sn!==null){switch(sn.$$typeof){case d:e:{for(var hi=sn.key;qr!==null;){if(qr.key===hi){if(hi=sn.type,hi===p){if(qr.tag===7){ae(Jr,qr.sibling),Bn=Be(qr,sn.props.children),Bn.return=Jr,Jr=Bn;break e}}else if(qr.elementType===hi||typeof hi=="object"&&hi!==null&&hi.$$typeof===w&&tu(hi)===qr.type){ae(Jr,qr.sibling),Bn=Be(qr,sn.props),lf(Bn,sn),Bn.return=Jr,Jr=Bn;break e}ae(Jr,qr);break}else V(Jr,qr);qr=qr.sibling}sn.type===p?(Bn=Tl(sn.props.children,Jr.mode,Bn,sn.key),Bn.return=Jr,Jr=Bn):(Bn=Yc(sn.type,sn.key,sn.props,null,Jr.mode,Bn),lf(Bn,sn),Bn.return=Jr,Jr=Bn)}return kt(Jr);case v:e:{for(hi=sn.key;qr!==null;){if(qr.key===hi)if(qr.tag===4&&qr.stateNode.containerInfo===sn.containerInfo&&qr.stateNode.implementation===sn.implementation){ae(Jr,qr.sibling),Bn=Be(qr,sn.children||[]),Bn.return=Jr,Jr=Bn;break e}else{ae(Jr,qr);break}else V(Jr,qr);qr=qr.sibling}Bn=bc(sn,Jr.mode,Bn),Bn.return=Jr,Jr=Bn}return kt(Jr);case w:return sn=tu(sn),_s(Jr,qr,sn,Bn)}if(F(sn))return Fa(Jr,qr,sn,Bn);if(k(sn)){if(hi=k(sn),typeof hi!="function")throw Error(n(150));return sn=hi.call(sn),Sa(Jr,qr,sn,Bn)}if(typeof sn.then=="function")return _s(Jr,qr,id(sn),Bn);if(sn.$$typeof===g)return _s(Jr,qr,Sc(Jr,sn),Bn);_h(Jr,sn)}return typeof sn=="string"&&sn!==""||typeof sn=="number"||typeof sn=="bigint"?(sn=""+sn,qr!==null&&qr.tag===6?(ae(Jr,qr.sibling),Bn=Be(qr,sn),Bn.return=Jr,Jr=Bn):(ae(Jr,qr),Bn=Du(sn,Jr.mode,Bn),Bn.return=Jr,Jr=Bn),kt(Jr)):ae(Jr,qr)}return function(Jr,qr,sn,Bn){try{qf=0;var hi=_s(Jr,qr,sn,Bn);return sf=null,hi}catch(ti){if(ti===of||ti===Ks)throw ti;var Ko=Ds(29,ti,null,Jr.mode);return Ko.lanes=Bn,Ko.return=Jr,Ko}finally{}}}var jf=Vv(!0),Ed=Vv(!1),Uf=!1;function wh(O){O.updateQueue={baseState:O.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kd(O,V){O=O.updateQueue,V.updateQueue===O&&(V.updateQueue={baseState:O.baseState,firstBaseUpdate:O.firstBaseUpdate,lastBaseUpdate:O.lastBaseUpdate,shared:O.shared,callbacks:null})}function Bu(O){return{lane:O,tag:0,payload:null,callback:null,next:null}}function Hf(O,V,ae){var ve=O.updateQueue;if(ve===null)return null;if(ve=ve.shared,(Xo&2)!==0){var Be=ve.pending;return Be===null?V.next=V:(V.next=Be.next,Be.next=V),ve.pending=V,V=xc(O),Ep(O,null,ae),V}return Td(O,ve,V,ae),xc(O)}function ru(O,V,ae){if(V=V.updateQueue,V!==null&&(V=V.shared,(ae&4194048)!==0)){var ve=V.lanes;ve&=O.pendingLanes,ae|=ve,V.lanes=ae,it(O,ae)}}function $o(O,V){var ae=O.updateQueue,ve=O.alternate;if(ve!==null&&(ve=ve.updateQueue,ae===ve)){var Be=null,Ze=null;if(ae=ae.firstBaseUpdate,ae!==null){do{var kt={lane:ae.lane,tag:ae.tag,payload:ae.payload,callback:null,next:null};Ze===null?Be=Ze=kt:Ze=Ze.next=kt,ae=ae.next}while(ae!==null);Ze===null?Be=Ze=V:Ze=Ze.next=V}else Be=Ze=V;ae={baseState:ve.baseState,firstBaseUpdate:Be,lastBaseUpdate:Ze,shared:ve.shared,callbacks:ve.callbacks},O.updateQueue=ae;return}O=ae.lastBaseUpdate,O===null?ae.firstBaseUpdate=V:O.next=V,ae.lastBaseUpdate=V}var eh=!1;function Ml(){if(eh){var O=Sl;if(O!==null)throw O}}function uf(O,V,ae,ve){eh=!1;var Be=O.updateQueue;Uf=!1;var Ze=Be.firstBaseUpdate,kt=Be.lastBaseUpdate,nr=Be.shared.pending;if(nr!==null){Be.shared.pending=null;var kr=nr,un=kr.next;kr.next=null,kt===null?Ze=un:kt.next=un,kt=kr;var Dn=O.alternate;Dn!==null&&(Dn=Dn.updateQueue,nr=Dn.lastBaseUpdate,nr!==kt&&(nr===null?Dn.firstBaseUpdate=un:nr.next=un,Dn.lastBaseUpdate=kr))}if(Ze!==null){var Yn=Be.baseState;kt=0,Dn=un=kr=null,nr=Ze;do{var gn=nr.lane&-536870913,xn=gn!==nr.lane;if(xn?(Mi&gn)===gn:(ve&gn)===gn){gn!==0&&gn===Il&&(eh=!0),Dn!==null&&(Dn=Dn.next={lane:0,tag:nr.tag,payload:nr.payload,callback:null,next:null});e:{var Fa=O,Sa=nr;gn=V;var _s=ae;switch(Sa.tag){case 1:if(Fa=Sa.payload,typeof Fa=="function"){Yn=Fa.call(_s,Yn,gn);break e}Yn=Fa;break e;case 3:Fa.flags=Fa.flags&-65537|128;case 0:if(Fa=Sa.payload,gn=typeof Fa=="function"?Fa.call(_s,Yn,gn):Fa,gn==null)break e;Yn=c({},Yn,gn);break e;case 2:Uf=!0}}gn=nr.callback,gn!==null&&(O.flags|=64,xn&&(O.flags|=8192),xn=Be.callbacks,xn===null?Be.callbacks=[gn]:xn.push(gn))}else xn={lane:gn,tag:nr.tag,payload:nr.payload,callback:nr.callback,next:null},Dn===null?(un=Dn=xn,kr=Yn):Dn=Dn.next=xn,kt|=gn;if(nr=nr.next,nr===null){if(nr=Be.shared.pending,nr===null)break;xn=nr,nr=xn.next,xn.next=null,Be.lastBaseUpdate=xn,Be.shared.pending=null}}while(!0);Dn===null&&(kr=Yn),Be.baseState=kr,Be.firstBaseUpdate=un,Be.lastBaseUpdate=Dn,Ze===null&&(Be.shared.lanes=0),Dp|=kt,O.lanes=kt,O.memoizedState=Yn}}function Cd(O,V){if(typeof O!="function")throw Error(n(191,O));O.call(V)}function fv(O,V){var ae=O.callbacks;if(ae!==null)for(O.callbacks=null,O=0;OZe?Ze:8;var kt=D.T,nr={};D.T=nr,Es(O,!1,V,ae);try{var kr=Be(),un=D.S;if(un!==null&&un(nr,kr),kr!==null&&typeof kr=="object"&&typeof kr.then=="function"){var Dn=Kc(kr,ve);Ri(O,V,Dn,Rh(O))}else Ri(O,V,ve,Rh(O))}catch(Yn){Ri(O,V,{then:function(){},status:"rejected",reason:Yn},Rh())}finally{z.p=Ze,kt!==null&&nr.types!==null&&(kt.types=nr.types),D.T=kt}}function Xn(){}function La(O,V,ae,ve){if(O.tag!==5)throw Error(n(476));var Be=vi(O).queue;la(O,Be,V,N,ae===null?Xn:function(){return _a(O),ae(ve)})}function vi(O){var V=O.memoizedState;if(V!==null)return V;V={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:N},next:null};var ae={};return V.next={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:ae},next:null},O.memoizedState=V,O=O.alternate,O!==null&&(O.memoizedState=V),V}function _a(O){var V=vi(O);V.next===null&&(V=O.alternate.memoizedState),Ri(O,V.next.queue,{},Rh())}function Pa(){return Xs(Rg)}function Qn(){return Un().memoizedState}function si(){return Un().memoizedState}function Fi(O){for(var V=O.return;V!==null;){switch(V.tag){case 24:case 3:var ae=Rh();O=Bu(ae);var ve=Hf(V,O,ae);ve!==null&&(vf(ve,V,ae),ru(ve,V,ae)),V={cache:Md()},O.payload=V;return}V=V.return}}function Wi(O,V,ae){var ve=Rh();ae={lane:ve,revertLane:0,gesture:null,action:ae,hasEagerState:!1,eagerState:null,next:null},co(O)?ks(V,ae):(ae=Qh(O,V,ae,ve),ae!==null&&(vf(ae,O,ve),Js(ae,V,ve)))}function ss(O,V,ae){var ve=Rh();Ri(O,V,ae,ve)}function Ri(O,V,ae,ve){var Be={lane:ve,revertLane:0,gesture:null,action:ae,hasEagerState:!1,eagerState:null,next:null};if(co(O))ks(V,Be);else{var Ze=O.alternate;if(O.lanes===0&&(Ze===null||Ze.lanes===0)&&(Ze=V.lastRenderedReducer,Ze!==null))try{var kt=V.lastRenderedState,nr=Ze(kt,ae);if(Be.hasEagerState=!0,Be.eagerState=nr,Pl(nr,kt))return Td(O,V,Be,0),us===null&&Gc(),!1}catch{}finally{}if(ae=Qh(O,V,Be,ve),ae!==null)return vf(ae,O,ve),Js(ae,V,ve),!0}return!1}function Es(O,V,ae,ve){if(ve={lane:2,revertLane:Fb(),gesture:null,action:ve,hasEagerState:!1,eagerState:null,next:null},co(O)){if(V)throw Error(n(479))}else V=Qh(O,ae,ve,2),V!==null&&vf(V,O,2)}function co(O){var V=O.alternate;return O===Ke||V!==null&&V===Ke}function ks(O,V){Gt=St=!0;var ae=O.pending;ae===null?V.next=V:(V.next=ae.next,ae.next=V),O.pending=V}function Js(O,V,ae){if((ae&4194048)!==0){var ve=V.lanes;ve&=O.pendingLanes,ae|=ve,V.lanes=ae,it(O,ae)}}var Qs={readContext:Xs,use:xa,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useLayoutEffect:sr,useInsertionEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useSyncExternalStore:sr,useId:sr,useHostTransitionStatus:sr,useFormState:sr,useActionState:sr,useOptimistic:sr,useMemoCache:sr,useCacheRefresh:sr};Qs.useEffectEvent=sr;var qu={readContext:Xs,use:xa,useCallback:function(O,V){return Mn().memoizedState=[O,V===void 0?null:V],O},useContext:Xs,useEffect:zn,useImperativeHandle:function(O,V,ae){ae=ae!=null?ae.concat([O]):null,ca(4194308,4,ma.bind(null,V,O),ae)},useLayoutEffect:function(O,V){return ca(4194308,4,O,V)},useInsertionEffect:function(O,V){ca(4,2,O,V)},useMemo:function(O,V){var ae=Mn();V=V===void 0?null:V;var ve=O();if(Zt){ot(!0);try{O()}finally{ot(!1)}}return ae.memoizedState=[ve,V],ve},useReducer:function(O,V,ae){var ve=Mn();if(ae!==void 0){var Be=ae(V);if(Zt){ot(!0);try{ae(V)}finally{ot(!1)}}}else Be=V;return ve.memoizedState=ve.baseState=Be,O={pending:null,lanes:0,dispatch:null,lastRenderedReducer:O,lastRenderedState:Be},ve.queue=O,O=O.dispatch=Wi.bind(null,Ke,O),[ve.memoizedState,O]},useRef:function(O){var V=Mn();return O={current:O},V.memoizedState=O},useState:function(O){O=yi(O);var V=O.queue,ae=ss.bind(null,Ke,V);return V.dispatch=ae,[O.memoizedState,ae]},useDebugValue:Ra,useDeferredValue:function(O,V){var ae=Mn();return ha(ae,O,V)},useTransition:function(){var O=yi(!1);return O=la.bind(null,Ke,O.queue,!0,!1),Mn().memoizedState=O,[!1,O]},useSyncExternalStore:function(O,V,ae){var ve=Ke,Be=Mn();if(Gi){if(ae===void 0)throw Error(n(407));ae=ae()}else{if(ae=V(),us===null)throw Error(n(349));(Mi&127)!==0||ui(ve,V,ae)}Be.memoizedState=ae;var Ze={value:ae,getSnapshot:V};return Be.queue=Ze,zn(Lo.bind(null,ve,Ze,O),[O]),ve.flags|=2048,Wn(9,{destroy:void 0},$i.bind(null,ve,Ze,ae,V),null),ae},useId:function(){var O=Mn(),V=us.identifierPrefix;if(Gi){var ae=If,ve=gu;ae=(ve&~(1<<32-ut(ve)-1)).toString(32)+ae,V="_"+V+"R_"+ae,ae=ar++,0<\/script>",Ze=Ze.removeChild(Ze.firstChild);break;case"select":Ze=typeof ve.is=="string"?kt.createElement("select",{is:ve.is}):kt.createElement("select"),ve.multiple?Ze.multiple=!0:ve.size&&(Ze.size=ve.size);break;default:Ze=typeof ve.is=="string"?kt.createElement(Be,{is:ve.is}):kt.createElement(Be)}}Ze[_r]=V,Ze[Rr]=ve;e:for(kt=V.child;kt!==null;){if(kt.tag===5||kt.tag===6)Ze.appendChild(kt.stateNode);else if(kt.tag!==4&&kt.tag!==27&&kt.child!==null){kt.child.return=kt,kt=kt.child;continue}if(kt===V)break e;for(;kt.sibling===null;){if(kt.return===null||kt.return===V)break e;kt=kt.return}kt.sibling.return=kt.return,kt=kt.sibling}V.stateNode=Ze;e:switch(gf(Ze,Be,ve),Be){case"button":case"input":case"select":case"textarea":ve=!!ve.autoFocus;break e;case"img":ve=!0;break e;default:ve=!1}ve&&ii(V)}}return qa(V),Ni(V,V.type,O===null?null:O.memoizedProps,V.pendingProps,ae),null;case 6:if(O&&V.stateNode!=null)O.memoizedProps!==ve&&ii(V);else{if(typeof ve!="string"&&V.stateNode===null)throw Error(n(166));if(O=te.current,yu(V)){if(O=V.stateNode,ae=V.memoizedProps,ve=null,Be=Ws,Be!==null)switch(Be.tag){case 27:case 5:ve=Be.memoizedProps}O[_r]=V,O=!!(O.nodeValue===ae||ve!==null&&ve.suppressHydrationWarning===!0||jb(O.nodeValue,ae)),O||rf(V,!0)}else O=Oy(O).createTextNode(ve),O[_r]=V,V.stateNode=O}return qa(V),null;case 31:if(ae=V.memoizedState,O===null||O.memoizedState!==null){if(ve=yu(V),ae!==null){if(O===null){if(!ve)throw Error(n(318));if(O=V.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(n(557));O[_r]=V}else mu(),(V.flags&128)===0&&(V.memoizedState=null),V.flags|=4;qa(V),O=!1}else ae=Sd(),O!==null&&O.memoizedState!==null&&(O.memoizedState.hydrationErrors=ae),O=!0;if(!O)return V.flags&256?(xe(V),V):(xe(V),null);if((V.flags&128)!==0)throw Error(n(558))}return qa(V),null;case 13:if(ve=V.memoizedState,O===null||O.memoizedState!==null&&O.memoizedState.dehydrated!==null){if(Be=yu(V),ve!==null&&ve.dehydrated!==null){if(O===null){if(!Be)throw Error(n(318));if(Be=V.memoizedState,Be=Be!==null?Be.dehydrated:null,!Be)throw Error(n(317));Be[_r]=V}else mu(),(V.flags&128)===0&&(V.memoizedState=null),V.flags|=4;qa(V),Be=!1}else Be=Sd(),O!==null&&O.memoizedState!==null&&(O.memoizedState.hydrationErrors=Be),Be=!0;if(!Be)return V.flags&256?(xe(V),V):(xe(V),null)}return xe(V),(V.flags&128)!==0?(V.lanes=ae,V):(ae=ve!==null,O=O!==null&&O.memoizedState!==null,ae&&(ve=V.child,Be=null,ve.alternate!==null&&ve.alternate.memoizedState!==null&&ve.alternate.memoizedState.cachePool!==null&&(Be=ve.alternate.memoizedState.cachePool.pool),Ze=null,ve.memoizedState!==null&&ve.memoizedState.cachePool!==null&&(Ze=ve.memoizedState.cachePool.pool),Ze!==Be&&(ve.flags|=2048)),ae!==O&&ae&&(V.child.flags|=8192),Ao(V,V.updateQueue),qa(V),null);case 4:return j(),O===null&&y1(V.stateNode.containerInfo),qa(V),null;case 10:return Al(V.type),qa(V),null;case 19:if($(Re),ve=V.memoizedState,ve===null)return qa(V),null;if(Be=(V.flags&128)!==0,Ze=ve.rendering,Ze===null)if(Be)Ja(ve,!1);else{if(kl!==0||O!==null&&(O.flags&128)!==0)for(O=V.child;O!==null;){if(Ze=Ve(O),Ze!==null){for(V.flags|=128,Ja(ve,!1),O=Ze.updateQueue,V.updateQueue=O,Ao(V,O),V.subtreeFlags=0,O=ae,ae=V.child;ae!==null;)Is(ae,O),ae=ae.sibling;return Q(Re,Re.current&1|2),Gi&&Co(V,ve.treeForkCount),V.child}O=O.sibling}ve.tail!==null&&Ee()>t1&&(V.flags|=128,Be=!0,Ja(ve,!1),V.lanes=4194304)}else{if(!Be)if(O=Ve(Ze),O!==null){if(V.flags|=128,Be=!0,O=O.updateQueue,V.updateQueue=O,Ao(V,O),Ja(ve,!0),ve.tail===null&&ve.tailMode==="hidden"&&!Ze.alternate&&!Gi)return qa(V),null}else 2*Ee()-ve.renderingStartTime>t1&&ae!==536870912&&(V.flags|=128,Be=!0,Ja(ve,!1),V.lanes=4194304);ve.isBackwards?(Ze.sibling=V.child,V.child=Ze):(O=ve.last,O!==null?O.sibling=Ze:V.child=Ze,ve.last=Ze)}return ve.tail!==null?(O=ve.tail,ve.rendering=O,ve.tail=O.sibling,ve.renderingStartTime=Ee(),O.sibling=null,ae=Re.current,Q(Re,Be?ae&1|2:ae&1),Gi&&Co(V,ve.treeForkCount),O):(qa(V),null);case 22:case 23:return xe(V),cf(),ve=V.memoizedState!==null,O!==null?O.memoizedState!==null!==ve&&(V.flags|=8192):ve&&(V.flags|=8192),ve?(ae&536870912)!==0&&(V.flags&128)===0&&(qa(V),V.subtreeFlags&6&&(V.flags|=8192)):qa(V),ae=V.updateQueue,ae!==null&&Ao(V,ae.retryQueue),ae=null,O!==null&&O.memoizedState!==null&&O.memoizedState.cachePool!==null&&(ae=O.memoizedState.cachePool.pool),ve=null,V.memoizedState!==null&&V.memoizedState.cachePool!==null&&(ve=V.memoizedState.cachePool.pool),ve!==ae&&(V.flags|=2048),O!==null&&$(Nf),null;case 24:return ae=null,O!==null&&(ae=O.memoizedState.cache),V.memoizedState.cache!==ae&&(V.flags|=2048),Al(wo),qa(V),null;case 25:return null;case 30:return null}throw Error(n(156,V.tag))}function El(O,V){switch(ov(V),V.tag){case 1:return O=V.flags,O&65536?(V.flags=O&-65537|128,V):null;case 3:return Al(wo),j(),O=V.flags,(O&65536)!==0&&(O&128)===0?(V.flags=O&-65537|128,V):null;case 26:case 27:case 5:return K(V),null;case 31:if(V.memoizedState!==null){if(xe(V),V.alternate===null)throw Error(n(340));mu()}return O=V.flags,O&65536?(V.flags=O&-65537|128,V):null;case 13:if(xe(V),O=V.memoizedState,O!==null&&O.dehydrated!==null){if(V.alternate===null)throw Error(n(340));mu()}return O=V.flags,O&65536?(V.flags=O&-65537|128,V):null;case 19:return $(Re),null;case 4:return j(),null;case 10:return Al(V.type),null;case 22:case 23:return xe(V),cf(),O!==null&&$(Nf),O=V.flags,O&65536?(V.flags=O&-65537|128,V):null;case 24:return Al(wo),null;case 25:return null;default:return null}}function Ec(O,V){switch(ov(V),V.tag){case 3:Al(wo),j();break;case 26:case 27:case 5:K(V);break;case 4:j();break;case 31:V.memoizedState!==null&&xe(V);break;case 13:xe(V);break;case 19:$(Re);break;case 10:Al(V.type);break;case 22:case 23:xe(V),cf(),O!==null&&$(Nf);break;case 24:Al(wo)}}function ju(O,V){try{var ae=V.updateQueue,ve=ae!==null?ae.lastEffect:null;if(ve!==null){var Be=ve.next;ae=Be;do{if((ae.tag&O)===O){ve=void 0;var Ze=ae.create,kt=ae.inst;ve=Ze(),kt.destroy=ve}ae=ae.next}while(ae!==Be)}}catch(nr){cs(V,V.return,nr)}}function au(O,V,ae){try{var ve=V.updateQueue,Be=ve!==null?ve.lastEffect:null;if(Be!==null){var Ze=Be.next;ve=Ze;do{if((ve.tag&O)===O){var kt=ve.inst,nr=kt.destroy;if(nr!==void 0){kt.destroy=void 0,Be=V;var kr=ae,un=nr;try{un()}catch(Dn){cs(Be,kr,Dn)}}}ve=ve.next}while(ve!==Ze)}}catch(Dn){cs(V,V.return,Dn)}}function Th(O){var V=O.updateQueue;if(V!==null){var ae=O.stateNode;try{fv(V,ae)}catch(ve){cs(O,O.return,ve)}}}function cv(O,V,ae){ae.props=Ns(O.type,O.memoizedProps),ae.state=O.memoizedState;try{ae.componentWillUnmount()}catch(ve){cs(O,V,ve)}}function Vf(O,V){try{var ae=O.ref;if(ae!==null){switch(O.tag){case 26:case 27:case 5:var ve=O.stateNode;break;case 30:ve=O.stateNode;break;default:ve=O.stateNode}typeof ae=="function"?O.refCleanup=ae(ve):ae.current=ve}}catch(Be){cs(O,V,Be)}}function qs(O,V){var ae=O.ref,ve=O.refCleanup;if(ae!==null)if(typeof ve=="function")try{ve()}catch(Be){cs(O,V,Be)}finally{O.refCleanup=null,O=O.alternate,O!=null&&(O.refCleanup=null)}else if(typeof ae=="function")try{ae(null)}catch(Be){cs(O,V,Be)}else ae.current=null}function Ah(O){var V=O.type,ae=O.memoizedProps,ve=O.stateNode;try{e:switch(V){case"button":case"input":case"select":case"textarea":ae.autoFocus&&ve.focus();break e;case"img":ae.src?ve.src=ae.src:ae.srcSet&&(ve.srcset=ae.srcSet)}}catch(Be){cs(O,O.return,Be)}}function Uu(O,V,ae){try{var ve=O.stateNode;Hw(ve,O.type,ae,V),ve[Rr]=V}catch(Be){cs(O,O.return,Be)}}function Hu(O){return O.tag===5||O.tag===3||O.tag===26||O.tag===27&&Dd(O.type)||O.tag===4}function kc(O){e:for(;;){for(;O.sibling===null;){if(O.return===null||Hu(O.return))return null;O=O.return}for(O.sibling.return=O.return,O=O.sibling;O.tag!==5&&O.tag!==6&&O.tag!==18;){if(O.tag===27&&Dd(O.type)||O.flags&2||O.child===null||O.tag===4)continue e;O.child.return=O,O=O.child}if(!(O.flags&2))return O.stateNode}}function Sh(O,V,ae){var ve=O.tag;if(ve===5||ve===6)O=O.stateNode,V?(ae.nodeType===9?ae.body:ae.nodeName==="HTML"?ae.ownerDocument.body:ae).insertBefore(O,V):(V=ae.nodeType===9?ae.body:ae.nodeName==="HTML"?ae.ownerDocument.body:ae,V.appendChild(O),ae=ae._reactRootContainer,ae!=null||V.onclick!==null||(V.onclick=ci));else if(ve!==4&&(ve===27&&Dd(O.type)&&(ae=O.stateNode,V=null),O=O.child,O!==null))for(Sh(O,V,ae),O=O.sibling;O!==null;)Sh(O,V,ae),O=O.sibling}function Yf(O,V,ae){var ve=O.tag;if(ve===5||ve===6)O=O.stateNode,V?ae.insertBefore(O,V):ae.appendChild(O);else if(ve!==4&&(ve===27&&Dd(O.type)&&(ae=O.stateNode),O=O.child,O!==null))for(Yf(O,V,ae),O=O.sibling;O!==null;)Yf(O,V,ae),O=O.sibling}function T0(O){var V=O.stateNode,ae=O.memoizedProps;try{for(var ve=O.type,Be=V.attributes;Be.length;)V.removeAttributeNode(Be[0]);gf(V,ve,ae),V[_r]=O,V[Rr]=ae}catch(Ze){cs(O,O.return,Ze)}}var $f=!1,so=!1,kp=!1,Cp=typeof WeakSet=="function"?WeakSet:Set,Do=null;function Rp(O,V){if(O=O.containerInfo,Ub=rp,O=av(O),iv(O)){if("selectionStart"in O)var ae={start:O.selectionStart,end:O.selectionEnd};else e:{ae=(ae=O.ownerDocument)&&ae.defaultView||window;var ve=ae.getSelection&&ae.getSelection();if(ve&&ve.rangeCount!==0){ae=ve.anchorNode;var Be=ve.anchorOffset,Ze=ve.focusNode;ve=ve.focusOffset;try{ae.nodeType,Ze.nodeType}catch{ae=null;break e}var kt=0,nr=-1,kr=-1,un=0,Dn=0,Yn=O,gn=null;t:for(;;){for(var xn;Yn!==ae||Be!==0&&Yn.nodeType!==3||(nr=kt+Be),Yn!==Ze||ve!==0&&Yn.nodeType!==3||(kr=kt+ve),Yn.nodeType===3&&(kt+=Yn.nodeValue.length),(xn=Yn.firstChild)!==null;)gn=Yn,Yn=xn;for(;;){if(Yn===O)break t;if(gn===ae&&++un===Be&&(nr=kt),gn===Ze&&++Dn===ve&&(kr=kt),(xn=Yn.nextSibling)!==null)break;Yn=gn,gn=Yn.parentNode}Yn=xn}ae=nr===-1||kr===-1?null:{start:nr,end:kr}}else ae=null}ae=ae||{start:0,end:0}}else ae=null;for(Hb={focusedElem:O,selectionRange:ae},rp=!1,Do=V;Do!==null;)if(V=Do,O=V.child,(V.subtreeFlags&1028)!==0&&O!==null)O.return=V,Do=O;else for(;Do!==null;){switch(V=Do,Ze=V.alternate,O=V.flags,V.tag){case 0:if((O&4)!==0&&(O=V.updateQueue,O=O!==null?O.events:null,O!==null))for(ae=0;ae title"))),gf(Ze,ve,ae),Ze[_r]=O,Ft(Ze),ve=Ze;break e;case"link":var kt=Kb("link","href",Be).get(ve+(ae.href||""));if(kt){for(var nr=0;nr_s&&(kt=_s,_s=Sa,Sa=kt);var Jr=rv(nr,Sa),qr=rv(nr,_s);if(Jr&&qr&&(xn.rangeCount!==1||xn.anchorNode!==Jr.node||xn.anchorOffset!==Jr.offset||xn.focusNode!==qr.node||xn.focusOffset!==qr.offset)){var sn=Yn.createRange();sn.setStart(Jr.node,Jr.offset),xn.removeAllRanges(),Sa>_s?(xn.addRange(sn),xn.extend(qr.node,qr.offset)):(sn.setEnd(qr.node,qr.offset),xn.addRange(sn))}}}}for(Yn=[],xn=nr;xn=xn.parentNode;)xn.nodeType===1&&Yn.push({element:xn,left:xn.scrollLeft,top:xn.scrollTop});for(typeof nr.focus=="function"&&nr.focus(),nr=0;nrae?32:ae,D.T=null,ae=kb,kb=null;var Ze=Op,kt=Kv;if(wu=0,Tg=Op=null,Kv=0,(Xo&6)!==0)throw Error(n(331));var nr=Xo;if(Xo|=4,Tw(Ze.current),bw(Ze,Ze.current,kt,ae),Xo=nr,dv(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(et,Ze)}catch{}return!0}finally{z.p=Be,D.T=ve,Pw(O,V)}}function R0(O,V,ae){V=No(ae,V),V=H(O.stateNode,V,2),O=Hf(O,V,2),O!==null&&(ye(O,2),hv(O))}function cs(O,V,ae){if(O.tag===3)R0(O,O,ae);else for(;V!==null;){if(V.tag===3){R0(V,O,ae);break}else if(V.tag===1){var ve=V.stateNode;if(typeof V.type.getDerivedStateFromError=="function"||typeof ve.componentDidCatch=="function"&&(Ip===null||!Ip.has(ve))){O=No(ae,O),ae=ie(2),ve=Hf(V,ae,2),ve!==null&&(W(ae,ve,V,O),ye(ve,2),hv(ve));break}}V=V.return}}function Ib(O,V,ae){var ve=O.pingCache;if(ve===null){ve=O.pingCache=new Sb;var Be=new Set;ve.set(V,Be)}else Be=ve.get(V),Be===void 0&&(Be=new Set,ve.set(V,Be));Be.has(ae)||(Mb=!0,Be.add(ae),O=IE.bind(null,O,V,ae),V.then(O,O))}function IE(O,V,ae){var ve=O.pingCache;ve!==null&&ve.delete(V),O.pingedLanes|=O.suspendedLanes&ae,O.warmLanes&=~ae,us===O&&(Mi&ae)===ae&&(kl===4||kl===3&&(Mi&62914560)===Mi&&300>Ee()-e1?(Xo&2)===0&&C0(O,0):Cy|=ae,Zv===Mi&&(Zv=0)),hv(O)}function Dw(O,V){V===0&&(V=je()),O=xo(O,V),O!==null&&(ye(O,V),hv(O))}function Iw(O){var V=O.memoizedState,ae=0;V!==null&&(ae=V.retryLane),Dw(O,ae)}function Ow(O,V){var ae=0;switch(O.tag){case 31:case 13:var ve=O.stateNode,Be=O.memoizedState;Be!==null&&(ae=Be.retryLane);break;case 19:ve=O.stateNode;break;case 22:ve=O.stateNode._retryCache;break;default:throw Error(n(314))}ve!==null&&ve.delete(V),Dw(O,ae)}function OE(O,V){return Oe(O,V)}var h1=null,Sg=null,Ob=!1,d1=!1,zb=!1,qp=0;function hv(O){O!==Sg&&O.next===null&&(Sg===null?h1=Sg=O:Sg=Sg.next=O),d1=!0,Ob||(Ob=!0,FE())}function dv(O,V){if(!zb&&d1){zb=!0;do for(var ae=!1,ve=h1;ve!==null;){if(O!==0){var Be=ve.pendingLanes;if(Be===0)var Ze=0;else{var kt=ve.suspendedLanes,nr=ve.pingedLanes;Ze=(1<<31-ut(42|O)+1)-1,Ze&=Be&~(kt&~nr),Ze=Ze&201326741?Ze&201326741|1:Ze?Ze|2:0}Ze!==0&&(ae=!0,sd(ve,Ze))}else Ze=Mi,Ze=mt(ve,ve===us?Ze:0,ve.cancelPendingCommit!==null||ve.timeoutHandle!==-1),(Ze&3)===0||He(ve,Ze)||(ae=!0,sd(ve,Ze));ve=ve.next}while(ae);zb=!1}}function zE(){zw()}function zw(){d1=Ob=!1;var O=0;qp!==0&&zy()&&(O=qp);for(var V=Ee(),ae=null,ve=h1;ve!==null;){var Be=ve.next,Ze=v1(ve,V);Ze===0?(ve.next=null,ae===null?h1=Be:ae.next=Be,Be===null&&(Sg=ae)):(ae=ve,(O!==0||(Ze&3)!==0)&&(d1=!0)),ve=Be}wu!==0&&wu!==5||dv(O),qp!==0&&(qp=0)}function v1(O,V){for(var ae=O.suspendedLanes,ve=O.pingedLanes,Be=O.expirationTimes,Ze=O.pendingLanes&-62914561;0nr)break;var Dn=kr.transferSize,Yn=kr.initiatorType;Dn&&Gw(Yn)&&(kr=kr.responseEnd,kt+=Dn*(kr"u"?null:document;function P0(O,V,ae){var ve=Qv;if(ve&&typeof V=="string"&&V){var Be=Zr(V);Be='link[rel="'+O+'"][href="'+Be+'"]',typeof ae=="string"&&(Be+='[crossorigin="'+ae+'"]'),Qw.has(Be)||(Qw.add(Be),O={rel:O,crossOrigin:ae,href:V},ve.querySelector(Be)===null&&(V=ve.createElement("link"),gf(V,"link",O),Ft(V),ve.head.appendChild(V)))}}function eT(O){Jv.D(O),P0("dns-prefetch",O,null)}function XE(O,V){Jv.C(O,V),P0("preconnect",O,V)}function ZE(O,V,ae){Jv.L(O,V,ae);var ve=Qv;if(ve&&O&&V){var Be='link[rel="preload"][as="'+Zr(V)+'"]';V==="image"&&ae&&ae.imageSrcSet?(Be+='[imagesrcset="'+Zr(ae.imageSrcSet)+'"]',typeof ae.imageSizes=="string"&&(Be+='[imagesizes="'+Zr(ae.imageSizes)+'"]')):Be+='[href="'+Zr(O)+'"]';var Ze=Be;switch(V){case"style":Ze=Eg(O);break;case"script":Ze=ep(O)}ud.has(Ze)||(O=c({rel:"preload",href:V==="image"&&ae&&ae.imageSrcSet?void 0:O,as:V},ae),ud.set(Ze,O),ve.querySelector(Be)!==null||V==="style"&&ve.querySelector(kg(Ze))||V==="script"&&ve.querySelector(tp(Ze))||(V=ve.createElement("link"),gf(V,"link",O),Ft(V),ve.head.appendChild(V)))}}function KE(O,V){Jv.m(O,V);var ae=Qv;if(ae&&O){var ve=V&&typeof V.as=="string"?V.as:"script",Be='link[rel="modulepreload"][as="'+Zr(ve)+'"][href="'+Zr(O)+'"]',Ze=Be;switch(ve){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Ze=ep(O)}if(!ud.has(Ze)&&(O=c({rel:"modulepreload",href:O},V),ud.set(Ze,O),ae.querySelector(Be)===null)){switch(ve){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(ae.querySelector(tp(Ze)))return}ve=ae.createElement("link"),gf(ve,"link",O),Ft(ve),ae.head.appendChild(ve)}}}function Wb(O,V,ae){Jv.S(O,V,ae);var ve=Qv;if(ve&&O){var Be=wt(ve).hoistableStyles,Ze=Eg(O);V=V||"default";var kt=Be.get(Ze);if(!kt){var nr={loading:0,preload:null};if(kt=ve.querySelector(kg(Ze)))nr.loading=5;else{O=c({rel:"stylesheet",href:O,"data-precedence":V},ae),(ae=ud.get(Ze))&&D0(O,ae);var kr=kt=ve.createElement("link");Ft(kr),gf(kr,"link",O),kr._p=new Promise(function(un,Dn){kr.onload=un,kr.onerror=Dn}),kr.addEventListener("load",function(){nr.loading|=1}),kr.addEventListener("error",function(){nr.loading|=2}),nr.loading|=4,yf(kt,V,ve)}kt={type:"stylesheet",instance:kt,count:1,state:nr},Be.set(Ze,kt)}}}function JE(O,V){Jv.X(O,V);var ae=Qv;if(ae&&O){var ve=wt(ae).hoistableScripts,Be=ep(O),Ze=ve.get(Be);Ze||(Ze=ae.querySelector(tp(Be)),Ze||(O=c({src:O,async:!0},V),(V=ud.get(Be))&&Zb(O,V),Ze=ae.createElement("script"),Ft(Ze),gf(Ze,"link",O),ae.head.appendChild(Ze)),Ze={type:"script",instance:Ze,count:1,state:null},ve.set(Be,Ze))}}function QE(O,V){Jv.M(O,V);var ae=Qv;if(ae&&O){var ve=wt(ae).hoistableScripts,Be=ep(O),Ze=ve.get(Be);Ze||(Ze=ae.querySelector(tp(Be)),Ze||(O=c({src:O,async:!0,type:"module"},V),(V=ud.get(Be))&&Zb(O,V),Ze=ae.createElement("script"),Ft(Ze),gf(Ze,"link",O),ae.head.appendChild(Ze)),Ze={type:"script",instance:Ze,count:1,state:null},ve.set(Be,Ze))}}function tT(O,V,ae,ve){var Be=(Be=te.current)?T1(Be):null;if(!Be)throw Error(n(446));switch(O){case"meta":case"title":return null;case"style":return typeof ae.precedence=="string"&&typeof ae.href=="string"?(V=Eg(ae.href),ae=wt(Be).hoistableStyles,ve=ae.get(V),ve||(ve={type:"style",instance:null,count:0,state:null},ae.set(V,ve)),ve):{type:"void",instance:null,count:0,state:null};case"link":if(ae.rel==="stylesheet"&&typeof ae.href=="string"&&typeof ae.precedence=="string"){O=Eg(ae.href);var Ze=wt(Be).hoistableStyles,kt=Ze.get(O);if(kt||(Be=Be.ownerDocument||Be,kt={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Ze.set(O,kt),(Ze=Be.querySelector(kg(O)))&&!Ze._p&&(kt.instance=Ze,kt.state.loading=5),ud.has(O)||(ae={rel:"preload",as:"style",href:ae.href,crossOrigin:ae.crossOrigin,integrity:ae.integrity,media:ae.media,hrefLang:ae.hrefLang,referrerPolicy:ae.referrerPolicy},ud.set(O,ae),Ze||Cc(Be,O,ae,kt.state))),V&&ve===null)throw Error(n(528,""));return kt}if(V&&ve!==null)throw Error(n(529,""));return null;case"script":return V=ae.async,ae=ae.src,typeof ae=="string"&&V&&typeof V!="function"&&typeof V!="symbol"?(V=ep(ae),ae=wt(Be).hoistableScripts,ve=ae.get(V),ve||(ve={type:"script",instance:null,count:0,state:null},ae.set(V,ve)),ve):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,O))}}function Eg(O){return'href="'+Zr(O)+'"'}function kg(O){return'link[rel="stylesheet"]['+O+"]"}function Xb(O){return c({},O,{"data-precedence":O.precedence,precedence:null})}function Cc(O,V,ae,ve){O.querySelector('link[rel="preload"][as="style"]['+V+"]")?ve.loading=1:(V=O.createElement("link"),ve.preload=V,V.addEventListener("load",function(){return ve.loading|=1}),V.addEventListener("error",function(){return ve.loading|=2}),gf(V,"link",ae),Ft(V),O.head.appendChild(V))}function ep(O){return'[src="'+Zr(O)+'"]'}function tp(O){return"script[async]"+O}function Cg(O,V,ae){if(V.count++,V.instance===null)switch(V.type){case"style":var ve=O.querySelector('style[data-href~="'+Zr(ae.href)+'"]');if(ve)return V.instance=ve,Ft(ve),ve;var Be=c({},ae,{"data-href":ae.href,"data-precedence":ae.precedence,href:null,precedence:null});return ve=(O.ownerDocument||O).createElement("style"),Ft(ve),gf(ve,"style",Be),yf(ve,ae.precedence,O),V.instance=ve;case"stylesheet":Be=Eg(ae.href);var Ze=O.querySelector(kg(Be));if(Ze)return V.state.loading|=4,V.instance=Ze,Ft(Ze),Ze;ve=Xb(ae),(Be=ud.get(Be))&&D0(ve,Be),Ze=(O.ownerDocument||O).createElement("link"),Ft(Ze);var kt=Ze;return kt._p=new Promise(function(nr,kr){kt.onload=nr,kt.onerror=kr}),gf(Ze,"link",ve),V.state.loading|=4,yf(Ze,ae.precedence,O),V.instance=Ze;case"script":return Ze=ep(ae.src),(Be=O.querySelector(tp(Ze)))?(V.instance=Be,Ft(Be),Be):(ve=ae,(Be=ud.get(Ze))&&(ve=c({},ae),Zb(ve,Be)),O=O.ownerDocument||O,Be=O.createElement("script"),Ft(Be),gf(Be,"link",ve),O.head.appendChild(Be),V.instance=Be);case"void":return null;default:throw Error(n(443,V.type))}else V.type==="stylesheet"&&(V.state.loading&4)===0&&(ve=V.instance,V.state.loading|=4,yf(ve,ae.precedence,O));return V.instance}function yf(O,V,ae){for(var ve=ae.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),Be=ve.length?ve[ve.length-1]:null,Ze=Be,kt=0;kt title"):null)}function Gu(O,V,ae){if(ae===1||V.itemProp!=null)return!1;switch(O){case"meta":case"title":return!0;case"style":if(typeof V.precedence!="string"||typeof V.href!="string"||V.href==="")break;return!0;case"link":if(typeof V.rel!="string"||typeof V.href!="string"||V.href===""||V.onLoad||V.onError)break;switch(V.rel){case"stylesheet":return O=V.disabled,typeof V.precedence=="string"&&O==null;default:return!0}case"script":if(V.async&&typeof V.async!="function"&&typeof V.async!="symbol"&&!V.onLoad&&!V.onError&&V.src&&typeof V.src=="string")return!0}return!1}function rT(O){return!(O.type==="stylesheet"&&(O.state.loading&3)===0)}function A1(O,V,ae,ve){if(ae.type==="stylesheet"&&(typeof ve.media!="string"||matchMedia(ve.media).matches!==!1)&&(ae.state.loading&4)===0){if(ae.instance===null){var Be=Eg(ve.href),Ze=V.querySelector(kg(Be));if(Ze){V=Ze._p,V!==null&&typeof V=="object"&&typeof V.then=="function"&&(O.count++,O=By.bind(O),V.then(O,O)),ae.state.loading|=4,ae.instance=Ze,Ft(Ze);return}Ze=V.ownerDocument||V,ve=Xb(ve),(Be=ud.get(Be))&&D0(ve,Be),Ze=Ze.createElement("link"),Ft(Ze);var kt=Ze;kt._p=new Promise(function(nr,kr){kt.onload=nr,kt.onerror=kr}),gf(Ze,"link",ve),ae.instance=Ze}O.stylesheets===null&&(O.stylesheets=new Map),O.stylesheets.set(ae,V),(V=ae.state.preload)&&(ae.state.loading&3)===0&&(O.count++,ae=By.bind(O),V.addEventListener("load",ae),V.addEventListener("error",ae))}}var fd=0;function Rc(O,V){return O.stylesheets&&O.count===0&&qy(O,O.stylesheets),0fd?50:800)+V);return O.unsuspend=ae,function(){O.unsuspend=null,clearTimeout(ve),clearTimeout(Be)}}:null}function By(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qy(this,this.stylesheets);else if(this.unsuspend){var O=this.unsuspend;this.unsuspend=null,O()}}}var S1=null;function qy(O,V){O.stylesheets=null,O.unsuspend!==null&&(O.count++,S1=new Map,V.forEach(ek,O),S1=null,By.call(O))}function ek(O,V){if(!(V.state.loading&4)){var ae=S1.get(O);if(ae)var ve=ae.get(null);else{ae=new Map,S1.set(O,ae);for(var Be=O.querySelectorAll("link[data-precedence],style[data-precedence]"),Ze=0;Ze"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),uk.exports=p6e(),uk.exports}var y6e=g6e();const m6e=Pv(y6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x6e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b6e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),cJ=e=>{const t=b6e(e);return t.charAt(0).toUpperCase()+t.slice(1)},v3e=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),_6e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var w6e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T6e=Vt.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...f},i)=>Vt.createElement("svg",{ref:i,...w6e,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:v3e("lucide",o),...!s&&!_6e(f)&&{"aria-hidden":"true"},...f},[...a.map(([l,u])=>Vt.createElement(l,u)),...Array.isArray(s)?s:[s]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Di=(e,t)=>{const r=Vt.forwardRef(({className:n,...o},s)=>Vt.createElement(T6e,{ref:s,iconNode:t,className:v3e(`lucide-${x6e(cJ(e))}`,`lucide-${e}`,n),...o}));return r.displayName=cJ(e),r};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A6e=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],S6e=Di("book-open",A6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M6e=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],E6e=Di("book",M6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k6e=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],C6e=Di("briefcase",k6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R6e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],L6e=Di("check",R6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P6e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],WG=Di("chevron-down",P6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D6e=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],I6e=Di("chevron-up",D6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O6e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],YY=Di("circle-alert",O6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z6e=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],p3e=Di("circle-check-big",z6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F6e=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],N6e=Di("clipboard-check",F6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B6e=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],g3e=Di("clipboard-list",B6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q6e=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],j6e=Di("clock",q6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U6e=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],H6e=Di("code-xml",U6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G6e=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],V6e=Di("code",G6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y6e=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],$6e=Di("cpu",Y6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W6e=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],X6e=Di("download",W6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z6e=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],K6e=Di("gauge",Z6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J6e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Q6e=Di("globe",J6e);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],y3e=Di("image",eIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tIe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rIe=Di("info",tIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nIe=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],m3e=Di("instagram",nIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aIe=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],x3e=Di("lightbulb",aIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iIe=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],$Y=Di("linkedin",iIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oIe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],sIe=Di("log-out",oIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lIe=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],N3=Di("mail",lIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uIe=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],fIe=Di("map-pin",uIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cIe=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],hIe=Di("maximize",cIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dIe=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],vIe=Di("megaphone",dIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pIe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],gIe=Di("menu",pIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yIe=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],hJ=Di("message-circle",yIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mIe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],b3e=Di("message-square",mIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xIe=[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],dJ=Di("monitor-play",xIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],_Ie=Di("panel-left-close",bIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],TIe=Di("panels-top-left",wIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AIe=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],_3e=Di("pen-line",AIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SIe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],G_=Di("plus",SIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MIe=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],EIe=Di("scale",MIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kIe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],w3e=Di("send",kIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CIe=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],RIe=Di("share-2",CIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LIe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],PIe=Di("smile",LIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DIe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],vm=Di("sparkles",DIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IIe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],OIe=Di("target",IIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zIe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],FIe=Di("terminal",zIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NIe=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],BIe=Di("timer",NIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qIe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],jIe=Di("trash-2",qIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UIe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],HIe=Di("triangle-alert",UIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GIe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],XG=Di("user",GIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VIe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],YIe=Di("users",VIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $Ie=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],WIe=Di("video",$Ie);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XIe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ey=Di("x",XIe);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZIe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],WY=Di("zap",ZIe);var Ky=(e=>(e.PR_COMMS="PR & Comms",e.PRODUCT="Product",e.BRANDING="Branding",e.MARKETING="Marketing",e.SOCIAL_MEDIA="Social Media",e.JOURNALISM="Journalism",e))(Ky||{});const vJ=[{label:"Features",href:"#features"},{label:"Use Cases",href:"#use-cases"},{label:"How it Works",href:"#how-it-works"},{label:"Accuracy",href:"#accuracy"},{label:"Docs",href:"#docs"}],KIe=[{category:Ky.PR_COMMS,title:"Craft Narratives",description:"Test different communication strategies via API to deliver the right reaction",color:"bg-purple-500"},{category:Ky.PRODUCT,title:"Decide Features",description:"Test how your target customers react to product ideas and new features",color:"bg-teal-500"},{category:Ky.BRANDING,title:"Stand Out",description:"Test how different brand and voice ideas resonate with your ideal buyer.",color:"bg-pink-500"},{category:Ky.MARKETING,title:"Generate Leads",description:"Test marketing content in a simulation of your target customers",color:"bg-orange-500"},{category:Ky.SOCIAL_MEDIA,title:"Make Content",description:"Test social content in simulations of your network and audience",color:"bg-blue-500"},{category:Ky.JOURNALISM,title:"Capture Attention",description:"Test headlines, thumbnails, and article content to maximise reader attention",color:"bg-yellow-500"}],JIe=[{question:"Is the API free for developers?",answer:"Yes. We offer a generous free tier specifically designed for developers and hobbyists to build, test, and integrate user simulations without upfront costs."},{question:"What is a Focus Group?",answer:"A Focus Group is a simulated collective of AI personas that mirror the behaviors, preferences, and interactions of a specific real-world audience."},{question:"How do credits work in the free tier?",answer:"Credits are used to run simulations. One credit equals one simulated interaction. The developer plan includes 1,000 free credits per month, refreshing automatically."},{question:"Can I integrate this into my CI/CD?",answer:"Absolutely. Our CLI tool and API are designed to run as part of your testing pipeline, allowing you to validate UX decisions before merging code."},{question:"How do I get an API key?",answer:"You need a Huggingface token with a valid account."}],sh=({children:e,variant:t="primary",size:r="md",className:n="",...o})=>{const s="inline-flex items-center justify-center rounded-full font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-black disabled:opacity-50 disabled:pointer-events-none",a={primary:"bg-white text-black hover:bg-gray-200 border border-transparent",secondary:"bg-gray-800 text-white hover:bg-gray-700 border border-transparent",outline:"bg-transparent text-white border border-gray-600 hover:border-gray-400 hover:text-gray-200",ghost:"bg-transparent text-white hover:bg-white/10"},f={sm:"px-4 py-1.5 text-sm",md:"px-6 py-2.5 text-base",lg:"px-8 py-3.5 text-lg"};return ct.jsx("button",{className:`${s} ${a[t]} ${f[r]} ${n}`,...o,children:e})},QIe=({onStart:e})=>{const[t,r]=Vt.useState(!1),[n,o]=Vt.useState(!1);return Vt.useEffect(()=>{const s=()=>{r(window.scrollY>20)};return window.addEventListener("scroll",s),()=>window.removeEventListener("scroll",s)},[]),ct.jsxs("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${t?"bg-black/80 backdrop-blur-md py-3 border-b border-gray-800":"bg-transparent py-5"}`,children:[ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 flex items-center justify-between",children:[ct.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>window.scrollTo(0,0),children:[ct.jsx("div",{className:"w-8 h-8 flex items-center justify-center font-bold text-xl text-white",children:ct.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-full h-full",children:[ct.jsx("path",{d:"M12 2L2 22h20L12 2z",className:"text-gray-400"}),ct.jsx("path",{d:"M12 6L6 20h12L12 6z",className:"text-white fill-white"})]})}),ct.jsx("span",{className:"font-semibold text-lg tracking-tight",children:"SyncUsers"})]}),ct.jsx("div",{className:"hidden md:flex items-center gap-8",children:vJ.map(s=>ct.jsx("a",{href:s.href,className:"text-sm font-medium text-gray-300 hover:text-white transition-colors",children:s.label},s.label))}),ct.jsx("div",{className:"hidden md:block",children:ct.jsx(sh,{variant:"primary",size:"sm",onClick:e,children:"Start Building"})}),ct.jsx("button",{className:"md:hidden text-gray-300 hover:text-white",onClick:()=>o(!n),children:n?ct.jsx(ey,{}):ct.jsx(gIe,{})})]}),n&&ct.jsx("div",{className:"md:hidden bg-black border-t border-gray-800 p-6 absolute top-full left-0 right-0",children:ct.jsxs("div",{className:"flex flex-col gap-4",children:[vJ.map(s=>ct.jsx("a",{href:s.href,className:"text-lg font-medium text-gray-300 hover:text-white",onClick:()=>o(!1),children:s.label},s.label)),ct.jsx("div",{className:"pt-4",children:ct.jsx(sh,{variant:"primary",className:"w-full",onClick:()=>{o(!1),e&&e()},children:"Start Building"})})]})})]})};var dk={},vk={},pJ;function XY(){return pJ||(pJ=1,vk.version="2.30.0"),vk}var b3={exports:{}};/*! Native Promise Only + v0.8.1 (c) Kyle Simpson + MIT License: http://getify.mit-license.org +*/var eOe=b3.exports,gJ;function tOe(){return gJ||(gJ=1,(function(e){(function(r,n,o){n[r]=n[r]||o(),e.exports&&(e.exports=n[r])})("Promise",typeof Mu<"u"?Mu:eOe,function(){var r,n,o,s=Object.prototype.toString,a=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(g,T,S,A){return Object.defineProperty(g,T,{value:S,writable:!0,configurable:A!==!1})}}catch{r=function(T,S,A){return T[S]=A,T}}o=(function(){var g,T,S;function A(M,w){this.fn=M,this.self=w,this.next=void 0}return{add:function(w,C){S=new A(w,C),T?T.next=S:g=S,T=S,S=void 0},drain:function(){var w=g;for(g=T=n=void 0;w;)w.fn.call(w.self),w=w.next}}})();function f(b,g){o.add(b,g),n||(n=a(o.drain))}function i(b){var g,T=typeof b;return b!=null&&(T=="object"||T=="function")&&(g=b.then),typeof g=="function"?g:!1}function l(){for(var b=0;b0&&f(l,T))}catch(S){h.call(new v(T),S)}}}function h(b){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=b,g.state=2,g.chain.length>0&&f(l,g))}function d(b,g,T,S){for(var A=0;Axe?1:se>=xe?0:NaN}t.descending=function(se,xe){return xese?1:xe>=se?0:NaN},t.min=function(se,xe){var Re=-1,Ve=se.length,Xe,Ke;if(arguments.length===1){for(;++Re=Ke){Xe=Ke;break}for(;++ReKe&&(Xe=Ke)}else{for(;++Re=Ke){Xe=Ke;break}for(;++ReKe&&(Xe=Ke)}return Xe},t.max=function(se,xe){var Re=-1,Ve=se.length,Xe,Ke;if(arguments.length===1){for(;++Re=Ke){Xe=Ke;break}for(;++ReXe&&(Xe=Ke)}else{for(;++Re=Ke){Xe=Ke;break}for(;++ReXe&&(Xe=Ke)}return Xe},t.extent=function(se,xe){var Re=-1,Ve=se.length,Xe,Ke,dt;if(arguments.length===1){for(;++Re=Ke){Xe=dt=Ke;break}for(;++ReKe&&(Xe=Ke),dt=Ke){Xe=dt=Ke;break}for(;++ReKe&&(Xe=Ke),dt1)return dt/(St-1)},t.deviation=function(){var se=t.variance.apply(this,arguments);return se&&Math.sqrt(se)};function p(se){return{left:function(xe,Re,Ve,Xe){for(arguments.length<3&&(Ve=0),arguments.length<4&&(Xe=xe.length);Ve>>1;se(xe[Ke],Re)<0?Ve=Ke+1:Xe=Ke}return Ve},right:function(xe,Re,Ve,Xe){for(arguments.length<3&&(Ve=0),arguments.length<4&&(Xe=xe.length);Ve>>1;se(xe[Ke],Re)>0?Xe=Ke:Ve=Ke+1}return Ve}}}var m=p(h);t.bisectLeft=m.left,t.bisect=t.bisectRight=m.right,t.bisector=function(se){return p(se.length===1?function(xe,Re){return h(se(xe),Re)}:se)},t.shuffle=function(se,xe,Re){(Ve=arguments.length)<3&&(Re=se.length,Ve<2&&(xe=0));for(var Ve=Re-xe,Xe,Ke;Ve;)Ke=Math.random()*Ve--|0,Xe=se[Ve+xe],se[Ve+xe]=se[Ke+xe],se[Ke+xe]=Xe;return se},t.permute=function(se,xe){for(var Re=xe.length,Ve=new Array(Re);Re--;)Ve[Re]=se[xe[Re]];return Ve},t.pairs=function(se){for(var xe=0,Re=se.length-1,Ve=se[0],Xe=new Array(Re<0?0:Re);xe=0;)for(dt=se[xe],Re=dt.length;--Re>=0;)Ke[--Xe]=dt[Re];return Ke};var b=Math.abs;t.range=function(se,xe,Re){if(arguments.length<3&&(Re=1,arguments.length<2&&(xe=se,se=0)),(xe-se)/Re===1/0)throw new Error("infinite range");var Ve=[],Xe=g(b(Re)),Ke=-1,dt;if(se*=Xe,xe*=Xe,Re*=Xe,Re<0)for(;(dt=se+Re*++Ke)>xe;)Ve.push(dt/Xe);else for(;(dt=se+Re*++Ke)=xe.length)return Xe?Xe.call(se,St):Ve?St.sort(Ve):St;for(var Zt=-1,ar=St.length,ir=xe[Gt++],Tr,hr,sr,yr=new S,Ar;++Zt=xe.length)return at;var Gt=[],Zt=Re[St++];return at.forEach(function(ar,ir){Gt.push({key:ar,values:dt(ir,St)})}),Zt?Gt.sort(function(ar,ir){return Zt(ar.key,ir.key)}):Gt}return se.map=function(at,St){return Ke(St,at,0)},se.entries=function(at){return dt(Ke(t.map,at,0),0)},se.key=function(at){return xe.push(at),se},se.sortKeys=function(at){return Re[xe.length-1]=at,se},se.sortValues=function(at){return Ve=at,se},se.rollup=function(at){return Xe=at,se},se},t.set=function(se){var xe=new F;if(se)for(var Re=0,Ve=se.length;Re=0&&(Ve=se.slice(Re+1),se=se.slice(0,Re)),se)return arguments.length<2?this[se].on(Ve):this[se].on(Ve,xe);if(arguments.length===2){if(xe==null)for(se in this)this.hasOwnProperty(se)&&this[se].on(Ve,null);return this}};function $(se){var xe=[],Re=new S;function Ve(){for(var Xe=xe,Ke=-1,dt=Xe.length,at;++Ke=0&&(Re=se.slice(0,xe))!=="xmlns"&&(se=se.slice(xe+1)),fe.hasOwnProperty(Re)?{space:fe[Re],local:se}:se}},X.attr=function(se,xe){if(arguments.length<2){if(typeof se=="string"){var Re=this.node();return se=t.ns.qualify(se),se.local?Re.getAttributeNS(se.space,se.local):Re.getAttribute(se)}for(xe in se)this.each(de(xe,se[xe]));return this}return this.each(de(se,xe))};function de(se,xe){se=t.ns.qualify(se);function Re(){this.removeAttribute(se)}function Ve(){this.removeAttributeNS(se.space,se.local)}function Xe(){this.setAttribute(se,xe)}function Ke(){this.setAttributeNS(se.space,se.local,xe)}function dt(){var St=xe.apply(this,arguments);St==null?this.removeAttribute(se):this.setAttribute(se,St)}function at(){var St=xe.apply(this,arguments);St==null?this.removeAttributeNS(se.space,se.local):this.setAttributeNS(se.space,se.local,St)}return xe==null?se.local?Ve:Re:typeof xe=="function"?se.local?at:dt:se.local?Ke:Xe}function _e(se){return se.trim().replace(/\s+/g," ")}X.classed=function(se,xe){if(arguments.length<2){if(typeof se=="string"){var Re=this.node(),Ve=(se=Oe(se)).length,Xe=-1;if(xe=Re.classList){for(;++Xe=0;)(Ke=Re[Ve])&&(Xe&&Xe!==Ke.nextSibling&&Xe.parentNode.insertBefore(Ke,Xe),Xe=Ke);return this},X.sort=function(se){se=Qe.apply(this,arguments);for(var xe=-1,Re=this.length;++xe=xe&&(xe=Xe+1);!(St=dt[xe])&&++xe0&&(se=se.slice(0,Xe));var dt=ot.get(se);dt&&(se=dt,Ke=ht);function at(){var Zt=this[Ve];Zt&&(this.removeEventListener(se,Zt,Zt.$),delete this[Ve])}function St(){var Zt=Ke(xe,n(arguments));at.call(this),this.addEventListener(se,this[Ve]=Zt,Zt.$=Re),Zt._=xe}function Gt(){var Zt=new RegExp("^__on([^.]+)"+t.requote(se)+"$"),ar;for(var ir in this)if(ar=ir.match(Zt)){var Tr=this[ir];this.removeEventListener(ar[1],Tr,Tr.$),delete this[ir]}}return Xe?xe?St:at:xe?P:Gt}var ot=t.map({mouseenter:"mouseover",mouseleave:"mouseout"});o&&ot.forEach(function(se){"on"+se in o&&ot.remove(se)});function ut(se,xe){return function(Re){var Ve=t.event;t.event=Re,xe[0]=this.__data__;try{se.apply(this,xe)}finally{t.event=Ve}}}function ht(se,xe){var Re=ut(se,xe);return function(Ve){var Xe=this,Ke=Ve.relatedTarget;(!Ke||Ke!==Xe&&!(Ke.compareDocumentPosition(Xe)&8))&&Re.call(Xe,Ve)}}var Ht,Et=0;function Jt(se){var xe=".dragsuppress-"+ ++Et,Re="click"+xe,Ve=t.select(a(se)).on("touchmove"+xe,Q).on("dragstart"+xe,Q).on("selectstart"+xe,Q);if(Ht==null&&(Ht="onselectstart"in se?!1:N(se.style,"userSelect")),Ht){var Xe=s(se).style,Ke=Xe[Ht];Xe[Ht]="none"}return function(dt){if(Ve.on(xe,null),Ht&&(Xe[Ht]=Ke),dt){var at=function(){Ve.on(Re,null)};Ve.on(Re,function(){Q(),at()},!0),setTimeout(at,0)}}}t.mouse=function(se){return rt(se,J())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function rt(se,xe){xe.changedTouches&&(xe=xe.changedTouches[0]);var Re=se.ownerSVGElement||se;if(Re.createSVGPoint){var Ve=Re.createSVGPoint();if(Tt<0){var Xe=a(se);if(Xe.scrollX||Xe.scrollY){Re=t.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ke=Re[0][0].getScreenCTM();Tt=!(Ke.f||Ke.e),Re.remove()}}return Tt?(Ve.x=xe.pageX,Ve.y=xe.pageY):(Ve.x=xe.clientX,Ve.y=xe.clientY),Ve=Ve.matrixTransform(se.getScreenCTM().inverse()),[Ve.x,Ve.y]}var dt=se.getBoundingClientRect();return[xe.clientX-dt.left-se.clientLeft,xe.clientY-dt.top-se.clientTop]}t.touch=function(se,xe,Re){if(arguments.length<3&&(Re=xe,xe=J().changedTouches),xe){for(var Ve=0,Xe=xe.length,Ke;Ve1?ye:se<-1?-ye:Math.asin(se)}function Pt(se){return((se=Math.exp(se))-1/se)/2}function Bt(se){return((se=Math.exp(se))+1/se)/2}function It(se){return((se=Math.exp(2*se))-1)/(se+1)}var qt=Math.SQRT2,pr=2,_r=4;t.interpolateZoom=function(se,xe){var Re=se[0],Ve=se[1],Xe=se[2],Ke=xe[0],dt=xe[1],at=xe[2],St=Ke-Re,Gt=dt-Ve,Zt=St*St+Gt*Gt,ar,ir;if(Zt0&&(Jn=Jn.transition().duration(dt)),Jn.call(Or.event)}function Un(){yr&&yr.domain(sr.range().map(function(Jn){return(Jn-se.x)/se.k}).map(sr.invert)),Dr&&Dr.domain(Ar.range().map(function(Jn){return(Jn-se.y)/se.k}).map(Ar.invert))}function sa(Jn){at++||Jn({type:"zoomstart"})}function Oa(Jn){Un(),Jn({type:"zoom",scale:se.k,translate:[se.x,se.y]})}function xa(Jn){--at||(Jn({type:"zoomend"}),Re=null)}function ka(){var Jn=this,Xa=hr.of(Jn,arguments),ui=0,$i=t.select(a(Jn)).on(Gt,xs).on(Zt,yi),Lo=Sr(t.mouse(Jn)),eo=Jt(Jn);Bu.call(Jn),sa(Xa);function xs(){ui=1,Zn(t.mouse(Jn),Lo),Oa(Xa)}function yi(){$i.on(Gt,null).on(Zt,null),eo(ui),xa(Xa)}}function Na(){var Jn=this,Xa=hr.of(Jn,arguments),ui={},$i=0,Lo,eo=".zoom-"+t.event.changedTouches[0].identifier,xs="touchmove"+eo,yi="touchend"+eo,Ss=[],Ms=t.select(Jn),To=Jt(Jn);vr(),sa(Xa),Ms.on(St,null).on(ir,vr);function Lt(){var _n=t.touches(Jn);return Lo=se.k,_n.forEach(function(Mr){Mr.identifier in ui&&(ui[Mr.identifier]=Sr(Mr))}),_n}function vr(){var _n=t.event.target;t.select(_n).on(xs,xr).on(yi,tn),Ss.push(_n);for(var Mr=t.event.changedTouches,Lr=0,qn=Mr.length;Lr1){var Wn=Nn[0],Aa=Nn[1],ca=Wn[0]-Aa[0],aa=Wn[1]-Aa[1];$i=ca*ca+aa*aa}}function xr(){var _n=t.touches(Jn),Mr,Lr,qn,Nn;Bu.call(Jn);for(var Gn=0,Wn=_n.length;Gn1?1:xe,Re=Re<0?0:Re>1?1:Re,Xe=Re<=.5?Re*(1+xe):Re+xe-Re*xe,Ve=2*Re-Xe;function Ke(at){return at>360?at-=360:at<0&&(at+=360),at<60?Ve+(Xe-Ve)*at/60:at<180?Xe:at<240?Ve+(Xe-Ve)*(240-at)/60:Ve}function dt(at){return Math.round(Ke(at)*255)}return new Wt(dt(se+120),dt(se),dt(se-120))}t.hcl=Wr;function Wr(se,xe,Re){return this instanceof Wr?(this.h=+se,this.c=+xe,void(this.l=+Re)):arguments.length<2?se instanceof Wr?new Wr(se.h,se.c,se.l):se instanceof yt?Ne(se.l,se.a,se.b):Ne((se=br((se=t.rgb(se)).r,se.g,se.b)).l,se.a,se.b):new Wr(se,xe,Re)}var bt=Wr.prototype=new Gr;bt.brighter=function(se){return new Wr(this.h,this.c,Math.min(100,this.l+wt*(arguments.length?se:1)))},bt.darker=function(se){return new Wr(this.h,this.c,Math.max(0,this.l-wt*(arguments.length?se:1)))},bt.rgb=function(){return tt(this.h,this.c,this.l).rgb()};function tt(se,xe,Re){return isNaN(se)&&(se=0),isNaN(xe)&&(xe=0),new yt(Re,Math.cos(se*=Se)*xe,Math.sin(se)*xe)}t.lab=yt;function yt(se,xe,Re){return this instanceof yt?(this.l=+se,this.a=+xe,void(this.b=+Re)):arguments.length<2?se instanceof yt?new yt(se.l,se.a,se.b):se instanceof Wr?tt(se.h,se.c,se.l):br((se=Wt(se)).r,se.g,se.b):new yt(se,xe,Re)}var wt=18,Ft=.95047,er=1,cr=1.08883,lr=yt.prototype=new Gr;lr.brighter=function(se){return new yt(Math.min(100,this.l+wt*(arguments.length?se:1)),this.a,this.b)},lr.darker=function(se){return new yt(Math.max(0,this.l-wt*(arguments.length?se:1)),this.a,this.b)},lr.rgb=function(){return Ue(this.l,this.a,this.b)};function Ue(se,xe,Re){var Ve=(se+16)/116,Xe=Ve+xe/500,Ke=Ve-Re/200;return Xe=At(Xe)*Ft,Ve=At(Ve)*er,Ke=At(Ke)*cr,new Wt(Ct(3.2404542*Xe-1.5371385*Ve-.4985314*Ke),Ct(-.969266*Xe+1.8760108*Ve+.041556*Ke),Ct(.0556434*Xe-.2040259*Ve+1.0572252*Ke))}function Ne(se,xe,Re){return se>0?new Wr(Math.atan2(Re,xe)*Pe,Math.sqrt(xe*xe+Re*Re),se):new Wr(NaN,NaN,se)}function At(se){return se>.206893034?se*se*se:(se-4/29)/7.787037}function Rt(se){return se>.008856?Math.pow(se,1/3):7.787037*se+4/29}function Ct(se){return Math.round(255*(se<=.00304?12.92*se:1.055*Math.pow(se,1/2.4)-.055))}t.rgb=Wt;function Wt(se,xe,Re){return this instanceof Wt?(this.r=~~se,this.g=~~xe,void(this.b=~~Re)):arguments.length<2?se instanceof Wt?new Wt(se.r,se.g,se.b):fr(""+se,Wt,hn):new Wt(se,xe,Re)}function Qt(se){return new Wt(se>>16,se>>8&255,se&255)}function Xt(se){return Qt(se)+""}var $t=Wt.prototype=new Gr;$t.brighter=function(se){se=Math.pow(.7,arguments.length?se:1);var xe=this.r,Re=this.g,Ve=this.b,Xe=30;return!xe&&!Re&&!Ve?new Wt(Xe,Xe,Xe):(xe&&xe>4,Ve=Ve>>4|Ve,Xe=St&240,Xe=Xe>>4|Xe,Ke=St&15,Ke=Ke<<4|Ke):se.length===7&&(Ve=(St&16711680)>>16,Xe=(St&65280)>>8,Ke=St&255)),xe(Ve,Xe,Ke))}function mr(se,xe,Re){var Ve=Math.min(se/=255,xe/=255,Re/=255),Xe=Math.max(se,xe,Re),Ke=Xe-Ve,dt,at,St=(Xe+Ve)/2;return Ke?(at=St<.5?Ke/(Xe+Ve):Ke/(2-Xe-Ve),se==Xe?dt=(xe-Re)/Ke+(xe0&&St<1?0:dt),new en(dt,at,St)}function br(se,xe,Re){se=Pr(se),xe=Pr(xe),Re=Pr(Re);var Ve=Rt((.4124564*se+.3575761*xe+.1804375*Re)/Ft),Xe=Rt((.2126729*se+.7151522*xe+.072175*Re)/er),Ke=Rt((.0193339*se+.119192*xe+.9503041*Re)/cr);return yt(116*Xe-16,500*(Ve-Xe),200*(Xe-Ke))}function Pr(se){return(se/=255)<=.04045?se/12.92:Math.pow((se+.055)/1.055,2.4)}function Cr(se){var xe=parseFloat(se);return se.charAt(se.length-1)==="%"?Math.round(xe*2.55):xe}var Zr=t.map({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});Zr.forEach(function(se,xe){Zr.set(se,Qt(xe))});function jr(se){return typeof se=="function"?se:function(){return se}}t.functor=jr,t.xhr=Sn(D);function Sn(se){return function(xe,Re,Ve){return arguments.length===2&&typeof Re=="function"&&(Ve=Re,Re=null),Fn(xe,Re,se,Ve)}}function Fn(se,xe,Re,Ve){var Xe={},Ke=t.dispatch("beforesend","progress","load","error"),dt={},at=new XMLHttpRequest,St=null;self.XDomainRequest&&!("withCredentials"in at)&&/^(http(s)?:)?\/\//.test(se)&&(at=new XDomainRequest),"onload"in at?at.onload=at.onerror=Gt:at.onreadystatechange=function(){at.readyState>3&&Gt()};function Gt(){var Zt=at.status,ar;if(!Zt&&An(at)||Zt>=200&&Zt<300||Zt===304){try{ar=Re.call(Xe,at)}catch(ir){Ke.error.call(Xe,ir);return}Ke.load.call(Xe,ar)}else Ke.error.call(Xe,at)}return at.onprogress=function(Zt){var ar=t.event;t.event=Zt;try{Ke.progress.call(Xe,at)}finally{t.event=ar}},Xe.header=function(Zt,ar){return Zt=(Zt+"").toLowerCase(),arguments.length<2?dt[Zt]:(ar==null?delete dt[Zt]:dt[Zt]=ar+"",Xe)},Xe.mimeType=function(Zt){return arguments.length?(xe=Zt==null?null:Zt+"",Xe):xe},Xe.responseType=function(Zt){return arguments.length?(St=Zt,Xe):St},Xe.response=function(Zt){return Re=Zt,Xe},["get","post"].forEach(function(Zt){Xe[Zt]=function(){return Xe.send.apply(Xe,[Zt].concat(n(arguments)))}}),Xe.send=function(Zt,ar,ir){if(arguments.length===2&&typeof ar=="function"&&(ir=ar,ar=null),at.open(Zt,se,!0),xe!=null&&!("accept"in dt)&&(dt.accept=xe+",*/*"),at.setRequestHeader)for(var Tr in dt)at.setRequestHeader(Tr,dt[Tr]);return xe!=null&&at.overrideMimeType&&at.overrideMimeType(xe),St!=null&&(at.responseType=St),ir!=null&&Xe.on("error",ir).on("load",function(hr){ir(null,hr)}),Ke.beforesend.call(Xe,at),at.send(ar??null),Xe},Xe.abort=function(){return at.abort(),Xe},t.rebind(Xe,Ke,"on"),Ve==null?Xe:Xe.get(ea(Ve))}function ea(se){return se.length===1?function(xe,Re){se(xe==null?Re:null)}:se}function An(se){var xe=se.responseType;return xe&&xe!=="text"?se.response:se.responseText}t.dsv=function(se,xe){var Re=new RegExp('["'+se+` +]`),Ve=se.charCodeAt(0);function Xe(Gt,Zt,ar){arguments.length<3&&(ar=Zt,Zt=null);var ir=Fn(Gt,xe,Zt==null?Ke:dt(Zt),ar);return ir.row=function(Tr){return arguments.length?ir.response((Zt=Tr)==null?Ke:dt(Tr)):Zt},ir}function Ke(Gt){return Xe.parse(Gt.responseText)}function dt(Gt){return function(Zt){return Xe.parse(Zt.responseText,Gt)}}Xe.parse=function(Gt,Zt){var ar;return Xe.parseRows(Gt,function(ir,Tr){if(ar)return ar(ir,Tr-1);var hr=function(sr){for(var yr={},Ar=ir.length,Dr=0;Dr=hr)return ir;if(Dr)return Dr=!1,ar;var yn=sr;if(Gt.charCodeAt(yn)===34){for(var On=yn;On++24?(isFinite(xe)&&(clearTimeout(Ln),Ln=setTimeout(ba,xe)),ua=0):(ua=1,oa(ba))}t.timer.flush=function(){Da(),_i()};function Da(){for(var se=Date.now(),xe=Hn;xe;)se>=xe.t&&xe.c(se-xe.t)&&(xe.c=null),xe=xe.n;return se}function _i(){for(var se,xe=Hn,Re=1/0;xe;)xe.c?(xe.t=0;--at)sr.push(Xe[Gt[ar[at]][2]]);for(at=+Tr;at1&&it(se[Re[Ve-2]],se[Re[Ve-1]],se[Xe])<=0;)--Ve;Re[Ve++]=Xe}return Re.slice(0,Ve)}function es(se,xe){return se[0]-xe[0]||se[1]-xe[1]}t.geom.polygon=function(se){return Z(se,Qa),se};var Qa=t.geom.polygon.prototype=[];Qa.area=function(){for(var se=-1,xe=this.length,Re,Ve=this[xe-1],Xe=0;++semt)at=at.L;else if(dt=xe-dn(at,Re),dt>mt){if(!at.R){Ve=at;break}at=at.R}else{Ke>-mt?(Ve=at.P,Xe=at):dt>-mt?(Ve=at,Xe=at.N):Ve=Xe=at;break}var St=ts(se);if(Wa.insert(Ve,St),!(!Ve&&!Xe)){if(Ve===Xe){mo(Ve),Xe=ts(Ve.site),Wa.insert(St,Xe),St.edge=Xe.edge=ri(Ve.site,St.site),_o(Ve),_o(Xe);return}if(!Xe){St.edge=ri(Ve.site,St.site);return}mo(Ve),mo(Xe);var Gt=Ve.site,Zt=Gt.x,ar=Gt.y,ir=se.x-Zt,Tr=se.y-ar,hr=Xe.site,sr=hr.x-Zt,yr=hr.y-ar,Ar=2*(ir*yr-Tr*sr),Dr=ir*ir+Tr*Tr,Or=sr*sr+yr*yr,Sr={x:(yr*Dr-Tr*Or)/Ar+Zt,y:(ir*Or-sr*Dr)/Ar+ar};ul(Xe.edge,Gt,hr,Sr),St.edge=ri(Gt,se,null,Sr),Xe.edge=ri(se,hr,null,Sr),_o(Ve),_o(Xe)}}function no(se,xe){var Re=se.site,Ve=Re.x,Xe=Re.y,Ke=Xe-xe;if(!Ke)return Ve;var dt=se.P;if(!dt)return-1/0;Re=dt.site;var at=Re.x,St=Re.y,Gt=St-xe;if(!Gt)return at;var Zt=at-Ve,ar=1/Ke-1/Gt,ir=Zt/Gt;return ar?(-ir+Math.sqrt(ir*ir-2*ar*(Zt*Zt/(-2*Gt)-St+Gt/2+Xe-Ke/2)))/ar+Ve:(Ve+at)/2}function dn(se,xe){var Re=se.N;if(Re)return no(Re,xe);var Ve=se.site;return Ve.y===xe?Ve.x:1/0}function ia(se){this.site=se,this.edges=[]}ia.prototype.prepare=function(){for(var se=this.edges,xe=se.length,Re;xe--;)Re=se[xe].edge,(!Re.b||!Re.a)&&se.splice(xe,1);return se.sort(bl),se.length};function Ef(se){for(var xe=se[0][0],Re=se[1][0],Ve=se[0][1],Xe=se[1][1],Ke,dt,at,St,Gt=Ga,Zt=Gt.length,ar,ir,Tr,hr,sr,yr;Zt--;)if(ar=Gt[Zt],!(!ar||!ar.prepare()))for(Tr=ar.edges,hr=Tr.length,ir=0;irmt||b(St-dt)>mt)&&(Tr.splice(ir,0,new oi(cu(ar.site,yr,b(at-xe)mt?{x:xe,y:b(Ke-xe)mt?{x:b(dt-Xe)mt?{x:Re,y:b(Ke-Re)mt?{x:b(dt-Ve)=-He)){var ir=St*St+Gt*Gt,Tr=Zt*Zt+yr*yr,hr=(yr*ir-Gt*Tr)/ar,sr=(St*Tr-Zt*ir)/ar,yr=sr+at,Ar=Yi.pop()||new gi;Ar.arc=se,Ar.site=Xe,Ar.x=hr+dt,Ar.y=yr+Math.sqrt(hr*hr+sr*sr),Ar.cy=yr,se.circle=Ar;for(var Dr=null,Or=Vi._;Or;)if(Ar.y0)){if(sr/=Tr,Tr<0){if(sr0){if(sr>ir)return;sr>ar&&(ar=sr)}if(sr=Re-at,!(!Tr&&sr<0)){if(sr/=Tr,Tr<0){if(sr>ir)return;sr>ar&&(ar=sr)}else if(Tr>0){if(sr0)){if(sr/=hr,hr<0){if(sr0){if(sr>ir)return;sr>ar&&(ar=sr)}if(sr=Ve-St,!(!hr&&sr<0)){if(sr/=hr,hr<0){if(sr>ir)return;sr>ar&&(ar=sr)}else if(hr>0){if(sr0&&(Xe.a={x:at+ar*Tr,y:St+ar*hr}),ir<1&&(Xe.b={x:at+ir*Tr,y:St+ir*hr}),Xe}}}}}}function ao(se){for(var xe=qi,Re=Uo(se[0][0],se[0][1],se[1][0],se[1][1]),Ve=xe.length,Xe;Ve--;)Xe=xe[Ve],(!$n(Xe,se)||!Re(Xe)||b(Xe.a.x-Xe.b.x)=Ke)return;if(Zt>ir){if(!Ve)Ve={x:hr,y:dt};else if(Ve.y>=at)return;Re={x:hr,y:at}}else{if(!Ve)Ve={x:hr,y:at};else if(Ve.y1)if(Zt>ir){if(!Ve)Ve={x:(dt-Ar)/yr,y:dt};else if(Ve.y>=at)return;Re={x:(at-Ar)/yr,y:at}}else{if(!Ve)Ve={x:(at-Ar)/yr,y:at};else if(Ve.y=Ke)return;Re={x:Ke,y:yr*Ke+Ar}}else{if(!Ve)Ve={x:Ke,y:yr*Ke+Ar};else if(Ve.x=Zt&&Ar.x<=ir&&Ar.y>=ar&&Ar.y<=Tr?[[Zt,Tr],[ir,Tr],[ir,ar],[Zt,ar]]:[];Dr.point=St[sr]}),Gt}function at(St){return St.map(function(Gt,Zt){return{x:Math.round(Ve(Gt,Zt)/mt)*mt,y:Math.round(Xe(Gt,Zt)/mt)*mt,i:Zt}})}return dt.links=function(St){return Ho(at(St)).edges.filter(function(Gt){return Gt.l&&Gt.r}).map(function(Gt){return{source:St[Gt.l.i],target:St[Gt.r.i]}})},dt.triangles=function(St){var Gt=[];return Ho(at(St)).cells.forEach(function(Zt,ar){for(var ir=Zt.site,Tr=Zt.edges.sort(bl),hr=-1,sr=Tr.length,yr,Ar=Tr[sr-1].edge,Dr=Ar.l===ir?Ar.r:Ar.l;++hrOr&&(Or=Zt.x),Zt.y>Sr&&(Sr=Zt.y),Tr.push(Zt.x),hr.push(Zt.y);else for(sr=0;srOr&&(Or=yn),On>Sr&&(Sr=On),Tr.push(yn),hr.push(On)}var Zn=Or-Ar,Mn=Sr-Dr;Zn>Mn?Sr=Dr+Zn:Or=Ar+Mn;function Un(xa,ka,Na,Oi,zi,Jn,Xa,ui){if(!(isNaN(Na)||isNaN(Oi)))if(xa.leaf){var $i=xa.x,Lo=xa.y;if($i!=null)if(b($i-Na)+b(Lo-Oi)<.01)sa(xa,ka,Na,Oi,zi,Jn,Xa,ui);else{var eo=xa.point;xa.x=xa.y=xa.point=null,sa(xa,eo,$i,Lo,zi,Jn,Xa,ui),sa(xa,ka,Na,Oi,zi,Jn,Xa,ui)}else xa.x=Na,xa.y=Oi,xa.point=ka}else sa(xa,ka,Na,Oi,zi,Jn,Xa,ui)}function sa(xa,ka,Na,Oi,zi,Jn,Xa,ui){var $i=(zi+Xa)*.5,Lo=(Jn+ui)*.5,eo=Na>=$i,xs=Oi>=Lo,yi=xs<<1|eo;xa.leaf=!1,xa=xa.nodes[yi]||(xa.nodes[yi]=Zd()),eo?zi=$i:Xa=$i,xs?Jn=Lo:ui=Lo,Un(xa,ka,Na,Oi,zi,Jn,Xa,ui)}var Oa=Zd();if(Oa.add=function(xa){Un(Oa,xa,+ar(xa,++sr),+ir(xa,sr),Ar,Dr,Or,Sr)},Oa.visit=function(xa){Zi(xa,Oa,Ar,Dr,Or,Sr)},Oa.find=function(xa){return bd(Oa,xa[0],xa[1],Ar,Dr,Or,Sr)},sr=-1,xe==null){for(;++srKe||ir>dt||Tr=yn,Mn=Re>=On,Un=Mn<<1|Zn,sa=Un+4;UnRe&&(Ke=xe.slice(Re,Ke),at[dt]?at[dt]+=Ke:at[++dt]=Ke),(Ve=Ve[0])===(Xe=Xe[0])?at[dt]?at[dt]+=Xe:at[++dt]=Xe:(at[++dt]=null,St.push({i:dt,x:ys(Ve,Xe)})),Re=ms.lastIndex;return Re=0&&!(Ve=t.interpolators[Re](se,xe)););return Ve}t.interpolators=[function(se,xe){var Re=typeof xe;return(Re==="string"?Zr.has(xe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(xe)?_d:Kd:xe instanceof Gr?_d:Array.isArray(xe)?Vo:Re==="object"&&isNaN(xe)?Ys:ys)(se,xe)}],t.interpolateArray=Vo;function Vo(se,xe){var Re=[],Ve=[],Xe=se.length,Ke=xe.length,dt=Math.min(se.length,xe.length),at;for(at=0;at=0?se.slice(0,xe):se,Ve=xe>=0?se.slice(xe+1):"in";return Re=Jd.get(Re)||Fo,Ve=fl.get(Ve)||D,Ku(Ve(Re.apply(null,r.call(arguments,1))))};function Ku(se){return function(xe){return xe<=0?0:xe>=1?1:se(xe)}}function Ju(se){return function(xe){return 1-se(1-xe)}}function Qd(se){return function(xe){return .5*(xe<.5?se(2*xe):2-se(2-2*xe))}}function Zl(se){return se*se}function $h(se){return se*se*se}function du(se){if(se<=0)return 0;if(se>=1)return 1;var xe=se*se,Re=xe*se;return 4*(se<.5?Re:3*(se-xe)+Re-.75)}function io(se){return function(xe){return Math.pow(xe,se)}}function _p(se){return 1-Math.cos(se*ye)}function Rf(se){return Math.pow(2,10*(se-1))}function Ll(se){return 1-Math.sqrt(1-se*se)}function qc(se,xe){var Re;return arguments.length<2&&(xe=.45),arguments.length?Re=xe/je*Math.asin(1/se):(se=1,Re=xe/4),function(Ve){return 1+se*Math.pow(2,-10*Ve)*Math.sin((Ve-Re)*je/xe)}}function Wh(se){return se||(se=1.70158),function(xe){return xe*xe*((se+1)*xe-se)}}function _0(se){return se<1/2.75?7.5625*se*se:se<2/2.75?7.5625*(se-=1.5/2.75)*se+.75:se<2.5/2.75?7.5625*(se-=2.25/2.75)*se+.9375:7.5625*(se-=2.625/2.75)*se+.984375}t.interpolateHcl=vh;function vh(se,xe){se=t.hcl(se),xe=t.hcl(xe);var Re=se.h,Ve=se.c,Xe=se.l,Ke=xe.h-Re,dt=xe.c-Ve,at=xe.l-Xe;return isNaN(dt)&&(dt=0,Ve=isNaN(Ve)?xe.c:Ve),isNaN(Ke)?(Ke=0,Re=isNaN(Re)?xe.h:Re):Ke>180?Ke-=360:Ke<-180&&(Ke+=360),function(St){return tt(Re+Ke*St,Ve+dt*St,Xe+at*St)+""}}t.interpolateHsl=wp;function wp(se,xe){se=t.hsl(se),xe=t.hsl(xe);var Re=se.h,Ve=se.s,Xe=se.l,Ke=xe.h-Re,dt=xe.s-Ve,at=xe.l-Xe;return isNaN(dt)&&(dt=0,Ve=isNaN(Ve)?xe.s:Ve),isNaN(Ke)?(Ke=0,Re=isNaN(Re)?xe.h:Re):Ke>180?Ke-=360:Ke<-180&&(Ke+=360),function(St){return hn(Re+Ke*St,Ve+dt*St,Xe+at*St)+""}}t.interpolateLab=Tp;function Tp(se,xe){se=t.lab(se),xe=t.lab(xe);var Re=se.l,Ve=se.a,Xe=se.b,Ke=xe.l-Re,dt=xe.a-Ve,at=xe.b-Xe;return function(St){return Ue(Re+Ke*St,Ve+dt*St,Xe+at*St)+""}}t.interpolateRound=Xh;function Xh(se,xe){return xe-=se,function(Re){return Math.round(se+xe*Re)}}t.transform=function(se){var xe=o.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(Re){if(Re!=null){xe.setAttribute("transform",Re);var Ve=xe.transform.baseVal.consolidate()}return new ph(Ve?Ve.matrix:w0)})(se)};function ph(se){var xe=[se.a,se.b],Re=[se.c,se.d],Ve=ev(xe),Xe=Nv(xe,Re),Ke=ev(tv(Re,xe,-Xe))||0;xe[0]*Re[1]180?xe+=360:xe-se>180&&(se+=360),Ve.push({i:Re.push(gc(Re)+"rotate(",null,")")-2,x:ys(se,xe)})):xe&&Re.push(gc(Re)+"rotate("+xe+")")}function Zh(se,xe,Re,Ve){se!==xe?Ve.push({i:Re.push(gc(Re)+"skewX(",null,")")-2,x:ys(se,xe)}):xe&&Re.push(gc(Re)+"skewX("+xe+")")}function Pl(se,xe,Re,Ve){if(se[0]!==xe[0]||se[1]!==xe[1]){var Xe=Re.push(gc(Re)+"scale(",null,",",null,")");Ve.push({i:Xe-4,x:ys(se[0],xe[0])},{i:Xe-2,x:ys(se[1],xe[1])})}else(xe[0]!==1||xe[1]!==1)&&Re.push(gc(Re)+"scale("+xe+")")}function Uc(se,xe){var Re=[],Ve=[];return se=t.transform(se),xe=t.transform(xe),Ap(se.translate,xe.translate,Re,Ve),jc(se.rotate,xe.rotate,Re,Ve),Zh(se.skew,xe.skew,Re,Ve),Pl(se.scale,xe.scale,Re,Ve),se=xe=null,function(Xe){for(var Ke=-1,dt=Ve.length,at;++Ke0?Ke=Sr:(Re.c=null,Re.t=NaN,Re=null,xe.end({type:"end",alpha:Ke=0})):Sr>0&&(xe.start({type:"start",alpha:Ke=Sr}),Re=Ta(se.tick)),se):Ke},se.start=function(){var Sr,yn=Tr.length,On=hr.length,Zn=Ve[0],Mn=Ve[1],Un,sa;for(Sr=0;Sr=0;)Ke.push(Zt=Gt[St]),Zt.parent=at,Zt.depth=at.depth+1;Re&&(at.value=0),at.children=Gt}else Re&&(at.value=+Re.call(Ve,at,at.depth)||0),delete at.children;return hl(Xe,function(ar){var ir,Tr;se&&(ir=ar.children)&&ir.sort(se),Re&&(Tr=ar.parent)&&(Tr.value+=ar.value)}),dt}return Ve.sort=function(Xe){return arguments.length?(se=Xe,Ve):se},Ve.children=function(Xe){return arguments.length?(xe=Xe,Ve):xe},Ve.value=function(Xe){return arguments.length?(Re=Xe,Ve):Re},Ve.revalue=function(Xe){return Re&&(Yo(Xe,function(Ke){Ke.children&&(Ke.value=0)}),hl(Xe,function(Ke){var dt;Ke.children||(Ke.value=+Re.call(Ve,Ke,Ke.depth)||0),(dt=Ke.parent)&&(dt.value+=Ke.value)})),Xe},Ve};function _l(se,xe){return t.rebind(se,xe,"sort","children","value"),se.nodes=se,se.links=Sp,se}function Yo(se,xe){for(var Re=[se];(se=Re.pop())!=null;)if(xe(se),(Xe=se.children)&&(Ve=Xe.length))for(var Ve,Xe;--Ve>=0;)Re.push(Xe[Ve])}function hl(se,xe){for(var Re=[se],Ve=[];(se=Re.pop())!=null;)if(Ve.push(se),(dt=se.children)&&(Ke=dt.length))for(var Xe=-1,Ke,dt;++XeXe&&(Xe=at),Ve.push(at)}for(dt=0;dtVe&&(Re=xe,Ve=Xe);return Re}function Hc(se){return se.reduce(Gc,0)}function Gc(se,xe){return se+xe[1]}t.layout.histogram=function(){var se=!0,xe=Number,Re=xo,Ve=Td;function Xe(Ke,ir){for(var at=[],St=Ke.map(xe,this),Gt=Re.call(this,St,ir),Zt=Ve.call(this,Gt,St,ir),ar,ir=-1,Tr=St.length,hr=Zt.length-1,sr=se?1:1/Tr,yr;++ir0)for(ir=-1;++ir=Gt[0]&&yr<=Gt[1]&&(ar=at[t.bisect(Zt,yr,1,hr)-1],ar.y+=sr,ar.push(Ke[ir]));return at}return Xe.value=function(Ke){return arguments.length?(xe=Ke,Xe):xe},Xe.range=function(Ke){return arguments.length?(Re=jr(Ke),Xe):Re},Xe.bins=function(Ke){return arguments.length?(Ve=typeof Ke=="number"?function(dt){return Qh(dt,Ke)}:jr(Ke),Xe):Ve},Xe.frequency=function(Ke){return arguments.length?(se=!!Ke,Xe):se},Xe};function Td(se,xe){return Qh(se,Math.ceil(Math.log(xe.length)/Math.LN2+1))}function Qh(se,xe){for(var Re=-1,Ve=+se[0],Xe=(se[1]-Ve)/xe,Ke=[];++Re<=xe;)Ke[Re]=Xe*Re+Ve;return Ke}function xo(se){return[t.min(se),t.max(se)]}t.layout.pack=function(){var se=t.layout.hierarchy().sort(Ep),xe=0,Re=[1,1],Ve;function Xe(Ke,dt){var at=se.call(this,Ke,dt),St=at[0],Gt=Re[0],Zt=Re[1],ar=Ve==null?Math.sqrt:typeof Ve=="function"?Ve:function(){return Ve};if(St.x=St.y=0,hl(St,function(Tr){Tr.r=+ar(Tr.value)}),hl(St,Ds),xe){var ir=xe*(Ve?1:Math.max(2*St.r/Gt,2*St.r/Zt))/2;hl(St,function(Tr){Tr.r+=ir}),hl(St,Ds),hl(St,function(Tr){Tr.r-=ir})}return Is(St,Gt/2,Zt/2,Ve?1:1/Math.max(2*St.r/Gt,2*St.r/Zt)),at}return Xe.size=function(Ke){return arguments.length?(Re=Ke,Xe):Re},Xe.radius=function(Ke){return arguments.length?(Ve=Ke==null||typeof Ke=="function"?Ke:+Ke,Xe):Ve},Xe.padding=function(Ke){return arguments.length?(xe=+Ke,Xe):xe},_l(Xe,se)};function Ep(se,xe){return se.value-xe.value}function xc(se,xe){var Re=se._pack_next;se._pack_next=xe,xe._pack_prev=se,xe._pack_next=Re,Re._pack_prev=xe}function Vc(se,xe){se._pack_next=xe,xe._pack_prev=se}function Gv(se,xe){var Re=xe.x-se.x,Ve=xe.y-se.y,Xe=se.r+xe.r;return .999*Xe*Xe>Re*Re+Ve*Ve}function Ds(se){if(!(xe=se.children)||!(ir=xe.length))return;var xe,Re=1/0,Ve=-1/0,Xe=1/0,Ke=-1/0,dt,at,St,Gt,Zt,ar,ir;function Tr(Sr){Re=Math.min(Sr.x-Sr.r,Re),Ve=Math.max(Sr.x+Sr.r,Ve),Xe=Math.min(Sr.y-Sr.r,Xe),Ke=Math.max(Sr.y+Sr.r,Ke)}if(xe.forEach(yh),dt=xe[0],dt.x=-dt.r,dt.y=0,Tr(dt),ir>1&&(at=xe[1],at.x=at.r,at.y=0,Tr(at),ir>2))for(St=xe[2],Yc(dt,at,St),Tr(St),xc(dt,St),dt._pack_prev=St,xc(St,at),at=dt._pack_next,Gt=3;Gtyr.x&&(yr=yn),yn.depth>Ar.depth&&(Ar=yn)});var Dr=xe(sr,yr)/2-sr.x,Or=Re[0]/(yr.x+xe(yr,sr)/2+Dr),Sr=Re[1]/(Ar.depth||1);Yo(Tr,function(yn){yn.x=(yn.x+Dr)*Or,yn.y=yn.depth*Sr})}return ir}function Ke(Zt){for(var ar={A:null,children:[Zt]},ir=[ar],Tr;(Tr=ir.pop())!=null;)for(var hr=Tr.children,sr,yr=0,Ar=hr.length;yr0&&(bc(No(sr,Zt,ir),Zt,yn),Ar+=yn,Dr+=yn),Or+=sr.m,Ar+=Tr.m,Sr+=yr.m,Dr+=hr.m;sr&&!Df(hr)&&(hr.t=sr,hr.m+=Or-Dr),Tr&&!Du(yr)&&(yr.t=Tr,yr.m+=Ar-Sr,ir=Zt)}return ir}function Gt(Zt){Zt.x*=Re[0],Zt.y=Zt.depth*Re[1]}return Xe.separation=function(Zt){return arguments.length?(xe=Zt,Xe):xe},Xe.size=function(Zt){return arguments.length?(Ve=(Re=Zt)==null?Gt:null,Xe):Ve?null:Re},Xe.nodeSize=function(Zt){return arguments.length?(Ve=(Re=Zt)==null?null:Gt,Xe):Ve?Re:null},_l(Xe,se)};function Tl(se,xe){return se.parent==xe.parent?1:2}function Du(se){var xe=se.children;return xe.length?xe[0]:se.t}function Df(se){var xe=se.children,Re;return(Re=xe.length)?xe[Re-1]:se.t}function bc(se,xe,Re){var Ve=Re/(xe.i-se.i);xe.c-=Ve,xe.s+=Re,se.c+=Ve,xe.z+=Re,xe.m+=Re}function _c(se){for(var xe=0,Re=0,Ve=se.children,Xe=Ve.length,Ke;--Xe>=0;)Ke=Ve[Xe],Ke.z+=xe,Ke.m+=xe,xe+=Ke.s+(Re+=Ke.c)}function No(se,xe,Re){return se.a.parent===xe.parent?se.a:Re}t.layout.cluster=function(){var se=t.layout.hierarchy().sort(null).value(null),xe=Tl,Re=[1,1],Ve=!1;function Xe(Ke,dt){var at=se.call(this,Ke,dt),St=at[0],Gt,Zt=0;hl(St,function(sr){var yr=sr.children;yr&&yr.length?(sr.x=vu(yr),sr.y=Ql(yr)):(sr.x=Gt?Zt+=xe(sr,Gt):0,sr.y=0,Gt=sr)});var ar=ed(St),ir=td(St),Tr=ar.x-xe(ar,ir)/2,hr=ir.x+xe(ir,ar)/2;return hl(St,Ve?function(sr){sr.x=(sr.x-St.x)*Re[0],sr.y=(St.y-sr.y)*Re[1]}:function(sr){sr.x=(sr.x-Tr)/(hr-Tr)*Re[0],sr.y=(1-(St.y?sr.y/St.y:1))*Re[1]}),at}return Xe.separation=function(Ke){return arguments.length?(xe=Ke,Xe):xe},Xe.size=function(Ke){return arguments.length?(Ve=(Re=Ke)==null,Xe):Ve?null:Re},Xe.nodeSize=function(Ke){return arguments.length?(Ve=(Re=Ke)!=null,Xe):Ve?Re:null},_l(Xe,se)};function Ql(se){return 1+t.max(se,function(xe){return xe.y})}function vu(se){return se.reduce(function(xe,Re){return xe+Re.x},0)/se.length}function ed(se){var xe=se.children;return xe&&xe.length?ed(xe[0]):se}function td(se){var xe=se.children,Re;return xe&&(Re=xe.length)?td(xe[Re-1]):se}t.layout.treemap=function(){var se=t.layout.hierarchy(),xe=Math.round,Re=[1,1],Ve=null,Xe=eu,Ke=!1,dt,at="squarify",St=.5*(1+Math.sqrt(5));function Gt(sr,yr){for(var Ar=-1,Dr=sr.length,Or,Sr;++Ar0;)Dr.push(Sr=Or[Mn-1]),Dr.area+=Sr.area,at!=="squarify"||(On=ir(Dr,Zn))<=yn?(Or.pop(),yn=On):(Dr.area-=Dr.pop().area,Tr(Dr,Zn,Ar,!1),Zn=Math.min(Ar.dx,Ar.dy),Dr.length=Dr.area=0,yn=1/0);Dr.length&&(Tr(Dr,Zn,Ar,!0),Dr.length=Dr.area=0),yr.forEach(Zt)}}function ar(sr){var yr=sr.children;if(yr&&yr.length){var Ar=Xe(sr),Dr=yr.slice(),Or,Sr=[];for(Gt(Dr,Ar.dx*Ar.dy/sr.value),Sr.area=0;Or=Dr.pop();)Sr.push(Or),Sr.area+=Or.area,Or.z!=null&&(Tr(Sr,Or.z?Ar.dx:Ar.dy,Ar,!Dr.length),Sr.length=Sr.area=0);yr.forEach(ar)}}function ir(sr,yr){for(var Ar=sr.area,Dr,Or=0,Sr=1/0,yn=-1,On=sr.length;++ynOr&&(Or=Dr));return Ar*=Ar,yr*=yr,Ar?Math.max(yr*Or*St/Ar,Ar/(yr*Sr*St)):1/0}function Tr(sr,yr,Ar,Dr){var Or=-1,Sr=sr.length,yn=Ar.x,On=Ar.y,Zn=yr?xe(sr.area/yr):0,Mn;if(yr==Ar.dx){for((Dr||Zn>Ar.dy)&&(Zn=Ar.dy);++OrAr.dx)&&(Zn=Ar.dx);++Or1);return se+xe*Ve*Math.sqrt(-2*Math.log(Ke)/Ke)}},logNormal:function(){var se=t.random.normal.apply(t,arguments);return function(){return Math.exp(se())}},bates:function(se){var xe=t.random.irwinHall(se);return function(){return xe()/se}},irwinHall:function(se){return function(){for(var xe=0,Re=0;Re2?ov:If,Gt=Ve?rv:Bv;return Xe=St(se,xe,Gt,Re),Ke=St(xe,se,Gt,Xl),at}function at(St){return Xe(St)}return at.invert=function(St){return Ke(St)},at.domain=function(St){return arguments.length?(se=St.map(Number),dt()):se},at.range=function(St){return arguments.length?(xe=St,dt()):xe},at.rangeRound=function(St){return at.range(St).interpolate(Xh)},at.clamp=function(St){return arguments.length?(Ve=St,dt()):Ve},at.interpolate=function(St){return arguments.length?(Re=St,dt()):Re},at.ticks=function(St){return Iu(se,St)},at.tickFormat=function(St,Gt){return d3_scale_linearTickFormat(se,St,Gt)},at.nice=function(St){return Ji(se,St),dt()},at.copy=function(){return Wc(se,xe,Re,Ve)},dt()}function Ws(se,xe){return t.rebind(se,xe,"range","rangeRound","interpolate","clamp")}function Ji(se,xe){return Co(se,wc(Gi(se,xe)[2])),Co(se,wc(Gi(se,xe)[2])),se}function Gi(se,xe){xe==null&&(xe=10);var Re=tf(se),Ve=Re[1]-Re[0],Xe=Math.pow(10,Math.floor(Math.log(Ve/xe)/Math.LN10)),Ke=xe/Ve*Xe;return Ke<=.15?Xe*=10:Ke<=.35?Xe*=5:Ke<=.75&&(Xe*=2),Re[0]=Math.ceil(Re[0]/Xe)*Xe,Re[1]=Math.floor(Re[1]/Xe)*Xe+Xe*.5,Re[2]=Xe,Re}function Iu(se,xe){return t.range.apply(t,Gi(se,xe))}t.scale.log=function(){return Dl(t.scale.linear().domain([0,1]),10,!0,[1,10])};function Dl(se,xe,Re,Ve){function Xe(at){return(Re?Math.log(at<0?0:at):-Math.log(at>0?0:-at))/Math.log(xe)}function Ke(at){return Re?Math.pow(xe,at):-Math.pow(xe,-at)}function dt(at){return se(Xe(at))}return dt.invert=function(at){return Ke(se.invert(at))},dt.domain=function(at){return arguments.length?(Re=at[0]>=0,se.domain((Ve=at.map(Number)).map(Xe)),dt):Ve},dt.base=function(at){return arguments.length?(xe=+at,se.domain(Ve.map(Xe)),dt):xe},dt.nice=function(){var at=Co(Ve.map(Xe),Re?Math:Ad);return se.domain(at),Ve=at.map(Ke),dt},dt.ticks=function(){var at=tf(Ve),St=[],Gt=at[0],Zt=at[1],ar=Math.floor(Xe(Gt)),ir=Math.ceil(Xe(Zt)),Tr=xe%1?2:xe;if(isFinite(ir-ar)){if(Re){for(;ar0;hr--)St.push(Ke(ar)*hr);for(ar=0;St[ar]Zt;ir--);St=St.slice(ar,ir)}return St},dt.copy=function(){return Dl(se.copy(),xe,Re,Ve)},Ws(dt,se)}var Ad={floor:function(se){return-Math.ceil(-se)},ceil:function(se){return-Math.floor(-se)}};t.scale.pow=function(){return rf(t.scale.linear(),1,[0,1])};function rf(se,xe,Re){var Ve=Xc(xe),Xe=Xc(1/xe);function Ke(dt){return se(Ve(dt))}return Ke.invert=function(dt){return Xe(se.invert(dt))},Ke.domain=function(dt){return arguments.length?(se.domain((Re=dt.map(Number)).map(Ve)),Ke):Re},Ke.ticks=function(dt){return Iu(Re,dt)},Ke.tickFormat=function(dt,at){return d3_scale_linearTickFormat(Re,dt,at)},Ke.nice=function(dt){return Ke.domain(Ji(Re,dt))},Ke.exponent=function(dt){return arguments.length?(Ve=Xc(xe=dt),Xe=Xc(1/xe),se.domain(Re.map(Ve)),Ke):xe},Ke.copy=function(){return rf(se.copy(),xe,Re)},Ws(Ke,se)}function Xc(se){return function(xe){return xe<0?-Math.pow(-xe,se):Math.pow(xe,se)}}t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return Of([],{t:"range",a:[[]]})};function Of(se,xe){var Re,Ve,Xe;function Ke(at){return Ve[((Re.get(at)||(xe.t==="range"?Re.set(at,se.push(at)):NaN))-1)%Ve.length]}function dt(at,St){return t.range(se.length).map(function(Gt){return at+St*Gt})}return Ke.domain=function(at){if(!arguments.length)return se;se=[],Re=new S;for(var St=-1,Gt=at.length,Zt;++St0?Re[Ke-1]:se[0],Keir?0:1;if(Zt=pe)return St(Zt,hr)+(Gt?St(Gt,1-hr):"")+"Z";var sr,yr,Ar,Dr,Or=0,Sr=0,yn,On,Zn,Mn,Un,sa,Oa,xa,ka=[];if((Dr=(+dt.apply(this,arguments)||0)/2)&&(Ar=Ve===Ou?Math.sqrt(Gt*Gt+Zt*Zt):+Ve.apply(this,arguments),hr||(Sr*=-1),Zt&&(Sr=vt(Ar/Zt*Math.sin(Dr))),Gt&&(Or=vt(Ar/Gt*Math.sin(Dr)))),Zt){yn=Zt*Math.cos(ar+Sr),On=Zt*Math.sin(ar+Sr),Zn=Zt*Math.cos(ir-Sr),Mn=Zt*Math.sin(ir-Sr);var Na=Math.abs(ir-ar-2*Sr)<=Ie?0:1;if(Sr&&Sc(yn,On,Zn,Mn)===hr^Na){var Oi=(ar+ir)/2;yn=Zt*Math.cos(Oi),On=Zt*Math.sin(Oi),Zn=Mn=null}}else yn=On=0;if(Gt){Un=Gt*Math.cos(ir-Or),sa=Gt*Math.sin(ir-Or),Oa=Gt*Math.cos(ar+Or),xa=Gt*Math.sin(ar+Or);var zi=Math.abs(ar-ir+2*Or)<=Ie?0:1;if(Or&&Sc(Un,sa,Oa,xa)===1-hr^zi){var Jn=(ar+ir)/2;Un=Gt*Math.cos(Jn),sa=Gt*Math.sin(Jn),Oa=xa=null}}else Un=sa=0;if(Tr>mt&&(sr=Math.min(Math.abs(Zt-Gt)/2,+Re.apply(this,arguments)))>.001){yr=Gt0?0:1}function nf(se,xe,Re,Ve,Xe){var Ke=se[0]-xe[0],dt=se[1]-xe[1],at=(Xe?Ve:-Ve)/Math.sqrt(Ke*Ke+dt*dt),St=at*dt,Gt=-at*Ke,Zt=se[0]+St,ar=se[1]+Gt,ir=xe[0]+St,Tr=xe[1]+Gt,hr=(Zt+ir)/2,sr=(ar+Tr)/2,yr=ir-Zt,Ar=Tr-ar,Dr=yr*yr+Ar*Ar,Or=Re-Ve,Sr=Zt*Tr-ir*ar,yn=(Ar<0?-1:1)*Math.sqrt(Math.max(0,Or*Or*Dr-Sr*Sr)),On=(Sr*Ar-yr*yn)/Dr,Zn=(-Sr*yr-Ar*yn)/Dr,Mn=(Sr*Ar+yr*yn)/Dr,Un=(-Sr*yr+Ar*yn)/Dr,sa=On-hr,Oa=Zn-sr,xa=Mn-hr,ka=Un-sr;return sa*sa+Oa*Oa>xa*xa+ka*ka&&(On=Mn,Zn=Un),[[On-St,Zn-Gt],[On*Re/Or,Zn*Re/Or]]}function sv(){return!0}function lv(se){var xe=ci,Re=Bi,Ve=sv,Xe=wo,Ke=Xe.key,dt=.7;function at(St){var Gt=[],Zt=[],ar=-1,ir=St.length,Tr,hr=jr(xe),sr=jr(Re);function yr(){Gt.push("M",Xe(se(Zt),dt))}for(;++ar1?se.join("L"):se+"Z"}function Md(se){return se.join("L")+"Z"}function af(se){for(var xe=0,Re=se.length,Ve=se[0],Xe=[Ve[0],",",Ve[1]];++xe1&&Xe.push("H",Ve[0]),Xe.join("")}function zu(se){for(var xe=0,Re=se.length,Ve=se[0],Xe=[Ve[0],",",Ve[1]];++xe1){at=xe[1],Ke=se[St],St++,Ve+="C"+(Xe[0]+dt[0])+","+(Xe[1]+dt[1])+","+(Ke[0]-at[0])+","+(Ke[1]-at[1])+","+Ke[0]+","+Ke[1];for(var Gt=2;Gt9&&(Ke=Re*3/Math.sqrt(Ke),dt[at]=Ke*Ve,dt[at+1]=Ke*Xe));for(at=-1;++at<=St;)Ke=(se[Math.min(St,at+1)][0]-se[Math.max(0,at-1)][0])/(6*(1+dt[at]*dt[at])),xe.push([Ke||0,dt[at]*Ke||0]);return xe}function xh(se){return se.length<3?wo(se):se[0]+Nu(se,tu(se))}t.svg.line.radial=function(){var se=lv(bh);return se.radius=se.x,delete se.x,se.angle=se.y,delete se.y,se};function bh(se){for(var xe,Re=-1,Ve=se.length,Xe,Ke;++ReIe)+",1 "+ar}function Gt(Zt,ar,ir,Tr){return"Q 0,0 "+Tr}return Ke.radius=function(Zt){return arguments.length?(Re=jr(Zt),Ke):Re},Ke.source=function(Zt){return arguments.length?(se=jr(Zt),Ke):se},Ke.target=function(Zt){return arguments.length?(xe=jr(Zt),Ke):xe},Ke.startAngle=function(Zt){return arguments.length?(Ve=jr(Zt),Ke):Ve},Ke.endAngle=function(Zt){return arguments.length?(Xe=jr(Zt),Ke):Xe},Ke};function id(se){return se.radius}t.svg.diagonal=function(){var se=sf,xe=qf,Re=lf;function Ve(Xe,Ke){var dt=se.call(this,Xe,Ke),at=xe.call(this,Xe,Ke),St=(dt.y+at.y)/2,Gt=[dt,{x:dt.x,y:St},{x:at.x,y:St},at];return Gt=Gt.map(Re),"M"+Gt[0]+"C"+Gt[1]+" "+Gt[2]+" "+Gt[3]}return Ve.source=function(Xe){return arguments.length?(se=jr(Xe),Ve):se},Ve.target=function(Xe){return arguments.length?(xe=jr(Xe),Ve):xe},Ve.projection=function(Xe){return arguments.length?(Re=Xe,Ve):Re},Ve};function lf(se){return[se.x,se.y]}t.svg.diagonal.radial=function(){var se=t.svg.diagonal(),xe=lf,Re=se.projection;return se.projection=function(Ve){return arguments.length?Re(_h(xe=Ve)):xe},se};function _h(se){return function(){var xe=se.apply(this,arguments),Re=xe[0],Ve=xe[1]-ye;return[Re*Math.cos(Ve),Re*Math.sin(Ve)]}}t.svg.symbol=function(){var se=jf,xe=Vv;function Re(Ve,Xe){return(Uf.get(se.call(this,Ve,Xe))||Ed)(xe.call(this,Ve,Xe))}return Re.type=function(Ve){return arguments.length?(se=jr(Ve),Re):se},Re.size=function(Ve){return arguments.length?(xe=jr(Ve),Re):xe},Re};function Vv(){return 64}function jf(){return"circle"}function Ed(se){var xe=Math.sqrt(se/Ie);return"M0,"+xe+"A"+xe+","+xe+" 0 1,1 0,"+-xe+"A"+xe+","+xe+" 0 1,1 0,"+xe+"Z"}var Uf=t.map({circle:Ed,cross:function(se){var xe=Math.sqrt(se/5)/2;return"M"+-3*xe+","+-xe+"H"+-xe+"V"+-3*xe+"H"+xe+"V"+-xe+"H"+3*xe+"V"+xe+"H"+xe+"V"+3*xe+"H"+-xe+"V"+xe+"H"+-3*xe+"Z"},diamond:function(se){var xe=Math.sqrt(se/(2*kd)),Re=xe*kd;return"M0,"+-xe+"L"+Re+",0 0,"+xe+" "+-Re+",0Z"},square:function(se){var xe=Math.sqrt(se)/2;return"M"+-xe+","+-xe+"L"+xe+","+-xe+" "+xe+","+xe+" "+-xe+","+xe+"Z"},"triangle-down":function(se){var xe=Math.sqrt(se/wh),Re=xe*wh/2;return"M0,"+Re+"L"+xe+","+-Re+" "+-xe+","+-Re+"Z"},"triangle-up":function(se){var xe=Math.sqrt(se/wh),Re=xe*wh/2;return"M0,"+-Re+"L"+xe+","+Re+" "+-xe+","+Re+"Z"}});t.svg.symbolTypes=Uf.keys();var wh=Math.sqrt(3),kd=Math.tan(30*Se);X.transition=function(se){for(var xe=Ml||++eh,Re=ff(se),Ve=[],Xe,Ke,dt=uf||{time:Date.now(),ease:du,delay:0,duration:250},at=-1,St=this.length;++at0;)ar[--Dr].call(se,Ar);if(yr>=1)return dt.event&&dt.event.end.call(se,se.__data__,xe),--Ke.count?delete Ke[Ve]:delete se[Re],1}dt||(at=Xe.time,St=Ta(ir,0,at),dt=Ke[Ve]={tween:new S,time:at,timer:St,delay:Xe.delay,duration:Xe.duration,ease:Xe.ease,index:xe},Xe=null,++Ke.count)}t.svg.axis=function(){var se=t.scale.linear(),xe=Ro,Re=6,Ve=6,Xe=3,Ke=[10],dt=null,at;function St(Gt){Gt.each(function(){var Zt=t.select(this),ar=this.__chart__||se,ir=this.__chart__=se.copy(),Tr=dt??(ir.ticks?ir.ticks.apply(ir,Ke):ir.domain()),hr=at??(ir.tickFormat?ir.tickFormat.apply(ir,Ke):D),sr=Zt.selectAll(".tick").data(Tr,ir),yr=sr.enter().insert("g",".domain").attr("class","tick").style("opacity",mt),Ar=t.transition(sr.exit()).style("opacity",mt).remove(),Dr=t.transition(sr.order()).style("opacity",1),Or=Math.max(Re,0)+Xe,Sr,yn=gu(ir),On=Zt.selectAll(".domain").data([0]),Zn=(On.enter().append("path").attr("class","domain"),t.transition(On));yr.append("line"),yr.append("text");var Mn=yr.select("line"),Un=Dr.select("line"),sa=sr.select("text").text(hr),Oa=yr.select("text"),xa=Dr.select("text"),ka=xe==="top"||xe==="left"?-1:1,Na,Oi,zi,Jn;if(xe==="bottom"||xe==="top"?(Sr=cf,Na="x",zi="y",Oi="x2",Jn="y2",sa.attr("dy",ka<0?"0em":".71em").style("text-anchor","middle"),Zn.attr("d","M"+yn[0]+","+ka*Ve+"V0H"+yn[1]+"V"+ka*Ve)):(Sr=Wo,Na="y",zi="x",Oi="y2",Jn="x2",sa.attr("dy",".32em").style("text-anchor",ka<0?"end":"start"),Zn.attr("d","M"+ka*Ve+","+yn[0]+"H0V"+yn[1]+"H"+ka*Ve)),Mn.attr(Jn,ka*Re),Oa.attr(zi,ka*Or),Un.attr(Oi,0).attr(Jn,ka*Re),xa.attr(Na,0).attr(zi,ka*Or),ir.rangeBand){var Xa=ir,ui=Xa.rangeBand()/2;ar=ir=function($i){return Xa($i)+ui}}else ar.rangeBand?ar=ir:Ar.call(Sr,ir,ar);yr.call(Sr,ar,ir),Dr.call(Sr,ir,ir)})}return St.scale=function(Gt){return arguments.length?(se=Gt,St):se},St.orient=function(Gt){return arguments.length?(xe=Gt in _u?Gt+"":Ro,St):xe},St.ticks=function(){return arguments.length?(Ke=n(arguments),St):Ke},St.tickValues=function(Gt){return arguments.length?(dt=Gt,St):dt},St.tickFormat=function(Gt){return arguments.length?(at=Gt,St):at},St.tickSize=function(Gt){var Zt=arguments.length;return Zt?(Re=+Gt,Ve=+arguments[Zt-1],St):Re},St.innerTickSize=function(Gt){return arguments.length?(Re=+Gt,St):Re},St.outerTickSize=function(Gt){return arguments.length?(Ve=+Gt,St):Ve},St.tickPadding=function(Gt){return arguments.length?(Xe=+Gt,St):Xe},St.tickSubdivide=function(){return arguments.length&&St},St};var Ro="bottom",_u={top:1,right:1,bottom:1,left:1};function cf(se,xe,Re){se.attr("transform",function(Ve){var Xe=xe(Ve);return"translate("+(isFinite(Xe)?Xe:Re(Ve))+",0)"})}function Wo(se,xe,Re){se.attr("transform",function(Ve){var Xe=xe(Ve);return"translate(0,"+(isFinite(Xe)?Xe:Re(Ve))+")"})}t.svg.brush=function(){var se=ne(Zt,"brushstart","brush","brushend"),xe=null,Re=null,Ve=[0,0],Xe=[0,0],Ke,dt,at=!0,St=!0,Gt=ji[0];function Zt(sr){sr.each(function(){var yr=t.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",hr).on("touchstart.brush",hr),Ar=yr.selectAll(".background").data([0]);Ar.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),yr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Dr=yr.selectAll(".resize").data(Gt,D);Dr.exit().remove(),Dr.enter().append("g").attr("class",function(On){return"resize "+On}).style("cursor",function(On){return di[On]}).append("rect").attr("x",function(On){return/[ew]$/.test(On)?-3:null}).attr("y",function(On){return/^[ns]/.test(On)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Dr.style("display",Zt.empty()?"none":null);var Or=t.transition(yr),Sr=t.transition(Ar),yn;xe&&(yn=gu(xe),Sr.attr("x",yn[0]).attr("width",yn[1]-yn[0]),ir(Or)),Re&&(yn=gu(Re),Sr.attr("y",yn[0]).attr("height",yn[1]-yn[0]),Tr(Or)),ar(Or)})}Zt.event=function(sr){sr.each(function(){var yr=se.of(this,arguments),Ar={x:Ve,y:Xe,i:Ke,j:dt},Dr=this.__chart__||Ar;this.__chart__=Ar,Ml?t.select(this).transition().each("start.brush",function(){Ke=Dr.i,dt=Dr.j,Ve=Dr.x,Xe=Dr.y,yr({type:"brushstart"})}).tween("brush:brush",function(){var Or=Vo(Ve,Ar.x),Sr=Vo(Xe,Ar.y);return Ke=dt=null,function(yn){Ve=Ar.x=Or(yn),Xe=Ar.y=Sr(yn),yr({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ke=Ar.i,dt=Ar.j,yr({type:"brush",mode:"resize"}),yr({type:"brushend"})}):(yr({type:"brushstart"}),yr({type:"brush",mode:"resize"}),yr({type:"brushend"}))})};function ar(sr){sr.selectAll(".resize").attr("transform",function(yr){return"translate("+Ve[+/e$/.test(yr)]+","+Xe[+/^s/.test(yr)]+")"})}function ir(sr){sr.select(".extent").attr("x",Ve[0]),sr.selectAll(".extent,.n>rect,.s>rect").attr("width",Ve[1]-Ve[0])}function Tr(sr){sr.select(".extent").attr("y",Xe[0]),sr.selectAll(".extent,.e>rect,.w>rect").attr("height",Xe[1]-Xe[0])}function hr(){var sr=this,yr=t.select(t.event.target),Ar=se.of(sr,arguments),Dr=t.select(sr),Or=yr.datum(),Sr=!/^(n|s)$/.test(Or)&&xe,yn=!/^(e|w)$/.test(Or)&&Re,On=yr.classed("extent"),Zn=Jt(sr),Mn,Un=t.mouse(sr),sa,Oa=t.select(a(sr)).on("keydown.brush",Na).on("keyup.brush",Oi);if(t.event.changedTouches?Oa.on("touchmove.brush",zi).on("touchend.brush",Xa):Oa.on("mousemove.brush",zi).on("mouseup.brush",Xa),Dr.interrupt().selectAll("*").interrupt(),On)Un[0]=Ve[0]-Un[0],Un[1]=Xe[0]-Un[1];else if(Or){var xa=+/w$/.test(Or),ka=+/^n/.test(Or);sa=[Ve[1-xa]-Un[0],Xe[1-ka]-Un[1]],Un[0]=Ve[xa],Un[1]=Xe[ka]}else t.event.altKey&&(Mn=Un.slice());Dr.style("pointer-events","none").selectAll(".resize").style("display",null),t.select("body").style("cursor",yr.style("cursor")),Ar({type:"brushstart"}),zi();function Na(){t.event.keyCode==32&&(On||(Mn=null,Un[0]-=Ve[1],Un[1]-=Xe[1],On=2),Q())}function Oi(){t.event.keyCode==32&&On==2&&(Un[0]+=Ve[1],Un[1]+=Xe[1],On=0,Q())}function zi(){var ui=t.mouse(sr),$i=!1;sa&&(ui[0]+=sa[0],ui[1]+=sa[1]),On||(t.event.altKey?(Mn||(Mn=[(Ve[0]+Ve[1])/2,(Xe[0]+Xe[1])/2]),Un[0]=Ve[+(ui[0]0))return i;do i.push(l=new Date(+s)),t(s,f),e(s);while(l=a)for(;e(a),!s(a);)a.setTime(a-1)},function(a,f){if(a>=a)if(f<0)for(;++f<=0;)for(;t(a,-1),!s(a););else for(;--f>=0;)for(;t(a,1),!s(a););})},r&&(o.count=function(s,a){return yk.setTime(+s),mk.setTime(+a),e(yk),e(mk),Math.floor(r(yk,mk))},o.every=function(s){return s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?function(a){return n(a)%s===0}:function(a){return o.count(0,a)%s===0}):o}),o}var e2=_f(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});e2.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?_f(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):e2};var xJ=e2.range,B3=1e3,pm=6e4,q3=36e5,T3e=864e5,A3e=6048e5,ZG=_f(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*B3)},function(e,t){return(t-e)/B3},function(e){return e.getUTCSeconds()}),bJ=ZG.range,S3e=_f(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*B3)},function(e,t){e.setTime(+e+t*pm)},function(e,t){return(t-e)/pm},function(e){return e.getMinutes()}),rOe=S3e.range,M3e=_f(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*B3-e.getMinutes()*pm)},function(e,t){e.setTime(+e+t*q3)},function(e,t){return(t-e)/q3},function(e){return e.getHours()}),nOe=M3e.range,AS=_f(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pm)/T3e},function(e){return e.getDate()-1}),aOe=AS.range;function Rm(e){return _f(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*pm)/A3e})}var j3=Rm(0),t2=Rm(1),E3e=Rm(2),k3e=Rm(3),gm=Rm(4),C3e=Rm(5),R3e=Rm(6),_J=j3.range,iOe=t2.range,oOe=E3e.range,sOe=k3e.range,lOe=gm.range,uOe=C3e.range,fOe=R3e.range,L3e=_f(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),cOe=L3e.range,ny=_f(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});ny.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:_f(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};var hOe=ny.range,P3e=_f(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*pm)},function(e,t){return(t-e)/pm},function(e){return e.getUTCMinutes()}),dOe=P3e.range,D3e=_f(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*q3)},function(e,t){return(t-e)/q3},function(e){return e.getUTCHours()}),vOe=D3e.range,SS=_f(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/T3e},function(e){return e.getUTCDate()-1}),pOe=SS.range;function Lm(e){return _f(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/A3e})}var U3=Lm(0),r2=Lm(1),I3e=Lm(2),O3e=Lm(3),ym=Lm(4),z3e=Lm(5),F3e=Lm(6),wJ=U3.range,gOe=r2.range,yOe=I3e.range,mOe=O3e.range,xOe=ym.range,bOe=z3e.range,_Oe=F3e.range,N3e=_f(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),wOe=N3e.range,ay=_f(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});ay.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:_f(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};var TOe=ay.range;const AOe=Object.freeze(Object.defineProperty({__proto__:null,timeDay:AS,timeDays:aOe,timeFriday:C3e,timeFridays:uOe,timeHour:M3e,timeHours:nOe,timeInterval:_f,timeMillisecond:e2,timeMilliseconds:xJ,timeMinute:S3e,timeMinutes:rOe,timeMonday:t2,timeMondays:iOe,timeMonth:L3e,timeMonths:cOe,timeSaturday:R3e,timeSaturdays:fOe,timeSecond:ZG,timeSeconds:bJ,timeSunday:j3,timeSundays:_J,timeThursday:gm,timeThursdays:lOe,timeTuesday:E3e,timeTuesdays:oOe,timeWednesday:k3e,timeWednesdays:sOe,timeWeek:j3,timeWeeks:_J,timeYear:ny,timeYears:hOe,utcDay:SS,utcDays:pOe,utcFriday:z3e,utcFridays:bOe,utcHour:D3e,utcHours:vOe,utcMillisecond:e2,utcMilliseconds:xJ,utcMinute:P3e,utcMinutes:dOe,utcMonday:r2,utcMondays:gOe,utcMonth:N3e,utcMonths:wOe,utcSaturday:F3e,utcSaturdays:_Oe,utcSecond:ZG,utcSeconds:bJ,utcSunday:U3,utcSundays:wJ,utcThursday:ym,utcThursdays:xOe,utcTuesday:I3e,utcTuesdays:yOe,utcWednesday:O3e,utcWednesdays:mOe,utcWeek:U3,utcWeeks:wJ,utcYear:ay,utcYears:TOe},Symbol.toStringTag,{value:"Module"}));function xk(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bk(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function s_(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function B3e(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,s=e.days,a=e.shortDays,f=e.months,i=e.shortMonths,l=l_(o),u=u_(o),c=l_(s),h=u_(s),d=l_(a),v=u_(a),p=l_(f),m=u_(f),y=l_(i),b=u_(i),g={a:z,A:N,b:q,B:P,c:null,d:kJ,e:kJ,f:$Oe,g:n8e,G:i8e,H:GOe,I:VOe,j:YOe,L:q3e,m:WOe,M:XOe,p:B,q:$,Q:LJ,s:PJ,S:ZOe,u:KOe,U:JOe,V:QOe,w:e8e,W:t8e,x:null,X:null,y:r8e,Y:a8e,Z:o8e,"%":RJ},T={a:Q,A:J,b:ne,B:te,c:null,d:CJ,e:CJ,f:f8e,g:b8e,G:w8e,H:s8e,I:l8e,j:u8e,L:U3e,m:c8e,M:h8e,p:Z,q:G,Q:LJ,s:PJ,S:d8e,u:v8e,U:p8e,V:g8e,w:y8e,W:m8e,x:null,X:null,y:x8e,Y:_8e,Z:T8e,"%":RJ},S={a:x,A:_,b:k,B:E,c:I,d:MJ,e:MJ,f:qOe,g:SJ,G:AJ,H:EJ,I:EJ,j:zOe,L:BOe,m:OOe,M:FOe,p:C,q:IOe,Q:UOe,s:HOe,S:NOe,u:COe,U:ROe,V:LOe,w:kOe,W:POe,x:F,X:D,y:SJ,Y:AJ,Z:DOe,"%":jOe};g.x=A(r,g),g.X=A(n,g),g.c=A(t,g),T.x=A(r,T),T.X=A(n,T),T.c=A(t,T);function A(j,Y){return function(K){var X=[],ee=-1,le=0,oe=j.length,fe,de,_e;for(K instanceof Date||(K=new Date(+K));++ee53)return null;"w"in X||(X.w=1),"Z"in X?(le=bk(s_(X.y,0,1)),oe=le.getUTCDay(),le=oe>4||oe===0?r2.ceil(le):r2(le),le=SS.offset(le,(X.V-1)*7),X.y=le.getUTCFullYear(),X.m=le.getUTCMonth(),X.d=le.getUTCDate()+(X.w+6)%7):(le=xk(s_(X.y,0,1)),oe=le.getDay(),le=oe>4||oe===0?t2.ceil(le):t2(le),le=AS.offset(le,(X.V-1)*7),X.y=le.getFullYear(),X.m=le.getMonth(),X.d=le.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),oe="Z"in X?bk(s_(X.y,0,1)).getUTCDay():xk(s_(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(oe+5)%7:X.w+X.U*7-(oe+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,bk(X)):xk(X)}}function w(j,Y,K,X){for(var ee=0,le=Y.length,oe=K.length,fe,de;ee=oe)return-1;if(fe=Y.charCodeAt(ee++),fe===37){if(fe=Y.charAt(ee++),de=S[fe in TJ?Y.charAt(ee++):fe],!de||(X=de(j,K,X))<0)return-1}else if(fe!=K.charCodeAt(X++))return-1}return X}function C(j,Y,K){var X=l.exec(Y.slice(K));return X?(j.p=u[X[0].toLowerCase()],K+X[0].length):-1}function x(j,Y,K){var X=d.exec(Y.slice(K));return X?(j.w=v[X[0].toLowerCase()],K+X[0].length):-1}function _(j,Y,K){var X=c.exec(Y.slice(K));return X?(j.w=h[X[0].toLowerCase()],K+X[0].length):-1}function k(j,Y,K){var X=y.exec(Y.slice(K));return X?(j.m=b[X[0].toLowerCase()],K+X[0].length):-1}function E(j,Y,K){var X=p.exec(Y.slice(K));return X?(j.m=m[X[0].toLowerCase()],K+X[0].length):-1}function I(j,Y,K){return w(j,t,Y,K)}function F(j,Y,K){return w(j,r,Y,K)}function D(j,Y,K){return w(j,n,Y,K)}function z(j){return a[j.getDay()]}function N(j){return s[j.getDay()]}function q(j){return i[j.getMonth()]}function P(j){return f[j.getMonth()]}function B(j){return o[+(j.getHours()>=12)]}function $(j){return 1+~~(j.getMonth()/3)}function Q(j){return a[j.getUTCDay()]}function J(j){return s[j.getUTCDay()]}function ne(j){return i[j.getUTCMonth()]}function te(j){return f[j.getUTCMonth()]}function Z(j){return o[+(j.getUTCHours()>=12)]}function G(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var Y=A(j+="",g);return Y.toString=function(){return j},Y},parse:function(j){var Y=M(j+="",!1);return Y.toString=function(){return j},Y},utcFormat:function(j){var Y=A(j+="",T);return Y.toString=function(){return j},Y},utcParse:function(j){var Y=M(j+="",!0);return Y.toString=function(){return j},Y}}}var TJ={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,SOe=/^%/,MOe=/[\\^$*+?|[\]().{}]/g;function is(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",s=o.length;return n+(s68?1900:2e3),r+n[0].length):-1}function DOe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function IOe(e,t,r){var n=fc.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function OOe(e,t,r){var n=fc.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function MJ(e,t,r){var n=fc.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zOe(e,t,r){var n=fc.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function EJ(e,t,r){var n=fc.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function FOe(e,t,r){var n=fc.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function NOe(e,t,r){var n=fc.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function BOe(e,t,r){var n=fc.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function qOe(e,t,r){var n=fc.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function jOe(e,t,r){var n=SOe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function UOe(e,t,r){var n=fc.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function HOe(e,t,r){var n=fc.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function kJ(e,t){return is(e.getDate(),t,2)}function GOe(e,t){return is(e.getHours(),t,2)}function VOe(e,t){return is(e.getHours()%12||12,t,2)}function YOe(e,t){return is(1+AS.count(ny(e),e),t,3)}function q3e(e,t){return is(e.getMilliseconds(),t,3)}function $Oe(e,t){return q3e(e,t)+"000"}function WOe(e,t){return is(e.getMonth()+1,t,2)}function XOe(e,t){return is(e.getMinutes(),t,2)}function ZOe(e,t){return is(e.getSeconds(),t,2)}function KOe(e){var t=e.getDay();return t===0?7:t}function JOe(e,t){return is(j3.count(ny(e)-1,e),t,2)}function j3e(e){var t=e.getDay();return t>=4||t===0?gm(e):gm.ceil(e)}function QOe(e,t){return e=j3e(e),is(gm.count(ny(e),e)+(ny(e).getDay()===4),t,2)}function e8e(e){return e.getDay()}function t8e(e,t){return is(t2.count(ny(e)-1,e),t,2)}function r8e(e,t){return is(e.getFullYear()%100,t,2)}function n8e(e,t){return e=j3e(e),is(e.getFullYear()%100,t,2)}function a8e(e,t){return is(e.getFullYear()%1e4,t,4)}function i8e(e,t){var r=e.getDay();return e=r>=4||r===0?gm(e):gm.ceil(e),is(e.getFullYear()%1e4,t,4)}function o8e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+is(t/60|0,"0",2)+is(t%60,"0",2)}function CJ(e,t){return is(e.getUTCDate(),t,2)}function s8e(e,t){return is(e.getUTCHours(),t,2)}function l8e(e,t){return is(e.getUTCHours()%12||12,t,2)}function u8e(e,t){return is(1+SS.count(ay(e),e),t,3)}function U3e(e,t){return is(e.getUTCMilliseconds(),t,3)}function f8e(e,t){return U3e(e,t)+"000"}function c8e(e,t){return is(e.getUTCMonth()+1,t,2)}function h8e(e,t){return is(e.getUTCMinutes(),t,2)}function d8e(e,t){return is(e.getUTCSeconds(),t,2)}function v8e(e){var t=e.getUTCDay();return t===0?7:t}function p8e(e,t){return is(U3.count(ay(e)-1,e),t,2)}function H3e(e){var t=e.getUTCDay();return t>=4||t===0?ym(e):ym.ceil(e)}function g8e(e,t){return e=H3e(e),is(ym.count(ay(e),e)+(ay(e).getUTCDay()===4),t,2)}function y8e(e){return e.getUTCDay()}function m8e(e,t){return is(r2.count(ay(e)-1,e),t,2)}function x8e(e,t){return is(e.getUTCFullYear()%100,t,2)}function b8e(e,t){return e=H3e(e),is(e.getUTCFullYear()%100,t,2)}function _8e(e,t){return is(e.getUTCFullYear()%1e4,t,4)}function w8e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ym(e):ym.ceil(e),is(e.getUTCFullYear()%1e4,t,4)}function T8e(){return"+0000"}function RJ(){return"%"}function LJ(e){return+e}function PJ(e){return Math.floor(+e/1e3)}var G1,ZY,G3e,MS,KY;V3e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function V3e(e){return G1=B3e(e),ZY=G1.format,G3e=G1.parse,MS=G1.utcFormat,KY=G1.utcParse,G1}var Y3e="%Y-%m-%dT%H:%M:%S.%LZ";function A8e(e){return e.toISOString()}var S8e=Date.prototype.toISOString?A8e:MS(Y3e);function M8e(e){var t=new Date(e);return isNaN(t)?null:t}var E8e=+new Date("2000-01-01T00:00:00.000Z")?M8e:KY(Y3e);const k8e=Object.freeze(Object.defineProperty({__proto__:null,isoFormat:S8e,isoParse:E8e,get timeFormat(){return ZY},timeFormatDefaultLocale:V3e,timeFormatLocale:B3e,get timeParse(){return G3e},get utcFormat(){return MS},get utcParse(){return KY}},Symbol.toStringTag,{value:"Module"})),n2=$d(k8e);function C8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function H3(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function px(e){return e=H3(Math.abs(e)),e?e[1]:NaN}function R8e(e,t){return function(r,n){for(var o=r.length,s=[],a=0,f=e[0],i=0;o>0&&f>0&&(i+f+1>n&&(f=Math.max(1,n-i)),s.push(r.substring(o-=f,o+f)),!((i+=f+1)>n));)f=e[a=(a+1)%e.length];return s.reverse().join(t)}}function L8e(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var P8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gx(e){if(!(t=P8e.exec(e)))throw new Error("invalid format: "+e);var t;return new ES({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gx.prototype=ES.prototype;function ES(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ES.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 D8e(e){e:for(var t=e.length,r=1,n=-1,o;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var $3e;function I8e(e,t){var r=H3(e,t);if(!r)return e+"";var n=r[0],o=r[1],s=o-($3e=Math.max(-8,Math.min(8,Math.floor(o/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")+H3(e,Math.max(0,t+s-1))[0]}function DJ(e,t){var r=H3(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const IJ={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:C8e,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return DJ(e*100,t)},r:DJ,s:I8e,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function OJ(e){return e}var zJ=Array.prototype.map,FJ=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function W3e(e){var t=e.grouping===void 0||e.thousands===void 0?OJ:R8e(zJ.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?OJ:L8e(zJ.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",f=e.minus===void 0?"-":e.minus+"",i=e.nan===void 0?"NaN":e.nan+"";function l(c){c=gx(c);var h=c.fill,d=c.align,v=c.sign,p=c.symbol,m=c.zero,y=c.width,b=c.comma,g=c.precision,T=c.trim,S=c.type;S==="n"?(b=!0,S="g"):IJ[S]||(g===void 0&&(g=12),T=!0,S="g"),(m||h==="0"&&d==="=")&&(m=!0,h="0",d="=");var A=p==="$"?r:p==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",M=p==="$"?n:/[%p]/.test(S)?a:"",w=IJ[S],C=/[defgprs%]/.test(S);g=g===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function x(_){var k=A,E=M,I,F,D;if(S==="c")E=w(_)+E,_="";else{_=+_;var z=_<0||1/_<0;if(_=isNaN(_)?i:w(Math.abs(_),g),T&&(_=D8e(_)),z&&+_==0&&v!=="+"&&(z=!1),k=(z?v==="("?v:f:v==="-"||v==="("?"":v)+k,E=(S==="s"?FJ[8+$3e/3]:"")+E+(z&&v==="("?")":""),C){for(I=-1,F=_.length;++ID||D>57){E=(D===46?o+_.slice(I+1):_.slice(I))+E,_=_.slice(0,I);break}}}b&&!m&&(_=t(_,1/0));var N=k.length+_.length+E.length,q=N>1)+k+_+E+q.slice(N);break;default:_=q+k+_+E;break}return s(_)}return x.toString=function(){return c+""},x}function u(c,h){var d=l((c=gx(c),c.type="f",c)),v=Math.max(-8,Math.min(8,Math.floor(px(h)/3)))*3,p=Math.pow(10,-v),m=FJ[8+v/3];return function(y){return d(p*y)+m}}return{format:l,formatPrefix:u}}var yT,kS,JY;X3e({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function X3e(e){return yT=W3e(e),kS=yT.format,JY=yT.formatPrefix,yT}function Z3e(e){return Math.max(0,-px(Math.abs(e)))}function K3e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(px(t)/3)))*3-px(Math.abs(e)))}function J3e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,px(t)-px(e))+1}const O8e=Object.freeze(Object.defineProperty({__proto__:null,FormatSpecifier:ES,get format(){return kS},formatDefaultLocale:X3e,formatLocale:W3e,get formatPrefix(){return JY},formatSpecifier:gx,precisionFixed:Z3e,precisionPrefix:K3e,precisionRound:J3e},Symbol.toStringTag,{value:"Module"})),Q3e=$d(O8e);var _k,NJ;function z8e(){return NJ||(NJ=1,_k=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}),_k}var wk,BJ;function Ua(){if(BJ)return wk;BJ=1;var e=z8e();return wk=function(t){var r=typeof t;if(r==="string"){var n=t;if(t=+t,t===0&&e(n))return!1}else if(r!=="number")return!1;return t-t<1},wk}var Tk,qJ;function Pi(){return qJ||(qJ=1,Tk={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}),Tk}var pv={},ix="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L_=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var mT=0;mT>2],o+=ix[(t[r]&3)<<4|t[r+1]>>4],o+=ix[(t[r+1]&15)<<2|t[r+2]>>6],o+=ix[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},N8e=function(e){var t=e.length*.75,r=e.length,n,o=0,s,a,f,i;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),u=new Uint8Array(l);for(n=0;n>4,u[o++]=(a&15)<<4|f>>2,u[o++]=(f&3)<<6|i&63;return l};const B8e=Object.freeze(Object.defineProperty({__proto__:null,decode:N8e,encode:F8e},Symbol.toStringTag,{value:"Module"})),eAe=$d(B8e);var Ak,jJ;function ly(){return jJ||(jJ=1,Ak=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}),Ak}var UJ;function lh(){if(UJ)return pv;UJ=1;var e=eAe.decode,t=ly(),r=Array.isArray,n=ArrayBuffer,o=DataView;function s(h){return n.isView(h)&&!(h instanceof o)}pv.isTypedArray=s;function a(h){return r(h)||s(h)}pv.isArrayOrTypedArray=a;function f(h){return!a(h[0])}pv.isArray1D=f,pv.ensureArray=function(h,d){return r(h)||(h=[]),h.length=d,h};var i={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};i.uint8c=i.u1c,i.uint8=i.u1,i.int8=i.i1,i.uint16=i.u2,i.int16=i.i2,i.uint32=i.u4,i.int32=i.i4,i.float32=i.f4,i.float64=i.f8;function l(h){return h.constructor===ArrayBuffer}pv.isArrayBuffer=l,pv.decodeTypedArraySpec=function(h){var d=[],v=u(h),p=v.dtype,m=i[p];if(!m)throw new Error('Error in dtype: "'+p+'"');var y=m.BYTES_PER_ELEMENT,b=v.bdata;l(b)||(b=e(b));var g=v.shape===void 0?[b.byteLength/y]:(""+v.shape).split(",");g.reverse();var T=g.length,S,A,M=+g[0],w=y*M,C=0;if(T===1)d=new m(b);else if(T===2)for(S=+g[1],A=0;A2)return p[T]=p[T]|o,b.set(g,null);if(y){for(h=T;h0)return Math.log(r)/Math.LN10;var o=Math.log(Math.min(n[0],n[1]))/Math.LN10;return e(o)||(o=Math.log(Math.max(n[0],n[1]))/Math.LN10-6),o},kk}var Ck,$J;function U8e(){if($J)return Ck;$J=1;var e=lh().isArrayOrTypedArray,t=ly();return Ck=function r(n,o){for(var s in o){var a=o[s],f=n[s];if(f!==a)if(s.charAt(0)==="_"||typeof a=="function"){if(s in n)continue;n[s]=a}else if(e(a)&&e(f)&&t(a[0])){if(s==="customdata"||s==="ids")continue;for(var i=Math.min(a.length,f.length),l=0;ln/2?r-Math.round(r/n)*n:r}return Rk={mod:e,modHalf:t},Rk}var Lk={},_3={exports:{}},H8e=_3.exports,XJ;function wf(){return XJ||(XJ=1,(function(e,t){(function(r,n){e.exports=n()})(H8e,(function(){function r(G){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},r(G)}var n=/^\s+/,o=/\s+$/;function s(G,j){if(G=G||"",j=j||{},G instanceof s)return G;if(!(this instanceof s))return new s(G,j);var Y=a(G);this._originalInput=G,this._r=Y.r,this._g=Y.g,this._b=Y.b,this._a=Y.a,this._roundA=Math.round(100*this._a)/100,this._format=j.format||Y.format,this._gradientType=j.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=Y.ok}s.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 j=this.toRgb();return(j.r*299+j.g*587+j.b*114)/1e3},getLuminance:function(){var j=this.toRgb(),Y,K,X,ee,le,oe;return Y=j.r/255,K=j.g/255,X=j.b/255,Y<=.03928?ee=Y/12.92:ee=Math.pow((Y+.055)/1.055,2.4),K<=.03928?le=K/12.92:le=Math.pow((K+.055)/1.055,2.4),X<=.03928?oe=X/12.92:oe=Math.pow((X+.055)/1.055,2.4),.2126*ee+.7152*le+.0722*oe},setAlpha:function(j){return this._a=I(j),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var j=u(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=u(this._r,this._g,this._b),Y=Math.round(j.h*360),K=Math.round(j.s*100),X=Math.round(j.v*100);return this._a==1?"hsv("+Y+", "+K+"%, "+X+"%)":"hsva("+Y+", "+K+"%, "+X+"%, "+this._roundA+")"},toHsl:function(){var j=i(this._r,this._g,this._b);return{h:j.h*360,s:j.s,l:j.l,a:this._a}},toHslString:function(){var j=i(this._r,this._g,this._b),Y=Math.round(j.h*360),K=Math.round(j.s*100),X=Math.round(j.l*100);return this._a==1?"hsl("+Y+", "+K+"%, "+X+"%)":"hsla("+Y+", "+K+"%, "+X+"%, "+this._roundA+")"},toHex:function(j){return h(this._r,this._g,this._b,j)},toHexString:function(j){return"#"+this.toHex(j)},toHex8:function(j){return d(this._r,this._g,this._b,this._a,j)},toHex8String:function(j){return"#"+this.toHex8(j)},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(F(this._r,255)*100)+"%",g:Math.round(F(this._g,255)*100)+"%",b:Math.round(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%)":"rgba("+Math.round(F(this._r,255)*100)+"%, "+Math.round(F(this._g,255)*100)+"%, "+Math.round(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[h(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var Y="#"+v(this._r,this._g,this._b,this._a),K=Y,X=this._gradientType?"GradientType = 1, ":"";if(j){var ee=s(j);K="#"+v(ee._r,ee._g,ee._b,ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+X+"startColorstr="+Y+",endColorstr="+K+")"},toString:function(j){var Y=!!j;j=j||this._format;var K=!1,X=this._a<1&&this._a>=0,ee=!Y&&X&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return ee?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(K=this.toRgbString()),j==="prgb"&&(K=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(K=this.toHexString()),j==="hex3"&&(K=this.toHexString(!0)),j==="hex4"&&(K=this.toHex8String(!0)),j==="hex8"&&(K=this.toHex8String()),j==="name"&&(K=this.toName()),j==="hsl"&&(K=this.toHslString()),j==="hsv"&&(K=this.toHsvString()),K||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(j,Y){var K=j.apply(null,[this].concat([].slice.call(Y)));return this._r=K._r,this._g=K._g,this._b=K._b,this.setAlpha(K._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(T,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(j,Y){return j.apply(null,[this].concat([].slice.call(Y)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(M,[3])},tetrad:function(){return this._applyCombination(M,[4])}},s.fromRatio=function(G,j){if(r(G)=="object"){var Y={};for(var K in G)G.hasOwnProperty(K)&&(K==="a"?Y[K]=G[K]:Y[K]=B(G[K]));G=Y}return s(G,j)};function a(G){var j={r:0,g:0,b:0},Y=1,K=null,X=null,ee=null,le=!1,oe=!1;return typeof G=="string"&&(G=te(G)),r(G)=="object"&&(ne(G.r)&&ne(G.g)&&ne(G.b)?(j=f(G.r,G.g,G.b),le=!0,oe=String(G.r).substr(-1)==="%"?"prgb":"rgb"):ne(G.h)&&ne(G.s)&&ne(G.v)?(K=B(G.s),X=B(G.v),j=c(G.h,K,X),le=!0,oe="hsv"):ne(G.h)&&ne(G.s)&&ne(G.l)&&(K=B(G.s),ee=B(G.l),j=l(G.h,K,ee),le=!0,oe="hsl"),G.hasOwnProperty("a")&&(Y=G.a)),Y=I(Y),{ok:le,format:G.format||oe,r:Math.min(255,Math.max(j.r,0)),g:Math.min(255,Math.max(j.g,0)),b:Math.min(255,Math.max(j.b,0)),a:Y}}function f(G,j,Y){return{r:F(G,255)*255,g:F(j,255)*255,b:F(Y,255)*255}}function i(G,j,Y){G=F(G,255),j=F(j,255),Y=F(Y,255);var K=Math.max(G,j,Y),X=Math.min(G,j,Y),ee,le,oe=(K+X)/2;if(K==X)ee=le=0;else{var fe=K-X;switch(le=oe>.5?fe/(2-K-X):fe/(K+X),K){case G:ee=(j-Y)/fe+(j1&&(we-=1),we<1/6?de+(_e-de)*6*we:we<1/2?_e:we<2/3?de+(_e-de)*(2/3-we)*6:de}if(j===0)K=X=ee=Y;else{var oe=Y<.5?Y*(1+j):Y+j-Y*j,fe=2*Y-oe;K=le(fe,oe,G+1/3),X=le(fe,oe,G),ee=le(fe,oe,G-1/3)}return{r:K*255,g:X*255,b:ee*255}}function u(G,j,Y){G=F(G,255),j=F(j,255),Y=F(Y,255);var K=Math.max(G,j,Y),X=Math.min(G,j,Y),ee,le,oe=K,fe=K-X;if(le=K===0?0:fe/K,K==X)ee=0;else{switch(K){case G:ee=(j-Y)/fe+(j>1)+720)%360;--j;)K.h=(K.h+X)%360,ee.push(s(K));return ee}function x(G,j){j=j||6;for(var Y=s(G).toHsv(),K=Y.h,X=Y.s,ee=Y.v,le=[],oe=1/j;j--;)le.push(s({h:K,s:X,v:ee})),ee=(ee+oe)%1;return le}s.mix=function(G,j,Y){Y=Y===0?0:Y||50;var K=s(G).toRgb(),X=s(j).toRgb(),ee=Y/100,le={r:(X.r-K.r)*ee+K.r,g:(X.g-K.g)*ee+K.g,b:(X.b-K.b)*ee+K.b,a:(X.a-K.a)*ee+K.a};return s(le)},s.readability=function(G,j){var Y=s(G),K=s(j);return(Math.max(Y.getLuminance(),K.getLuminance())+.05)/(Math.min(Y.getLuminance(),K.getLuminance())+.05)},s.isReadable=function(G,j,Y){var K=s.readability(G,j),X,ee;switch(ee=!1,X=Z(Y),X.level+X.size){case"AAsmall":case"AAAlarge":ee=K>=4.5;break;case"AAlarge":ee=K>=3;break;case"AAAsmall":ee=K>=7;break}return ee},s.mostReadable=function(G,j,Y){var K=null,X=0,ee,le,oe,fe;Y=Y||{},le=Y.includeFallbackColors,oe=Y.level,fe=Y.size;for(var de=0;deX&&(X=ee,K=s(j[de]));return s.isReadable(G,K,{level:oe,size:fe})||!le?K:(Y.includeFallbackColors=!1,s.mostReadable(G,["#fff","#000"],Y))};var _=s.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:"90ee90",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"},k=s.hexNames=E(_);function E(G){var j={};for(var Y in G)G.hasOwnProperty(Y)&&(j[G[Y]]=Y);return j}function I(G){return G=parseFloat(G),(isNaN(G)||G<0||G>1)&&(G=1),G}function F(G,j){N(G)&&(G="100%");var Y=q(G);return G=Math.min(j,Math.max(0,parseFloat(G))),Y&&(G=parseInt(G*j,10)/100),Math.abs(G-j)<1e-6?1:G%j/parseFloat(j)}function D(G){return Math.min(1,Math.max(0,G))}function z(G){return parseInt(G,16)}function N(G){return typeof G=="string"&&G.indexOf(".")!=-1&&parseFloat(G)===1}function q(G){return typeof G=="string"&&G.indexOf("%")!=-1}function P(G){return G.length==1?"0"+G:""+G}function B(G){return G<=1&&(G=G*100+"%"),G}function $(G){return Math.round(parseFloat(G)*255).toString(16)}function Q(G){return z(G)/255}var J=(function(){var G="[-\\+]?\\d+%?",j="[-\\+]?\\d*\\.\\d+%?",Y="(?:"+j+")|(?:"+G+")",K="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",X="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?";return{CSS_UNIT:new RegExp(Y),rgb:new RegExp("rgb"+K),rgba:new RegExp("rgba"+X),hsl:new RegExp("hsl"+K),hsla:new RegExp("hsla"+X),hsv:new RegExp("hsv"+K),hsva:new RegExp("hsva"+X),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 ne(G){return!!J.CSS_UNIT.exec(G)}function te(G){G=G.replace(n,"").replace(o,"").toLowerCase();var j=!1;if(_[G])G=_[G],j=!0;else if(G=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Y;return(Y=J.rgb.exec(G))?{r:Y[1],g:Y[2],b:Y[3]}:(Y=J.rgba.exec(G))?{r:Y[1],g:Y[2],b:Y[3],a:Y[4]}:(Y=J.hsl.exec(G))?{h:Y[1],s:Y[2],l:Y[3]}:(Y=J.hsla.exec(G))?{h:Y[1],s:Y[2],l:Y[3],a:Y[4]}:(Y=J.hsv.exec(G))?{h:Y[1],s:Y[2],v:Y[3]}:(Y=J.hsva.exec(G))?{h:Y[1],s:Y[2],v:Y[3],a:Y[4]}:(Y=J.hex8.exec(G))?{r:z(Y[1]),g:z(Y[2]),b:z(Y[3]),a:Q(Y[4]),format:j?"name":"hex8"}:(Y=J.hex6.exec(G))?{r:z(Y[1]),g:z(Y[2]),b:z(Y[3]),format:j?"name":"hex"}:(Y=J.hex4.exec(G))?{r:z(Y[1]+""+Y[1]),g:z(Y[2]+""+Y[2]),b:z(Y[3]+""+Y[3]),a:Q(Y[4]+""+Y[4]),format:j?"name":"hex8"}:(Y=J.hex3.exec(G))?{r:z(Y[1]+""+Y[1]),g:z(Y[2]+""+Y[2]),b:z(Y[3]+""+Y[3]),format:j?"name":"hex"}:!1}function Z(G){var j,Y;return G=G||{level:"AA",size:"small"},j=(G.level||"AA").toUpperCase(),Y=(G.size||"small").toLowerCase(),j!=="AA"&&j!=="AAA"&&(j="AA"),Y!=="small"&&Y!=="large"&&(Y="small"),{level:j,size:Y}}return s}))})(_3)),_3.exports}var Pk,ZJ;function Gs(){return ZJ||(ZJ=1,Pk=function(e){var t=e.editType,r=e.colorEditType;r===void 0&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t,description:""+(e.description||"")};return e.autoSize&&(n.size.dflt="auto"),e.autoColor&&(n.color.dflt="auto"),e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}),Pk}var Dk,KJ;function RS(){return KJ||(KJ=1,Dk={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}),Dk}var Ik,JJ;function uy(){if(JJ)return Ik;JJ=1;var e=RS(),t=Gs(),r=t({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});return r.family.dflt=e.HOVERFONT,r.size.dflt=e.HOVERFONTSIZE,Ik={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:r,grouptitlefont:t({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},Ik}var V1={},QJ;function ja(){if(QJ)return V1;QJ=1;var e=ly(),t=Array.isArray;function r(o,s){var a,f;for(a=0;a=0)))return i;if(d===3)c[d]>1&&(c[d]=1);else if(c[d]>=1)return i}var v=Math.round(c[0]*255)+", "+Math.round(c[1]*255)+", "+Math.round(c[2]*255);return h?"rgba("+v+", "+c[3]+")":"rgb("+v+")"}return Nk.exports}var Bk,iQ;function Pm(){return iQ||(iQ=1,Bk={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}),Bk}var qk={},oQ;function C2(){return oQ||(oQ=1,qk.counter=function(e,t,r,n){var o=(t||"")+(r?"":"$"),s=n===!1?"":"^";return e==="xy"?new RegExp(s+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+o):new RegExp(s+e+"([2-9]|[1-9][0-9]+)?"+o)}),qk}var sQ;function G8e(){return sQ||(sQ=1,(function(e){var t=Ua(),r=wf(),n=qo(),o=Fx(),s=va(),a=Pm().DESELECTDIM,f=CS(),i=C2().counter,l=E2().modHalf,u=lh().isArrayOrTypedArray,c=lh().isTypedArraySpec,h=lh().decodeTypedArraySpec;e.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(v,p,m){p.set(u(v)?v:c(v)?h(v):m)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(v,p,m,y){y.coerceNumber&&(v=+v),y.values.indexOf(v)===-1?p.set(m):p.set(v)},validateFunction:function(v,p){p.coerceNumber&&(v=+v);for(var m=p.values,y=0;yy.max?p.set(m):p.set(+v)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(v,p,m,y){v%1||!t(v)||y.min!==void 0&&vy.max?p.set(m):p.set(+v)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(v,p,m,y){if(typeof v!="string"){var b=typeof v=="number";y.strict===!0||!b?p.set(m):p.set(String(v))}else y.noBlank&&!v?p.set(m):p.set(v)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(v,p,m){r(v).isValid()?p.set(v):p.set(m)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(v,p,m){function y(b){return r(b).isValid()}!Array.isArray(v)||!v.length?p.set(m):v.every(y)?p.set(v):p.set(m)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(o.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(v,p,m){p.set(o.get(v,m))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(v,p,m){v==="auto"?p.set("auto"):t(v)?p.set(l(+v,360)):p.set(m)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(v,p,m,y){var b=y.regex||i(m);if(typeof v=="string"&&b.test(v)){p.set(v);return}p.set(m)},validateFunction:function(v,p){var m=p.dflt;return v===m?!0:typeof v!="string"?!1:!!i(m).test(v)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(v,p,m,y){if((y.extras||[]).indexOf(v)!==-1){p.set(v);return}if(typeof v!="string"){p.set(m);return}for(var b=v.split("+"),g=0;g/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},t={};function r(n,o){for(var s in n){var a=n[s];a.valType?o[s]=a.dflt:(o[s]||(o[s]={}),r(a,o[s]))}}return r(e,t),Hk={configAttributes:e,dfltConfig:t},Hk}var Gk,uQ;function tAe(){if(uQ)return Gk;uQ=1;var e=ya(),t=Ua(),r=[];return Gk=function(n,o){if(r.indexOf(n)!==-1)return;r.push(n);var s=1e3;t(o)?s=o:o==="long"&&(s=3e3);var a=e.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var f=a.selectAll(".notifier-note").data(r);function i(l){l.duration(700).style("opacity",0).each("end",function(u){var c=r.indexOf(u);c!==-1&&r.splice(c,1),e.select(this).remove()})}f.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=e.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(i)});for(var c=u.append("p"),h=l.split(//g),d=0;d1){var o=["LOG:"];for(n=0;n1){var s=[];for(n=0;n"),"long")}},r.warn=function(){var n;if(e.logging>0){var o=["WARN:"];for(n=0;n0){var s=[];for(n=0;n"),"stick")}},r.error=function(){var n;if(e.logging>0){var o=["ERROR:"];for(n=0;n0){var s=[];for(n=0;n"),"stick")}},Uk.exports}var Vk={},Yk,cQ;function e$(){return cQ||(cQ=1,Yk=function(){}),Yk}var $k,hQ;function rAe(){return hQ||(hQ=1,$k=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),o=0;o0){for(var l=[],u=0;u` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return a.arrayOk!==!1&&(l.arrayOk=!0),l},f_.texttemplateAttrs=function(a,f){a=a||{},f=f||{};var i=s(f),l={valType:"string",dflt:"",editType:a.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",n(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",i].join(" ")};return a.arrayOk!==!1&&(l.arrayOk=!0),l},f_.shapeTexttemplateAttrs=function(a,f){a=a||{},f=f||{};var i=a.newshape?"new ":"",l=s(f),u={valType:"string",dflt:"",editType:a.editType||"arraydraw",description:["Template string used for rendering the "+i+"shape's label.","Note that this will override `text`.",o(),l].join(" ")};return u},f_}var CC,ZQ;function r$(){if(ZQ)return CC;ZQ=1;function e(v,p){return p?p.d2l(v):v}function t(v,p){return p?p.l2d(v):v}function r(v){return v.x0}function n(v){return v.x1}function o(v){return v.y0}function s(v){return v.y1}function a(v,p){return e(v.x1,p)-e(v.x0,p)}function f(v,p,m){return e(v.y1,m)-e(v.y0,m)}function i(v,p){return Math.abs(a(v,p))}function l(v,p,m){return Math.abs(f(v,p,m))}function u(v,p,m){return v.type!=="line"?void 0:Math.sqrt(Math.pow(a(v,p),2)+Math.pow(f(v,p,m),2))}function c(v,p){return t((e(v.x1,p)+e(v.x0,p))/2,p)}function h(v,p,m){return t((e(v.y1,m)+e(v.y0,m))/2,m)}function d(v,p,m){return v.type!=="line"?void 0:f(v,p,m)/a(v,p)}return CC={x0:r,x1:n,y0:o,y1:s,slope:d,dx:a,dy:f,width:i,height:l,length:u,xcenter:c,ycenter:h},CC}var RC,KQ;function mze(){if(KQ)return RC;KQ=1;var e=ws().overrideAll,t=qo(),r=Gs(),n=lc().dash,o=ja().extendFlat,s=bi().shapeTexttemplateAttrs,a=r$();return RC=e({newshape:{visible:o({},t.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:o({},t.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:o({},t.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:o({},t.legendgrouptitle.text,{}),font:r({description:["Sets this legend group's title font."].join(" ")})},legendrank:o({},t.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:o({},t.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:o({},n,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:o({},t.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:s({newshape:!0},{keys:Object.keys(a)}),font:r({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root"),RC}var LC,JQ;function xze(){if(JQ)return LC;JQ=1;var e=lc().dash,t=ja().extendFlat;return LC={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:t({},e,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}},LC}var PC,QQ;function n$(){return QQ||(QQ=1,PC=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the left side of the component."},editType:t}}),PC}var DC,eee;function Bx(){if(eee)return DC;eee=1;var e=Gs(),t=PS(),r=Cu(),n=mze(),o=xze(),s=n$(),a=ja().extendFlat,f=e({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});return f.family.dflt='"Open Sans", verdana, arial, sans-serif',f.size.dflt=12,f.color.dflt=r.defaultLine,DC={font:f,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:e({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:a(s({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:r.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:r.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:r.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:n.newshape,activeshape:n.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:a({},t.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:e({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},DC}var tee;function ga(){return tee||(tee=1,(function(e){var t=Dm(),r=e$(),n=rAe(),o=ly(),s=LS().addStyleRule,a=ja(),f=qo(),i=Bx(),l=a.extendFlat,u=a.extendDeepAll;e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.transformsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(A){if(e.collectableSubplotTypes=null,A)A&&!Array.isArray(A)&&(A=[A]);else throw new Error("No argument passed to Plotly.register.");for(var M=0;M=g&&z<=T?z:a}if(typeof z!="string"&&typeof z!="number")return a;z=String(z);var $=y(N),Q=z.charAt(0);$&&(Q==="G"||Q==="g")&&(z=z.substr(1),N="");var J=$&&N.substr(0,7)==="chinese",ne=z.match(J?p:v);if(!ne)return a;var te=ne[1],Z=ne[3]||"1",G=Number(ne[5]||1),j=Number(ne[7]||0),Y=Number(ne[9]||0),K=Number(ne[11]||0);if($){if(te.length===2)return a;te=Number(te);var X;try{var ee=h.getComponentMethod("calendars","getCal")(N);if(J){var le=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),X=ee.newDate(te,ee.toMonthIndex(te,Z,le),G)}else X=ee.newDate(te,Number(Z),G)}catch{return a}return X?(X.toJD()-c)*f+j*i+Y*l+K*u:a}te.length===2?te=(Number(te)+2e3-m)%100+m:te=Number(te),Z-=1;var oe=new Date(Date.UTC(2e3,Z,G,j,Y));return oe.setUTCFullYear(te),oe.getUTCMonth()!==Z||oe.getUTCDate()!==G?a:oe.getTime()+K*u},g=e.MIN_MS=e.dateTime2ms("-9999"),T=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(z,N){return e.dateTime2ms(z,N)!==a};function S(z,N){return String(z+Math.pow(10,N)).substr(1)}var A=90*f,M=3*i,w=5*l;e.ms2DateTime=function(z,N,q){if(typeof z!="number"||!(z>=g&&z<=T))return a;N||(N=0);var P=Math.floor(o(z+.05,1)*10),B=Math.round(z-P/10),$,Q,J,ne,te,Z;if(y(q)){var G=Math.floor(B/f)+c,j=Math.floor(o(z,f));try{$=h.getComponentMethod("calendars","getCal")(q).fromJD(G).formatDate("yyyy-mm-dd")}catch{$=d("G%Y-%m-%d")(new Date(B))}if($.charAt(0)==="-")for(;$.length<11;)$="-0"+$.substr(1);else for(;$.length<10;)$="0"+$;Q=N=g+f&&z<=T-f))return a;var N=Math.floor(o(z+.05,1)*10),q=new Date(Math.round(z-N/10)),P=t("%Y-%m-%d")(q),B=q.getHours(),$=q.getMinutes(),Q=q.getSeconds(),J=q.getUTCMilliseconds()*10+N;return C(P,B,$,Q,J)};function C(z,N,q,P,B){if((N||q||P||B)&&(z+=" "+S(N,2)+":"+S(q,2),(P||B)&&(z+=":"+S(P,2),B))){for(var $=4;B%10===0;)$-=1,B/=10;z+="."+S(B,$)}return z}e.cleanDate=function(z,N,q){if(z===a)return N;if(e.isJSDate(z)||typeof z=="number"&&isFinite(z)){if(y(q))return n.error("JS Dates and milliseconds are incompatible with world calendars",z),N;if(z=e.ms2DateTimeLocal(+z),!z&&N!==void 0)return N}else if(!e.isDateTime(z,q))return n.error("unrecognized date",z),N;return z};var x=/%\d?f/g,_=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function E(z,N,q,P){z=z.replace(x,function($){var Q=Math.min(+$.charAt(1)||6,6),J=(N/1e3%1+2).toFixed(Q).substr(2).replace(/0+$/,"")||"0";return J});var B=new Date(Math.floor(N+.05));if(z=z.replace(_,function(){return k[q("%q")(B)]}),y(P))try{z=h.getComponentMethod("calendars","worldCalFmt")(z,N,P)}catch{return"Invalid"}return q(z)(B)}var I=[59,59.9,59.99,59.999,59.9999];function F(z,N){var q=o(z+.05,f),P=S(Math.floor(q/i),2)+":"+S(o(Math.floor(q/l),60),2);if(N!=="M"){r(N)||(N=0);var B=Math.min(o(z/u,60),I[N]),$=(100+B).toFixed(N).substr(1);N>0&&($=$.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+$}return P}e.formatDate=function(z,N,q,P,B,$){if(B=y(B)&&B,!N)if(q==="y")N=$.year;else if(q==="m")N=$.month;else if(q==="d")N=$.dayMonth+` +`+$.year;else return F(z,q)+` +`+E($.dayMonthYear,z,P,B);return E(N,z,P,B)};var D=3*f;e.incrementMonth=function(z,N,q){q=y(q)&&q;var P=o(z,f);if(z=Math.round(z-P),q)try{var B=Math.round(z/f)+c,$=h.getComponentMethod("calendars","getCal")(q),Q=$.fromJD(B);return N%12?$.add(Q,N,"m"):$.add(Q,N/12,"y"),(Q.toJD()-c)*f+P}catch{n.error("invalid ms "+z+" in calendar "+q)}var J=new Date(z+D);return J.setUTCMonth(J.getUTCMonth()+N)+P-D},e.findExactDates=function(z,N){for(var q=0,P=0,B=0,$=0,Q,J,ne=y(N)&&h.getComponentMethod("calendars","getCal")(N),te=0;te1?(c[v-1]-c[0])/(v-1):1,y,b;for(m>=0?b=h?a:f:b=h?l:i,u+=m*s*(h?-1:1)*(m>=0?1:-1);d90&&r.log("Long binary search..."),d-1};function a(u,c){return uc}function l(u,c){return u>=c}e.sorterAsc=function(u,c){return u-c},e.sorterDes=function(u,c){return c-u},e.distinctVals=function(u){var c=u.slice();c.sort(e.sorterAsc);var h;for(h=c.length-1;h>-1&&c[h]===o;h--);for(var d=c[h]-c[0]||1,v=d/(h||1)/1e4,p=[],m,y=0;y<=h;y++){var b=c[y],g=b-m;m===void 0?(p.push(b),m=b):g>v&&(d=Math.min(d,g),p.push(b),m=b)}return{vals:p,minDiff:d}},e.roundUp=function(u,c,h){for(var d=0,v=c.length-1,p,m=0,y=h?0:1,b=h?1:0,g=h?Math.ceil:Math.floor;d0&&(d=1),h&&d)return u.sort(c)}return d?u:u.reverse()},e.findIndexOfMin=function(u,c){c=c||n;for(var h=1/0,d,v=0;vs.length)&&(a=s.length),t(o)||(o=!1),r(s[0])){for(i=new Array(a),f=0;fn.length-1)return n[n.length-1];var s=o%1;return s*n[Math.ceil(o)]+(1-s)*n[Math.floor(o)]}})(FC)),FC}var NC,see;function wze(){if(see)return NC;see=1;var e=E2(),t=e.mod,r=e.modHalf,n=Math.PI,o=2*n;function s(m){return m/180*n}function a(m){return m/n*180}function f(m){return Math.abs(m[1]-m[0])>o-1e-14}function i(m,y){return r(y-m,o)}function l(m,y){return Math.abs(i(m,y))}function u(m,y){if(f(y))return!0;var b,g;y[0]g&&(g+=o);var T=t(m,o),S=T+o;return T>=b&&T<=g||S>=b&&S<=g}function c(m,y,b,g){if(!u(y,g))return!1;var T,S;return b[0]=T&&m<=S}function h(m,y,b,g,T,S,A){T=T||0,S=S||0;var M=f([b,g]),w,C,x,_,k;M?(w=0,C=n,x=o):b1/3&&t.x<2/3},qg.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3},qg.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3},qg.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3},qg.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}),qg}var jg={},uee;function Aze(){if(uee)return jg;uee=1;var e=E2().mod;jg.segmentsIntersect=t;function t(a,f,i,l,u,c,h,d){var v=i-a,p=u-a,m=h-u,y=l-f,b=c-f,g=d-c,T=v*g-m*y;if(T===0)return null;var S=(p*g-m*b)/T,A=(p*y-v*b)/T;return A<0||A>1||S<0||S>1?null:{x:a+v*S,y:f+y*S}}jg.segmentDistance=function(f,i,l,u,c,h,d,v){if(t(f,i,l,u,c,h,d,v))return 0;var p=l-f,m=u-i,y=d-c,b=v-h,g=p*p+m*m,T=y*y+b*b,S=Math.min(r(p,m,g,c-f,h-i),r(p,m,g,d-f,v-i),r(y,b,T,f-c,i-h),r(y,b,T,l-c,u-h));return Math.sqrt(S)};function r(a,f,i,l,u){var c=l*a+u*f;if(c<0)return l*l+u*u;if(c>i){var h=l-a,d=u-f;return h*h+d*d}else{var v=l*f-u*a;return v*v/i}}var n,o,s;return jg.getTextLocation=function(f,i,l,u){if((f!==o||u!==s)&&(n={},o=f,s=u),n[l])return n[l];var c=f.getPointAtLength(e(l-u/2,i)),h=f.getPointAtLength(e(l+u/2,i)),d=Math.atan((h.y-c.y)/(h.x-c.x)),v=f.getPointAtLength(e(l,i)),p=(v.x*4+c.x+h.x)/6,m=(v.y*4+c.y+h.y)/6,y={x:p,y:m,theta:d};return n[l]=y,y},jg.clearLocationCache=function(){o=null},jg.getVisibleSegment=function(f,i,l){var u=i.left,c=i.right,h=i.top,d=i.bottom,v=0,p=f.getTotalLength(),m=p,y,b;function g(S){var A=f.getPointAtLength(S);S===0?y=A:S===p&&(b=A);var M=A.xc?A.x-c:0,w=A.yd?A.y-d:0;return Math.sqrt(M*M+w*w)}for(var T=g(v);T;){if(v+=T+l,v>m)return;T=g(v)}for(T=g(m);T;){if(m-=T+l,v>m)return;T=g(m)}return{min:v,max:m,len:m-v,total:p,isClosed:v===0&&m===p&&Math.abs(y.x-b.x)<.1&&Math.abs(y.y-b.y)<.1}},jg.findPointOnPath=function(f,i,l,u){u=u||{};for(var c=u.pathLength||f.getTotalLength(),h=u.tolerance||.001,d=u.iterationLimit||30,v=f.getPointAtLength(0)[l]>f.getPointAtLength(c)[l]?-1:1,p=0,m=0,y=c,b,g,T;p0?y=b:m=b,p++}return g},jg}var BC={},fee;function i$(){return fee||(fee=1,(function(e){var t={};e.throttle=function(o,s,a){var f=t[o],i=Date.now();if(!f){for(var l in t)t[l].tsf.ts+s){u();return}f.timer=setTimeout(function(){u(),f.timer=null},s)},e.done=function(n){var o=t[n];return!o||!o.timer?Promise.resolve():new Promise(function(s){var a=o.onDone;o.onDone=function(){a&&a(),s(),o.onDone=null}})},e.clear=function(n){if(n)r(t[n]),delete t[n];else for(var o in t)e.clear(o)};function r(n){n&&n.timer!==null&&(clearTimeout(n.timer),n.timer=null)}})(BC)),BC}var qC,cee;function Sze(){return cee||(cee=1,qC=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}),qC}var c_={exports:{}},hee;function Mze(){if(hee)return c_.exports;hee=1,c_.exports=n,c_.exports.isMobile=n,c_.exports.default=n;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,r=/android|ipad|playbook|silk/i;function n(o){o||(o={});let s=o.ua;if(!s&&typeof navigator<"u"&&(s=navigator.userAgent),s&&s.headers&&typeof s.headers["user-agent"]=="string"&&(s=s.headers["user-agent"]),typeof s!="string")return!1;let a=e.test(s)&&!t.test(s)||!!o.tablet&&r.test(s);return!a&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&s.indexOf("Macintosh")!==-1&&s.indexOf("Safari")!==-1&&(a=!0),a}return c_.exports}var jC,dee;function Eze(){if(dee)return jC;dee=1;var e=Ua(),t=Mze();jC=function(o){var s;if(o&&o.hasOwnProperty("userAgent")?s=o.userAgent:s=r(),typeof s!="string")return!0;var a=t({ua:{headers:{"user-agent":s}},tablet:!0,featureDetect:!1});if(!a)for(var f=s.split(" "),i=1;i-1;u--){var c=f[u];if(c.substr(0,8)==="Version/"){var h=c.substr(8).split(".")[0];if(e(h)&&(h=+h),h>=13)return!0}}}return a};function r(){var n;return typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),n}return jC}var UC,vee;function kze(){if(vee)return UC;vee=1;var e=ya();return UC=function(r,n,o){var s=r.selectAll("g."+o.replace(/\s/g,".")).data(n,function(f){return f[0].trace.uid});s.exit().remove(),s.enter().append("g").attr("class",o),s.order();var a=r.classed("rangeplot")?"nodeRangePlot3":"node3";return s.each(function(f){f[0][a]=e.select(this)}),s},UC}var HC,pee;function Cze(){if(pee)return HC;pee=1;var e=ga();return HC=function(r,n){for(var o=r._context.locale,s=0;s<2;s++){for(var a=r._context.locales,f=0;f<2;f++){var i=(a[o]||{}).dictionary;if(i){var l=i[n];if(l)return l}a=e.localeRegistry}var u=o.split("-")[0];if(u===o)break;o=u}return n},HC}var GC,gee;function sAe(){return gee||(gee=1,GC=function(t){for(var r={},n=[],o=0,s=0;s1?(n*t+n*r)/n:t+r,s=String(o).length;if(s>16){var a=String(r).length,f=String(t).length;if(s>=f+a){var i=parseFloat(o).toPrecision(12);i.indexOf("e+")===-1&&(o=+i)}}return o}),YC}var $C,xee;function Pze(){if(xee)return $C;xee=1;var e=Ua(),t=Pi().BADNUM,r=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;return $C=function(o){return typeof o=="string"&&(o=o.replace(r,"")),e(o)?Number(o):t},$C}var bee;function rr(){if(bee)return pk.exports;bee=1;var e=ya(),t=n2.utcFormat,r=Q3e.format,n=Ua(),o=Pi(),s=o.FP_SAFE,a=-s,f=o.BADNUM,i=pk.exports={};i.adjustFormat=function(K){return!K||/^\d[.]\df/.test(K)||/[.]\d%/.test(K)?K:K==="0.f"?"~f":/^\d%/.test(K)?"~%":/^\ds/.test(K)?"~s":!/^[~,.0$]/.test(K)&&/[&fps]/.test(K)?"~"+K:K};var l={};i.warnBadFormat=function(Y){var K=String(Y);l[K]||(l[K]=1,i.warn('encountered bad format: "'+K+'"'))},i.noFormat=function(Y){return String(Y)},i.numberFormat=function(Y){var K;try{K=r(i.adjustFormat(Y))}catch{return i.warnBadFormat(Y),i.noFormat}return K},i.nestedProperty=CS(),i.keyedContainer=q8e(),i.relativeAttr=j8e(),i.isPlainObject=ly(),i.toLogRange=QY(),i.relinkPrivateKeys=U8e();var u=lh();i.isArrayBuffer=u.isArrayBuffer,i.isTypedArray=u.isTypedArray,i.isArrayOrTypedArray=u.isArrayOrTypedArray,i.isArray1D=u.isArray1D,i.ensureArray=u.ensureArray,i.concat=u.concat,i.maxRowLength=u.maxRowLength,i.minRowLength=u.minRowLength;var c=E2();i.mod=c.mod,i.modHalf=c.modHalf;var h=G8e();i.valObjectMeta=h.valObjectMeta,i.coerce=h.coerce,i.coerce2=h.coerce2,i.coerceFont=h.coerceFont,i.coercePattern=h.coercePattern,i.coerceHoverinfo=h.coerceHoverinfo,i.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,i.validate=h.validate;var d=bze();i.dateTime2ms=d.dateTime2ms,i.isDateTime=d.isDateTime,i.ms2DateTime=d.ms2DateTime,i.ms2DateTimeLocal=d.ms2DateTimeLocal,i.cleanDate=d.cleanDate,i.isJSDate=d.isJSDate,i.formatDate=d.formatDate,i.incrementMonth=d.incrementMonth,i.dateTick0=d.dateTick0,i.dfltRange=d.dfltRange,i.findExactDates=d.findExactDates,i.MIN_MS=d.MIN_MS,i.MAX_MS=d.MAX_MS;var v=a$();i.findBin=v.findBin,i.sorterAsc=v.sorterAsc,i.sorterDes=v.sorterDes,i.distinctVals=v.distinctVals,i.roundUp=v.roundUp,i.sort=v.sort,i.findIndexOfMin=v.findIndexOfMin,i.sortObjectKeys=qx();var p=_ze();i.aggNums=p.aggNums,i.len=p.len,i.mean=p.mean,i.median=p.median,i.midRange=p.midRange,i.variance=p.variance,i.stdev=p.stdev,i.interp=p.interp;var m=t$();i.init2dArray=m.init2dArray,i.transposeRagged=m.transposeRagged,i.dot=m.dot,i.translationMatrix=m.translationMatrix,i.rotationMatrix=m.rotationMatrix,i.rotationXYMatrix=m.rotationXYMatrix,i.apply3DTransform=m.apply3DTransform,i.apply2DTransform=m.apply2DTransform,i.apply2DTransform2=m.apply2DTransform2,i.convertCssMatrix=m.convertCssMatrix,i.inverseTransformMatrix=m.inverseTransformMatrix;var y=wze();i.deg2rad=y.deg2rad,i.rad2deg=y.rad2deg,i.angleDelta=y.angleDelta,i.angleDist=y.angleDist,i.isFullCircle=y.isFullCircle,i.isAngleInsideSector=y.isAngleInsideSector,i.isPtInsideSector=y.isPtInsideSector,i.pathArc=y.pathArc,i.pathSector=y.pathSector,i.pathAnnulus=y.pathAnnulus;var b=Tze();i.isLeftAnchor=b.isLeftAnchor,i.isCenterAnchor=b.isCenterAnchor,i.isRightAnchor=b.isRightAnchor,i.isTopAnchor=b.isTopAnchor,i.isMiddleAnchor=b.isMiddleAnchor,i.isBottomAnchor=b.isBottomAnchor;var g=Aze();i.segmentsIntersect=g.segmentsIntersect,i.segmentDistance=g.segmentDistance,i.getTextLocation=g.getTextLocation,i.clearLocationCache=g.clearLocationCache,i.getVisibleSegment=g.getVisibleSegment,i.findPointOnPath=g.findPointOnPath;var T=ja();i.extendFlat=T.extendFlat,i.extendDeep=T.extendDeep,i.extendDeepAll=T.extendDeepAll,i.extendDeepNoArrays=T.extendDeepNoArrays;var S=Dm();i.log=S.log,i.warn=S.warn,i.error=S.error;var A=C2();i.counterRegex=A.counter;var M=i$();i.throttle=M.throttle,i.throttleDone=M.done,i.clearThrottle=M.clear;var w=LS();i.getGraphDiv=w.getGraphDiv,i.isPlotDiv=w.isPlotDiv,i.removeElement=w.removeElement,i.addStyleRule=w.addStyleRule,i.addRelatedStyleRule=w.addRelatedStyleRule,i.deleteRelatedStyleRule=w.deleteRelatedStyleRule,i.getFullTransformMatrix=w.getFullTransformMatrix,i.getElementTransformMatrix=w.getElementTransformMatrix,i.getElementAndAncestors=w.getElementAndAncestors,i.equalDomRects=w.equalDomRects,i.clearResponsive=Sze(),i.preserveDrawingBuffer=Eze(),i.makeTraceGroups=kze(),i._=Cze(),i.notifier=tAe(),i.filterUnique=sAe(),i.filterVisible=Rze(),i.pushUnique=rAe(),i.increment=Lze(),i.cleanNumber=Pze(),i.ensureNumber=function(K){return n(K)?(K=Number(K),K>s||K=K?!1:n(Y)&&Y>=0&&Y%1===0},i.noop=e$(),i.identity=DS(),i.repeat=function(Y,K){for(var X=new Array(K),ee=0;eeX?Math.max(X,Math.min(K,Y)):Math.max(K,Math.min(X,Y))},i.bBoxIntersect=function(Y,K,X){return X=X||0,Y.left<=K.right+X&&K.left<=Y.right+X&&Y.top<=K.bottom+X&&K.top<=Y.bottom+X},i.simpleMap=function(Y,K,X,ee,le){for(var oe=Y.length,fe=new Array(oe),de=0;de=Math.pow(2,X)?le>10?(i.warn("randstr failed uniqueness"),fe):Y(K,X,ee,(le||0)+1):fe},i.OptionControl=function(Y,K){Y||(Y={}),K||(K="opt");var X={};return X.optionList=[],X._newoption=function(ee){ee[K]=Y,X[ee.name]=ee,X.optionList.push(ee)},X["_"+K]=Y,X},i.smooth=function(Y,K){if(K=Math.round(K)||0,K<2)return Y;var X=Y.length,ee=2*X,le=2*K-1,oe=new Array(le),fe=new Array(X),de,_e,we,Oe;for(de=0;de=ee&&(we-=ee*Math.floor(we/ee)),we<0?we=-1-we:we>=X&&(we=ee-1-we),Oe+=Y[we]*oe[_e];fe[de]=Oe}return fe},i.syncOrAsync=function(Y,K,X){var ee,le;function oe(){return i.syncOrAsync(Y,K,X)}for(;Y.length;)if(le=Y.splice(0,1)[0],ee=le(K),ee&&ee.then)return ee.then(oe);return X&&X(K)},i.stripTrailingSlash=function(Y){return Y.substr(-1)==="/"?Y.substr(0,Y.length-1):Y},i.noneOrAll=function(Y,K,X){if(Y){var ee=!1,le=!0,oe,fe;for(oe=0;oe0?le:0})},i.fillArray=function(Y,K,X,ee){if(ee=ee||i.identity,i.isArrayOrTypedArray(Y))for(var le=0;le1?le+fe[1]:"";if(oe&&(fe.length>1||de.length>4||X))for(;ee.test(de);)de=de.replace(ee,"$1"+oe+"$2");return de+_e},i.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;i.templateString=function(Y,K){var X={};return Y.replace(i.TEMPLATE_STRING_REGEX,function(ee,le){var oe;return z.test(le)?oe=K[le]:(X[le]=X[le]||i.nestedProperty(K,le).get,oe=X[le]()),i.isValidTextValue(oe)?oe:""})};var N={max:10,count:0,name:"hovertemplate"};i.hovertemplateString=function(){return J.apply(N,arguments)};var q={max:10,count:0,name:"texttemplate"};i.texttemplateString=function(){return J.apply(q,arguments)};var P=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function B(Y){var K=Y.match(P);return K?{key:K[1],op:K[2],number:Number(K[3])}:{key:Y,op:null,number:null}}var $={max:10,count:0,name:"texttemplate",parseMultDiv:!0};i.texttemplateStringForShapes=function(){return J.apply($,arguments)};var Q=/^[:|\|]/;function J(Y,K,X){var ee=this,le=arguments;K||(K={});var oe={};return Y.replace(i.TEMPLATE_STRING_REGEX,function(fe,de,_e){var we=de==="xother"||de==="yother",Oe=de==="_xother"||de==="_yother",be=de==="_xother_"||de==="_yother_",Te=de==="xother_"||de==="yother_",ke=we||Oe||Te||be,Ee=de;(Oe||be)&&(Ee=Ee.substring(1)),(Te||be)&&(Ee=Ee.substring(0,Ee.length-1));var Le=null,Fe=null;if(ee.parseMultDiv){var qe=B(Ee);Ee=qe.key,Le=qe.op,Fe=qe.number}var We;if(ke){if(We=K[Ee],We===void 0)return""}else{var Qe,De;for(De=3;De=ne&&fe<=te,we=de>=ne&&de<=te;if(_e&&(ee=10*ee+fe-ne),we&&(le=10*le+de-ne),!_e||!we){if(ee!==le)return ee-le;if(fe!==de)return fe-de}}return le-ee};var Z=2e9;i.seedPseudoRandom=function(){Z=2e9},i.pseudoRandom=function(){var Y=Z;return Z=(69069*Z+1)%4294967296,Math.abs(Z-Y)<429496729?i.pseudoRandom():Z/4294967296},i.fillText=function(Y,K,X){var ee=Array.isArray(X)?function(fe){X.push(fe)}:function(fe){X.text=fe},le=i.extractOption(Y,K,"htx","hovertext");if(i.isValidTextValue(le))return ee(le);var oe=i.extractOption(Y,K,"tx","text");if(i.isValidTextValue(oe))return ee(oe)},i.isValidTextValue=function(Y){return Y||Y===0},i.formatPercent=function(Y,K){K=K||0;for(var X=(Math.round(100*Y*Math.pow(10,K))*Math.pow(.1,K)).toFixed(K)+"%",ee=0;ee1&&(we=1):we=0,i.strTranslate(le-we*(X+fe),oe-we*(ee+de))+i.strScale(we)+(_e?"rotate("+_e+(K?"":" "+X+" "+ee)+")":"")},i.setTransormAndDisplay=function(Y,K){Y.attr("transform",i.getTextTransform(K)),Y.style("display",K.scale?null:"none")},i.ensureUniformFontSize=function(Y,K){var X=i.extendFlat({},K);return X.size=Math.max(K.size,Y._fullLayout.uniformtext.minsize||0),X},i.join2=function(Y,K,X){var ee=Y.length;return ee>1?Y.slice(0,-1).join(K)+X+Y[ee-1]:Y.join(K)},i.bigFont=function(Y){return Math.round(1.2*Y)};var G=i.getFirefoxVersion(),j=G!==null&&G<86;return i.getPositionFromD3Event=function(){return j?[e.event.layerX,e.event.layerY]:[e.event.offsetX,e.event.offsetY]},pk.exports}var _ee;function Dze(){if(_ee)return yJ;_ee=1;var e=rr(),t={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var r in t){var n=r.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");e.addStyleRule(n,t[r])}return yJ}var Rs={},WC={},XC,wee;function lAe(){return wee||(wee=1,XC=!0),XC}var ZC,Tee;function uAe(){if(Tee)return ZC;Tee=1;var e=lAe(),t;return typeof Mu.matchMedia=="function"?t=!Mu.matchMedia("(hover: none)").matches:t=e,ZC=t,ZC}var bT={exports:{}},Aee;function jx(){if(Aee)return bT.exports;Aee=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(S,A,M){return Function.prototype.apply.call(S,A,M)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:r=function(S){return Object.getOwnPropertyNames(S)};function n(T){console&&console.warn&&console.warn(T)}var o=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}bT.exports=s,bT.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function f(T){if(typeof T!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(T){if(typeof T!="number"||T<0||o(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");a=T}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||o(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function i(T){return T._maxListeners===void 0?s.defaultMaxListeners:T._maxListeners}s.prototype.getMaxListeners=function(){return i(this)},s.prototype.emit=function(S){for(var A=[],M=1;M0&&(x=A[0]),x instanceof Error)throw x;var _=new Error("Unhandled error."+(x?" ("+x.message+")":""));throw _.context=x,_}var k=C[S];if(k===void 0)return!1;if(typeof k=="function")t(k,this,A);else for(var E=k.length,I=v(k,E),M=0;M0&&x.length>w&&!x.warned){x.warned=!0;var _=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");_.name="MaxListenersExceededWarning",_.emitter=T,_.type=S,_.count=x.length,n(_)}return T}s.prototype.addListener=function(S,A){return l(this,S,A,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,A){return l(this,S,A,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(T,S,A){var M={fired:!1,wrapFn:void 0,target:T,type:S,listener:A},w=u.bind(M);return w.listener=A,M.wrapFn=w,w}s.prototype.once=function(S,A){return f(A),this.on(S,c(this,S,A)),this},s.prototype.prependOnceListener=function(S,A){return f(A),this.prependListener(S,c(this,S,A)),this},s.prototype.removeListener=function(S,A){var M,w,C,x,_;if(f(A),w=this._events,w===void 0)return this;if(M=w[S],M===void 0)return this;if(M===A||M.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete w[S],w.removeListener&&this.emit("removeListener",S,M.listener||A));else if(typeof M!="function"){for(C=-1,x=M.length-1;x>=0;x--)if(M[x]===A||M[x].listener===A){_=M[x].listener,C=x;break}if(C<0)return this;C===0?M.shift():p(M,C),M.length===1&&(w[S]=M[0]),w.removeListener!==void 0&&this.emit("removeListener",S,_||A)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var A,M,w;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[S]),this;if(arguments.length===0){var C=Object.keys(M),x;for(w=0;w=0;w--)this.removeListener(S,A[w]);return this};function h(T,S,A){var M=T._events;if(M===void 0)return[];var w=M[S];return w===void 0?[]:typeof w=="function"?A?[w.listener||w]:[w]:A?m(w):v(w,w.length)}s.prototype.listeners=function(S){return h(this,S,!0)},s.prototype.rawListeners=function(S){return h(this,S,!1)},s.listenerCount=function(T,S){return typeof T.listenerCount=="function"?T.listenerCount(S):d.call(T,S)},s.prototype.listenerCount=d;function d(T){var S=this._events;if(S!==void 0){var A=S[T];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function v(T,S){for(var A=new Array(S),M=0;Mt.queueLength&&(o.undoQueue.queue.shift(),o.undoQueue.index--)},n.startSequence=function(o){o.undoQueue=o.undoQueue||{index:0,queue:[],sequence:!1},o.undoQueue.sequence=!0,o.undoQueue.beginSequence=!0},n.stopSequence=function(o){o.undoQueue=o.undoQueue||{index:0,queue:[],sequence:!1},o.undoQueue.sequence=!1,o.undoQueue.beginSequence=!1},n.undo=function(s){var a,f;if(!(s.undoQueue===void 0||isNaN(s.undoQueue.index)||s.undoQueue.index<=0)){for(s.undoQueue.index--,a=s.undoQueue.queue[s.undoQueue.index],s.undoQueue.inSequence=!0,f=0;f=s.undoQueue.queue.length)){for(a=s.undoQueue.queue[s.undoQueue.index],s.undoQueue.inSequence=!0,f=0;f=$.length)return!1;P=(t.transformsRegistry[$[Q].type]||{}).attributes,B=P&&P[z[2]],q=3}else{var J=D._module;if(J||(J=(t.modules[D.type||n.type.dflt]||{})._module),!J)return!1;if(P=J.attributes,B=P&&P[N],!B){var ne=J.basePlotModule;ne&&ne.attributes&&(B=ne.attributes[N])}B||(B=n[N])}return T(B,z,q)},e.getLayoutValObject=function(D,z){var N=g(D,z[0]);return T(N,z,1)};function g(D,z){var N,q,P,B,$=D._basePlotModules;if($){var Q;for(N=0;N<$.length;N++){if(P=$[N],P.attrRegex&&P.attrRegex.test(z)){if(P.layoutAttrOverrides)return P.layoutAttrOverrides;!Q&&P.layoutAttributes&&(Q=P.layoutAttributes)}var J=P.baseLayoutAttrOverrides;if(J&&z in J)return J[z]}if(Q)return Q}var ne=D._modules;if(ne){for(N=0;N=B.length)return!1;if(D.dimensions===2){if(N++,z.length===N)return D;var $=z[N];if(!S($))return!1;D=B[P][$]}else D=B[P]}else D=B}}return D}function S(D){return D===Math.round(D)&&D>=0}function A(D){var z,N;z=t.modules[D]._module,N=z.basePlotModule;var q={};q.type=null;var P=l({},n),B=l({},z.attributes);e.crawl(B,function(J,ne,te,Z,G){h(P,G).set(void 0),J===void 0&&h(B,G).set(void 0)}),l(q,P),t.traceIs(D,"noOpacity")&&delete q.opacity,t.traceIs(D,"showLegend")||(delete q.showlegend,delete q.legendgroup),t.traceIs(D,"noHover")&&(delete q.hoverinfo,delete q.hoverlabel),z.selectPoints||delete q.selectedpoints,l(q,B),N.attributes&&l(q,N.attributes),q.type=D;var $={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:D,attributes:x(q)};if(z.layoutAttributes){var Q={};l(Q,z.layoutAttributes),$.layoutAttributes=x(Q)}return z.animatable||e.crawl($,function(J){e.isValObject(J)&&"anim"in J&&delete J.anim}),$}function M(){var D={},z,N;l(D,o);for(z in t.subplotsRegistry)if(N=t.subplotsRegistry[z],!!N.layoutAttributes)if(Array.isArray(N.attr))for(var q=0;q=l&&(i._input||{})._templateitemname;c&&(u=l);var h=f+"["+u+"]",d;function v(){d={},c&&(d[h]={},d[h][r]=c)}v();function p(g,T){d[g]=T}function m(g,T){c?e.nestedProperty(d[h],g).set(T):d[h+"."+g]=T}function y(){var g=d;return v(),g}function b(g,T){g&&m(g,T);var S=y();for(var A in S)e.nestedProperty(a,A).set(S[A])}return{modifyBase:p,modifyItem:m,getUpdateObj:y,applyUpdate:b}},Ug}var r5={},n5,Ree;function Wu(){if(Ree)return n5;Ree=1;var e=C2().counter;return n5={idRegex:{x:e("x","( domain)?"),y:e("y","( domain)?")},attrRegex:e("[xy]axis"),xAxisMatch:e("xaxis"),yAxisMatch:e("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}},n5}var Lee;function xl(){return Lee||(Lee=1,(function(e){var t=ga(),r=Wu();e.id2name=function(s){if(!(typeof s!="string"||!s.match(r.AX_ID_PATTERN))){var a=s.split(" ")[0].substr(1);return a==="1"&&(a=""),s.charAt(0)+"axis"+a}},e.name2id=function(s){if(s.match(r.AX_NAME_PATTERN)){var a=s.substr(5);return a==="1"&&(a=""),s.charAt(0)+a}},e.cleanId=function(s,a,f){var i=/( domain)$/.test(s);if(!(typeof s!="string"||!s.match(r.AX_ID_PATTERN))&&!(a&&s.charAt(0)!==a)&&!(i&&!f)){var l=s.split(" ")[0].substr(1).replace(/^0+/,"");return l==="1"&&(l=""),s.charAt(0)+l+(i&&f?" domain":"")}},e.list=function(o,s,a){var f=o._fullLayout;if(!f)return[];var i=e.listIds(o,s),l=new Array(i.length),u;for(u=0;uf?1:-1:+(o.substr(1)||1)-+(s.substr(1)||1)},e.ref2id=function(o){return/^[xyz]/.test(o)?o.split(" ")[0]:!1};function n(o,s){if(s&&s.length){for(var a=0;a0?".":"")+h;r.isPlainObject(d)?f(d,l,v,c+1):l(v,h,d)}})}})(o5)),o5}var zee;function Ts(){if(zee)return t5.exports;zee=1;var e=ya(),t=n2.timeFormatLocale,r=Q3e.formatLocale,n=Ua(),o=eAe,s=ga(),a=Im(),f=go(),i=rr(),l=va(),u=Pi().BADNUM,c=xl(),h=Om().clearOutline,d=o$(),v=PS(),p=fAe(),m=cc().getModuleCalcData,y=i.relinkPrivateKeys,b=i._,g=t5.exports={};i.extendFlat(g,s),g.attributes=qo(),g.attributes.type.values=g.allTypes,g.fontAttrs=Gs(),g.layoutAttributes=Bx(),g.fontWeight="normal";var T=g.transformsRegistry,S=Oze();g.executeAPICommand=S.executeAPICommand,g.computeAPICommandBindings=S.computeAPICommandBindings,g.manageCommandObserver=S.manageCommandObserver,g.hasSimpleAPICommandBindings=S.hasSimpleAPICommandBindings,g.redrawText=function(j){return j=i.getGraphDiv(j),new Promise(function(Y){setTimeout(function(){j._fullLayout&&(s.getComponentMethod("annotations","draw")(j),s.getComponentMethod("legend","draw")(j),s.getComponentMethod("colorbar","draw")(j),Y(g.previousPromises(j)))},300)})},g.resize=function(j){j=i.getGraphDiv(j);var Y,K=new Promise(function(X,ee){(!j||i.isHidden(j))&&ee(new Error("Resize must be passed a displayed plot div element.")),j._redrawTimer&&clearTimeout(j._redrawTimer),j._resolveResize&&(Y=j._resolveResize),j._resolveResize=X,j._redrawTimer=setTimeout(function(){if(!j.layout||j.layout.width&&j.layout.height||i.isHidden(j)){X(j);return}delete j.layout.width,delete j.layout.height;var le=j.changed;j.autoplay=!0,s.call("relayout",j,{autosize:!0}).then(function(){j.changed=le,j._resolveResize===X&&(delete j._resolveResize,X(j))})},100)});return Y&&Y(K),K},g.previousPromises=function(j){if((j._promises||[]).length)return Promise.all(j._promises).then(function(){j._promises=[]})},g.addLinks=function(j){if(!(!j._context.showLink&&!j._context.showSources)){var Y=j._fullLayout,K=i.ensureSingle(Y._paper,"text","js-plot-link-container",function(de){de.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:l.defaultLine,"pointer-events":"all"}).each(function(){var _e=e.select(this);_e.append("tspan").classed("js-link-to-tool",!0),_e.append("tspan").classed("js-link-spacer",!0),_e.append("tspan").classed("js-sourcelinks",!0)})}),X=K.node(),ee={y:Y._paper.attr("height")-9};document.body.contains(X)&&X.getComputedTextLength()>=Y.width-20?(ee["text-anchor"]="start",ee.x=5):(ee["text-anchor"]="end",ee.x=Y._paper.attr("width")-7),K.attr(ee);var le=K.select(".js-link-to-tool"),oe=K.select(".js-link-spacer"),fe=K.select(".js-sourcelinks");j._context.showSources&&j._context.showSources(j),j._context.showLink&&A(j,le),oe.text(le.text()&&fe.text()?" - ":"")}};function A(j,Y){Y.text("");var K=Y.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(j._context.linkText+" »");if(j._context.sendData)K.on("click",function(){g.sendDataToCloud(j)});else{var X=window.location.pathname.split("/"),ee=window.location.search;K.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+X[2].split(".")[0]+"/"+X[1]+ee})}}g.sendDataToCloud=function(j){var Y=(window.PLOTLYENV||{}).BASE_URL||j._context.plotlyServerURL;if(Y){j.emit("plotly_beforeexport");var K=e.select(j).append("div").attr("id","hiddenform").style("display","none"),X=K.append("form").attr({action:Y+"/external",method:"post",target:"_blank"}),ee=X.append("input").attr({type:"text",name:"data"});return ee.node().value=g.graphJson(j,!1,"keepdata"),X.node().submit(),K.remove(),j.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],w=["year","month","dayMonth","dayMonthYear"];g.supplyDefaults=function(j,Y){var K=Y&&Y.skipUpdateCalc,X=j._fullLayout||{};if(X._skipDefaults){delete X._skipDefaults;return}var ee=j._fullLayout={},le=j.layout||{},oe=j._fullData||[],fe=j._fullData=[],de=j.data||[],_e=j.calcdata||[],we=j._context||{},Oe;j._transitionData||g.createTransitionData(j),ee._dfltTitle={plot:b(j,"Click to enter Plot title"),x:b(j,"Click to enter X axis title"),y:b(j,"Click to enter Y axis title"),colorbar:b(j,"Click to enter Colorscale title"),annotation:b(j,"new text")},ee._traceWord=b(j,"trace");var be=_(j,M);if(ee._mapboxAccessToken=we.mapboxAccessToken,X._initialAutoSizeIsDone){var Te=X.width,ke=X.height;g.supplyLayoutGlobalDefaults(le,ee,be),le.width||(ee.width=Te),le.height||(ee.height=ke),g.sanitizeMargins(ee)}else{g.supplyLayoutGlobalDefaults(le,ee,be);var Ee=!le.width||!le.height,Le=ee.autosize,Fe=we.autosizable,qe=Ee&&(Le||Fe);qe?g.plotAutoSize(j,le,ee):Ee&&g.sanitizeMargins(ee),!Le&&Ee&&(le.width=ee.width,le.height=ee.height)}ee._d3locale=k(be,ee.separators),ee._extraFormat=_(j,w),ee._initialAutoSizeIsDone=!0,ee._dataLength=de.length,ee._modules=[],ee._visibleModules=[],ee._basePlotModules=[];var We=ee._subplots=x(),Qe=ee._splomAxes={x:{},y:{}},De=ee._splomSubplots={};ee._splomGridDflt={},ee._scatterStackOpts={},ee._firstScatter={},ee._alignmentOpts={},ee._colorAxes={},ee._requestRangeslider={},ee._traceUids=C(oe,de),ee._globalTransforms=(j._context||{}).globalTransforms,g.supplyDataDefaults(de,fe,le,ee);var me=Object.keys(Qe.x),Ce=Object.keys(Qe.y);if(me.length>1&&Ce.length>1){for(s.getComponentMethod("grid","sizeDefaults")(le,ee),Oe=0;Oe15&&Ce.length>15&&ee.shapes.length===0&&ee.images.length===0,g.linkSubplots(fe,ee,oe,X),g.cleanPlot(fe,ee,oe,X);var ht=!!(X._has&&X._has("gl2d")),Ht=!!(ee._has&&ee._has("gl2d")),Et=!!(X._has&&X._has("cartesian")),Jt=!!(ee._has&&ee._has("cartesian")),Tt=Et||ht,rt=Jt||Ht;Tt&&!rt?X._bgLayer.remove():rt&&!Tt&&(ee._shouldCreateBgLayer=!0),X._zoomlayer&&!j._dragging&&h({_fullLayout:X}),E(fe,ee),y(ee,X),s.getComponentMethod("colorscale","crossTraceDefaults")(fe,ee),ee._preGUI||(ee._preGUI={}),ee._tracePreGUI||(ee._tracePreGUI={});var gt=ee._tracePreGUI,mt={},He;for(He in gt)mt[He]="old";for(Oe=0;Oe0){var we=1-2*le;oe=Math.round(we*oe),fe=Math.round(we*fe)}}var Oe=g.layoutAttributes.width.min,be=g.layoutAttributes.height.min;oe1,ke=!K.height&&Math.abs(X.height-fe)>1;(ke||Te)&&(Te&&(X.width=oe),ke&&(X.height=fe)),Y._initialAutoSize||(Y._initialAutoSize={width:oe,height:fe}),g.sanitizeMargins(X)},g.supplyLayoutModuleDefaults=function(j,Y,K,X){var ee=s.componentsRegistry,le=Y._basePlotModules,oe,fe,de,_e=s.subplotsRegistry.cartesian;for(oe in ee)de=ee[oe],de.includeBasePlot&&de.includeBasePlot(j,Y);le.length||le.push(_e),Y._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(j,Y),_e.finalizeSubplots(j,Y));for(var we in Y._subplots)Y._subplots[we].sort(i.subplotSort);for(fe=0;fe1&&(K.l/=Le,K.r/=Le)}if(be){var Fe=(K.t+K.b)/be;Fe>1&&(K.t/=Fe,K.b/=Fe)}var qe=K.xl!==void 0?K.xl:K.x,We=K.xr!==void 0?K.xr:K.x,Qe=K.yt!==void 0?K.yt:K.y,De=K.yb!==void 0?K.yb:K.y;Te[Y]={l:{val:qe,size:K.l+Ee},r:{val:We,size:K.r+Ee},b:{val:De,size:K.b+Ee},t:{val:Qe,size:K.t+Ee}},ke[Y]=1}if(!X._replotting)return g.doAutoMargin(j)}};function B(j){if("_redrawFromAutoMarginCount"in j._fullLayout)return!1;var Y=c.list(j,"",!0);for(var K in Y)if(Y[K].autoshift||Y[K].shift)return!0;return!1}g.doAutoMargin=function(j){var Y=j._fullLayout,K=Y.width,X=Y.height;Y._size||(Y._size={}),N(Y);var ee=Y._size,le=Y.margin,oe={t:0,b:0,l:0,r:0},fe=i.extendFlat({},ee),de=le.l,_e=le.r,we=le.t,Oe=le.b,be=Y._pushmargin,Te=Y._pushmarginIds,ke=Y.minreducedwidth,Ee=Y.minreducedheight;if(le.autoexpand!==!1){for(var Le in be)Te[Le]||delete be[Le];var Fe=j._fullLayout._reservedMargin;for(var qe in Fe)for(var We in Fe[qe]){var Qe=Fe[qe][We];oe[We]=Math.max(oe[We],Qe)}be.base={l:{val:0,size:de},r:{val:1,size:_e},t:{val:1,size:we},b:{val:0,size:Oe}};for(var De in oe){var me=0;for(var Ce in be)Ce!=="base"&&n(be[Ce][De].size)&&(me=be[Ce][De].size>me?be[Ce][De].size:me);var et=Math.max(0,le[De]-me);oe[De]=Math.max(0,oe[De]-et)}for(var st in be){var ot=be[st].l||{},ut=be[st].b||{},ht=ot.val,Ht=ot.size,Et=ut.val,Jt=ut.size,Tt=K-oe.r-oe.l,rt=X-oe.t-oe.b;for(var gt in be){if(n(Ht)&&be[gt].r){var mt=be[gt].r.val,He=be[gt].r.size;if(mt>ht){var Ie=(Ht*mt+(He-Tt)*ht)/(mt-ht),je=(He*(1-ht)+(Ht-Tt)*(1-mt))/(mt-ht);Ie+je>de+_e&&(de=Ie,_e=je)}}if(n(Jt)&&be[gt].t){var pe=be[gt].t.val,ye=be[gt].t.size;if(pe>Et){var Se=(Jt*pe+(ye-rt)*Et)/(pe-Et),Pe=(ye*(1-Et)+(Jt-rt)*(1-pe))/(pe-Et);Se+Pe>Oe+we&&(Oe=Se,we=Pe)}}}}}var it=i.constrain(K-le.l-le.r,q,ke),vt=i.constrain(X-le.t-le.b,P,Ee),Pt=Math.max(0,K-it),Bt=Math.max(0,X-vt);if(Pt){var It=(de+_e)/Pt;It>1&&(de/=It,_e/=It)}if(Bt){var qt=(Oe+we)/Bt;qt>1&&(Oe/=qt,we/=qt)}if(ee.l=Math.round(de)+oe.l,ee.r=Math.round(_e)+oe.r,ee.t=Math.round(we)+oe.t,ee.b=Math.round(Oe)+oe.b,ee.p=Math.round(le.pad),ee.w=Math.round(K)-ee.l-ee.r,ee.h=Math.round(X)-ee.t-ee.b,!Y._replotting&&(g.didMarginChange(fe,ee)||B(j))){"_redrawFromAutoMarginCount"in Y?Y._redrawFromAutoMarginCount++:Y._redrawFromAutoMarginCount=1;var pr=3*(1+Object.keys(Te).length);if(Y._redrawFromAutoMarginCount1)return!0}return!1},g.graphJson=function(j,Y,K,X,ee,le){(ee&&Y&&!j._fullData||ee&&!Y&&!j._fullLayout)&&g.supplyDefaults(j);var oe=ee?j._fullData:j.data,fe=ee?j._fullLayout:j.layout,de=(j._transitionData||{})._frames;function _e(be,Te){if(typeof be=="function")return Te?"_function_":null;if(i.isPlainObject(be)){var ke={},Ee;return Object.keys(be).sort().forEach(function(We){if(["_","["].indexOf(We.charAt(0))===-1){if(typeof be[We]=="function"){Te&&(ke[We]="_function");return}if(K==="keepdata"){if(We.substr(We.length-3)==="src")return}else if(K==="keepstream"){if(Ee=be[We+"src"],typeof Ee=="string"&&Ee.indexOf(":")>0&&!i.isPlainObject(be.stream))return}else if(K!=="keepall"&&(Ee=be[We+"src"],typeof Ee=="string"&&Ee.indexOf(":")>0))return;ke[We]=_e(be[We],Te)}}),ke}var Le=Array.isArray(be),Fe=i.isTypedArray(be);if((Le||Fe)&&be.dtype&&be.shape){var qe=be.bdata;return _e({dtype:be.dtype,shape:be.shape,bdata:i.isArrayBuffer(qe)?o.encode(qe):qe},Te)}return Le?be.map(function(We){return _e(We,Te)}):Fe?i.simpleMap(be,i.identity):i.isJSDate(be)?i.ms2DateTimeLocal(+be):be}var we={data:(oe||[]).map(function(be){var Te=_e(be);return Y&&delete Te.fit,Te})};if(!Y&&(we.layout=_e(fe),ee)){var Oe=fe._size;we.layout.computed={margin:{b:Oe.b,l:Oe.l,r:Oe.r,t:Oe.t}}}return de&&(we.frames=_e(de)),le&&(we.config=_e(j._context,!0)),X==="object"?we:JSON.stringify(we)},g.modifyFrames=function(j,Y){var K,X,ee,le=j._transitionData._frames,oe=j._transitionData._frameHash;for(K=0;K0&&(j._transitioningWithDuration=!0),j._transitionData._interruptCallbacks.push(function(){X=!0}),K.redraw&&j._transitionData._interruptCallbacks.push(function(){return s.call("redraw",j)}),j._transitionData._interruptCallbacks.push(function(){j.emit("plotly_transitioninterrupted",[])});var be=0,Te=0;function ke(){return be++,function(){Te++,!X&&Te===be&&fe(Oe)}}K.runFn(ke),setTimeout(ke())})}function fe(Oe){if(j._transitionData)return le(j._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return s.call("redraw",j)}).then(function(){j._transitioning=!1,j._transitioningWithDuration=!1,j.emit("plotly_transitioned",[])}).then(Oe)}function de(){if(j._transitionData)return j._transitioning=!1,ee(j._transitionData._interruptCallbacks)}var _e=[g.previousPromises,de,K.prepareFn,g.rehover,g.reselect,oe],we=i.syncOrAsync(_e,j);return(!we||!we.then)&&(we=Promise.resolve()),we.then(function(){return j})}g.doCalcdata=function(j,Y){var K=c.list(j),X=j._fullData,ee=j._fullLayout,le,oe,fe,de,_e=new Array(X.length),we=(j.calcdata||[]).slice();for(j.calcdata=_e,ee._numBoxes=0,ee._numViolins=0,ee._violinScaleGroupStats={},j._hmpixcount=0,j._hmlumcount=0,ee._piecolormap={},ee._sunburstcolormap={},ee._treemapcolormap={},ee._iciclecolormap={},ee._funnelareacolormap={},fe=0;fe=0;de--)if(De[de].enabled){le._indexToPoints=De[de]._indexToPoints;break}oe&&oe.calc&&(Qe=oe.calc(j,le))}(!Array.isArray(Qe)||!Qe[0])&&(Qe=[{x:u,y:u}]),Qe[0].t||(Qe[0].t={}),Qe[0].trace=le,_e[qe]=Qe}}for(Z(K,X,ee),fe=0;feoe||be>fe)&&(ee.style("overflow","hidden"),we=ee.node().getBoundingClientRect(),Oe=we.width,be=we.height);var Te=+q.attr("x"),ke=+q.attr("y"),Ee=G||q.node().getBoundingClientRect().height,Le=-Ee/4;if(ne[0]==="y")le.attr({transform:"rotate("+[-90,Te,ke]+")"+n(-Oe/2,Le-be/2)});else if(ne[0]==="l")ke=Le-be/2;else if(ne[0]==="a"&&ne.indexOf("atitle")!==0)Te=0,ke=Le;else{var Fe=q.attr("text-anchor");Te=Te-Oe*(Fe==="middle"?.5:Fe==="end"?1:0),ke=ke+Le-be/2}ee.attr({x:Te,y:ke}),B&&B.call(q,le),Z(le)})})):te(),q};var f=/(<|<|<)/g,i=/(>|>|>)/g;function l(q){return q.replace(f,"\\lt ").replace(i,"\\gt ")}var u=[["$","$"],["\\(","\\)"]];function c(q,P,B){var $=parseInt((MathJax.version||"").split(".")[0]);if($!==2&&$!==3){r.warn("No MathJax version:",MathJax.version);return}var Q,J,ne,te,Z=function(){return J=r.extendDeepAll({},MathJax.Hub.config),ne=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:u},displayAlign:"left"})},G=function(){J=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=u},j=function(){if(Q=MathJax.Hub.config.menuSettings.renderer,Q!=="SVG")return MathJax.Hub.setRenderer("SVG")},Y=function(){Q=MathJax.config.startup.output,Q!=="svg"&&(MathJax.config.startup.output="svg")},K=function(){var de="math-output-"+r.randstr({},64);te=t.select("body").append("div").attr({id:de}).style({visibility:"hidden",position:"absolute","font-size":P.fontSize+"px"}).text(l(q));var _e=te.node();return $===2?MathJax.Hub.Typeset(_e):MathJax.typeset([_e])},X=function(){var de=te.select($===2?".MathJax_SVG":".MathJax"),_e=!de.empty()&&te.select("svg").node();if(!_e)r.log("There was an error in the tex syntax.",q),B();else{var we=_e.getBoundingClientRect(),Oe;$===2?Oe=t.select("body").select("#MathJax_SVG_glyphs"):Oe=de.select("defs"),B(de,Oe,we)}te.remove()},ee=function(){if(Q!=="SVG")return MathJax.Hub.setRenderer(Q)},le=function(){Q!=="svg"&&(MathJax.config.startup.output=Q)},oe=function(){return ne!==void 0&&(MathJax.Hub.processSectionDelay=ne),MathJax.Hub.Config(J)},fe=function(){MathJax.config=J};$===2?MathJax.Hub.Queue(Z,j,K,X,ee,oe):$===3&&(G(),Y(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){K(),X(),le(),fe()}))}var h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},v={sub:"-0.21em",sup:"0.42em"},p="​",m=["http:","https:","mailto:","",void 0,":"],y=e.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,g=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;e.BR_TAG_ALL=//gi;var S=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function C(q,P){if(!q)return null;var B=q.match(P),$=B&&(B[3]||B[4]);return $&&E($)}var x=/(^|;)\s*color:/;e.plainText=function(q,P){P=P||{};for(var B=P.len!==void 0&&P.len!==-1?P.len:1/0,$=P.allowedTags!==void 0?P.allowedTags:["br"],Q="...",J=Q.length,ne=q.split(b),te=[],Z="",G=0,j=0;jJ?te.push(Y.substr(0,le-J)+Q):te.push(Y.substr(0,le));break}Z=""}}return te.join("")};var _={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(q){return q.replace(k,function(P,B){var $;return B.charAt(0)==="#"?$=I(B.charAt(1)==="x"?parseInt(B.substr(2),16):parseInt(B.substr(1),10)):$=_[B],$||P})}e.convertEntities=E;function I(q){if(!(q>1114111)){var P=String.fromCodePoint;if(P)return P(q);var B=String.fromCharCode;return q<=65535?B(q):B((q>>10)+55232,q%1024+56320)}}function F(q,P){P=P.replace(y," ");var B=!1,$=[],Q,J=-1;function ne(){J++;var be=document.createElementNS(o.svg,"tspan");t.select(be).attr({class:"line",dy:J*s+"em"}),q.appendChild(be),Q=be;var Te=$;if($=[{node:be}],Te.length>1)for(var ke=1;ke.",P);return}var Te=$.pop();be!==Te.type&&r.log("Start tag <"+Te.type+"> doesnt match end tag <"+be+">. Pretending it did match.",P),Q=$[$.length-1].node}var j=T.test(P);j?ne():(Q=q,$=[{node:q}]);for(var Y=P.split(b),K=0;K=0;b--,g++){var T=p[b];y[g]=[1-T[0],T[1]]}return y}function h(p,m){m=m||{};for(var y=p.domain,b=p.range,g=b.length,T=new Array(g),S=0;S* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},p={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},m={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function y(w){var C={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return w||(C.dflt=5),C}function b(w){var C={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return w||(C.dflt=1),C}var g={valType:"color",dflt:t.defaultLine,editType:"ticks",description:"Sets the tick color."},T={valType:"color",dflt:t.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function S(w){var C={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return w||(C.dflt=1),C}var A=n({},r,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};return v5={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:t.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:e({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[f.idRegex.x.toString(),f.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[f.idRegex.x.toString(),f.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:o("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[l,i,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+l+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+i+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+l+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+i+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:a,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:c,nticks:h(),tick0:d,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:p,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:m,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:y(),tickwidth:b(),tickcolor:g,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:n({},r,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:e({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:s("tick label")},tickformatstops:o("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:s("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:t.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:T,gridwidth:S(),griddash:A,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:t.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:t.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",f.idRegex.x.toString(),f.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",f.idRegex.x.toString(),f.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:u,nticks:h("minor"),tick0:d,dtick:v,tickvals:p,ticks:m,ticklen:y("minor"),tickwidth:b("minor"),tickcolor:g,gridcolor:T,gridwidth:S("minor"),griddash:A,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:e({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},v5}var p5,Hee;function s$(){if(Hee)return p5;Hee=1;var e=hc(),t=Gs(),r=ja().extendFlat,n=ws().overrideAll;return p5=n({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:e.linecolor,outlinewidth:e.linewidth,bordercolor:e.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:e.minor.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:r({},e.ticks,{dflt:""}),ticklabeloverflow:r({},e.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,ticklabelstep:e.ticklabelstep,showticklabels:e.showticklabels,labelalias:e.labelalias,tickfont:t({description:"Sets the color bar's tick label font"}),tickangle:e.tickangle,tickformat:e.tickformat,tickformatstops:e.tickformatstops,tickprefix:e.tickprefix,showtickprefix:e.showtickprefix,ticksuffix:e.ticksuffix,showticksuffix:e.showticksuffix,separatethousands:e.separatethousands,exponentformat:e.exponentformat,minexponent:e.minexponent,showexponent:e.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:t({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:t({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root"),p5}var g5,Gee;function os(){if(Gee)return g5;Gee=1;var e=s$(),t=C2().counter,r=qx(),n=Fx().scales,o=r(n);function s(a){return"`"+a+"`"}return g5=function(f,i){f=f||"",i=i||{};var l=i.cLetter||"c",u="onlyIfNumerical"in i?i.onlyIfNumerical:!!f,c="noScale"in i?i.noScale:f==="marker.line",h="showScaleDflt"in i?i.showScaleDflt:l==="z",d=typeof i.colorscaleDflt=="string"?n[i.colorscaleDflt]:null,v=i.editTypeOverride||"",p=f?f+".":"",m,y;"colorAttr"in i?(m=i.colorAttr,y=i.colorAttr):(m={z:"z",c:"color"}[l],y="in "+s(p+m));var b=u?" Has an effect only if "+y+" is set to a numerical array.":"",g=l+"auto",T=l+"min",S=l+"max",A=l+"mid",M=s(p+g),w=s(p+T),C=s(p+S),x=w+" and "+C,_={};_[T]=_[S]=void 0;var k={};k[g]=!1;var E={};return m==="color"&&(E.color={valType:"color",arrayOk:!0,editType:v||"style",description:["Sets the",f,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",x,"if set."].join(" ")},i.anim&&(E.color.anim=!0)),E[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:_,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+y+") or the bounds set in",x+b,"Defaults to `false` when",x,"are set by the user."].join(" ")},E[T]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:k,description:["Sets the lower bound of the color domain."+b,"Value should have the same units as",y,"and if set,",C,"must be set as well."].join(" ")},E[S]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:k,description:["Sets the upper bound of the color domain."+b,"Value should have the same units as",y,"and if set,",w,"must be set as well."].join(" ")},E[A]={valType:"number",dflt:null,editType:"calc",impliedEdits:_,description:["Sets the mid-point of the color domain by scaling",w,"and/or",C,"to be equidistant to this point."+b,"Value should have the same units as",y+".","Has no effect when",M,"is `false`."].join(" ")},E.colorscale={valType:"colorscale",editType:"calc",dflt:d,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+b,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",x+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+o+"."].join(" ")},E.autocolorscale={valType:"boolean",dflt:i.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",s(p+"colorscale")+"."+b,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},E.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+b,"If true,",w,"will correspond to the last color","in the array and",C,"will correspond to the first color."].join(" ")},c||(E.showscale={valType:"boolean",dflt:h,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+b].join(" ")},E.colorbar=e),i.noColorAxis||(E.coloraxis={valType:"subplotid",regex:t("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),E},g5}var y5,Vee;function cAe(){if(Vee)return y5;Vee=1;var e=ja().extendFlat,t=os(),r=Fx().scales,n="Note that `autocolorscale` must be true for this attribute to work.";return y5={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:r.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",n].join(" ")},sequentialminus:{valType:"colorscale",dflt:r.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",n].join(" ")},diverging:{valType:"colorscale",dflt:r.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",n].join(" ")}},coloraxis:e({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},t("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},y5}var m5,Yee;function hAe(){if(Yee)return m5;Yee=1;var e=rr();return m5=function(r){return e.isPlainObject(r.colorbar)},m5}var _T={},$ee;function dAe(){if($ee)return _T;$ee=1;var e=Ua(),t=rr(),r=Pi(),n=r.ONEDAY,o=r.ONEWEEK;return _T.dtick=function(s,a){var f=a==="log",i=a==="date",l=a==="category",u=i?n:1;if(!s)return u;if(e(s))return s=Number(s),s<=0?u:l?Math.max(1,Math.round(s)):i?Math.max(.1,s):s;if(typeof s!="string"||!(i||f))return u;var c=s.charAt(0),h=s.substr(1);return h=e(h)?Number(h):0,h<=0||!(i&&c==="M"&&h===Math.round(h)||f&&c==="L"||f&&c==="D"&&(h===1||h===2))?u:s},_T.tick0=function(s,a,f,i){if(a==="date")return t.cleanDate(s,t.dateTick0(f,i%o===0?1:0));if(!(i==="D1"||i==="D2"))return e(s)?Number(s):0},_T}var x5,Wee;function Ux(){if(Wee)return x5;Wee=1;var e=dAe(),t=rr().isArrayOrTypedArray,r=lh().isTypedArraySpec,n=lh().decodeTypedArraySpec;return x5=function(s,a,f,i,l){l||(l={});var u=l.isMinor,c=u?s.minor||{}:s,h=u?a.minor:a,d=u?"minor.":"";function v(A){var M=c[A];return r(M)&&(M=n(M)),M!==void 0?M:(h._template||{})[A]}var p=v("tick0"),m=v("dtick"),y=v("tickvals"),b=t(y)?"array":m?"linear":"auto",g=f(d+"tickmode",b);if(g==="auto"||g==="sync")f(d+"nticks");else if(g==="linear"){var T=h.dtick=e.dtick(m,i);h.tick0=e.tick0(p,i,a.calendar,T)}else if(i!=="multicategory"){var S=f(d+"tickvals");S===void 0?h.tickmode="auto":u||f("ticktext")}},x5}var b5,Xee;function L2(){if(Xee)return b5;Xee=1;var e=rr(),t=hc();return b5=function(n,o,s,a){var f=a.isMinor,i=f?n.minor||{}:n,l=f?o.minor:o,u=f?t.minor:t,c=f?"minor.":"",h=e.coerce2(i,l,u,"ticklen",f?(o.ticklen||5)*.6:void 0),d=e.coerce2(i,l,u,"tickwidth",f?o.tickwidth||1:void 0),v=e.coerce2(i,l,u,"tickcolor",(f?o.tickcolor:void 0)||l.color),p=s(c+"ticks",!f&&a.outerTicks||h||d||v?"outside":"");p||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},b5}var _5,Zee;function vAe(){return Zee||(Zee=1,_5=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(s){return t[s]!==void 0}),o=function(s){return t[s]===t[n[0]]};if(n.every(o)||n.length===1)return t[n[0]]}),_5}var w5,Kee;function uh(){if(Kee)return w5;Kee=1;var e=rr(),t=go();return w5=function(n,o,s){var a=s.name,f=s.inclusionAttr||"visible",i=o[a],l=e.isArrayOrTypedArray(n[a])?n[a]:[],u=o[a]=[],c=t.arrayTemplater(o,a,f),h,d;for(h=0;hp-d?d=p-(v-p):v-p=0?b=f.colorscale.sequential:b=f.colorscale.sequentialminus,c._sync("colorscale",b)}},C5}var R5,ite;function Hs(){if(ite)return R5;ite=1;var e=Fx(),t=Bh();return R5={moduleType:"component",name:"colorscale",attributes:os(),layoutAttributes:cAe(),supplyLayoutDefaults:zze(),handleDefaults:Tf(),crossTraceDefaults:Fze(),calc:md(),scales:e.scales,defaultScale:e.defaultScale,getScale:e.get,isValidScale:e.isValid,hasColorscale:t.hasColorscale,extractOpts:t.extractOpts,extractScale:t.extractScale,flipScale:t.flipScale,makeColorScaleFunc:t.makeColorScaleFunc,makeColorScaleFuncFromTrace:t.makeColorScaleFuncFromTrace},R5}var L5,ote;function As(){if(ote)return L5;ote=1;var e=rr(),t=lh().isTypedArraySpec;return L5={hasLines:function(r){return r.visible&&r.mode&&r.mode.indexOf("lines")!==-1},hasMarkers:function(r){return r.visible&&(r.mode&&r.mode.indexOf("markers")!==-1||r.type==="splom")},hasText:function(r){return r.visible&&r.mode&&r.mode.indexOf("text")!==-1},isBubble:function(r){var n=r.marker;return e.isPlainObject(n)&&(e.isArrayOrTypedArray(n.size)||t(n.size))}},L5}var P5,ste;function IS(){if(ste)return P5;ste=1;var e=Ua();return P5=function(r,n){n||(n=2);var o=r.marker,s=o.sizeref||1,a=o.sizemin||0,f=o.sizemode==="area"?function(i){return Math.sqrt(i/s)}:function(i){return i/s};return function(i){var l=f(i/n);return e(l)&&l>0?Math.max(l,a):0}},P5}var D5={},lte;function Wd(){return lte||(lte=1,(function(e){var t=rr();e.getSubplot=function(f){return f.subplot||f.xaxis+f.yaxis||f.geo},e.isTraceInSubplots=function(f,i){if(f.type==="splom"){for(var l=f.xaxes||[],u=f.yaxes||[],c=0;c=0&&l.index2&&(a.push([i].concat(l.splice(0,2))),u="l",i=i=="m"?"l":"L");;){if(l.length==e[u])return l.unshift(i),a.push(l);if(l.length0&&(Te=100,be=be.replace("-open","")),be.indexOf("-dot")>0&&(Te+=200,be=be.replace("-dot","")),be=y.symbolNames.indexOf(be),be>=0&&(be+=Te)}return be%100>=T||be>=400?0:Math.floor(Math.max(be,0))};function A(be,Te,ke,Ee){var Le=be%100;return y.symbolFuncs[Le](Te,ke,Ee)+(be>=200?S:"")}var M=r("~f"),w={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};y.gradient=function(be,Te,ke,Ee,Le,Fe){var qe=w[Ee];return C(be,Te,ke,qe.type,Le,Fe,qe.start,qe.stop,!1,qe.reversed)};function C(be,Te,ke,Ee,Le,Fe,qe,We,Qe,De){var me=Le.length,Ce;Ee==="linear"?Ce={node:"linearGradient",attrs:{x1:qe.x,y1:qe.y,x2:We.x,y2:We.y,gradientUnits:Qe?"userSpaceOnUse":"objectBoundingBox"},reversed:De}:Ee==="radial"&&(Ce={node:"radialGradient",reversed:De});for(var et=new Array(me),st=0;st=0&&be.i===void 0&&(be.i=Fe.i),Te.style("opacity",Ee.selectedOpacityFn?Ee.selectedOpacityFn(be):be.mo===void 0?qe.opacity:be.mo),Ee.ms2mrc){var Qe;be.ms==="various"||qe.size==="various"?Qe=3:Qe=Ee.ms2mrc(be.ms),be.mrc=Qe,Ee.selectedSizeFn&&(Qe=be.mrc=Ee.selectedSizeFn(be));var De=y.symbolNumber(be.mx||qe.symbol)||0;be.om=De%200>=100;var me=Oe(be,ke),Ce=j(be,ke);Te.attr("d",A(De,Qe,me,Ce))}var et=!1,st,ot,ut;if(be.so)ut=We.outlierwidth,ot=We.outliercolor,st=qe.outliercolor;else{var ht=(We||{}).width;ut=(be.mlw+1||ht+1||(be.trace?(be.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in be?ot=be.mlcc=Ee.lineScale(be.mlc):t.isArrayOrTypedArray(We.color)?ot=a.defaultLine:ot=We.color,t.isArrayOrTypedArray(qe.color)&&(st=a.defaultLine,et=!0),"mc"in be?st=be.mcc=Ee.markerScale(be.mc):st=qe.color||qe.colors||"rgba(0,0,0,0)",Ee.selectedColorFn&&(st=Ee.selectedColorFn(be))}if(be.om)Te.call(a.stroke,st).style({"stroke-width":(ut||1)+"px",fill:"none"});else{Te.style("stroke-width",(be.isBlank?0:ut)+"px");var Ht=qe.gradient,Et=be.mgt;Et?et=!0:Et=Ht&&Ht.type,t.isArrayOrTypedArray(Et)&&(Et=Et[0],w[Et]||(Et=0));var Jt=qe.pattern,Tt=Jt&&y.getPatternAttr(Jt.shape,be.i,"");if(Et&&Et!=="none"){var rt=be.mgc;rt?et=!0:rt=Ht.color;var gt=ke.uid;et&&(gt+="-"+be.i),y.gradient(Te,Le,gt,Et,[[0,rt],[1,st]],"fill")}else if(Tt){var mt=!1,He=Jt.fgcolor;!He&&Fe&&Fe.color&&(He=Fe.color,mt=!0);var Ie=y.getPatternAttr(He,be.i,Fe&&Fe.color||null),je=y.getPatternAttr(Jt.bgcolor,be.i,null),pe=Jt.fgopacity,ye=y.getPatternAttr(Jt.size,be.i,8),Se=y.getPatternAttr(Jt.solidity,be.i,.3);mt=mt||be.mcc||t.isArrayOrTypedArray(Jt.shape)||t.isArrayOrTypedArray(Jt.bgcolor)||t.isArrayOrTypedArray(Jt.fgcolor)||t.isArrayOrTypedArray(Jt.size)||t.isArrayOrTypedArray(Jt.solidity);var Pe=ke.uid;mt&&(Pe+="-"+be.i),y.pattern(Te,"point",Le,Pe,Tt,ye,Se,be.mcc,Jt.fillmode,je,Ie,pe)}else t.isArrayOrTypedArray(st)?a.fill(Te,st[be.i]):a.fill(Te,st);ut&&a.stroke(Te,ot)}},y.makePointStyleFns=function(be){var Te={},ke=be.marker;return Te.markerScale=y.tryColorscale(ke,""),Te.lineScale=y.tryColorscale(ke,"line"),s.traceIs(be,"symbols")&&(Te.ms2mrc=v.isBubble(be)?p(be):function(){return(ke.size||6)/2}),be.selectedpoints&&t.extendFlat(Te,y.makeSelectedPointStyleFns(be)),Te},y.makeSelectedPointStyleFns=function(be){var Te={},ke=be.selected||{},Ee=be.unselected||{},Le=be.marker||{},Fe=ke.marker||{},qe=Ee.marker||{},We=Le.opacity,Qe=Fe.opacity,De=qe.opacity,me=Qe!==void 0,Ce=De!==void 0;(t.isArrayOrTypedArray(We)||me||Ce)&&(Te.selectedOpacityFn=function(Tt){var rt=Tt.mo===void 0?Le.opacity:Tt.mo;return Tt.selected?me?Qe:rt:Ce?De:d*rt});var et=Le.color,st=Fe.color,ot=qe.color;(st||ot)&&(Te.selectedColorFn=function(Tt){var rt=Tt.mcc||et;return Tt.selected?st||rt:ot||rt});var ut=Le.size,ht=Fe.size,Ht=qe.size,Et=ht!==void 0,Jt=Ht!==void 0;return s.traceIs(be,"symbols")&&(Et||Jt)&&(Te.selectedSizeFn=function(Tt){var rt=Tt.mrc||ut/2;return Tt.selected?Et?ht/2:rt:Jt?Ht/2:rt}),Te},y.makeSelectedTextStyleFns=function(be){var Te={},ke=be.selected||{},Ee=be.unselected||{},Le=be.textfont||{},Fe=ke.textfont||{},qe=Ee.textfont||{},We=Le.color,Qe=Fe.color,De=qe.color;return Te.selectedTextColorFn=function(me){var Ce=me.tc||We;return me.selected?Qe||Ce:De||(Qe?Ce:a.addOpacity(Ce,d))},Te},y.selectedPointStyle=function(be,Te){if(!(!be.size()||!Te.selectedpoints)){var ke=y.makeSelectedPointStyleFns(Te),Ee=Te.marker||{},Le=[];ke.selectedOpacityFn&&Le.push(function(Fe,qe){Fe.style("opacity",ke.selectedOpacityFn(qe))}),ke.selectedColorFn&&Le.push(function(Fe,qe){a.fill(Fe,ke.selectedColorFn(qe))}),ke.selectedSizeFn&&Le.push(function(Fe,qe){var We=qe.mx||Ee.symbol||0,Qe=ke.selectedSizeFn(qe);Fe.attr("d",A(y.symbolNumber(We),Qe,Oe(qe,Te),j(qe,Te))),qe.mrc2=Qe}),Le.length&&be.each(function(Fe){for(var qe=e.select(this),We=0;We0?ke:0}y.textPointStyle=function(be,Te,ke){if(be.size()){var Ee;if(Te.selectedpoints){var Le=y.makeSelectedTextStyleFns(Te);Ee=Le.selectedTextColorFn}var Fe=Te.texttemplate,qe=ke._fullLayout;be.each(function(We){var Qe=e.select(this),De=Fe?t.extractOption(We,Te,"txt","texttemplate"):t.extractOption(We,Te,"tx","text");if(!De&&De!==0){Qe.remove();return}if(Fe){var me=Te._module.formatLabels,Ce=me?me(We,Te,qe):{},et={};m(et,Te,We.i);var st=Te._meta||{};De=t.texttemplateString(De,Ce,qe._d3locale,et,We,st)}var ot=We.tp||Te.textposition,ut=k(We,Te),ht=Ee?Ee(We):We.tc||Te.textfont.color;Qe.call(y.font,We.tf||Te.textfont.family,ut,ht).text(De).call(l.convertToTspans,ke).call(_,ot,ut,We.mrc)})}},y.selectedTextStyle=function(be,Te){if(!(!be.size()||!Te.selectedpoints)){var ke=y.makeSelectedTextStyleFns(Te);be.each(function(Ee){var Le=e.select(this),Fe=ke.selectedTextColorFn(Ee),qe=Ee.tp||Te.textposition,We=k(Ee,Te);a.fill(Le,Fe);var Qe=s.traceIs(Te,"bar-like");_(Le,qe,We,Ee.mrc2||Ee.mrc,Qe)})}};var E=.5;y.smoothopen=function(be,Te){if(be.length<3)return"M"+be.join("L");var ke="M"+be[0],Ee=[],Le;for(Le=1;Le=Qe||Tt>=me&&Tt<=Qe)&&(rt<=Ce&&rt>=De||rt>=Ce&&rt<=De)&&(be=[Tt,rt])}return be}y.applyBackoff=$,y.makeTester=function(){var be=t.ensureSingleById(e.select("body"),"svg","js-plotly-tester",function(ke){ke.attr(u.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Te=t.ensureSingle(be,"path","js-reference-point",function(ke){ke.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});y.tester=be,y.testref=Te},y.savedBBoxes={};var Q=0,J=1e4;y.bBox=function(be,Te,ke){ke||(ke=ne(be));var Ee;if(ke){if(Ee=y.savedBBoxes[ke],Ee)return t.extendFlat({},Ee)}else if(be.childNodes.length===1){var Le=be.childNodes[0];if(ke=ne(Le),ke){var Fe=+Le.getAttribute("x")||0,qe=+Le.getAttribute("y")||0,We=Le.getAttribute("transform");if(!We){var Qe=y.bBox(Le,!1,ke);return Fe&&(Qe.left+=Fe,Qe.right+=Fe),qe&&(Qe.top+=qe,Qe.bottom+=qe),Qe}if(ke+="~"+Fe+"~"+qe+"~"+We,Ee=y.savedBBoxes[ke],Ee)return t.extendFlat({},Ee)}}var De,me;Te?De=be:(me=y.tester.node(),De=be.cloneNode(!0),me.appendChild(De)),e.select(De).attr("transform",null).call(l.positionText,0,0);var Ce=De.getBoundingClientRect(),et=y.testref.node().getBoundingClientRect();Te||me.removeChild(De);var st={height:Ce.height,width:Ce.width,left:Ce.left-et.left,top:Ce.top-et.top,right:Ce.right-et.left,bottom:Ce.bottom-et.top};return Q>=J&&(y.savedBBoxes={},Q=0),ke&&(y.savedBBoxes[ke]=st),Q++,t.extendFlat({},st)};function ne(be){var Te=be.getAttribute("data-unformatted");if(Te!==null)return Te+be.getAttribute("data-math")+be.getAttribute("text-anchor")+be.getAttribute("style")}y.setClipUrl=function(be,Te,ke){be.attr("clip-path",te(Te,ke))};function te(be,Te){if(!be)return null;var ke=Te._context,Ee=ke._exportedPlot?"":ke._baseUrl||"";return Ee?"url('"+Ee+"#"+be+"')":"url(#"+be+")"}y.getTranslate=function(be){var Te=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ke=be.attr?"attr":"getAttribute",Ee=be[ke]("transform")||"",Le=Ee.replace(Te,function(Fe,qe,We){return[qe,We].join(" ")}).split(" ");return{x:+Le[0]||0,y:+Le[1]||0}},y.setTranslate=function(be,Te,ke){var Ee=/(\btranslate\(.*?\);?)/,Le=be.attr?"attr":"getAttribute",Fe=be.attr?"attr":"setAttribute",qe=be[Le]("transform")||"";return Te=Te||0,ke=ke||0,qe=qe.replace(Ee,"").trim(),qe+=i(Te,ke),qe=qe.trim(),be[Fe]("transform",qe),qe},y.getScale=function(be){var Te=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ke=be.attr?"attr":"getAttribute",Ee=be[ke]("transform")||"",Le=Ee.replace(Te,function(Fe,qe,We){return[qe,We].join(" ")}).split(" ");return{x:+Le[0]||1,y:+Le[1]||1}},y.setScale=function(be,Te,ke){var Ee=/(\bscale\(.*?\);?)/,Le=be.attr?"attr":"getAttribute",Fe=be.attr?"attr":"setAttribute",qe=be[Le]("transform")||"";return Te=Te||1,ke=ke||1,qe=qe.replace(Ee,"").trim(),qe+="scale("+Te+","+ke+")",qe=qe.trim(),be[Fe]("transform",qe),qe};var Z=/\s*sc.*/;y.setPointGroupScale=function(be,Te,ke){if(Te=Te||1,ke=ke||1,!!be){var Ee=Te===1&&ke===1?"":"scale("+Te+","+ke+")";be.each(function(){var Le=(this.getAttribute("transform")||"").replace(Z,"");Le+=Ee,Le=Le.trim(),this.setAttribute("transform",Le)})}};var G=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(be,Te,ke){be&&be.each(function(){var Ee,Le=e.select(this),Fe=Le.select("text");if(Fe.node()){var qe=parseFloat(Fe.attr("x")||0),We=parseFloat(Fe.attr("y")||0),Qe=(Le.attr("transform")||"").match(G);Te===1&&ke===1?Ee=[]:Ee=[i(qe,We),"scale("+Te+","+ke+")",i(-qe,-We)],Qe&&Ee.push(Qe),Le.attr("transform",Ee.join(""))}})};function j(be,Te){var ke;return be&&(ke=be.mf),ke===void 0&&(ke=Te.marker&&Te.marker.standoff||0),!Te._geo&&!Te._xA?-ke:ke}y.getMarkerStandoff=j;var Y=Math.atan2,K=Math.cos,X=Math.sin;function ee(be,Te){var ke=Te[0],Ee=Te[1];return[ke*K(be)-Ee*X(be),ke*X(be)+Ee*K(be)]}var le,oe,fe,de,_e,we;function Oe(be,Te){var ke=be.ma;ke===void 0&&(ke=Te.marker.angle,(!ke||t.isArrayOrTypedArray(ke))&&(ke=0));var Ee,Le,Fe=Te.marker.angleref;if(Fe==="previous"||Fe==="north"){if(Te._geo){var qe=Te._geo.project(be.lonlat);Ee=qe[0],Le=qe[1]}else{var We=Te._xA,Qe=Te._yA;if(We&&Qe)Ee=We.c2p(be.x),Le=Qe.c2p(be.y);else return 90}if(Te._geo){var De=be.lonlat[0],me=be.lonlat[1],Ce=Te._geo.project([De,me+1e-5]),et=Te._geo.project([De+1e-5,me]),st=Y(et[1]-Le,et[0]-Ee),ot=Y(Ce[1]-Le,Ce[0]-Ee),ut;if(Fe==="north")ut=ke/180*Math.PI;else if(Fe==="previous"){var ht=De/180*Math.PI,Ht=me/180*Math.PI,Et=le/180*Math.PI,Jt=oe/180*Math.PI,Tt=Et-ht,rt=K(Jt)*X(Tt),gt=X(Jt)*K(Ht)-K(Jt)*X(Ht)*K(Tt);ut=-Y(rt,gt)-Math.PI,le=De,oe=me}var mt=ee(st,[K(ut),0]),He=ee(ot,[X(ut),0]);ke=Y(mt[1]+He[1],mt[0]+He[0])/Math.PI*180,Fe==="previous"&&!(we===Te.uid&&be.i===_e+1)&&(ke=null)}if(Fe==="previous"&&!Te._geo)if(we===Te.uid&&be.i===_e+1&&n(Ee)&&n(Le)){var Ie=Ee-fe,je=Le-de,pe=Te.line&&Te.line.shape||"",ye=pe.slice(pe.length-1);ye==="h"&&(je=0),ye==="v"&&(Ie=0),ke+=Y(je,Ie)/Math.PI*180+90}else ke=null}return fe=Ee,de=Le,_e=be.i,we=Te.uid,ke}return y.getMarkerAngle=Oe,c5.exports}var z5,hte;function Hx(){if(hte)return z5;hte=1;var e=ya(),t=Ua(),r=Ts(),n=ga(),o=rr(),s=o.strTranslate,a=Ba(),f=va(),i=ns(),l=Pm(),u=Zu().OPPOSITE_SIDE,c=/ [XY][0-9]* /;function h(d,v,p){var m=p.propContainer,y=p.propName,b=p.placeholder,g=p.traceIndex,T=p.avoid||{},S=p.attributes,A=p.transform,M=p.containerGroup,w=d._fullLayout,C=1,x=!1,_=m.title,k=(_&&_.text?_.text:"").trim(),E=_&&_.font?_.font:{},I=E.family,F=E.size,D=E.color,z;y==="title.text"?z="titleText":y.indexOf("axis")!==-1?z="axisTitleText":y.indexOf(!0)&&(z="colorbarTitleText");var N=d._context.edits[z];k===""?C=0:k.replace(c," % ")===b.replace(c," % ")&&(C=.2,x=!0,N||(k="")),p._meta?k=o.templateString(k,p._meta):w._meta&&(k=o.templateString(k,w._meta));var q=k||N,P;M||(M=o.ensureSingle(w._infolayer,"g","g-"+v),P=w._hColorbarMoveTitle);var B=M.selectAll("text").data(q?[0]:[]);if(B.enter().append("text"),B.text(k).attr("class",v),B.exit().remove(),!q)return M;function $(te){o.syncOrAsync([Q,J],te)}function Q(te){var Z;return!A&&P&&(A={}),A?(Z="",A.rotate&&(Z+="rotate("+[A.rotate,S.x,S.y]+")"),(A.offset||P)&&(Z+=s(0,(A.offset||0)-(P||0)))):Z=null,te.attr("transform",Z),te.style({"font-family":I,"font-size":e.round(F,2)+"px",fill:f.rgb(D),opacity:C*f.opacity(D),"font-weight":r.fontWeight}).attr(S).call(i.convertToTspans,d),r.previousPromises(d)}function J(te){var Z=e.select(te.node().parentNode);if(T&&T.selection&&T.side&&k){Z.attr("transform",null);var G=u[T.side],j=T.side==="left"||T.side==="top"?-1:1,Y=t(T.pad)?T.pad:2,K=a.bBox(Z.node()),X={t:0,b:0,l:0,r:0},ee=d._fullLayout._reservedMargin;for(var le in ee)for(var oe in ee[le]){var fe=ee[le][oe];X[oe]=Math.max(X[oe],fe)}var de={left:X.l,top:X.t,right:w.width-X.r,bottom:w.height-X.b},_e=T.maxShift||j*(de[T.side]-K[T.side]),we=0;if(_e<0)we=_e;else{var Oe=T.offsetLeft||0,be=T.offsetTop||0;K.left-=Oe,K.right-=Oe,K.top-=be,K.bottom-=be,T.selection.each(function(){var ke=a.bBox(this);o.bBoxIntersect(K,ke,Y)&&(we=Math.max(we,j*(ke[T.side]-K[G])+Y))}),we=Math.min(_e,we),m._titleScoot=Math.abs(we)}if(we>0||_e<0){var Te={left:[-we,0],right:[we,0],top:[0,-we],bottom:[0,we]}[T.side];Z.attr("transform",s(Te[0],Te[1]))}}}B.call($);function ne(){C=0,x=!0,B.text(b).on("mouseover.opacity",function(){e.select(this).transition().duration(l.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){e.select(this).transition().duration(l.HIDE_PLACEHOLDER).style("opacity",0)})}return N&&(k?B.on(".opacity",null):ne(),B.call(i.makeEditable,{gd:d}).on("edit",function(te){g!==void 0?n.call("_guiRestyle",d,y,te,g):n.call("_guiRelayout",d,y,te)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call($)}).on("input",function(te){this.text(te||" ").call(i.positionText,S.x,S.y)})),B.classed("js-placeholder",x),M}return z5={draw:h},z5}var F5,dte;function ag(){if(dte)return F5;dte=1;var e=ya(),t=n2.utcFormat,r=rr(),n=r.numberFormat,o=Ua(),s=r.cleanNumber,a=r.ms2DateTime,f=r.dateTime2ms,i=r.ensureNumber,l=r.isArrayOrTypedArray,u=Pi(),c=u.FP_SAFE,h=u.BADNUM,d=u.LOG_CLIP,v=u.ONEWEEK,p=u.ONEDAY,m=u.ONEHOUR,y=u.ONEMIN,b=u.ONESEC,g=xl(),T=Wu(),S=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(C){return Math.pow(10,C)}function w(C){return C!=null}return F5=function(x,_){_=_||{};var k=x._id||"x",E=k.charAt(0);function I(j,Y){if(j>0)return Math.log(j)/Math.LN10;if(j<=0&&Y&&x.range&&x.range.length===2){var K=x.range[0],X=x.range[1];return .5*(K+X-2*d*Math.abs(K-X))}else return h}function F(j,Y,K,X){if((X||{}).msUTC&&o(j))return+j;var ee=f(j,K||x.calendar);if(ee===h)if(o(j)){j=+j;var le=Math.floor(r.mod(j+.05,1)*10),oe=Math.round(j-le/10);ee=f(new Date(oe))+le/10}else return h;return ee}function D(j,Y,K){return a(j,Y,K||x.calendar)}function z(j){return x._categories[Math.round(j)]}function N(j){if(w(j)){if(x._categoriesMap===void 0&&(x._categoriesMap={}),x._categoriesMap[j]!==void 0)return x._categoriesMap[j];x._categories.push(typeof j=="number"?String(j):j);var Y=x._categories.length-1;return x._categoriesMap[j]=Y,Y}return h}function q(j,Y){for(var K=new Array(Y),X=0;Xx.range[1]&&(K=!K);for(var X=K?-1:1,ee=X*j,le=0,oe=0;oede)le=oe+1;else{le=ee<(fe+de)/2?oe:oe+1;break}}var _e=x._B[le]||0;return isFinite(_e)?Q(j,x._m2,_e):0},te=function(j){var Y=x._rangebreaks.length;if(!Y)return J(j,x._m,x._b);for(var K=0,X=0;Xx._rangebreaks[X].pmax&&(K=X+1);return J(j,x._m2,x._B[K])}}x.c2l=x.type==="log"?I:i,x.l2c=x.type==="log"?M:i,x.l2p=ne,x.p2l=te,x.c2p=x.type==="log"?function(j,Y){return ne(I(j,Y))}:ne,x.p2c=x.type==="log"?function(j){return M(te(j))}:te,["linear","-"].indexOf(x.type)!==-1?(x.d2r=x.r2d=x.d2c=x.r2c=x.d2l=x.r2l=s,x.c2d=x.c2r=x.l2d=x.l2r=i,x.d2p=x.r2p=function(j){return x.l2p(s(j))},x.p2d=x.p2r=te,x.cleanPos=i):x.type==="log"?(x.d2r=x.d2l=function(j,Y){return I(s(j),Y)},x.r2d=x.r2c=function(j){return M(s(j))},x.d2c=x.r2l=s,x.c2d=x.l2r=i,x.c2r=I,x.l2d=M,x.d2p=function(j,Y){return x.l2p(x.d2r(j,Y))},x.p2d=function(j){return M(te(j))},x.r2p=function(j){return x.l2p(s(j))},x.p2r=te,x.cleanPos=i):x.type==="date"?(x.d2r=x.r2d=r.identity,x.d2c=x.r2c=x.d2l=x.r2l=F,x.c2d=x.c2r=x.l2d=x.l2r=D,x.d2p=x.r2p=function(j,Y,K){return x.l2p(F(j,0,K))},x.p2d=x.p2r=function(j,Y,K){return D(te(j),Y,K)},x.cleanPos=function(j){return r.cleanDate(j,h,x.calendar)}):x.type==="category"?(x.d2c=x.d2l=N,x.r2d=x.c2d=x.l2d=z,x.d2r=x.d2l_noadd=B,x.r2c=function(j){var Y=$(j);return Y!==void 0?Y:x.fraction2r(.5)},x.l2r=x.c2r=i,x.r2l=$,x.d2p=function(j){return x.l2p(x.r2c(j))},x.p2d=function(j){return z(te(j))},x.r2p=x.d2p,x.p2r=te,x.cleanPos=function(j){return typeof j=="string"&&j!==""?j:i(j)}):x.type==="multicategory"&&(x.r2d=x.c2d=x.l2d=z,x.d2r=x.d2l_noadd=B,x.r2c=function(j){var Y=B(j);return Y!==void 0?Y:x.fraction2r(.5)},x.r2c_just_indices=P,x.l2r=x.c2r=i,x.r2l=B,x.d2p=function(j){return x.l2p(x.r2c(j))},x.p2d=function(j){return z(te(j))},x.r2p=x.d2p,x.p2r=te,x.cleanPos=function(j){return Array.isArray(j)||typeof j=="string"&&j!==""?j:i(j)},x.setupMultiCategory=function(j){var Y=x._traceIndices,K,X,ee=x._matchGroup;if(ee&&x._categories.length===0){for(var le in ee)if(le!==k){var oe=_[g.id2name(le)];Y=Y.concat(oe._traceIndices)}}var fe=[[0,{}],[0,{}]],de=[];for(K=0;Koe[1]&&(X[le?0:1]=K),X[0]===X[1]){var fe=x.l2r(Y),de=x.l2r(K);if(Y!==void 0){var _e=fe+1;K!==void 0&&(_e=Math.min(_e,de)),X[le?1:0]=_e}if(K!==void 0){var we=de+1;Y!==void 0&&(we=Math.max(we,fe)),X[le?0:1]=we}}}},x.cleanRange=function(j,Y){x._cleanRange(j,Y),x.limitRange(j)},x._cleanRange=function(j,Y){Y||(Y={}),j||(j="range");var K=r.nestedProperty(x,j).get(),X,ee;if(x.type==="date"?ee=r.dfltRange(x.calendar):E==="y"?ee=T.DFLTRANGEY:x._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||T.DFLTRANGEX,ee=ee.slice(),(x.rangemode==="tozero"||x.rangemode==="nonnegative")&&(ee[0]=0),!K||K.length!==2){r.nestedProperty(x,j).set(ee);return}var le=K[0]===null,oe=K[1]===null;for(x.type==="date"&&!x.autorange&&(K[0]=r.cleanDate(K[0],h,x.calendar),K[1]=r.cleanDate(K[1],h,x.calendar)),X=0;X<2;X++)if(x.type==="date"){if(!r.isDateTime(K[X],x.calendar)){x[j]=ee;break}if(x.r2l(K[0])===x.r2l(K[1])){var fe=r.constrain(x.r2l(K[0]),r.MIN_MS+1e3,r.MAX_MS-1e3);K[0]=x.l2r(fe-1e3),K[1]=x.l2r(fe+1e3);break}}else{if(!o(K[X]))if(!(le||oe)&&o(K[1-X]))K[X]=K[1-X]*(X?10:.1);else{x[j]=ee;break}if(K[X]<-c?K[X]=-c:K[X]>c&&(K[X]=c),K[0]===K[1]){var de=Math.max(1,Math.abs(K[0]*1e-6));K[0]-=de,K[1]+=de}}},x.setScale=function(j){var Y=_._size;if(x.overlaying){var K=g.getFromId({_fullLayout:_},x.overlaying);x.domain=K.domain}var X=j&&x._r?"_r":"range",ee=x.calendar;x.cleanRange(X);var le=x.r2l(x[X][0],ee),oe=x.r2l(x[X][1],ee),fe=E==="y";if(fe?(x._offset=Y.t+(1-x.domain[1])*Y.h,x._length=Y.h*(x.domain[1]-x.domain[0]),x._m=x._length/(le-oe),x._b=-x._m*oe):(x._offset=Y.l+x.domain[0]*Y.w,x._length=Y.w*(x.domain[1]-x.domain[0]),x._m=x._length/(oe-le),x._b=-x._m*le),x._rangebreaks=[],x._lBreaks=0,x._m2=0,x._B=[],x.rangebreaks){var de,_e;if(x._rangebreaks=x.locateBreaks(Math.min(le,oe),Math.max(le,oe)),x._rangebreaks.length){for(de=0;deoe&&(we=!we),we&&x._rangebreaks.reverse();var Oe=we?-1:1;for(x._m2=Oe*x._length/(Math.abs(oe-le)-x._lBreaks),x._B.push(-x._m2*(fe?oe:le)),de=0;deee&&(ee+=7,leee&&(ee+=24,le=X&&le=X&&j=me.min&&(qeme.max&&(me.max=We),Qe=!1)}Qe&&oe.push({min:qe,max:We})}};for(K=0;Kb*2}function u(d){return Math.max(1,(d-1)/1e3)}function c(d,v){for(var p=d.length,m=u(p),y=0,b=0,g={},T=0;Ty*2}function h(d){return n(d[0])&&n(d[1])}return N5}var B5,pte;function Iv(){if(pte)return B5;pte=1;var e=ya(),t=Ua(),r=rr(),n=Pi().FP_SAFE,o=ga(),s=Ba(),a=xl(),f=a.getFromId,i=a.isLinked;B5={applyAutorangeOptions:x,getAutoRange:l,makePadFn:c,doAutoRange:p,findExtremes:m,concatExtremes:v};function l(_,k){var E,I,F=[],D=_._fullLayout,z=c(D,k,0),N=c(D,k,1),q=v(_,k),P=q.min,B=q.max;if(P.length===0||B.length===0)return r.simpleMap(k.range,k.r2l);var $=P[0].val,Q=B[0].val;for(E=1;E0&&(de=Y-z(ee)-N(le),de>K?_e/de>X&&(oe=ee,fe=le,X=_e/de):_e/Y>X&&(oe={val:ee.val,nopad:1},fe={val:le.val,nopad:1},X=_e/Y));function we(Ee,Le){return Math.max(Ee,N(Le))}if($===Q){var Oe=$-1,be=$+1;if(G)if($===0)F=[0,1];else{var Te=($>0?B:P).reduce(we,0),ke=$/(1-Math.min(.5,Te/Y));F=$>0?[0,ke]:[ke,0]}else j?F=[Math.max(0,Oe),Math.max(1,be)]:F=[Oe,be]}else G?(oe.val>=0&&(oe={val:0,nopad:1}),fe.val<=0&&(fe={val:0,nopad:1})):j&&(oe.val-X*z(oe)<0&&(oe={val:0,nopad:1}),fe.val<=0&&(fe={val:1,nopad:1})),X=(fe.val-oe.val-u(k,ee.val,le.val))/(Y-z(oe)-N(fe)),F=[oe.val-X*z(oe),fe.val+X*N(fe)];return F=x(F,k),k.limitRange&&k.limitRange(),ne&&F.reverse(),r.simpleMap(F,k.l2r||Number)}function u(_,k,E){var I=0;if(_.rangebreaks)for(var F=_.locateBreaks(k,E),D=0;D0?E.ppadplus:E.ppadminus)||E.ppad||0),ee=K((_._m>0?E.ppadminus:E.ppadplus)||E.ppad||0),le=K(E.vpadplus||E.vpad),oe=K(E.vpadminus||E.vpad);if(!P){if(j=1/0,Y=-1/0,q)for($=0;$0&&(j=Q),Q>Y&&Q-n&&(j=Q),Q>Y&&Q=_e;$--)de($);return{min:I,max:F,opts:E}}function y(_,k,E,I){g(_,k,E,I,S)}function b(_,k,E,I){g(_,k,E,I,A)}function g(_,k,E,I,F){for(var D=I.tozero,z=I.extrapad,N=!0,q=0;q<_.length&&N;q++){var P=_[q];if(F(P.val,k)&&P.pad>=E&&(P.extrapad||!z)){N=!1;break}else F(k,P.val)&&P.pad<=E&&(z||!P.extrapad)&&(_.splice(q,1),q--)}if(N){var B=D&&k===0;_.push({val:k,pad:B?0:E,extrapad:B?!1:z})}}function T(_){return t(_)&&Math.abs(_)=k}function M(_,k){var E=k.autorangeoptions;return E&&E.minallowed!==void 0&&C(k,E.minallowed,E.maxallowed)?E.minallowed:E&&E.clipmin!==void 0&&C(k,E.clipmin,E.clipmax)?Math.max(_,k.d2l(E.clipmin)):_}function w(_,k){var E=k.autorangeoptions;return E&&E.maxallowed!==void 0&&C(k,E.minallowed,E.maxallowed)?E.maxallowed:E&&E.clipmax!==void 0&&C(k,E.clipmin,E.clipmax)?Math.min(_,k.d2l(E.clipmax)):_}function C(_,k,E){return k!==void 0&&E!==void 0?(k=_.d2l(k),E=_.d2l(E),k=q&&(D=q,E=q),z<=q&&(z=q,I=q)}}return E=M(E,k),I=w(I,k),[E,I]}return B5}var gte;function Ia(){if(gte)return s5.exports;gte=1;var e=ya(),t=Ua(),r=Ts(),n=ga(),o=rr(),s=o.strTranslate,a=ns(),f=Hx(),i=va(),l=Ba(),u=hc(),c=dAe(),h=Pi(),d=h.ONEMAXYEAR,v=h.ONEAVGYEAR,p=h.ONEMINYEAR,m=h.ONEMAXQUARTER,y=h.ONEAVGQUARTER,b=h.ONEMINQUARTER,g=h.ONEMAXMONTH,T=h.ONEAVGMONTH,S=h.ONEMINMONTH,A=h.ONEWEEK,M=h.ONEDAY,w=M/2,C=h.ONEHOUR,x=h.ONEMIN,_=h.ONESEC,k=h.MINUS_SIGN,E=h.BADNUM,I={K:"zeroline"},F={K:"gridline",L:"path"},D={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},N={K:"tick",L:"text"},q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P=Zu(),B=P.MID_SHIFT,$=P.CAP_SHIFT,Q=P.LINE_SPACING,J=P.OPPOSITE_SIDE,ne=3,te=s5.exports={};te.setConvert=ag();var Z=P2(),G=xl(),j=G.idSort,Y=G.isLinked;te.id2name=G.id2name,te.name2id=G.name2id,te.cleanId=G.cleanId,te.list=G.list,te.listIds=G.listIds,te.getFromId=G.getFromId,te.getFromTrace=G.getFromTrace;var K=Iv();te.getAutoRange=K.getAutoRange,te.findExtremes=K.findExtremes;var X=1e-4;function ee(Ue){var Ne=(Ue[1]-Ue[0])*X;return[Ue[0]-Ne,Ue[1]+Ne]}te.coerceRef=function(Ue,Ne,At,Rt,Ct,Wt){var Qt=Rt.charAt(Rt.length-1),Xt=At._fullLayout._subplots[Qt+"axis"],$t=Rt+"ref",ur={};return Ct||(Ct=Xt[0]||(typeof Wt=="string"?Wt:Wt[0])),Wt||(Wt=Ct),Xt=Xt.concat(Xt.map(function(fr){return fr+" domain"})),ur[$t]={valType:"enumerated",values:Xt.concat(Wt?typeof Wt=="string"?[Wt]:Wt:[]),dflt:Ct},o.coerce(Ue,Ne,ur,$t)},te.getRefType=function(Ue){return Ue===void 0?Ue:Ue==="paper"?"paper":Ue==="pixel"?"pixel":/( domain)$/.test(Ue)?"domain":"range"},te.coercePosition=function(Ue,Ne,At,Rt,Ct,Wt){var Qt,Xt,$t=te.getRefType(Rt);if($t!=="range")Qt=o.ensureNumber,Xt=At(Ct,Wt);else{var ur=te.getFromId(Ne,Rt);Wt=ur.fraction2r(Wt),Xt=At(Ct,Wt),Qt=ur.cleanPos}Ue[Ct]=Qt(Xt)},te.cleanPosition=function(Ue,Ne,At){var Rt=At==="paper"||At==="pixel"?o.ensureNumber:te.getFromId(Ne,At).cleanPos;return Rt(Ue)},te.redrawComponents=function(Ue,Ne){Ne=Ne||te.listIds(Ue);var At=Ue._fullLayout;function Rt(Ct,Wt,Qt,Xt){for(var $t=n.getComponentMethod(Ct,Wt),ur={},fr=0;fr2e-6||((At-Ue._forceTick0)/Ue._minDtick%1+1.000001)%1>2e-6)&&(Ue._minDtick=0))},te.saveRangeInitial=function(Ue,Ne){for(var At=te.list(Ue,"",!0),Rt=!1,Ct=0;Ctmr*.3||ur(Rt)||ur(Ct))){var br=At.dtick/2;Ue+=Ue+brQt){var Xt=Number(At.substr(1));Wt.exactYears>Qt&&Xt%12===0?Ue=te.tickIncrement(Ue,"M6","reverse")+M*1.5:Wt.exactMonths>Qt?Ue=te.tickIncrement(Ue,"M1","reverse")+M*15.5:Ue-=w;var $t=te.tickIncrement(Ue,At);if($t<=Rt)return $t}return Ue}te.prepMinorTicks=function(Ue,Ne,At){if(!Ne.minor.dtick){delete Ue.dtick;var Rt=Ne.dtick&&t(Ne._tmin),Ct;if(Rt){var Wt=te.tickIncrement(Ne._tmin,Ne.dtick,!0);Ct=[Ne._tmin,Wt*.99+Ne._tmin*.01]}else{var Qt=o.simpleMap(Ne.range,Ne.r2l);Ct=[Qt[0],.8*Qt[0]+.2*Qt[1]]}if(Ue.range=o.simpleMap(Ct,Ne.l2r),Ue._isMinor=!0,te.prepTicks(Ue,At),Rt){var Xt=t(Ne.dtick),$t=t(Ue.dtick),ur=Xt?Ne.dtick:+Ne.dtick.substring(1),fr=$t?Ue.dtick:+Ue.dtick.substring(1);Xt&&$t?we(ur,fr)?ur===2*A&&fr===2*M&&(Ue.dtick=A):ur===2*A&&fr===3*M?Ue.dtick=A:ur===A&&!(Ne._input.minor||{}).nticks?Ue.dtick=M:Oe(ur/fr,2.5)?Ue.dtick=ur/2:Ue.dtick=ur:String(Ne.dtick).charAt(0)==="M"?$t?Ue.dtick="M1":we(ur,fr)?ur>=12&&fr===2&&(Ue.dtick="M3"):Ue.dtick=Ne.dtick:String(Ue.dtick).charAt(0)==="L"?String(Ne.dtick).charAt(0)==="L"?we(ur,fr)||(Ue.dtick=Oe(ur/fr,2.5)?Ne.dtick/2:Ne.dtick):Ue.dtick="D1":Ue.dtick==="D2"&&+Ne.dtick>1&&(Ue.dtick=1)}Ue.range=Ne.range}Ne.minor._tick0Init===void 0&&(Ue.tick0=Ne.tick0)};function we(Ue,Ne){return Math.abs((Ue/Ne+.5)%1-.5)<.001}function Oe(Ue,Ne){return Math.abs(Ue/Ne-1)<.001}te.prepTicks=function(Ue,Ne){var At=o.simpleMap(Ue.range,Ue.r2l,void 0,void 0,Ne);if(Ue.tickmode==="auto"||!Ue.dtick){var Rt=Ue.nticks,Ct;Rt||(Ue.type==="category"||Ue.type==="multicategory"?(Ct=Ue.tickfont?o.bigFont(Ue.tickfont.size||12):15,Rt=Ue._length/Ct):(Ct=Ue._id.charAt(0)==="y"?40:80,Rt=o.constrain(Ue._length/Ct,4,9)+1),Ue._name==="radialaxis"&&(Rt*=2)),Ue.minor&&Ue.minor.tickmode!=="array"||Ue.tickmode==="array"&&(Rt*=100),Ue._roughDTick=Math.abs(At[1]-At[0])/Rt,te.autoTicks(Ue,Ue._roughDTick),Ue._minDtick>0&&Ue.dtick0?(Wt=Rt-1,Qt=Rt):(Wt=Rt,Qt=Rt);var Xt=Ue[Wt].value,$t=Ue[Qt].value,ur=Math.abs($t-Xt),fr=At||ur,mr=0;fr>=p?ur>=p&&ur<=d?mr=ur:mr=v:At===y&&fr>=b?ur>=b&&ur<=m?mr=ur:mr=y:fr>=S?ur>=S&&ur<=g?mr=ur:mr=T:At===A&&fr>=A?mr=A:fr>=M?mr=M:At===w&&fr>=w?mr=w:At===C&&fr>=C&&(mr=C);var br;mr>=ur&&(mr=ur,br=!0);var Pr=Ct+mr;if(Ne.rangebreaks&&mr>0){for(var Cr=84,Zr=0,jr=0;jrA&&(mr=ur)}(mr>0||Rt===0)&&(Ue[Rt].periodX=Ct+mr/2)}}te.calcTicks=function(Ne,At){for(var Rt=Ne.type,Ct=Ne.calendar,Wt=Ne.ticklabelstep,Qt=Ne.ticklabelmode==="period",Xt=o.simpleMap(Ne.range,Ne.r2l,void 0,void 0,At),$t=Xt[1]=(jr?0:1);Sn--){var Fn=!Sn;Sn?(Ne._dtickInit=Ne.dtick,Ne._tick0Init=Ne.tick0):(Ne.minor._dtickInit=Ne.minor.dtick,Ne.minor._tick0Init=Ne.minor.tick0);var ea=Sn?Ne:o.extendFlat({},Ne,Ne.minor);if(Fn?te.prepMinorTicks(ea,Ne,At):te.prepTicks(ea,At),ea.tickmode==="array"){Sn?(Cr=[],br=Fe(Ne,!Fn)):(Zr=[],Pr=Fe(Ne,!Fn));continue}if(ea.tickmode==="sync"){Cr=[],br=Le(Ne);continue}var An=ee(Xt),Hn=An[0],In=An[1],ua=t(ea.dtick),Ln=Rt==="log"&&!(ua||ea.dtick.charAt(0)==="L"),oa=te.tickFirst(ea,At);if(Sn){if(Ne._tmin=oa,oa=In:ba<=In;ba=te.tickIncrement(ba,ci,$t,Ct)){if(Sn&&Da++,ea.rangebreaks&&!$t){if(ba=fr)break}if(Cr.length>mr||ba===Ta)break;Ta=ba;var Bi={value:ba};Sn?(Ln&&ba!==(ba|0)&&(Bi.simpleLabel=!0),Wt>1&&Da%Wt&&(Bi.skipLabel=!0),Cr.push(Bi)):(Bi.minor=!0,Zr.push(Bi))}}if(jr){var yo=Ne.minor.ticks==="inside"&&Ne.ticks==="outside"||Ne.minor.ticks==="outside"&&Ne.ticks==="inside";if(!yo){for(var es=Cr.map(function(dn){return dn.value}),Qa=[],Ii=0;Ii-1;Wa--){if(Cr[Wa].drop){Cr.splice(Wa,1);continue}Cr[Wa].value=wt(Cr[Wa].value,Ne);var Yi=Ne.c2p(Cr[Wa].value);(Ai?Vi>Yi-fo:Vifr||gsfr&&(Eo.periodX=fr),gsCt&&brv)Ne/=v,Rt=Ct(10),Ue.dtick="M"+12*st(Ne,Rt,qe);else if(Wt>T)Ne/=T,Ue.dtick="M"+st(Ne,1,We);else if(Wt>M){if(Ue.dtick=st(Ne,M,Ue._hasDayOfWeekBreaks?[1,2,7,14]:De),!At){var Qt=te.getTickFormat(Ue),Xt=Ue.ticklabelmode==="period";Xt&&(Ue._rawTick0=Ue.tick0),/%[uVW]/.test(Qt)?Ue.tick0=o.dateTick0(Ue.calendar,2):Ue.tick0=o.dateTick0(Ue.calendar,1),Xt&&(Ue._dowTick0=Ue.tick0)}}else Wt>C?Ue.dtick=st(Ne,C,We):Wt>x?Ue.dtick=st(Ne,x,Qe):Wt>_?Ue.dtick=st(Ne,_,Qe):(Rt=Ct(10),Ue.dtick=st(Ne,Rt,qe))}else if(Ue.type==="log"){Ue.tick0=0;var $t=o.simpleMap(Ue.range,Ue.r2l);if(Ue._isMinor&&(Ne*=1.5),Ne>.7)Ue.dtick=Math.ceil(Ne);else if(Math.abs($t[1]-$t[0])<1){var ur=1.5*Math.abs(($t[1]-$t[0])/Ne);Ne=Math.abs(Math.pow(10,$t[1])-Math.pow(10,$t[0]))/ur,Rt=Ct(10),Ue.dtick="L"+st(Ne,Rt,qe)}else Ue.dtick=Ne>.3?"D2":"D1"}else Ue.type==="category"||Ue.type==="multicategory"?(Ue.tick0=0,Ue.dtick=Math.ceil(Math.max(Ne,1))):yt(Ue)?(Ue.tick0=0,Rt=1,Ue.dtick=st(Ne,Rt,et)):(Ue.tick0=0,Rt=Ct(10),Ue.dtick=st(Ne,Rt,qe));if(Ue.dtick===0&&(Ue.dtick=1),!t(Ue.dtick)&&typeof Ue.dtick!="string"){var fr=Ue.dtick;throw Ue.dtick=1,"ax.dtick error: "+String(fr)}};function ot(Ue){var Ne=Ue.dtick;if(Ue._tickexponent=0,!t(Ne)&&typeof Ne!="string"&&(Ne=1),(Ue.type==="category"||Ue.type==="multicategory")&&(Ue._tickround=null),Ue.type==="date"){var At=Ue.r2l(Ue.tick0),Rt=Ue.l2r(At).replace(/(^-|i)/g,""),Ct=Rt.length;if(String(Ne).charAt(0)==="M")Ct>10||Rt.substr(5)!=="01-01"?Ue._tickround="d":Ue._tickround=+Ne.substr(1)%12===0?"y":"m";else if(Ne>=M&&Ct<=10||Ne>=M*15)Ue._tickround="d";else if(Ne>=x&&Ct<=16||Ne>=C)Ue._tickround="M";else if(Ne>=_&&Ct<=19||Ne>=x)Ue._tickround="S";else{var Wt=Ue.l2r(At+Ne).replace(/^-/,"").length;Ue._tickround=Math.max(Ct,Wt)-20,Ue._tickround<0&&(Ue._tickround=4)}}else if(t(Ne)||Ne.charAt(0)==="L"){var Qt=Ue.range.map(Ue.r2d||Number);t(Ne)||(Ne=Number(Ne.substr(1))),Ue._tickround=2-Math.floor(Math.log(Ne)/Math.LN10+.01);var Xt=Math.max(Math.abs(Qt[0]),Math.abs(Qt[1])),$t=Math.floor(Math.log(Xt)/Math.LN10+.01),ur=Ue.minexponent===void 0?3:Ue.minexponent;Math.abs($t)>ur&&(He(Ue.exponentformat)&&!Ie($t)?Ue._tickexponent=3*Math.round(($t-1)/3):Ue._tickexponent=$t)}else Ue._tickround=null}te.tickIncrement=function(Ue,Ne,At,Rt){var Ct=At?-1:1;if(t(Ne))return o.increment(Ue,Ct*Ne);var Wt=Ne.charAt(0),Qt=Ct*Number(Ne.substr(1));if(Wt==="M")return o.incrementMonth(Ue,Qt,Rt);if(Wt==="L")return Math.log(Math.pow(10,Ue)+Qt)/Math.LN10;if(Wt==="D"){var Xt=Ne==="D2"?Ce:me,$t=Ue+Ct*.01,ur=o.roundUp(o.mod($t,1),Xt,At);return Math.floor($t)+Math.log(e.round(Math.pow(10,ur),1))/Math.LN10}throw"unrecognized dtick "+String(Ne)},te.tickFirst=function(Ue,Ne){var At=Ue.r2l||Number,Rt=o.simpleMap(Ue.range,At,void 0,void 0,Ne),Ct=Rt[1]=0&&Sn<=Ue._length?jr:null};if(Wt&&o.isArrayOrTypedArray(Ue.ticktext)){var mr=o.simpleMap(Ue.range,Ue.r2l),br=(Math.abs(mr[1]-mr[0])-(Ue._lBreaks||0))/1e4;for(ur=0;ur"+Xt;else{var ur=Ft(Ue),fr=Ue._trueSide||Ue.side;(!ur&&fr==="top"||ur&&fr==="bottom")&&(Qt+="
")}Ne.text=Qt}function Ht(Ue,Ne,At,Rt,Ct){var Wt=Ue.dtick,Qt=Ne.x,Xt=Ue.tickformat,$t=typeof Wt=="string"&&Wt.charAt(0);if(Ct==="never"&&(Ct=""),Rt&&$t!=="L"&&(Wt="L3",$t="L"),Xt||$t==="L")Ne.text=je(Math.pow(10,Qt),Ue,Ct,Rt);else if(t(Wt)||$t==="D"&&o.mod(Qt+.01,1)<.1){var ur=Math.round(Qt),fr=Math.abs(ur),mr=Ue.exponentformat;mr==="power"||He(mr)&&Ie(ur)?(ur===0?Ne.text=1:ur===1?Ne.text="10":Ne.text="10"+(ur>1?"":k)+fr+"",Ne.fontSize*=1.25):(mr==="e"||mr==="E")&&fr>2?Ne.text="1"+mr+(ur>0?"+":k)+fr:(Ne.text=je(Math.pow(10,Qt),Ue,"","fakehover"),Wt==="D1"&&Ue._id.charAt(0)==="y"&&(Ne.dy-=Ne.fontSize/6))}else if($t==="D")Ne.text=String(Math.round(Math.pow(10,o.mod(Qt,1)))),Ne.fontSize*=.75;else throw"unrecognized dtick "+String(Wt);if(Ue.dtick==="D1"){var br=String(Ne.text).charAt(0);(br==="0"||br==="1")&&(Ue._id.charAt(0)==="y"?Ne.dx-=Ne.fontSize/4:(Ne.dy+=Ne.fontSize/2,Ne.dx+=(Ue.range[1]>Ue.range[0]?1:-1)*Ne.fontSize*(Qt<0?.5:.25)))}}function Et(Ue,Ne){var At=Ue._categories[Math.round(Ne.x)];At===void 0&&(At=""),Ne.text=String(At)}function Jt(Ue,Ne,At){var Rt=Math.round(Ne.x),Ct=Ue._categories[Rt]||[],Wt=Ct[1]===void 0?"":String(Ct[1]),Qt=Ct[0]===void 0?"":String(Ct[0]);At?Ne.text=Qt+" - "+Wt:(Ne.text=Wt,Ne.text2=Qt)}function Tt(Ue,Ne,At,Rt,Ct){Ct==="never"?Ct="":Ue.showexponent==="all"&&Math.abs(Ne.x/Ue.dtick)<1e-6&&(Ct="hide"),Ne.text=je(Ne.x,Ue,Ct,Rt)}function rt(Ue,Ne,At,Rt,Ct){if(Ue.thetaunit==="radians"&&!At){var Wt=Ne.x/180;if(Wt===0)Ne.text="0";else{var Qt=gt(Wt);if(Qt[1]>=100)Ne.text=je(o.deg2rad(Ne.x),Ue,Ct,Rt);else{var Xt=Ne.x<0;Qt[1]===1?Qt[0]===1?Ne.text="π":Ne.text=Qt[0]+"π":Ne.text=["",Qt[0],"","⁄","",Qt[1],"","π"].join(""),Xt&&(Ne.text=k+Ne.text)}}}else Ne.text=je(Ne.x,Ue,Ct,Rt)}function gt(Ue){function Ne(Xt,$t){return Math.abs(Xt-$t)<=1e-6}function At(Xt,$t){return Ne($t,0)?Xt:At($t,Xt%$t)}function Rt(Xt){for(var $t=1;!Ne(Math.round(Xt*$t)/$t,Xt);)$t*=10;return $t}var Ct=Rt(Ue),Wt=Ue*Ct,Qt=Math.abs(At(Wt,Ct));return[Math.round(Wt/Qt),Math.round(Ct/Qt)]}var mt=["f","p","n","μ","m","","k","M","G","T"];function He(Ue){return Ue==="SI"||Ue==="B"}function Ie(Ue){return Ue>14||Ue<-15}function je(Ue,Ne,At,Rt){var Ct=Ue<0,Wt=Ne._tickround,Qt=At||Ne.exponentformat||"B",Xt=Ne._tickexponent,$t=te.getTickFormat(Ne),ur=Ne.separatethousands;if(Rt){var fr={exponentformat:Qt,minexponent:Ne.minexponent,dtick:Ne.showexponent==="none"?Ne.dtick:t(Ue)&&Math.abs(Ue)||1,range:Ne.showexponent==="none"?Ne.range.map(Ne.r2d):[0,Ue||1]};ot(fr),Wt=(Number(fr._tickround)||0)+4,Xt=fr._tickexponent,Ne.hoverformat&&($t=Ne.hoverformat)}if($t)return Ne._numFormat($t)(Ue).replace(/-/g,k);var mr=Math.pow(10,-Wt)/2;if(Qt==="none"&&(Xt=0),Ue=Math.abs(Ue),Ue"+Cr+"":Qt==="B"&&Xt===9?Ue+="B":He(Qt)&&(Ue+=mt[Xt/3+5])}return Ct?k+Ue:Ue}te.getTickFormat=function(Ue){var Ne;function At($t){return typeof $t!="string"?$t:Number($t.replace("M",""))*T}function Rt($t,ur){var fr=["L","D"];if(typeof $t==typeof ur){if(typeof $t=="number")return $t-ur;var mr=fr.indexOf($t.charAt(0)),br=fr.indexOf(ur.charAt(0));return mr===br?Number($t.replace(/(L|D)/g,""))-Number(ur.replace(/(L|D)/g,"")):mr-br}else return typeof $t=="number"?1:-1}function Ct($t,ur,fr){var mr=fr||function(Cr){return Cr},br=ur[0],Pr=ur[1];return(!br&&typeof br!="number"||mr(br)<=mr($t))&&(!Pr&&typeof Pr!="number"||mr(Pr)>=mr($t))}function Wt($t,ur){var fr=ur[0]===null,mr=ur[1]===null,br=Rt($t,ur[0])>=0,Pr=Rt($t,ur[1])<=0;return(fr||br)&&(mr||Pr)}var Qt,Xt;if(Ue.tickformatstops&&Ue.tickformatstops.length>0)switch(Ue.type){case"date":case"linear":{for(Ne=0;Ne=0&&Ct.unshift(Ct.splice(fr,1).shift())}});var Xt={false:{left:0,right:0}};return o.syncOrAsync(Ct.map(function($t){return function(){if($t){var ur=te.getFromId(Ue,$t);At||(At={}),At.axShifts=Xt,At.overlayingShiftedAx=Qt;var fr=te.drawOne(Ue,ur,At);return ur._shiftPusher&&cr(ur,ur._fullDepth||0,Xt,!0),ur._r=ur.range.slice(),ur._rl=o.simpleMap(ur._r,ur.r2l),fr}}}))},te.drawOne=function(Ue,Ne,At){At=At||{};var Rt=At.axShifts||{},Ct=At.overlayingShiftedAx||[],Wt,Qt,Xt;Ne.setScale();var $t=Ue._fullLayout,ur=Ne._id,fr=ur.charAt(0),mr=te.counterLetter(ur),br=$t._plots[Ne._mainSubplot];if(!br)return;if(Ne._shiftPusher=Ne.autoshift||Ct.indexOf(Ne._id)!==-1||Ct.indexOf(Ne.overlaying)!==-1,Ne._shiftPusher&Ne.anchor==="free"){var Pr=Ne.linewidth/2||0;Ne.ticks==="inside"&&(Pr+=Ne.ticklen),cr(Ne,Pr,Rt,!0),cr(Ne,Ne.shift||0,Rt,!1)}(At.skipTitle!==!0||Ne._shift===void 0)&&(Ne._shift=lr(Ne,Rt));var Cr=br[fr+"axislayer"],Zr=Ne._mainLinePosition,jr=Zr+=Ne._shift,Sn=Ne._mainMirrorPosition,Fn=Ne._vals=te.calcTicks(Ne),ea=[Ne.mirror,jr,Sn].join("_");for(Wt=0;Wt0?ao.bottom-mo:0,Uo))));var cu=0,ul=0;if(Ne._shiftPusher&&(cu=Math.max(Uo,ao.height>0?gi==="l"?mo-ao.left:ao.right-mo:0),Ne.title.text!==$t._dfltTitle[fr]&&(ul=(Ne._titleStandoff||0)+(Ne._titleScoot||0),gi==="l"&&(ul+=qt(Ne))),Ne._fullDepth=Math.max(cu,ul)),Ne.automargin){$n={x:0,y:0,r:0,l:0,t:0,b:0};var oi=[0,1],kf=typeof Ne._shift=="number"?Ne._shift:0;if(fr==="x"){if(gi==="b"?$n[gi]=Ne._depth:($n[gi]=Ne._depth=Math.max(ao.width>0?mo-ao.top:0,Uo),oi.reverse()),ao.width>0){var hu=ao.right-(Ne._offset+Ne._length);hu>0&&($n.xr=1,$n.r=hu);var nl=Ne._offset-ao.left;nl>0&&($n.xl=0,$n.l=nl)}}else if(gi==="l"?(Ne._depth=Math.max(ao.height>0?mo-ao.left:0,Uo),$n[gi]=Ne._depth-kf):(Ne._depth=Math.max(ao.height>0?ao.right-mo:0,Uo),$n[gi]=Ne._depth+kf,oi.reverse()),ao.height>0){var Lu=ao.bottom-(Ne._offset+Ne._length);Lu>0&&($n.yb=0,$n.b=Lu);var al=Ne._offset-ao.top;al>0&&($n.yt=1,$n.t=al)}$n[mr]=Ne.anchor==="free"?Ne.position:Ne._anchorAxis.domain[oi[0]],Ne.title.text!==$t._dfltTitle[fr]&&($n[gi]+=qt(Ne)+(Ne.title.standoff||0)),Ne.mirror&&Ne.anchor!=="free"&&(ai={x:0,y:0,r:0,l:0,t:0,b:0},ai[_o]=Ne.linewidth,Ne.mirror&&Ne.mirror!==!0&&(ai[_o]+=Uo),Ne.mirror===!0||Ne.mirror==="ticks"?ai[mr]=Ne._anchorAxis.domain[oi[1]]:(Ne.mirror==="all"||Ne.mirror==="allticks")&&(ai[mr]=[Ne._counterDomainMin,Ne._counterDomainMax][oi[1]]))}bl&&(ri=n.getComponentMethod("rangeslider","autoMarginOpts")(Ue,Ne)),typeof Ne.automargin=="string"&&(pe($n,Ne.automargin),pe(ai,Ne.automargin)),r.autoMargin(Ue,Gr(Ne),$n),r.autoMargin(Ue,en(Ne),ai),r.autoMargin(Ue,cn(Ne),ri)}),o.syncOrAsync(ia)}};function pe(Ue,Ne){if(Ue){var At=Object.keys(q).reduce(function(Rt,Ct){return Ne.indexOf(Ct)!==-1&&q[Ct].forEach(function(Wt){Rt[Wt]=1}),Rt},{});Object.keys(Ue).forEach(function(Rt){At[Rt]||(Rt.length===1?Ue[Rt]=0:delete Ue[Rt])})}}function ye(Ue,Ne){var At=[],Rt,Ct=function(Wt,Qt){var Xt=Wt.xbnd[Qt];Xt!==null&&At.push(o.extendFlat({},Wt,{x:Xt}))};if(Ne.length){for(Rt=0;Rt60?-.5*ci:Ue.side==="top"!==fr?-ci:0};else if(ua==="y"){if(oa=!fr&&In==="left"||fr&&In==="right",An=oa?1:-1,fr&&(An*=-1),Sn=br,Fn=Pr*An,ea=0,!fr&&Math.abs(Ln)===90&&(Ln===-90&&In==="left"||Ln===90&&In==="right"?ea=$:ea=.5),fr){var Ta=t(Ln)?+Ln:0;if(Ta!==0){var ba=o.deg2rad(Ta);Hn=Math.abs(Math.sin(ba))*$*An,ea=0}}jr.xFn=function(Da){return Da.dx+Ne-(Sn+Da.fontSize*ea)*An+Hn*Da.fontSize},jr.yFn=function(Da){return Da.dy+Fn+Da.fontSize*B},jr.anchorFn=function(Da,_i){return t(_i)&&Math.abs(_i)===90?"middle":oa?"end":"start"},jr.heightFn=function(Da,_i,ci){return Ue.side==="right"&&(_i*=-1),_i<-30?-ci:_i<30?-.5*ci:0}}return jr};function Bt(Ue){return[Ue.text,Ue.x,Ue.axInfo,Ue.font,Ue.fontSize,Ue.fontColor].join("_")}te.drawTicks=function(Ue,Ne,At){At=At||{};var Rt=Ne._id+"tick",Ct=[].concat(Ne.minor&&Ne.minor.ticks?At.vals.filter(function(Qt){return Qt.minor&&!Qt.noTick}):[]).concat(Ne.ticks?At.vals.filter(function(Qt){return!Qt.minor&&!Qt.noTick}):[]),Wt=At.layer.selectAll("path."+Rt).data(Ct,Bt);Wt.exit().remove(),Wt.enter().append("path").classed(Rt,1).classed("ticks",1).classed("crisp",At.crisp!==!1).each(function(Qt){return i.stroke(e.select(this),Qt.minor?Ne.minor.tickcolor:Ne.tickcolor)}).style("stroke-width",function(Qt){return l.crispRound(Ue,Qt.minor?Ne.minor.tickwidth:Ne.tickwidth,1)+"px"}).attr("d",At.path).style("display",null),er(Ne,[z]),Wt.attr("transform",At.transFn)},te.drawGrid=function(Ue,Ne,At){if(At=At||{},Ne.tickmode!=="sync"){var Rt=Ne._id+"grid",Ct=Ne.minor&&Ne.minor.showgrid,Wt=Ct?At.vals.filter(function(Sn){return Sn.minor}):[],Qt=Ne.showgrid?At.vals.filter(function(Sn){return!Sn.minor}):[],Xt=At.counterAxis;if(Xt&&te.shouldShowZeroLine(Ue,Ne,Xt))for(var $t=Ne.tickmode==="array",ur=0;ur=0;Cr--){var Zr=Cr?br:Pr;if(Zr){var jr=Zr.selectAll("path."+Rt).data(Cr?Qt:Wt,Bt);jr.exit().remove(),jr.enter().append("path").classed(Rt,1).classed("crisp",At.crisp!==!1),jr.attr("transform",At.transFn).attr("d",At.path).each(function(Sn){return i.stroke(e.select(this),Sn.minor?Ne.minor.gridcolor:Ne.gridcolor||"#ddd")}).style("stroke-dasharray",function(Sn){return l.dashStyle(Sn.minor?Ne.minor.griddash:Ne.griddash,Sn.minor?Ne.minor.gridwidth:Ne.gridwidth)}).style("stroke-width",function(Sn){return(Sn.minor?mr:Ne._gw)+"px"}).style("display",null),typeof At.path=="function"&&jr.attr("d",At.path)}}er(Ne,[F,D])}},te.drawZeroLine=function(Ue,Ne,At){At=At||At;var Rt=Ne._id+"zl",Ct=te.shouldShowZeroLine(Ue,Ne,At.counterAxis),Wt=At.layer.selectAll("path."+Rt).data(Ct?[{x:0,id:Ne._id}]:[]);Wt.exit().remove(),Wt.enter().append("path").classed(Rt,1).classed("zl",1).classed("crisp",At.crisp!==!1).each(function(){At.layer.selectAll("path").sort(function(Qt,Xt){return j(Qt.id,Xt.id)})}),Wt.attr("transform",At.transFn).attr("d",At.path).call(i.stroke,Ne.zerolinecolor||i.defaultLine).style("stroke-width",l.crispRound(Ue,Ne.zerolinewidth,Ne._gw||1)+"px").style("display",null),er(Ne,[I])},te.drawLabels=function(Ue,Ne,At){At=At||{};var Rt=Ue._fullLayout,Ct=Ne._id,Wt=At.cls||Ct+"tick",Qt=At.vals.filter(function(Qa){return Qa.text}),Xt=At.labelFns,$t=At.secondary?0:Ne.tickangle,ur=(Ne._prevTickAngles||{})[Wt],fr=At.layer.selectAll("g."+Wt).data(Ne.showticklabels?Qt:[],Bt),mr=[];fr.enter().append("g").classed(Wt,1).append("text").attr("text-anchor","middle").each(function(Qa){var Ii=e.select(this),Ci=Ue._promises.length;Ii.call(a.positionText,Xt.xFn(Qa),Xt.yFn(Qa)).call(l.font,Qa.font,Qa.fontSize,Qa.fontColor).text(Qa.text).call(a.convertToTspans,Ue),Ue._promises[Ci]?mr.push(Ue._promises.pop().then(function(){br(Ii,$t)})):br(Ii,$t)}),er(Ne,[N]),fr.exit().remove(),At.repositionOnUpdate&&fr.each(function(Qa){e.select(this).select("text").call(a.positionText,Xt.xFn(Qa),Xt.yFn(Qa))});function br(Qa,Ii){Qa.each(function(Ci){var Hi=e.select(this),qi=Hi.select(".text-math-group"),Ga=Xt.anchorFn(Ci,Ii),Wa=At.transFn.call(Hi.node(),Ci)+(t(Ii)&&+Ii!=0?" rotate("+Ii+","+Xt.xFn(Ci)+","+(Xt.yFn(Ci)-Ci.fontSize/2)+")":""),Ai=a.lineCount(Hi),fo=Q*Ci.fontSize,Vi=Xt.heightFn(Ci,t(Ii)?+Ii:0,(Ai-1)*fo);if(Vi&&(Wa+=s(0,Vi)),qi.empty()){var Yi=Hi.select("text");Yi.attr({transform:Wa,"text-anchor":Ga}),Yi.style("opacity",1),Ne._adjustTickLabelsOverflow&&Ne._adjustTickLabelsOverflow()}else{var Ps=l.bBox(qi.node()).width,ts=Ps*{end:-.5,start:.5}[Ga];qi.attr("transform",Wa+s(ts,0))}})}Ne._adjustTickLabelsOverflow=function(){var Qa=Ne.ticklabeloverflow;if(!(!Qa||Qa==="allow")){var Ii=Qa.indexOf("hide")!==-1,Ci=Ne._id.charAt(0)==="x",Hi=0,qi=Ci?Ue._fullLayout.width:Ue._fullLayout.height;if(Qa.indexOf("domain")!==-1){var Ga=o.simpleMap(Ne.range,Ne.r2l);Hi=Ne.l2p(Ga[0])+Ne._offset,qi=Ne.l2p(Ga[1])+Ne._offset}var Wa=Math.min(Hi,qi),Ai=Math.max(Hi,qi),fo=Ne.side,Vi=1/0,Yi=-1/0;fr.each(function(gs){var jo=e.select(this),no=jo.select(".text-math-group");if(no.empty()){var dn=l.bBox(jo.node()),ia=0;Ci?(dn.right>Ai||dn.leftAi||dn.top+(Ne.tickangle?0:gs.fontSize/4)Ne["_visibleLabelMin_"+Ga._id]?gs.style("display","none"):Ai.K==="tick"&&!Wa&&gs.style("display",null)})})})})},br(fr,ur+1?ur:$t);function Pr(){return mr.length&&Promise.all(mr)}var Cr=null;function Zr(){if(br(fr,$t),Qt.length&&Ne.autotickangles&&(Ne.type!=="log"||String(Ne.dtick).charAt(0)!=="D")){Cr=Ne.autotickangles[0];var Qa=0,Ii=[],Ci,Hi=1;if(fr.each(function(Uo){Qa=Math.max(Qa,Uo.fontSize);var ao=Ne.l2p(Uo.x),$n=Br(this),ai=l.bBox($n.node());Hi=Math.max(Hi,a.lineCount($n)),Ii.push({top:0,bottom:10,height:10,left:ao-ai.width/2,right:ao+ai.width/2+2,width:ai.width+2})}),(Ne.tickson==="boundaries"||Ne.showdividers)&&!At.secondary){var qi=2;for(Ne.ticks&&(qi+=Ne.tickwidth/2),Ci=0;CiBi*ci&&(ba=ci,Ln[ua]=oa[ua]=Da[ua])}var yo=Math.abs(ba-Ta);yo-An>0?(yo-=An,An*=1+An/yo):An=0,Ne._id.charAt(0)!=="y"&&(An=-An),Ln[In]=Fn.p2r(Fn.r2p(oa[In])+Hn*An),Fn.autorange==="min"||Fn.autorange==="max reversed"?(Ln[0]=null,Fn._rangeInitial0=void 0,Fn._rangeInitial1=void 0):(Fn.autorange==="max"||Fn.autorange==="min reversed")&&(Ln[1]=null,Fn._rangeInitial0=void 0,Fn._rangeInitial1=void 0),Rt._insideTickLabelsUpdaterange[Fn._name+".range"]=Ln}var es=o.syncOrAsync(jr);return es&&es.then&&Ue._promises.push(es),es};function It(Ue,Ne,At){var Rt=Ne._id+"divider",Ct=At.vals,Wt=At.layer.selectAll("path."+Rt).data(Ct,Bt);Wt.exit().remove(),Wt.enter().insert("path",":first-child").classed(Rt,1).classed("crisp",1).call(i.stroke,Ne.dividercolor).style("stroke-width",l.crispRound(Ue,Ne.dividerwidth,1)+"px"),Wt.attr("transform",At.transFn).attr("d",At.path)}te.getPxPosition=function(Ue,Ne){var At=Ue._fullLayout._size,Rt=Ne._id.charAt(0),Ct=Ne.side,Wt;if(Ne.anchor!=="free"?Wt=Ne._anchorAxis:Rt==="x"?Wt={_offset:At.t+(1-(Ne.position||0))*At.h,_length:0}:Rt==="y"&&(Wt={_offset:At.l+(Ne.position||0)*At.w+Ne._shift,_length:0}),Ct==="top"||Ct==="left")return Wt._offset;if(Ct==="bottom"||Ct==="right")return Wt._offset+Wt._length};function qt(Ue){var Ne=Ue.title.font.size,At=(Ue.title.text.match(a.BR_TAG_ALL)||[]).length;return Ue.title.hasOwnProperty("standoff")?At?Ne*($+At*Q):Ne*$:At?Ne*(At+1)*Q:Ne}function pr(Ue,Ne){var At=Ue._fullLayout,Rt=Ne._id,Ct=Rt.charAt(0),Wt=Ne.title.font.size,Qt;if(Ne.title.hasOwnProperty("standoff"))Qt=Ne._depth+Ne.title.standoff+qt(Ne);else{var Xt=Ft(Ne);if(Ne.type==="multicategory")Qt=Ne._depth;else{var $t=1.5*Wt;Xt&&($t=.5*Wt,Ne.ticks==="outside"&&($t+=Ne.ticklen)),Qt=10+$t+(Ne.linewidth?Ne.linewidth-1:0)}Xt||(Ct==="x"?Qt+=Ne.side==="top"?Wt*(Ne.showticklabels?1:0):Wt*(Ne.showticklabels?1.5:.5):Qt+=Ne.side==="right"?Wt*(Ne.showticklabels?1:.5):Wt*(Ne.showticklabels?.5:0))}var ur=te.getPxPosition(Ue,Ne),fr,mr,br;Ct==="x"?(mr=Ne._offset+Ne._length/2,br=Ne.side==="top"?ur-Qt:ur+Qt):(br=Ne._offset+Ne._length/2,mr=Ne.side==="right"?ur+Qt:ur-Qt,fr={rotate:"-90",offset:0});var Pr;if(Ne.type!=="multicategory"){var Cr=Ne._selections[Ne._id+"tick"];if(Pr={selection:Cr,side:Ne.side},Cr&&Cr.node()&&Cr.node().parentNode){var Zr=l.getTranslate(Cr.node().parentNode);Pr.offsetLeft=Zr.x,Pr.offsetTop=Zr.y}Ne.title.hasOwnProperty("standoff")&&(Pr.pad=0)}return Ne._titleStandoff=Qt,f.draw(Ue,Rt+"title",{propContainer:Ne,propName:Ne._name+".title.text",placeholder:At._dfltTitle[Ct],avoid:Pr,transform:fr,attributes:{x:mr,y:br,"text-anchor":"middle"}})}te.shouldShowZeroLine=function(Ue,Ne,At){var Rt=o.simpleMap(Ne.range,Ne.r2l);return Rt[0]*Rt[1]<=0&&Ne.zeroline&&(Ne.type==="linear"||Ne.type==="-")&&!(Ne.rangebreaks&&Ne.maskBreaks(0)===E)&&(_r(Ne,0)||!Rr(Ue,Ne,At,Rt)||an(Ue,Ne))},te.clipEnds=function(Ue,Ne){return Ne.filter(function(At){return _r(Ue,At.x)})};function _r(Ue,Ne){var At=Ue.l2p(Ne);return At>1&&At1)for(Ct=1;Ct=Ct.min&&Ue4/3-i?f:i}),Y5}var $5,wte;function qze(){if(wte)return $5;wte=1;var e=rr(),t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];return $5=function(n,o,s,a){return s==="left"?n=0:s==="center"?n=1:s==="right"?n=2:n=e.constrain(Math.floor(n*3),0,2),a==="bottom"?o=0:a==="middle"?o=1:a==="top"?o=2:o=e.constrain(Math.floor(o*3),0,2),t[o][n]},$5}var W5={exports:{}},Tte;function jze(){if(Tte)return W5.exports;Tte=1;var e=R2(),t=i$(),r=LS().getGraphDiv,n=RS(),o=W5.exports={};return o.wrapped=function(s,a,f){s=r(s),s._fullLayout&&t.clear(s._fullLayout._uid+n.HOVERID),o.raw(s,a,f)},o.raw=function(a,f){var i=a._fullLayout,l=a._hoverdata;f||(f={}),!(f.target&&!a._dragged&&e.triggerHandler(a,"plotly_beforehover",f)===!1)&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),a._hoverdata=void 0,f.target&&l&&a.emit("plotly_unhover",{event:f,points:l}))},W5.exports}var Ate;function Gh(){if(Ate)return H5.exports;Ate=1;var e=mAe(),t=uAe(),r=zS(),n=rr().removeElement,o=Wu(),s=H5.exports={};s.align=Bze(),s.getCursor=qze();var a=jze();s.unhover=a.wrapped,s.unhoverRaw=a.raw,s.init=function(u){var c=u.gd,h=1,d=c._context.doubleClickDelay,v=u.element,p,m,y,b,g,T,S,A;c._mouseDownTime||(c._mouseDownTime=0),v.style.pointerEvents="all",v.onmousedown=C,r?(v._ontouchstart&&v.removeEventListener("touchstart",v._ontouchstart),v._ontouchstart=C,v.addEventListener("touchstart",C,{passive:!1})):v.ontouchstart=C;function M(k,E,I){return Math.abs(k)"u"&&typeof k.clientY>"u"&&(k.clientX=p,k.clientY=m),y=new Date().getTime(),y-c._mouseDownTimed&&(h=Math.max(h-1,1)),c._dragged)u.doneFn&&u.doneFn();else if(u.clickFn&&u.clickFn(h,T),!A){var E;try{E=new MouseEvent("click",k)}catch{var I=i(k);E=document.createEvent("MouseEvents"),E.initMouseEvent("click",k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k.screenY,I[0],I[1],k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.relatedTarget)}S.dispatchEvent(E)}c._dragging=!1,c._dragged=!1}};function f(){var l=document.createElement("div");l.className="dragcover";var u=l.style;return u.position="fixed",u.left=0,u.right=0,u.top=0,u.bottom=0,u.zIndex=999999999,u.background="none",document.body.appendChild(l),l}s.coverSlip=f;function i(l){return e(l.changedTouches?l.changedTouches[0]:l,document.body)}return H5.exports}var wT={},X5,Ste;function v0(){return Ste||(Ste=1,X5=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}),X5}var Z5,Mte;function Uze(){if(Mte)return Z5;Mte=1;var e=v0(),t="data-savedcursor",r="!!";return Z5=function(o,s){var a=o.attr(t);if(s){if(!a){for(var f=(o.attr("class")||"").split(" "),i=0;i(i==="legend"?1:0));if(k===!1&&(u[i]=void 0),!(k===!1&&!h.uirevision)&&(v("uirevision",u.uirevision),k!==!1)){v("borderwidth");var E=v("orientation"),I=v("yref"),F=v("xref"),D=E==="h",z=I==="paper",N=F==="paper",q,P,B,$="left";D?(q=0,e.getComponentMethod("rangeslider","isVisible")(l.xaxis)?z?(P=1.1,B="bottom"):(P=1,B="top"):z?(P=-.1,B="top"):(P=0,B="bottom")):(P=1,B="auto",N?q=1.02:(q=1,$="right")),t.coerce(h,d,{x:{valType:"number",editType:"legend",min:N?-2:0,max:N?3:1,dflt:q}},"x"),t.coerce(h,d,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:P}},"y"),v("traceorder",M),a.isGrouped(u[i])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",$),v("yanchor",B),v("valign"),t.noneOrAll(h,d,["x","y"]);var Q=v("title.text");if(Q){v("title.side",D?"left":"top");var J=t.extendFlat({},p,{size:t.bigFont(p.size)});t.coerceFont(v,"title.font",J)}}}}return J5=function(l,u,c){var h,d=c.slice(),v=u.shapes;if(v)for(h=0;hk&&(_=k)}C[p][0]._groupMinRank=_,C[p][0]._preGroupSort=p}var E=function(q,P){return q[0]._groupMinRank-P[0]._groupMinRank||q[0]._preGroupSort-P[0]._preGroupSort},I=function(q,P){return q.trace.legendrank-P.trace.legendrank||q._preSort-P._preSort};for(C.forEach(function(q,P){q[0]._preGroupSort=P}),C.sort(E),p=0;p0)Y=Z.width;else return 0;return w?j:Math.min(Y,G)};T.each(function(te){var Z=e.select(this),G=r.ensureSingle(Z,"g","layers");G.style("opacity",te[0].trace.opacity);var j=A.indentation,Y=A.valign,K=te[0].lineHeight,X=te[0].height;if(Y==="middle"&&j===0||!K||!X)G.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],le=ee*(.5*(K-X+3))||0,oe=A.indentation;G.attr("transform",n(oe,le))}var fe=G.selectAll("g.legendfill").data([te]);fe.enter().append("g").classed("legendfill",!0);var de=G.selectAll("g.legendlines").data([te]);de.enter().append("g").classed("legendlines",!0);var _e=G.selectAll("g.legendsymbols").data([te]);_e.enter().append("g").classed("legendsymbols",!0),_e.selectAll("g.legendpoints").data([te]).enter().append("g").classed("legendpoints",!0)}).each(ne).each(F).each(z).each(D).each(q).each(Q).each($).each(E).each(I).each(P).each(B);function E(te){var Z=y(te),G=Z.showFill,j=Z.showLine,Y=Z.showGradientLine,K=Z.showGradientFill,X=Z.anyFill,ee=Z.anyLine,le=te[0],oe=le.trace,fe,de,_e=a(oe),we=_e.colorscale,Oe=_e.reversescale,be=function(We){if(We.size())if(G)o.fillGroupStyle(We,S,!0);else{var Qe="legendfill-"+oe.uid;o.gradient(We,S,Qe,m(Oe),we,"fill")}},Te=function(We){if(We.size()){var Qe="legendline-"+oe.uid;o.lineGroupStyle(We),o.gradient(We,S,Qe,m(Oe),we,"stroke")}},ke=f.hasMarkers(oe)||!X?"M5,0":ee?"M5,-2":"M5,-3",Ee=e.select(this),Le=Ee.select(".legendfill").selectAll("path").data(G||K?[te]:[]);if(Le.enter().append("path").classed("js-fill",!0),Le.exit().remove(),Le.attr("d",ke+"h"+C+"v6h-"+C+"z").call(be),j||Y){var Fe=k(void 0,oe.line,v,h);de=r.minExtend(oe,{line:{width:Fe}}),fe=[r.minExtend(le,{trace:de})]}var qe=Ee.select(".legendlines").selectAll("path").data(j||Y?[fe]:[]);qe.enter().append("path").classed("js-line",!0),qe.exit().remove(),qe.attr("d",ke+(Y?"l"+C+",0.0001":"h"+C)).call(j?o.lineGroupStyle:Te)}function I(te){var Z=y(te),G=Z.anyFill,j=Z.anyLine,Y=Z.showLine,K=Z.showMarker,X=te[0],ee=X.trace,le=!K&&!j&&!G&&f.hasText(ee),oe,fe;function de(Le,Fe,qe,We){var Qe=r.nestedProperty(ee,Le).get(),De=r.isArrayOrTypedArray(Qe)&&Fe?Fe(Qe):Qe;if(w&&De&&We!==void 0&&(De=We),qe){if(Deqe[1])return qe[1]}return De}function _e(Le){return X._distinct&&X.index&&Le[X.index]?Le[X.index]:Le[0]}if(K||le||Y){var we={},Oe={};if(K){we.mc=de("marker.color",_e),we.mx=de("marker.symbol",_e),we.mo=de("marker.opacity",r.mean,[.2,1]),we.mlc=de("marker.line.color",_e),we.mlw=de("marker.line.width",r.mean,[0,5],d),Oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var be=de("marker.size",r.mean,[2,16],c);we.ms=be,Oe.marker.size=be}Y&&(Oe.line={width:de("line.width",_e,[0,10],h)}),le&&(we.tx="Aa",we.tp=de("textposition",_e),we.ts=10,we.tc=de("textfont.color",_e),we.tf=de("textfont.family",_e)),oe=[r.minExtend(X,we)],fe=r.minExtend(ee,Oe),fe.selectedpoints=null,fe.texttemplate=null}var Te=e.select(this).select("g.legendpoints"),ke=Te.selectAll("path.scatterpts").data(K?oe:[]);ke.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),ke.exit().remove(),ke.call(o.pointStyle,fe,S),K&&(oe[0].mrc=3);var Ee=Te.selectAll("g.pointtext").data(le?oe:[]);Ee.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),Ee.exit().remove(),Ee.selectAll("text").call(o.textPointStyle,fe,S)}function F(te){var Z=te[0].trace,G=Z.type==="waterfall";if(te[0]._distinct&&G){var j=te[0].trace[te[0].dir].marker;return te[0].mc=j.color,te[0].mlw=j.line.width,te[0].mlc=j.line.color,N(te,this,"waterfall")}var Y=[];Z.visible&&G&&(Y=te[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var K=e.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);K.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(X){var ee=e.select(this),le=Z[X[0]].marker,oe=k(void 0,le.line,p,d);ee.attr("d",X[1]).style("stroke-width",oe+"px").call(s.fill,le.color),oe&&ee.call(s.stroke,le.line.color)})}function D(te){N(te,this)}function z(te){N(te,this,"funnel")}function N(te,Z,G){var j=te[0].trace,Y=j.marker||{},K=Y.line||{},X=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=G?j.visible&&j.type===G:t.traceIs(j,"bar"),le=e.select(Z).select("g.legendpoints").selectAll("path.legend"+G).data(ee?[te]:[]);le.enter().append("path").classed("legend"+G,!0).attr("d",X).attr("transform",_),le.exit().remove(),le.each(function(oe){var fe=e.select(this),de=oe[0],_e=k(de.mlw,Y.line,p,d);fe.style("stroke-width",_e+"px");var we=de.mcc;if(!A._inHover&&"mc"in de){var Oe=a(Y),be=Oe.mid;be===void 0&&(be=(Oe.max+Oe.min)/2),we=o.tryColorscale(Y,"")(be)}var Te=we||de.mc||Y.color,ke=Y.pattern,Ee=ke&&o.getPatternAttr(ke.shape,0,"");if(Ee){var Le=o.getPatternAttr(ke.bgcolor,0,null),Fe=o.getPatternAttr(ke.fgcolor,0,null),qe=ke.fgopacity,We=b(ke.size,8,10),Qe=b(ke.solidity,.5,1),De="legend-"+j.uid;fe.call(o.pattern,"legend",S,De,Ee,We,Qe,we,ke.fillmode,Le,Fe,qe)}else fe.call(s.fill,Te);_e&&s.stroke(fe,de.mlc||K.color)})}function q(te){var Z=te[0].trace,G=e.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Z.visible&&t.traceIs(Z,"box-violin")?[te]:[]);G.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),G.exit().remove(),G.each(function(){var j=e.select(this);if((Z.boxpoints==="all"||Z.points==="all")&&s.opacity(Z.fillcolor)===0&&s.opacity((Z.line||{}).color)===0){var Y=r.minExtend(Z,{marker:{size:w?c:r.constrain(Z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});G.call(o.pointStyle,Y,S)}else{var K=k(void 0,Z.line,p,d);j.style("stroke-width",K+"px").call(s.fill,Z.fillcolor),K&&s.stroke(j,Z.line.color)}})}function P(te){var Z=te[0].trace,G=e.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Z.visible&&Z.type==="candlestick"?[te,te]:[]);G.enter().append("path").classed("legendcandle",!0).attr("d",function(j,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",_).style("stroke-miterlimit",1),G.exit().remove(),G.each(function(j,Y){var K=e.select(this),X=Z[Y?"increasing":"decreasing"],ee=k(void 0,X.line,p,d);K.style("stroke-width",ee+"px").call(s.fill,X.fillcolor),ee&&s.stroke(K,X.line.color)})}function B(te){var Z=te[0].trace,G=e.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Z.visible&&Z.type==="ohlc"?[te,te]:[]);G.enter().append("path").classed("legendohlc",!0).attr("d",function(j,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",_).style("stroke-miterlimit",1),G.exit().remove(),G.each(function(j,Y){var K=e.select(this),X=Z[Y?"increasing":"decreasing"],ee=k(void 0,X.line,p,d);K.style("fill","none").call(o.dashLine,X.line.dash,ee),ee&&s.stroke(K,X.line.color)})}function $(te){J(te,this,"pie")}function Q(te){J(te,this,"funnelarea")}function J(te,Z,G){var j=te[0],Y=j.trace,K=G?Y.visible&&Y.type===G:t.traceIs(Y,G),X=e.select(Z).select("g.legendpoints").selectAll("path.legend"+G).data(K?[te]:[]);if(X.enter().append("path").classed("legend"+G,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),X.exit().remove(),X.size()){var ee=Y.marker||{},le=k(l(ee.line.width,j.pts),ee.line,p,d),oe="pieLike",fe=r.minExtend(Y,{marker:{line:{width:le}}},oe),de=r.minExtend(j,{trace:fe},oe);i(X,de,fe,S)}}function ne(te){var Z=te[0].trace,G,j=[];if(Z.visible)switch(Z.type){case"histogram2d":case"heatmap":j=[["M-15,-2V4H15V-2Z"]],G=!0;break;case"choropleth":case"choroplethmapbox":j=[["M-6,-6V6H6V-6Z"]],G=!0;break;case"densitymapbox":j=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],G="radial";break;case"cone":j=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],G=!1;break;case"streamtube":j=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],G=!1;break;case"surface":j=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],G=!0;break;case"mesh3d":j=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],G=!1;break;case"volume":j=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],G=!0;break;case"isosurface":j=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],G=!1;break}var Y=e.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(j);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(K,X){var ee=e.select(this),le=a(Z),oe=le.colorscale,fe=le.reversescale,de=function(be){if(be.size()){var Te="legendfill-"+Z.uid;o.gradient(be,S,Te,m(fe,G==="radial"),oe,"fill")}},_e;if(oe){if(!G){var Oe=oe.length;_e=X===0?oe[fe?Oe-1:0][1]:X===1?oe[fe?0:Oe-1][1]:oe[Math.floor((Oe-1)/2)][1]}}else{var we=Z.vertexcolor||Z.facecolor||Z.color;_e=r.isArrayOrTypedArray(we)?we[X]||we[0]:we}ee.attr("d",K[0]),_e?ee.call(s.fill,_e):ee.call(de)})}};function m(g,T){var S=T?"radial":"horizontal";return S+(g?"":"reversed")}function y(g){var T=g[0].trace,S=T.contours,A=f.hasLines(T),M=f.hasMarkers(T),w=T.visible&&T.fill&&T.fill!=="none",C=!1,x=!1;if(S){var _=S.coloring;_==="lines"?C=!0:A=_==="none"||_==="heatmap"||S.showlines,S.type==="constraint"?w=S._operation!=="=":(_==="fill"||_==="heatmap")&&(x=!0)}return{showMarker:M,showLine:A,showFill:w,showGradientLine:C,showGradientFill:x,anyLine:A||C,anyFill:w||x}}function b(g,T,S){return g&&r.isArrayOrTypedArray(g)?T:g>S?S:g}return i4}var o4,Fte;function TAe(){if(Fte)return o4;Fte=1;var e=ya(),t=rr(),r=Ts(),n=ga(),o=R2(),s=Gh(),a=Ba(),f=va(),i=ns(),l=Hze(),u=_Ae(),c=Zu(),h=c.LINE_SPACING,d=c.FROM_TL,v=c.FROM_BR,p=Gze(),m=wAe(),y=l$(),b=1,g=/^legend[0-9]*$/;o4=function(P,B){if(B)S(P,B);else{var $=P._fullLayout,Q=$._legends,J=$._infolayer.selectAll('[class^="legend"]');J.each(function(){var G=e.select(this),j=G.attr("class"),Y=j.split(" ")[0];Y.match(g)&&Q.indexOf(Y)===-1&&G.remove()});for(var ne=0;ne1)}var ee=$.hiddenlabels||[];if(!te&&(!$.showlegend||!Z.length))return ne.selectAll("."+Q).remove(),$._topdefs.select("#"+J).remove(),r.autoMargin(q,Q);var le=t.ensureSingle(ne,"g",Q,function(ke){te||ke.attr("pointer-events","all")}),oe=t.ensureSingleById($._topdefs,"clipPath",J,function(ke){ke.append("rect")}),fe=t.ensureSingle(le,"rect","bg",function(ke){ke.attr("shape-rendering","crispEdges")});fe.call(f.stroke,B.bordercolor).call(f.fill,B.bgcolor).style("stroke-width",B.borderwidth+"px");var de=t.ensureSingle(le,"g","scrollbox"),_e=B.title;B._titleWidth=0,B._titleHeight=0;var we;_e.text?(we=t.ensureSingle(de,"text",Q+"titletext"),we.attr("text-anchor","start").call(a.font,_e.font).text(_e.text),_(we,de,q,B,b)):de.selectAll("."+Q+"titletext").remove();var Oe=t.ensureSingle(le,"rect","scrollbar",function(ke){ke.attr(u.scrollBarEnterAttrs).call(f.fill,u.scrollBarColor)}),be=de.selectAll("g.groups").data(Z);be.enter().append("g").attr("class","groups"),be.exit().remove();var Te=be.selectAll("g.traces").data(t.identity);Te.enter().append("g").attr("class","traces"),Te.exit().remove(),Te.style("opacity",function(ke){var Ee=ke[0].trace;return n.traceIs(Ee,"pie-like")?ee.indexOf(ke[0].label)!==-1?.5:1:Ee.visible==="legendonly"?.5:1}).each(function(){e.select(this).call(w,q,B)}).call(m,q,B).each(function(){te||e.select(this).call(x,q,Q)}),t.syncOrAsync([r.previousPromises,function(){return I(q,be,Te,B)},function(){var ke=$._size,Ee=B.borderwidth,Le=B.xref==="paper",Fe=B.yref==="paper";if(_e.text&&T(we,B,Ee),!te){var qe,We;Le?qe=ke.l+ke.w*B.x-d[D(B)]*B._width:qe=$.width*B.x-d[D(B)]*B._width,Fe?We=ke.t+ke.h*(1-B.y)-d[z(B)]*B._effHeight:We=$.height*(1-B.y)-d[z(B)]*B._effHeight;var Qe=F(q,Q,qe,We);if(Qe)return;if($.margin.autoexpand){var De=qe,me=We;qe=Le?t.constrain(qe,0,$.width-B._width):De,We=Fe?t.constrain(We,0,$.height-B._effHeight):me,qe!==De&&t.log("Constrain "+Q+".x to make legend fit inside graph"),We!==me&&t.log("Constrain "+Q+".y to make legend fit inside graph")}a.setTranslate(le,qe,We)}if(Oe.on(".drag",null),le.on("wheel",null),te||B._height<=B._maxHeight||q._context.staticPlot){var Ce=B._effHeight;te&&(Ce=B._height),fe.attr({width:B._width-Ee,height:Ce-Ee,x:Ee/2,y:Ee/2}),a.setTranslate(de,0,0),oe.select("rect").attr({width:B._width-2*Ee,height:Ce-2*Ee,x:Ee,y:Ee}),a.setClipUrl(de,J,q),a.setRect(Oe,0,0,0,0),delete B._scrollY}else{var et=Math.max(u.scrollBarMinHeight,B._effHeight*B._effHeight/B._height),st=B._effHeight-et-2*u.scrollBarMargin,ot=B._height-B._effHeight,ut=st/ot,ht=Math.min(B._scrollY||0,ot);fe.attr({width:B._width-2*Ee+u.scrollBarWidth+u.scrollBarMargin,height:B._effHeight-Ee,x:Ee/2,y:Ee/2}),oe.select("rect").attr({width:B._width-2*Ee+u.scrollBarWidth+u.scrollBarMargin,height:B._effHeight-2*Ee,x:Ee,y:Ee+ht}),a.setClipUrl(de,J,q),He(ht,et,ut),le.on("wheel",function(){ht=t.constrain(B._scrollY+e.event.deltaY/st*ot,0,ot),He(ht,et,ut),ht!==0&&ht!==ot&&e.event.preventDefault()});var Ht,Et,Jt,Tt=function(Se,Pe,it){var vt=(it-Pe)/ut+Se;return t.constrain(vt,0,ot)},rt=function(Se,Pe,it){var vt=(Pe-it)/ut+Se;return t.constrain(vt,0,ot)},gt=e.behavior.drag().on("dragstart",function(){var Se=e.event.sourceEvent;Se.type==="touchstart"?Ht=Se.changedTouches[0].clientY:Ht=Se.clientY,Jt=ht}).on("drag",function(){var Se=e.event.sourceEvent;Se.buttons===2||Se.ctrlKey||(Se.type==="touchmove"?Et=Se.changedTouches[0].clientY:Et=Se.clientY,ht=Tt(Jt,Ht,Et),He(ht,et,ut))});Oe.call(gt);var mt=e.behavior.drag().on("dragstart",function(){var Se=e.event.sourceEvent;Se.type==="touchstart"&&(Ht=Se.changedTouches[0].clientY,Jt=ht)}).on("drag",function(){var Se=e.event.sourceEvent;Se.type==="touchmove"&&(Et=Se.changedTouches[0].clientY,ht=rt(Jt,Ht,Et),He(ht,et,ut))});de.call(mt)}function He(Se,Pe,it){B._scrollY=q._fullLayout[Q]._scrollY=Se,a.setTranslate(de,0,-Se),a.setRect(Oe,B._width,u.scrollBarMargin+Se*it,u.scrollBarWidth,Pe),oe.select("rect").attr("y",Ee+Se)}if(q._context.edits.legendPosition){var Ie,je,pe,ye;le.classed("cursor-move",!0),s.init({element:le.node(),gd:q,prepFn:function(){var Se=a.getTranslate(le);pe=Se.x,ye=Se.y},moveFn:function(Se,Pe){var it=pe+Se,vt=ye+Pe;a.setTranslate(le,it,vt),Ie=s.align(it,B._width,ke.l,ke.l+ke.w,B.xanchor),je=s.align(vt+B._height,-B._height,ke.t+ke.h,ke.t,B.yanchor)},doneFn:function(){if(Ie!==void 0&&je!==void 0){var Se={};Se[Q+".x"]=Ie,Se[Q+".y"]=je,n.call("_guiRelayout",q,Se)}},clickFn:function(Se,Pe){var it=ne.selectAll("g.traces").filter(function(){var vt=this.getBoundingClientRect();return Pe.clientX>=vt.left&&Pe.clientX<=vt.right&&Pe.clientY>=vt.top&&Pe.clientY<=vt.bottom});it.size()>0&&M(q,le,it,Se,Pe)}})}}],q)}}function A(q,P,B){var $=q[0],Q=$.width,J=P.entrywidthmode,ne=$.trace.legendwidth||P.entrywidth;return J==="fraction"?P._maxWidth*ne:B+(ne||Q)}function M(q,P,B,$,Q){var J=B.data()[0][0].trace,ne={event:Q,node:B.node(),curveNumber:J.index,expandedIndex:J._expandedIndex,data:q.data,layout:q.layout,frames:q._transitionData._frames,config:q._context,fullData:q._fullData,fullLayout:q._fullLayout};J._group&&(ne.group=J._group),n.traceIs(J,"pie-like")&&(ne.label=B.datum()[0].label);var te=o.triggerHandler(q,"plotly_legendclick",ne);if($===1){if(te===!1)return;P._clickTimeout=setTimeout(function(){q._fullLayout&&l(B,q,$)},q._context.doubleClickDelay)}else if($===2){P._clickTimeout&&clearTimeout(P._clickTimeout),q._legendMouseDownTime=0;var Z=o.triggerHandler(q,"plotly_legenddoubleclick",ne);Z!==!1&&te!==!1&&l(B,q,$)}}function w(q,P,B){var $=N(B),Q=q.data()[0][0],J=Q.trace,ne=n.traceIs(J,"pie-like"),te=!B._inHover&&P._context.edits.legendText&&!ne,Z=B._maxNameLength,G,j;Q.groupTitle?(G=Q.groupTitle.text,j=Q.groupTitle.font):(j=B.font,B.entries?G=Q.text:(G=ne?Q.label:J.name,J._meta&&(G=t.templateString(G,J._meta))));var Y=t.ensureSingle(q,"text",$+"text");Y.attr("text-anchor","start").call(a.font,j).text(te?C(G,Z):G);var K=B.indentation+B.itemwidth+u.itemGap*2;i.positionText(Y,K,0),te?Y.call(i.makeEditable,{gd:P,text:G}).call(_,q,P,B).on("edit",function(X){this.text(C(X,Z)).call(_,q,P,B);var ee=Q.trace._fullInput||{},le={};if(n.hasTransform(ee,"groupby")){var oe=n.getTransformIndices(ee,"groupby"),fe=oe[oe.length-1],de=t.keyedContainer(ee,"transforms["+fe+"].styles","target","value.name");de.set(Q.trace._group,X),le=de.constructUpdate()}else le.name=X;return ee._isShape?n.call("_guiRelayout",P,"shapes["+J.index+"].name",le.name):n.call("_guiRestyle",P,le,J.index)}):_(Y,q,P,B)}function C(q,P){var B=Math.max(4,P);if(q&&q.trim().length>=B/2)return q;q=q||"";for(var $=B-q.length;$>0;$--)q+=" ";return q}function x(q,P,B){var $=P._context.doubleClickDelay,Q,J=1,ne=t.ensureSingle(q,"rect",B+"toggle",function(te){P._context.staticPlot||te.style("cursor","pointer").attr("pointer-events","all"),te.call(f.fill,"rgba(0,0,0,0)")});P._context.staticPlot||(ne.on("mousedown",function(){Q=new Date().getTime(),Q-P._legendMouseDownTime<$?J+=1:(J=1,P._legendMouseDownTime=Q)}),ne.on("mouseup",function(){if(!(P._dragged||P._editing)){var te=P._fullLayout[B];new Date().getTime()-P._legendMouseDownTime>$&&(J=Math.max(J-1,1)),M(P,te,q,J,e.event)}}))}function _(q,P,B,$,Q){$._inHover&&q.attr("data-notex",!0),i.convertToTspans(q,B,function(){k(P,B,$,Q)})}function k(q,P,B,$){var Q=q.data()[0][0];if(!B._inHover&&Q&&!Q.trace.showlegend){q.remove();return}var J=q.select("g[class*=math-group]"),ne=J.node(),te=N(B);B||(B=P._fullLayout[te]);var Z=B.borderwidth,G;$===b?G=B.title.font:Q.groupTitle?G=Q.groupTitle.font:G=B.font;var j=G.size*h,Y,K;if(ne){var X=a.bBox(ne);Y=X.height,K=X.width,$===b?a.setTranslate(J,Z,Z+Y*.75):a.setTranslate(J,0,Y*.25)}else{var ee="."+te+($===b?"title":"")+"text",le=q.select(ee),oe=i.lineCount(le),fe=le.node();if(Y=j*oe,K=fe?a.bBox(fe).width:0,$===b)B.title.side==="left"&&(K+=u.itemGap*2),i.positionText(le,Z+u.titlePad,Z+j);else{var de=u.itemGap*2+B.indentation+B.itemwidth;Q.groupTitle&&(de=u.itemGap,K-=B.indentation+B.itemwidth),i.positionText(le,de,-j*((oe-1)/2-.3))}}$===b?(B._titleWidth=K,B._titleHeight=Y):(Q.lineHeight=j,Q.height=Math.max(Y,16)+3,Q.width=K)}function E(q){var P=0,B=0,$=q.title.side;return $&&($.indexOf("left")!==-1&&(P=q._titleWidth),$.indexOf("top")!==-1&&(B=q._titleHeight)),[P,B]}function I(q,P,B,$){var Q=q._fullLayout,J=N($);$||($=Q[J]);var ne=Q._size,te=y.isVertical($),Z=y.isGrouped($),G=$.entrywidthmode==="fraction",j=$.borderwidth,Y=2*j,K=u.itemGap,X=$.indentation+$.itemwidth+K*2,ee=2*(j+K),le=z($),oe=$.y<0||$.y===0&&le==="top",fe=$.y>1||$.y===1&&le==="bottom",de=$.tracegroupgap,_e={};$._maxHeight=Math.max(oe||fe?Q.height/2:ne.h,30);var we=0;$._width=0,$._height=0;var Oe=E($);if(te)B.each(function(Jt){var Tt=Jt[0].height;a.setTranslate(this,j+Oe[0],j+Oe[1]+$._height+Tt/2+K),$._height+=Tt,$._width=Math.max($._width,Jt[0].width)}),we=X+$._width,$._width+=K+X+Y,$._height+=ee,Z&&(P.each(function(Jt,Tt){a.setTranslate(this,0,Tt*$.tracegroupgap)}),$._height+=($._lgroupsLength-1)*$.tracegroupgap);else{var be=D($),Te=$.x<0||$.x===0&&be==="right",ke=$.x>1||$.x===1&&be==="left",Ee=fe||oe,Le=Q.width/2;$._maxWidth=Math.max(Te?Ee&&be==="left"?ne.l+ne.w:Le:ke?Ee&&be==="right"?ne.r+ne.w:Le:ne.w,2*X);var Fe=0,qe=0;B.each(function(Jt){var Tt=A(Jt,$,X);Fe=Math.max(Fe,Tt),qe+=Tt}),we=null;var We=0;if(Z){var Qe=0,De=0,me=0;P.each(function(){var Jt=0,Tt=0;e.select(this).selectAll("g.traces").each(function(gt){var mt=A(gt,$,X),He=gt[0].height;a.setTranslate(this,Oe[0],Oe[1]+j+K+He/2+Tt),Tt+=He,Jt=Math.max(Jt,mt),_e[gt[0].trace.legendgroup]=Jt});var rt=Jt+K;De>0&&rt+j+De>$._maxWidth?(We=Math.max(We,De),De=0,me+=Qe+de,Qe=Tt):Qe=Math.max(Qe,Tt),a.setTranslate(this,De,me),De+=rt}),$._width=Math.max(We,De)+j,$._height=me+Qe+ee}else{var Ce=B.size(),et=qe+Y+(Ce-1)*K<$._maxWidth,st=0,ot=0,ut=0,ht=0;B.each(function(Jt){var Tt=Jt[0].height,rt=A(Jt,$,X),gt=et?rt:Fe;G||(gt+=K),gt+j+ot-K>=$._maxWidth&&(We=Math.max(We,ht),ot=0,ut+=st,$._height+=st,st=0),a.setTranslate(this,Oe[0]+j+ot,Oe[1]+j+ut+Tt/2+K),ht=ot+rt+K,ot+=gt,st=Math.max(st,Tt)}),et?($._width=ot+Y,$._height=st+ee):($._width=Math.max(We,ht)+Y,$._height+=st+ee)}}$._width=Math.ceil(Math.max($._width+Oe[0],$._titleWidth+2*(j+u.titlePad))),$._height=Math.ceil(Math.max($._height+Oe[1],$._titleHeight+2*(j+u.itemGap))),$._effHeight=Math.min($._height,$._maxHeight);var Ht=q._context.edits,Et=Ht.legendText||Ht.legendPosition;B.each(function(Jt){var Tt=e.select(this).select("."+J+"toggle"),rt=Jt[0].height,gt=Jt[0].trace.legendgroup,mt=A(Jt,$,X);Z&>!==""&&(mt=_e[gt]);var He=Et?X:we||mt;!te&&!G&&(He+=K/2),a.setRect(Tt,0,-rt/2,He,rt)})}function F(q,P,B,$){var Q=q._fullLayout,J=Q[P],ne=D(J),te=z(J),Z=J.xref==="paper",G=J.yref==="paper";q._fullLayout._reservedMargin[P]={};var j=J.y<.5?"b":"t",Y=J.x<.5?"l":"r",K={r:Q.width-B,l:B+J._width,b:Q.height-$,t:$+J._effHeight};if(Z&&G)return r.autoMargin(q,P,{x:J.x,y:J.y,l:J._width*d[ne],r:J._width*v[ne],b:J._effHeight*v[te],t:J._effHeight*d[te]});Z?q._fullLayout._reservedMargin[P][j]=K[j]:G||J.orientation==="v"?q._fullLayout._reservedMargin[P][Y]=K[Y]:q._fullLayout._reservedMargin[P][j]=K[j]}function D(q){return t.isRightAnchor(q)?"right":t.isCenterAnchor(q)?"center":"left"}function z(q){return t.isBottomAnchor(q)?"bottom":t.isMiddleAnchor(q)?"middle":"top"}function N(q){return q._id||"legend"}return o4}var Nte;function AAe(){if(Nte)return wT;Nte=1;var e=ya(),t=Ua(),r=wf(),n=rr(),o=n.strTranslate,s=n.strRotate,a=R2(),f=ns(),i=Uze(),l=Ba(),u=va(),c=Gh(),h=Ia(),d=ga(),v=Wd(),p=RS(),m=bAe(),y=TAe(),b=p.YANGLE,g=Math.PI*b/180,T=1/Math.sin(g),S=Math.cos(g),A=Math.sin(g),M=p.HOVERARROWSIZE,w=p.HOVERTEXTPAD,C={box:!0,ohlc:!0,violin:!0,candlestick:!0},x={scatter:!0,scattergl:!0,splom:!0};wT.hover=function(K,X,ee,le){K=n.getGraphDiv(K);var oe=X.target;n.throttle(K._fullLayout._uid+p.HOVERID,p.HOVERMINTIME,function(){_(K,X,ee,le,oe)})},wT.loneHover=function(K,X){var ee=!0;Array.isArray(K)||(ee=!1,K=[K]);var le=X.gd,oe=Z(le),fe=G(le),de=K.map(function(Fe){var qe=Fe._x0||Fe.x0||Fe.x||0,We=Fe._x1||Fe.x1||Fe.x||0,Qe=Fe._y0||Fe.y0||Fe.y||0,De=Fe._y1||Fe.y1||Fe.y||0,me=Fe.eventData;if(me){var Ce=Math.min(qe,We),et=Math.max(qe,We),st=Math.min(Qe,De),ot=Math.max(Qe,De),ut=Fe.trace;if(d.traceIs(ut,"gl3d")){var ht=le._fullLayout[ut.scene]._scene.container,Ht=ht.offsetLeft,Et=ht.offsetTop;Ce+=Ht,et+=Ht,st+=Et,ot+=Et}me.bbox={x0:Ce+fe,x1:et+fe,y0:st+oe,y1:ot+oe},X.inOut_bbox&&X.inOut_bbox.push(me.bbox)}else me=!1;return{color:Fe.color||u.defaultLine,x0:Fe.x0||Fe.x||0,x1:Fe.x1||Fe.x||0,y0:Fe.y0||Fe.y||0,y1:Fe.y1||Fe.y||0,xLabel:Fe.xLabel,yLabel:Fe.yLabel,zLabel:Fe.zLabel,text:Fe.text,name:Fe.name,idealAlign:Fe.idealAlign,borderColor:Fe.borderColor,fontFamily:Fe.fontFamily,fontSize:Fe.fontSize,fontColor:Fe.fontColor,nameLength:Fe.nameLength,textAlign:Fe.textAlign,trace:Fe.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Fe.hovertemplate||!1,hovertemplateLabels:Fe.hovertemplateLabels||!1,eventData:me}}),_e=!1,we=I(de,{gd:le,hovermode:"closest",rotateLabels:_e,bgColor:X.bgColor||u.background,container:e.select(X.container),outerContainer:X.outerContainer||X.container}),Oe=we.hoverLabels,be=5,Te=0,ke=0;Oe.sort(function(Fe,qe){return Fe.y0-qe.y0}).each(function(Fe,qe){var We=Fe.y0-Fe.by/2;We-beTe[0]._length||Se<0||Se>ke[0]._length)return c.unhoverRaw(Y,K)}if(K.pointerX=ye+Te[0]._offset,K.pointerY=Se+ke[0]._offset,"xval"in K?et=v.flat(oe,K.xval):et=v.p2c(Te,ye),"yval"in K?st=v.flat(oe,K.yval):st=v.p2c(ke,Se),!t(et[0])||!t(st[0]))return n.warn("Fx.hover failed",K,Y),c.unhoverRaw(Y,K)}var vt=1/0;function Pt(An,Hn){for(ut=0;utHe&&(me.splice(0,He),vt=me[0].distance),we&&De!==0&&me.length===0){mt.distance=De,mt.index=!1;var Ta=Ht._module.hoverPoints(mt,rt,gt,"closest",{hoverLayer:fe._hoverlayer});if(Ta&&(Ta=Ta.filter(function(yo){return yo.spikeDistance<=De})),Ta&&Ta.length){var ba,Da=Ta.filter(function(yo){return yo.xa.showspikes&&yo.xa.spikesnap!=="hovered data"});if(Da.length){var _i=Da[0];t(_i.x0)&&t(_i.y0)&&(ba=It(_i),(!Ie.vLinePoint||Ie.vLinePoint.spikeDistance>ba.spikeDistance)&&(Ie.vLinePoint=ba))}var ci=Ta.filter(function(yo){return yo.ya.showspikes&&yo.ya.spikesnap!=="hovered data"});if(ci.length){var Bi=ci[0];t(Bi.x0)&&t(Bi.y0)&&(ba=It(Bi),(!Ie.hLinePoint||Ie.hLinePoint.spikeDistance>ba.spikeDistance)&&(Ie.hLinePoint=ba))}}}}}Pt();function Bt(An,Hn,In){for(var ua=null,Ln=1/0,oa,Ta=0;Ta0&&Math.abs(An.distance)bt-1;lr--)cr(me[lr]);me=wt,_r()}var Ue=Y._hoverdata,Ne=[],At=Z(Y),Rt=G(Y);for(ot=0;ot1||me.length>1)||We==="closest"&&je&&me.length>1,jr=u.combine(fe.plot_bgcolor||u.background,fe.paper_bgcolor),Sn=I(me,{gd:Y,hovermode:We,rotateLabels:Zr,bgColor:jr,container:fe._hoverlayer,outerContainer:fe._paper.node(),commonLabelOpts:fe.hoverlabel,hoverdistance:fe.hoverdistance}),Fn=Sn.hoverLabels;if(v.isUnifiedHover(We)||(D(Fn,Zr,fe,Sn.commonLabelBoundingBox),q(Fn,Zr,fe._invScaleX,fe._invScaleY)),le&&le.tagName){var ea=d.getComponentMethod("annotations","hasClickToShow")(Y,Ne);i(e.select(le),ea?"pointer":"")}!le||ee||!$(Y,K,Ue)||(Ue&&Y.emit("plotly_unhover",{event:K,points:Ue}),Y.emit("plotly_hover",{event:K,points:Y._hoverdata,xaxes:Te,yaxes:ke,xvals:et,yvals:st}))}function k(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var E=/([\s\S]*)<\/extra>/;function I(Y,K){var X=K.gd,ee=X._fullLayout,le=K.hovermode,oe=K.rotateLabels,fe=K.bgColor,de=K.container,_e=K.outerContainer,we=K.commonLabelOpts||{};if(Y.length===0)return[[]];var Oe=K.fontFamily||p.HOVERFONT,be=K.fontSize||p.HOVERFONTSIZE,Te=Y[0],ke=Te.xa,Ee=Te.ya,Le=le.charAt(0),Fe=Le+"Label",qe=Te[Fe];if(qe===void 0&&ke.type==="multicategory")for(var We=0;Weee.width-Ct&&(Wt=ee.width-Ct),yt.attr("d","M"+(Ne-Wt)+",0L"+(Ne-Wt+M)+","+Rt+M+"H"+Ct+"v"+Rt+(w*2+Ue.height)+"H"+-Ct+"V"+Rt+M+"H"+(Ne-Wt-M)+"Z"),Ne=Wt,Et.minX=Ne-Ct,Et.maxX=Ne+Ct,ke.side==="top"?(Et.minY=At-(w*2+Ue.height),Et.maxY=At-w):(Et.minY=At+w,Et.maxY=At+(w*2+Ue.height))}else{var Qt,Xt,$t;Ee.side==="right"?(Qt="start",Xt=1,$t="",Ne=ke._offset+ke._length):(Qt="end",Xt=-1,$t="-",Ne=ke._offset),At=Ee._offset+(Te.y0+Te.y1)/2,wt.attr("text-anchor",Qt),yt.attr("d","M0,0L"+$t+M+","+M+"V"+(w+Ue.height/2)+"h"+$t+(w*2+Ue.width)+"V-"+(w+Ue.height/2)+"H"+$t+M+"V-"+M+"Z"),Et.minY=At-(w+Ue.height/2),Et.maxY=At+(w+Ue.height/2),Ee.side==="right"?(Et.minX=Ne+M,Et.maxX=Ne+M+(w*2+Ue.width)):(Et.minX=Ne-M-(w*2+Ue.width),Et.maxX=Ne-M);var ur=Ue.height/2,fr=De-Ue.top-ur,mr="clip"+ee._uid+"commonlabel"+Ee._id,br;if(Ne=0?hn=Br:Gr+Pt=0?hn=Gr:en+Pt=0?Wr=Rr:an+Bt=0?Wr=an:cn+Bt=0,(tt.idealAlign==="top"||!jr)&&Sn?(ur-=mr/2,tt.anchor="end"):jr?(ur+=mr/2,tt.anchor="start"):tt.anchor="middle",tt.crossPos=ur;else{if(tt.pos=ur,jr=$t+fr/2+Zr<=me,Sn=$t-fr/2-Zr>=0,(tt.idealAlign==="left"||!jr)&&Sn)$t-=fr/2,tt.anchor="end";else if(jr)$t+=fr/2,tt.anchor="start";else{tt.anchor="middle";var Fn=Zr/2,ea=$t+Fn-me,An=$t-Fn;ea>0&&($t-=ea),An<0&&($t+=-An)}tt.crossPos=$t}Rt.attr("text-anchor",tt.anchor),Wt&&Ct.attr("text-anchor",tt.anchor),yt.attr("transform",o($t,ur)+(oe?s(b):""))}),{hoverLabels:bt,commonLabelBoundingBox:Et}}function F(Y,K,X,ee,le,oe){var fe="",de="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=n.templateString(Y.name,Y.trace._meta)),fe=J(Y.name,Y.nameLength));var _e=X.charAt(0),we=_e==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(de+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(de+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&(de+=(de?"z: ":"")+Y.zLabel)):K&&Y[_e+"Label"]===le?de=Y[we+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(de=Y.yLabel):Y.yLabel===void 0?de=Y.xLabel:de="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(de+=(de?"
":"")+Y.text),Y.extraText!==void 0&&(de+=(de?"
":"")+Y.extraText),oe&&de===""&&!Y.hovertemplate&&(fe===""&&oe.remove(),de=fe);var Oe=Y.hovertemplate||!1;if(Oe){var be=Y.hovertemplateLabels||Y;Y[_e+"Label"]!==le&&(be[_e+"other"]=be[_e+"Val"],be[_e+"otherLabel"]=be[_e+"Label"]),de=n.hovertemplateString(Oe,be,ee._d3locale,Y.eventData[0]||{},Y.trace._meta),de=de.replace(E,function(Te,ke){return fe=J(ke,Y.nameLength),""})}return[de,fe]}function D(Y,K,X,ee){var le=K?"xa":"ya",oe=K?"ya":"xa",fe=0,de=1,_e=Y.size(),we=new Array(_e),Oe=0,be=ee.minX,Te=ee.maxX,ke=ee.minY,Ee=ee.maxY,Le=function(rt){return rt*X._invScaleX},Fe=function(rt){return rt*X._invScaleY};Y.each(function(rt){var gt=rt[le],mt=rt[oe],He=gt._id.charAt(0)==="x",Ie=gt.range;Oe===0&&Ie&&Ie[0]>Ie[1]!==He&&(de=-1);var je=0,pe=He?X.width:X.height;if(X.hovermode==="x"||X.hovermode==="y"){var ye=z(rt,K),Se=rt.anchor,Pe=Se==="end"?-1:1,it,vt;if(Se==="middle")it=rt.crossPos+(He?Fe(ye.y-rt.by/2):Le(rt.bx/2+rt.tx2width/2)),vt=it+(He?Fe(rt.by):Le(rt.bx));else if(He)it=rt.crossPos+Fe(M+ye.y)-Fe(rt.by/2-M),vt=it+Fe(rt.by);else{var Pt=Le(Pe*M+ye.x),Bt=Pt+Le(Pe*rt.bx);it=rt.crossPos+Math.min(Pt,Bt),vt=rt.crossPos+Math.max(Pt,Bt)}He?ke!==void 0&&Ee!==void 0&&Math.min(vt,Ee)-Math.max(it,ke)>1&&(mt.side==="left"?(je=mt._mainLinePosition,pe=X.width):pe=mt._mainLinePosition):be!==void 0&&Te!==void 0&&Math.min(vt,Te)-Math.max(it,be)>1&&(mt.side==="top"?(je=mt._mainLinePosition,pe=X.height):pe=mt._mainLinePosition)}we[Oe++]=[{datum:rt,traceIndex:rt.trace.index,dp:0,pos:rt.pos,posref:rt.posref,size:rt.by*(He?T:1)/2,pmin:je,pmax:pe}]}),we.sort(function(rt,gt){return rt[0].posref-gt[0].posref||de*(gt[0].traceIndex-rt[0].traceIndex)});var qe,We,Qe,De,me,Ce,et;function st(rt){var gt=rt[0],mt=rt[rt.length-1];if(We=gt.pmin-gt.pos-gt.dp+gt.size,Qe=mt.pos+mt.dp+mt.size-gt.pmax,We>.01){for(me=rt.length-1;me>=0;me--)rt[me].dp+=We;qe=!1}if(!(Qe<.01)){if(We<-.01){for(me=rt.length-1;me>=0;me--)rt[me].dp-=Qe;qe=!1}if(qe){var He=0;for(De=0;Degt.pmax&&He++;for(De=rt.length-1;De>=0&&!(He<=0);De--)Ce=rt[De],Ce.pos>gt.pmax-1&&(Ce.del=!0,He--);for(De=0;De=0;me--)rt[me].dp-=Qe;for(De=rt.length-1;De>=0&&!(He<=0);De--)Ce=rt[De],Ce.pos+Ce.dp+Ce.size>gt.pmax&&(Ce.del=!0,He--)}}}for(;!qe&&fe<=_e;){for(fe++,qe=!0,De=0;De.01&&ht.pmin===Ht.pmin&&ht.pmax===Ht.pmax){for(me=ut.length-1;me>=0;me--)ut[me].dp+=We;for(ot.push.apply(ot,ut),we.splice(De+1,1),et=0,me=ot.length-1;me>=0;me--)et+=ot[me].dp;for(Qe=et/ot.length,me=ot.length-1;me>=0;me--)ot[me].dp-=Qe;qe=!1}else De++}we.forEach(st)}for(De=we.length-1;De>=0;De--){var Et=we[De];for(me=Et.length-1;me>=0;me--){var Jt=Et[me],Tt=Jt.datum;Tt.offset=Jt.dp,Tt.del=Jt.del}}}function z(Y,K){var X=0,ee=Y.offset;return K&&(ee*=-A,X=Y.offset*S),{x:X,y:ee}}function N(Y){var K={start:1,end:-1,middle:0}[Y.anchor],X=K*(M+w),ee=X+K*(Y.txwidth+w),le=Y.anchor==="middle";return le&&(X-=Y.tx2width/2,ee+=Y.txwidth/2+w),{alignShift:K,textShiftX:X,text2ShiftX:ee}}function q(Y,K,X,ee){var le=function(fe){return fe*X},oe=function(fe){return fe*ee};Y.each(function(fe){var de=e.select(this);if(fe.del)return de.remove();var _e=de.select("text.nums"),we=fe.anchor,Oe=we==="end"?-1:1,be=N(fe),Te=z(fe,K),ke=Te.x,Ee=Te.y,Le=we==="middle";de.select("path").attr("d",Le?"M-"+le(fe.bx/2+fe.tx2width/2)+","+oe(Ee-fe.by/2)+"h"+le(fe.bx)+"v"+oe(fe.by)+"h-"+le(fe.bx)+"Z":"M0,0L"+le(Oe*M+ke)+","+oe(M+Ee)+"v"+oe(fe.by/2-M)+"h"+le(Oe*fe.bx)+"v-"+oe(fe.by)+"H"+le(Oe*M+ke)+"V"+oe(Ee-M)+"Z");var Fe=ke+be.textShiftX,qe=Ee+fe.ty0-fe.by/2+w,We=fe.textAlign||"auto";We!=="auto"&&(We==="left"&&we!=="start"?(_e.attr("text-anchor","start"),Fe=Le?-fe.bx/2-fe.tx2width/2+w:-fe.bx-w):We==="right"&&we!=="end"&&(_e.attr("text-anchor","end"),Fe=Le?fe.bx/2-fe.tx2width/2-w:fe.bx+w)),_e.call(f.positionText,le(Fe),oe(qe)),fe.tx2width&&(de.select("text.name").call(f.positionText,le(be.text2ShiftX+be.alignShift*w+ke),oe(Ee+fe.ty0-fe.by/2+w)),de.select("rect").call(l.setRect,le(be.text2ShiftX+(be.alignShift-1)*fe.tx2width/2+ke),oe(Ee-fe.by/2-1),le(fe.tx2width),oe(fe.by+2)))})}function P(Y,K){var X=Y.index,ee=Y.trace||{},le=Y.cd[0],oe=Y.cd[X]||{};function fe(Te){return Te||t(Te)&&Te===0}var de=Array.isArray(X)?function(Te,ke){var Ee=n.castOption(le,X,Te);return fe(Ee)?Ee:n.extractOption({},ee,"",ke)}:function(Te,ke){return n.extractOption(oe,ee,Te,ke)};function _e(Te,ke,Ee){var Le=de(ke,Ee);fe(Le)&&(Y[Te]=Le)}if(_e("hoverinfo","hi","hoverinfo"),_e("bgcolor","hbg","hoverlabel.bgcolor"),_e("borderColor","hbc","hoverlabel.bordercolor"),_e("fontFamily","htf","hoverlabel.font.family"),_e("fontSize","hts","hoverlabel.font.size"),_e("fontColor","htc","hoverlabel.font.color"),_e("nameLength","hnl","hoverlabel.namelength"),_e("textAlign","hta","hoverlabel.align"),Y.posref=K==="y"||K==="closest"&&ee.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=n.constrain(Y.x0,0,Y.xa._length),Y.x1=n.constrain(Y.x1,0,Y.xa._length),Y.y0=n.constrain(Y.y0,0,Y.ya._length),Y.y1=n.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:h.hoverLabelText(Y.xa,Y.xLabelVal,ee.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:h.hoverLabelText(Y.ya,Y.yLabelVal,ee.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var we=h.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+we+" / -"+h.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+we,K==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var Oe=h.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+Oe+" / -"+h.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+Oe,K==="y"&&(Y.distance+=1)}var be=Y.hoverinfo||Y.trace.hoverinfo;return be&&be!=="all"&&(be=Array.isArray(be)?be:be.split("+"),be.indexOf("x")===-1&&(Y.xLabel=void 0),be.indexOf("y")===-1&&(Y.yLabel=void 0),be.indexOf("z")===-1&&(Y.zLabel=void 0),be.indexOf("text")===-1&&(Y.text=void 0),be.indexOf("name")===-1&&(Y.name=void 0)),Y}function B(Y,K,X){var ee=X.container,le=X.fullLayout,oe=le._size,fe=X.event,de=!!K.hLinePoint,_e=!!K.vLinePoint,we,Oe;if(ee.selectAll(".spikeline").remove(),!!(_e||de)){var be=u.combine(le.plot_bgcolor,le.paper_bgcolor);if(de){var Te=K.hLinePoint,ke,Ee;we=Te&&Te.xa,Oe=Te&&Te.ya;var Le=Oe.spikesnap;Le==="cursor"?(ke=fe.pointerX,Ee=fe.pointerY):(ke=we._offset+Te.x,Ee=Oe._offset+Te.y);var Fe=r.readability(Te.color,be)<1.5?u.contrast(be):Te.color,qe=Oe.spikemode,We=Oe.spikethickness,Qe=Oe.spikecolor||Fe,De=h.getPxPosition(Y,Oe),me,Ce;if(qe.indexOf("toaxis")!==-1||qe.indexOf("across")!==-1){if(qe.indexOf("toaxis")!==-1&&(me=De,Ce=ke),qe.indexOf("across")!==-1){var et=Oe._counterDomainMin,st=Oe._counterDomainMax;Oe.anchor==="free"&&(et=Math.min(et,Oe.position),st=Math.max(st,Oe.position)),me=oe.l+et*oe.w,Ce=oe.l+st*oe.w}ee.insert("line",":first-child").attr({x1:me,x2:Ce,y1:Ee,y2:Ee,"stroke-width":We,stroke:Qe,"stroke-dasharray":l.dashStyle(Oe.spikedash,We)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:me,x2:Ce,y1:Ee,y2:Ee,"stroke-width":We+2,stroke:be}).classed("spikeline",!0).classed("crisp",!0)}qe.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:De+(Oe.side!=="right"?We:-We),cy:Ee,r:We,fill:Qe}).classed("spikeline",!0)}if(_e){var ot=K.vLinePoint,ut,ht;we=ot&&ot.xa,Oe=ot&&ot.ya;var Ht=we.spikesnap;Ht==="cursor"?(ut=fe.pointerX,ht=fe.pointerY):(ut=we._offset+ot.x,ht=Oe._offset+ot.y);var Et=r.readability(ot.color,be)<1.5?u.contrast(be):ot.color,Jt=we.spikemode,Tt=we.spikethickness,rt=we.spikecolor||Et,gt=h.getPxPosition(Y,we),mt,He;if(Jt.indexOf("toaxis")!==-1||Jt.indexOf("across")!==-1){if(Jt.indexOf("toaxis")!==-1&&(mt=gt,He=ht),Jt.indexOf("across")!==-1){var Ie=we._counterDomainMin,je=we._counterDomainMax;we.anchor==="free"&&(Ie=Math.min(Ie,we.position),je=Math.max(je,we.position)),mt=oe.t+(1-je)*oe.h,He=oe.t+(1-Ie)*oe.h}ee.insert("line",":first-child").attr({x1:ut,x2:ut,y1:mt,y2:He,"stroke-width":Tt,stroke:rt,"stroke-dasharray":l.dashStyle(we.spikedash,Tt)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:ut,x2:ut,y1:mt,y2:He,"stroke-width":Tt+2,stroke:be}).classed("spikeline",!0).classed("crisp",!0)}Jt.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:ut,cy:gt-(we.side!=="top"?Tt:-Tt),r:Tt,fill:rt}).classed("spikeline",!0)}}}function $(Y,K,X){if(!X||X.length!==Y._hoverdata.length)return!0;for(var ee=X.length-1;ee>=0;ee--){var le=X[ee],oe=Y._hoverdata[ee];if(le.curveNumber!==oe.curveNumber||String(le.pointNumber)!==String(oe.pointNumber)||String(le.pointNumbers)!==String(oe.pointNumbers))return!0}return!1}function Q(Y,K){return!0}function J(Y,K){return f.plainText(Y||"",{len:K,allowedTags:["br","sub","sup","b","i","em"]})}function ne(Y,K){for(var X=K.charAt(0),ee=[],le=[],oe=[],fe=0;fe",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}),x4}var b4={},_4,Zte;function f$(){if(Zte)return _4;Zte=1;var e=32;return _4={CIRCLE_SIDES:e,i000:0,i090:e/4,i180:e/2,i270:e/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},_4}var w4,Kte;function c$(){if(Kte)return w4;Kte=1;var e=rr().strTranslate;function t(s,a){switch(s.type){case"log":return s.p2d(a);case"date":return s.p2r(a,0,s.calendar);default:return s.p2r(a)}}function r(s,a){switch(s.type){case"log":return s.d2p(a);case"date":return s.r2p(a,0,s.calendar);default:return s.r2p(a)}}function n(s){var a=s._id.charAt(0)==="y"?1:0;return function(f){return t(s,f[a])}}function o(s){return e(s.xaxis._offset,s.yaxis._offset)}return w4={p2r:t,r2p:r,axValue:n,getTransform:o},w4}var Jte;function Bm(){return Jte||(Jte=1,(function(e){var t=OS(),r=f$(),n=r.CIRCLE_SIDES,o=r.SQRT2,s=c$(),a=s.p2r,f=s.r2p,i=[0,3,4,5,6,1,2],l=[0,3,4,1,2];e.writePaths=function(h){var d=h.length;if(!d)return"M0,0Z";for(var v="",p=0;p0&&Tb&&(T="X"),T});return v>b&&(g=g.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+d)),p+g})}})(S4)),S4}var E4,nre;function EAe(){if(nre)return E4;nre=1;var e=rr(),t=Ia(),r=ns(),n=Ba(),o=Bm().readPaths,s=qm(),a=s.getPathString,f=r$(),i=Zu().FROM_TL;E4=function(h,d,v,p){if(p.selectAll(".shape-label").remove(),!!(v.label.text||v.label.texttemplate)){var m;if(v.label.texttemplate){var y={};if(v.type!=="path"){var b=t.getFromId(h,v.xref),g=t.getFromId(h,v.yref);for(var T in f){var S=f[T](v,b,g);S!==void 0&&(y[T]=S)}}m=e.texttemplateStringForShapes(v.label.texttemplate,{},h._fullLayout._d3locale,y)}else m=v.label.text;var A={"data-index":d},M=v.label.font,w={"data-notex":1},C=p.append("g").attr(A).classed("shape-label",!0),x=C.append("text").attr(w).classed("shape-label-text",!0).text(m),_,k,E,I;if(v.path){var F=a(h,v),D=o(F,h);_=1/0,E=1/0,k=-1/0,I=-1/0;for(var z=0;z=c?p=h-v:p=v-h,-180/Math.PI*Math.atan2(p,m)}function u(c,h,d,v,p,m,y){var b=p.label.textposition,g=p.label.textangle,T=p.label.padding,S=p.type,A=Math.PI/180*m,M=Math.sin(A),w=Math.cos(A),C=p.label.xanchor,x=p.label.yanchor,_,k,E,I;if(S==="line"){b==="start"?(_=c,k=h):b==="end"?(_=d,k=v):(_=(c+d)/2,k=(h+v)/2),C==="auto"&&(b==="start"?g==="auto"?d>c?C="left":dc?C="right":dc?C="right":dc?C="left":d1&&!(ke.length===2&&ke[1][0]==="Z")&&(te===0&&(ke[0][0]="M"),_[ne]=ke,D(),z())}}function oe(ke,Ee){if(ke===2){ne=+Ee.srcElement.getAttribute("data-i"),te=+Ee.srcElement.getAttribute("data-j");var Le=_[ne];!m(Le)&&!y(Le)&&le()}}function fe(ke){Q=[];for(var Ee=0;Ee<_.length;Ee++){var Le=_[Ee],Fe=m(Le),qe=!Fe&&y(Le);Q[Ee]=[];for(var We=Le.length,Qe=0;QeD&&mt>z&&!Tt.shiftKey?c.getCursor(He/gt,1-Ie/mt):"move";h(_,je),Qe=je.split("-")[0]}}function et(Tt){y(x)||(N&&(Z=ke(k.xanchor)),q&&(G=Ee(k.yanchor)),k.type==="path"?de=k.path:(Q=N?k.x0:ke(k.x0),J=q?k.y0:Ee(k.y0),ne=N?k.x1:ke(k.x1),te=q?k.y1:Ee(k.y1)),Qte?(j=J,ee="y0",Y=te,le="y1"):(j=te,ee="y1",Y=J,le="y0"),Ce(Tt),Ht(I,k),Jt(_,k,x),We.moveFn=Qe==="move"?ut:ht,We.altKey=Tt.altKey)}function st(){y(x)||(h(_),Et(I),T(_,x,k),t.call("_guiRelayout",x,F.getUpdateObj()))}function ot(){y(x)||Et(I)}function ut(Tt,rt){if(k.type==="path"){var gt=function(Ie){return Ie},mt=gt,He=gt;N?$("xanchor",k.xanchor=Le(Z+Tt)):(mt=function(je){return Le(ke(je)+Tt)},we&&we.type==="date"&&(mt=v.encodeDate(mt))),q?$("yanchor",k.yanchor=Fe(G+rt)):(He=function(je){return Fe(Ee(je)+rt)},be&&be.type==="date"&&(He=v.encodeDate(He))),$("path",k.path=A(de,mt,He))}else N?$("xanchor",k.xanchor=Le(Z+Tt)):($("x0",k.x0=Le(Q+Tt)),$("x1",k.x1=Le(ne+Tt))),q?$("yanchor",k.yanchor=Fe(G+rt)):($("y0",k.y0=Fe(J+rt)),$("y1",k.y1=Fe(te+rt)));_.attr("d",p(x,k)),Ht(I,k),a(x,E,k,_e)}function ht(Tt,rt){if(B){var gt=function(_r){return _r},mt=gt,He=gt;N?$("xanchor",k.xanchor=Le(Z+Tt)):(mt=function(Rr){return Le(ke(Rr)+Tt)},we&&we.type==="date"&&(mt=v.encodeDate(mt))),q?$("yanchor",k.yanchor=Fe(G+rt)):(He=function(Rr){return Fe(Ee(Rr)+rt)},be&&be.type==="date"&&(He=v.encodeDate(He))),$("path",k.path=A(de,mt,He))}else if(P){if(Qe==="resize-over-start-point"){var Ie=Q+Tt,je=q?J-rt:J+rt;$("x0",k.x0=N?Ie:Le(Ie)),$("y0",k.y0=q?je:Fe(je))}else if(Qe==="resize-over-end-point"){var pe=ne+Tt,ye=q?te-rt:te+rt;$("x1",k.x1=N?pe:Le(pe)),$("y1",k.y1=q?ye:Fe(ye))}}else{var Se=function(_r){return Qe.indexOf(_r)!==-1},Pe=Se("n"),it=Se("s"),vt=Se("w"),Pt=Se("e"),Bt=Pe?j+rt:j,It=it?Y+rt:Y,qt=vt?K+Tt:K,pr=Pt?X+Tt:X;q&&(Pe&&(Bt=j-rt),it&&(It=Y-rt)),(!q&&It-Bt>z||q&&Bt-It>z)&&($(ee,k[ee]=q?Bt:Fe(Bt)),$(le,k[le]=q?It:Fe(It))),pr-qt>D&&($(oe,k[oe]=N?qt:Le(qt)),$(fe,k[fe]=N?pr:Le(pr)))}_.attr("d",p(x,k)),Ht(I,k),a(x,E,k,_e)}function Ht(Tt,rt){(N||q)&>();function gt(){var mt=rt.type!=="path",He=Tt.selectAll(".visual-cue").data([0]),Ie=1;He.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ie}).classed("visual-cue",!0);var je=ke(N?rt.xanchor:r.midRange(mt?[rt.x0,rt.x1]:v.extractPathCoords(rt.path,d.paramIsX))),pe=Ee(q?rt.yanchor:r.midRange(mt?[rt.y0,rt.y1]:v.extractPathCoords(rt.path,d.paramIsY)));if(je=v.roundPositionForSharpStrokeRendering(je,Ie),pe=v.roundPositionForSharpStrokeRendering(pe,Ie),N&&q){var ye="M"+(je-1-Ie)+","+(pe-1-Ie)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";He.attr("d",ye)}else if(N){var Se="M"+(je-1-Ie)+","+(pe-9-Ie)+"v18 h2 v-18 Z";He.attr("d",Se)}else{var Pe="M"+(je-9-Ie)+","+(pe-1-Ie)+"h18 v2 h-18 Z";He.attr("d",Pe)}}}function Et(Tt){Tt.selectAll(".visual-cue").remove()}function Jt(Tt,rt,gt){var mt=rt.xref,He=rt.yref,Ie=n.getFromId(gt,mt),je=n.getFromId(gt,He),pe="";mt!=="paper"&&!Ie.autorange&&(pe+=mt),He!=="paper"&&!je.autorange&&(pe+=He),l.setClipUrl(Tt,pe?"clip"+gt._fullLayout._uid+pe:null,gt)}}function A(x,_,k){return x.replace(d.segmentRE,function(E){var I=0,F=E.charAt(0),D=d.paramIsX[F],z=d.paramIsY[F],N=d.numParams[F],q=E.substr(1).replace(d.paramRE,function(P){return I>=N||(D[I]?P=_(P):z[I]&&(P=k(P)),I++),P});return F+q})}function M(x,_){if(b(x)){var k=_.node(),E=+k.getAttribute("data-index");if(E>=0){if(E===x._fullLayout._activeShapeIndex){w(x);return}x._fullLayout._activeShapeIndex=E,x._fullLayout._deactivateShape=w,m(x)}}}function w(x){if(b(x)){var _=x._fullLayout._activeShapeIndex;_>=0&&(f(x),delete x._fullLayout._activeShapeIndex,m(x))}}function C(x){if(b(x)){f(x);var _=x._fullLayout._activeShapeIndex,k=(x.layout||{}).shapes||[];if(_1?(J=["toggleHover"],ne=["resetViews"]):C?(Q=["zoomInGeo","zoomOutGeo"],J=["hoverClosestGeo"],ne=["resetGeo"]):w?(J=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMapbox","zoomOutMapbox"],J=["toggleHover"],ne=["resetViewMapbox"]):k?J=["hoverClosestGl2d"]:x?J=["hoverClosestPie"]:z?(J=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):J=["toggleHover"],M&&(J=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(c(m)||q)&&(J=[]),(M||k)&&!N&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),w?te=["zoom3d","pan3d","orbitRotation","tableRotation"]:(M||k)&&!N||E?te=["zoom2d","pan2d"]:I||C?te=["pan2d"]:F&&(te=["zoom2d"]),u(m)&&te.push("select2d","lasso2d");var Z=[],G=function(X){Z.indexOf(X)===-1&&J.indexOf(X)!==-1&&Z.push(X)};if(Array.isArray(S)){for(var j=[],Y=0;YT?y.substr(T):b.substr(g))+S}function d(p,m){for(var y=m._size,b=y.h/y.w,g={},T=Object.keys(p),S=0;Sa*E&&!z)){for(T=0;T<_.length;T++)if(A=_[T],w=F[A],M=D[A],C=M.constrain,w!==I||C==="domain")if(x=w/I,C==="range")o(M,x);else{var N=M._inputDomain,q=(M.domain[1]-M.domain[0])/(N[1]-N[0]),P=(M.r2l(M.range[1])-M.r2l(M.range[0]))/(M.r2l(M._inputRange[1])-M.r2l(M._inputRange[0]));if(x/=q,x*P<1){M.domain=M._input.domain=N.slice(),o(M,x);continue}if(P<1&&(M.range=M._input.range=M._inputRange.slice(),x*=P),M.autorange){var B=M.r2l(M.range[0]),$=M.r2l(M.range[1]),Q=(B+$)/2,J=Q,ne=Q,te=Math.abs($-Q),Z=Q-te*x*1.0001,G=Q+te*x*1.0001,j=t.makePadFn(y,M,0),Y=t.makePadFn(y,M,1);v(M,x);var K=Math.abs(M._m),X=t.concatExtremes(m,M),ee=X.min,le=X.max,oe,fe;for(fe=0;feZ&&oene&&(ne=oe);var de=(ne-J)/(2*te);x/=de,J=M.l2r(J),ne=M.l2r(ne),M.range=M._input.range=B<$?[J,ne]:[ne,J]}v(M,x)}}}},Y1.getAxisGroup=function(m,y){for(var b=m._axisMatchGroups,g=0;g=N[1]||$[1]<=N[0])&&Q[0]q[0])return!0}return!1}function S(N){var q=N._fullLayout,P=q._size,B=P.p,$=c.list(N,"",!0),Q,J,ne,te,Z,G;if(q._paperdiv.style({width:N._context.responsive&&q.autosize&&!N._context._hasZeroWidth&&!N.layout.width?"100%":q.width+"px",height:N._context.responsive&&q.autosize&&!N._context._hasZeroHeight&&!N.layout.height?"100%":q.height+"px"}).selectAll(".main-svg").call(i.setSize,q.width,q.height),N._context.setBackground(N,q.paper_bgcolor),e.drawMainTitle(N),u.manage(N),!q._has("cartesian"))return n.previousPromises(N);function j(He,Ie,je){var pe=He._lw/2;if(He._id.charAt(0)==="x"){if(Ie){if(je==="top")return Ie._offset-B-pe}else return P.t+P.h*(1-(He.position||0))+pe%1;return Ie._offset+Ie._length+B+pe}if(Ie){if(je==="right")return Ie._offset+Ie._length+B+pe}else return P.l+P.w*(He.position||0)+pe%1;return Ie._offset-B-pe}for(Q=0;Q<$.length;Q++){te=$[Q];var Y=te._anchorAxis;te._linepositions={},te._lw=i.crispRound(N,te.linewidth,1),te._mainLinePosition=j(te,Y,te.side),te._mainMirrorPosition=te.mirror&&Y?j(te,Y,h.OPPOSITE_SIDE[te.side]):null}var K=[],X=[],ee=[],le=f.opacity(q.paper_bgcolor)===1&&f.opacity(q.plot_bgcolor)===1&&q.paper_bgcolor===q.plot_bgcolor;for(J in q._plots)if(ne=q._plots[J],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var oe=ne.xaxis.domain,fe=ne.yaxis.domain,de=ne.plotgroup;if(T(oe,fe,ee)){var _e=de.node(),we=ne.bg=o.ensureSingle(de,"rect","bg");_e.insertBefore(we.node(),_e.childNodes[0]),X.push(J)}else de.select("rect.bg").remove(),ee.push([oe,fe]),le||(K.push(J),X.push(J))}var Oe=q._bgLayer.selectAll(".bg").data(K);for(Oe.enter().append("rect").classed("bg",!0),Oe.exit().remove(),Oe.each(function(He){q._plots[He].bg=t.select(this)}),Q=0;Q0){k(N,Q,Z,te),ne.attr({x:J,y:Q,"text-anchor":B,dy:F(q.yanchor)}).call(s.positionText,J,Q);var G=(q.text.match(s.BR_TAG_ALL)||[]).length;if(G){var j=h.LINE_SPACING*G+h.MID_SHIFT;q.y===0&&(j=-j),ne.selectAll(".line").each(function(){var Y=+this.getAttribute("dy").slice(0,-2)-j+"em";this.setAttribute("dy",Y)})}}}};function C(N,q,P,B,$){var Q=q.yref==="paper"?N._fullLayout._size.h:N._fullLayout.height,J=o.isTopAnchor(q)?B:B-$,ne=P==="b"?Q-J:J;return o.isTopAnchor(q)&&P==="t"||o.isBottomAnchor(q)&&P==="b"?!1:ne<$}function x(N,q,P,B,$){var Q=0;return P==="middle"&&(Q+=$/2),N==="t"?(P==="top"&&(Q+=$),Q+=B-q*B):(P==="bottom"&&(Q+=$),Q+=q*B),Q}function _(N,q,P){var B=q.y,$=q.yanchor,Q=B>.5?"t":"b",J=N._fullLayout.margin[Q],ne=0;return q.yref==="paper"?ne=P+q.pad.t+q.pad.b:q.yref==="container"&&(ne=x(Q,B,$,N._fullLayout.height,P)+q.pad.t+q.pad.b),ne>J?ne:0}function k(N,q,P,B){var $="title.automargin",Q=N._fullLayout.title,J=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},te={};Q.yref==="paper"&&C(N,Q,J,q,B)?ne[J]=P:Q.yref==="container"&&(te[J]=P,N._fullLayout._reservedMargin[$]=te),n.allowAutoMargin(N,$),n.autoMargin(N,$,ne)}function E(N,q){var P=N.title,B=N._size,$=0;switch(q===y?$=P.pad.l:q===g&&($=-P.pad.r),P.xref){case"paper":return B.l+B.w*P.x+$;case"container":default:return N.width*P.x+$}}function I(N,q){var P=N.title,B=N._size,$=0;if(q==="0em"||!q?$=-P.pad.b:q===h.CAP_SHIFT+"em"&&($=P.pad.t),P.y==="auto")return B.t/2;switch(P.yref){case"paper":return B.t+B.h-B.h*P.y+$;case"container":default:return N.height-N.height*P.y+$}}function F(N){return N==="top"?h.CAP_SHIFT+.3+"em":N==="bottom"?"-0.3em":h.MID_SHIFT+"em"}function D(N){var q=N.title,P=b;return o.isRightAnchor(q)?P=g:o.isLeftAnchor(q)&&(P=y),P}function z(N){var q=N.title,P="0em";return o.isTopAnchor(q)?P=h.CAP_SHIFT+"em":o.isMiddleAnchor(q)&&(P=h.MID_SHIFT+"em"),P}e.doTraceStyle=function(N){var q=N.calcdata,P=[],B;for(B=0;B=0;F--){var D=S.append("path").attr(M).style("opacity",F?.1:w).call(n.stroke,x).call(n.fill,C).call(o.dashLine,F?"solid":k,F?4+_:_);if(c(D,p,b),E){var z=s(p.layout,"selections",b);D.style({cursor:"move"});var N={element:D.node(),plotinfo:g,gd:p,editHelpers:z,isActiveSelection:!0},q=e(A,p);t(q,D,N)}else D.style("pointer-events",F?"all":"none");I[F]=D}var P=I[0],B=I[1];B.node().addEventListener("click",function(){return h(p,P)})}}function c(p,m,y){var b=y.xref+y.yref;o.setClipUrl(p,"clip"+m._fullLayout._uid+b,m)}function h(p,m){if(l(p)){var y=m.node(),b=+y.getAttribute("data-index");if(b>=0){if(b===p._fullLayout._activeSelectionIndex){v(p);return}p._fullLayout._activeSelectionIndex=b,p._fullLayout._deactivateSelection=v,i(p)}}}function d(p){if(l(p)){var m=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=m,p._fullLayout._deactivateSelection=v,i(p)}}function v(p){if(l(p)){var m=p._fullLayout._activeSelectionIndex;m>=0&&(r(p),delete p._fullLayout._activeSelectionIndex,i(p))}}return F4}var N4,yre;function eFe(){if(yre)return N4;yre=1;function e(){var t,r=0,n=!1;function o(s,a){return t.list.push({type:s,data:a?JSON.parse(JSON.stringify(a)):void 0}),t}return t={list:[],segmentId:function(){return r++},checkIntersection:function(s,a){return o("check",{seg1:s,seg2:a})},segmentChop:function(s,a){return o("div_seg",{seg:s,pt:a}),o("chop",{seg:s,pt:a})},statusRemove:function(s){return o("pop_seg",{seg:s})},segmentUpdate:function(s){return o("seg_update",{seg:s})},segmentNew:function(s,a){return o("new_seg",{seg:s,primary:a})},segmentRemove:function(s){return o("rem_seg",{seg:s})},tempStatus:function(s,a,f){return o("temp_status",{seg:s,above:a,below:f})},rewind:function(s){return o("rewind",{seg:s})},status:function(s,a,f){return o("status",{seg:s,above:a,below:f})},vert:function(s){return s===n?t:(n=s,o("vert",{x:s}))},log:function(s){return typeof s!="string"&&(s=JSON.stringify(s,!1," ")),o("log",{txt:s})},reset:function(){return o("reset")},selected:function(s){return o("selected",{segs:s})},chainStart:function(s){return o("chain_start",{seg:s})},chainRemoveHead:function(s,a){return o("chain_rem_head",{index:s,pt:a})},chainRemoveTail:function(s,a){return o("chain_rem_tail",{index:s,pt:a})},chainNew:function(s,a){return o("chain_new",{pt1:s,pt2:a})},chainMatch:function(s){return o("chain_match",{index:s})},chainClose:function(s){return o("chain_close",{index:s})},chainAddHead:function(s,a){return o("chain_add_head",{index:s,pt:a})},chainAddTail:function(s,a){return o("chain_add_tail",{index:s,pt:a})},chainConnect:function(s,a){return o("chain_con",{index1:s,index2:a})},chainReverse:function(s){return o("chain_rev",{index:s})},chainJoin:function(s,a){return o("chain_join",{index1:s,index2:a})},done:function(){return o("done")}},t}return N4=e,N4}var B4,mre;function tFe(){if(mre)return B4;mre=1;function e(t){typeof t!="number"&&(t=1e-10);var r={epsilon:function(n){return typeof n=="number"&&(t=n),t},pointAboveOrOnLine:function(n,o,s){var a=o[0],f=o[1],i=s[0],l=s[1],u=n[0],c=n[1];return(i-a)*(c-f)-(l-f)*(u-a)>=-t},pointBetween:function(n,o,s){var a=n[1]-o[1],f=s[0]-o[0],i=n[0]-o[0],l=s[1]-o[1],u=i*f+a*l;if(u-t)},pointsSameX:function(n,o){return Math.abs(n[0]-o[0])t!=i-a>t&&(f-c)*(a-h)/(i-h)+c-s>t&&(l=!l),f=c,i=h}return l}};return r}return B4=e,B4}var q4,xre;function rFe(){if(xre)return q4;xre=1;var e={create:function(){var t={root:{root:!0,next:null},exists:function(r){return!(r===null||r===t.root)},isEmpty:function(){return t.root.next===null},getHead:function(){return t.root.next},insertBefore:function(r,n){for(var o=t.root,s=t.root.next;s!==null;){if(n(s)){r.prev=s.prev,r.next=s,s.prev.next=r,s.prev=r;return}o=s,s=s.next}o.next=r,r.prev=o,r.next=null},findTransition:function(r){for(var n=t.root,o=t.root.next;o!==null&&!r(o);)n=o,o=o.next;return{before:n===t.root?null:n,after:o,insert:function(s){return s.prev=n,s.next=o,n.next=s,o!==null&&(o.prev=s),s}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}};return q4=e,q4}var j4,bre;function nFe(){if(bre)return j4;bre=1;var e=rFe();function t(r,n,o){function s(m,y){return{id:o?o.segmentId():-1,start:m,end:y,myFill:{above:null,below:null},otherFill:null}}function a(m,y,b){return{id:o?o.segmentId():-1,start:m,end:y,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var f=e.create();function i(m,y,b,g,T,S){var A=n.pointsCompare(y,T);return A!==0?A:n.pointsSame(b,S)?0:m!==g?m?1:-1:n.pointAboveOrOnLine(b,g?T:S,g?S:T)?1:-1}function l(m,y){f.insertBefore(m,function(b){var g=i(m.isStart,m.pt,y,b.isStart,b.pt,b.other.pt);return g<0})}function u(m,y){var b=e.node({isStart:!0,pt:m.start,seg:m,primary:y,other:null,status:null});return l(b,m.end),b}function c(m,y,b){var g=e.node({isStart:!1,pt:y.end,seg:y,primary:b,other:m,status:null});m.other=g,l(g,m.pt)}function h(m,y){var b=u(m,y);return c(b,m,y),b}function d(m,y){o&&o.segmentChop(m.seg,y),m.other.remove(),m.seg.end=y,m.other.pt=y,l(m.other,m.pt)}function v(m,y){var b=a(y,m.seg.end,m.seg);return d(m,y),h(b,m.primary)}function p(m,y){var b=e.create();function g(z,N){var q=z.seg.start,P=z.seg.end,B=N.seg.start,$=N.seg.end;return n.pointsCollinear(q,B,$)?n.pointsCollinear(P,B,$)||n.pointAboveOrOnLine(P,B,$)?1:-1:n.pointAboveOrOnLine(q,B,$)?1:-1}function T(z){return b.findTransition(function(N){var q=g(z,N.ev);return q>0})}function S(z,N){var q=z.seg,P=N.seg,B=q.start,$=q.end,Q=P.start,J=P.end;o&&o.checkIntersection(q,P);var ne=n.linesIntersect(B,$,Q,J);if(ne===!1){if(!n.pointsCollinear(B,$,Q)||n.pointsSame(B,J)||n.pointsSame($,Q))return!1;var te=n.pointsSame(B,Q),Z=n.pointsSame($,J);if(te&&Z)return N;var G=!te&&n.pointBetween(B,Q,J),j=!Z&&n.pointBetween($,Q,J);if(te)return j?v(N,$):v(z,J),N;G&&(Z||(j?v(N,$):v(z,J)),v(N,B))}else ne.alongA===0&&(ne.alongB===-1?v(z,Q):ne.alongB===0?v(z,ne.pt):ne.alongB===1&&v(z,J)),ne.alongB===0&&(ne.alongA===-1?v(N,B):ne.alongA===0?v(N,ne.pt):ne.alongA===1&&v(N,$));return!1}for(var A=[];!f.isEmpty();){var M=f.getHead();if(o&&o.vert(M.pt[0]),M.isStart){let z=function(){if(C){var N=S(M,C);if(N)return N}return x?S(M,x):!1};var D=z;o&&o.segmentNew(M.seg,M.primary);var w=T(M),C=w.before?w.before.ev:null,x=w.after?w.after.ev:null;o&&o.tempStatus(M.seg,C?C.seg:!1,x?x.seg:!1);var _=z();if(_){if(r){var k;M.seg.myFill.below===null?k=!0:k=M.seg.myFill.above!==M.seg.myFill.below,k&&(_.seg.myFill.above=!_.seg.myFill.above)}else _.seg.otherFill=M.seg.myFill;o&&o.segmentUpdate(_.seg),M.other.remove(),M.remove()}if(f.getHead()!==M){o&&o.rewind(M.seg);continue}if(r){var k;M.seg.myFill.below===null?k=!0:k=M.seg.myFill.above!==M.seg.myFill.below,x?M.seg.myFill.below=x.seg.myFill.above:M.seg.myFill.below=m,k?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var E;x?M.primary===x.primary?E=x.seg.otherFill.above:E=x.seg.myFill.above:E=M.primary?y:m,M.seg.otherFill={above:E,below:E}}o&&o.status(M.seg,C?C.seg:!1,x?x.seg:!1),M.other.status=w.insert(e.node({ev:M}))}else{var I=M.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(I.prev)&&b.exists(I.next)&&S(I.prev.ev,I.next.ev),o&&o.statusRemove(I.ev.seg),I.remove(),!M.primary){var F=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=F}A.push(M.seg)}f.getHead().remove()}return o&&o.done(),A}return r?{addRegion:function(m){for(var y,b=m[m.length-1],g=0;ga!=v>a&&s<(d-c)*(a-h)/(v-h)+c;p&&(f=!f)}return f}),Y4}var $4={exports:{}},Mre;function jS(){if(Mre)return $4.exports;Mre=1;var e=t$().dot,t=Pi().BADNUM,r=$4.exports={};return r.tester=function(o){var s=o.slice(),a=s[0][0],f=a,i=s[0][1],l=i,u;for((s[s.length-1][0]!==s[0][0]||s[s.length-1][1]!==s[0][1])&&s.push(s[0]),u=1;uf||T===t||Tl||b&&h(y))}function v(y,b){var g=y[0],T=y[1];if(g===t||gf||T===t||Tl)return!1;var S=s.length,A=s[0][0],M=s[0][1],w=0,C,x,_,k,E;for(C=1;CMath.max(x,A)||T>Math.max(_,M)))if(Tu||Math.abs(e(v,h))>f)return!0;return!1},r.filter=function(o,s){var a=[o[0]],f=0,i=0;function l(c){o.push(c);var h=a.length,d=f;a.splice(i+1);for(var v=d+1;v1){var u=o.pop();l(u)}return{addPt:l,raw:o,filtered:a}},$4.exports}var W4,Ere;function uFe(){return Ere||(Ere=1,W4={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}),W4}var X4,kre;function fFe(){if(kre)return X4;kre=1;var e=sFe(),t=lFe(),r=ga(),n=Ba().dashStyle,o=va(),s=yl(),a=Wd().makeEventData,f=p0(),i=f.freeMode,l=f.rectMode,u=f.drawMode,c=f.openMode,h=f.selectMode,d=qm(),v=BS(),p=h$(),m=Om().clearOutline,y=Bm(),b=y.handleEllipse,g=y.readPaths,T=KG().newShapes,S=MAe(),A=DAe().activateLastSelection,M=rr(),w=M.sorterAsc,C=jS(),x=i$(),_=xl().getFromId,k=NS(),E=qS().redrawReglTraces,I=uFe(),F=I.MINSELECT,D=C.filter,z=C.tester,N=c$(),q=N.p2r,P=N.axValue,B=N.getTransform;function $(rt){return rt.subplot!==void 0}function Q(rt,gt,mt,He,Ie){var je=!$(He),pe=i(Ie),ye=l(Ie),Se=c(Ie),Pe=u(Ie),it=h(Ie),vt=Ie==="drawline",Pt=Ie==="drawcircle",Bt=vt||Pt,It=He.gd,qt=It._fullLayout,pr=it&&qt.newselection.mode==="immediate"&&je,_r=qt._zoomlayer,Rr=He.element.getBoundingClientRect(),an=He.plotinfo,Br=B(an),Gr=gt-Rr.left,en=mt-Rr.top;qt._calcInverseTransform(It);var cn=M.apply3DTransform(qt._invTransform)(Gr,en);Gr=cn[0],en=cn[1];var hn=qt._invScaleX,Wr=qt._invScaleY,bt=Gr,tt=en,yt="M"+Gr+","+en,wt=He.xaxes[0],Ft=He.yaxes[0],er=wt._length,cr=Ft._length,lr=rt.altKey&&!(u(Ie)&&Se),Ue,Ne,At,Rt,Ct,Wt,Qt;j(rt,It,He),pe&&(Ue=D([[Gr,en]],I.BENDPX));var Xt=_r.selectAll("path.select-outline-"+an.id).data([1]),$t=Pe?qt.newshape:qt.newselection;Pe&&(He.hasText=$t.label.text||$t.label.texttemplate);var ur=Pe&&!Se?$t.fillcolor:"rgba(0,0,0,0)",fr=$t.line.color||(je?o.contrast(It._fullLayout.plot_bgcolor):"#7f7f7f");Xt.enter().append("path").attr("class","select-outline select-outline-"+an.id).style({opacity:Pe?$t.opacity/2:1,"stroke-dasharray":n($t.line.dash,$t.line.width),"stroke-width":$t.line.width+"px","shape-rendering":"crispEdges"}).call(o.stroke,fr).call(o.fill,ur).attr("fill-rule","evenodd").classed("cursor-move",!!Pe).attr("transform",Br).attr("d",yt+"Z");var mr=_r.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform",Br).attr("d","M0,0Z");if(Pe&&He.hasText){var br=_r.select(".label-temp");br.empty()&&(br=_r.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Pr=qt._uid+I.SELECTID,Cr=[],Zr=le(It,He.xaxes,He.yaxes,He.subplot);pr&&!rt.shiftKey&&(He._clearSubplotSelections=function(){if(je){var Sn=wt._id,Fn=Ft._id;De(It,Sn,Fn,Zr);for(var ea=(It.layout||{}).selections||[],An=[],Hn=!1,In=0;In=0){It._fullLayout._deactivateShape(It);return}if(!Pe){var ea=qt.clickmode;x.done(Pr).then(function(){if(x.clear(Pr),Sn===2){for(Xt.remove(),Ct=0;Ct-1&&J(Fn,It,He.xaxes,He.yaxes,He.subplot,He,Xt),ea==="event"&&Jt(It,void 0);s.click(It,Fn,an.id)}).catch(M.error)}},He.doneFn=function(){mr.remove(),x.done(Pr).then(function(){x.clear(Pr),!pr&&Rt&&He.selectionDefs&&(Rt.subtract=lr,He.selectionDefs.push(Rt),He.mergedPolygons.length=0,[].push.apply(He.mergedPolygons,At)),(pr||Pe)&&X(He,pr),He.doneFnCompleted&&He.doneFnCompleted(Cr),it&&Jt(It,Qt)}).catch(M.error)}}function J(rt,gt,mt,He,Ie,je,pe){var ye=gt._hoverdata,Se=gt._fullLayout,Pe=Se.clickmode,it=Pe.indexOf("event")>-1,vt=[],Pt,Bt,It,qt,pr,_r,Rr,an,Br,Gr;if(fe(ye)){j(rt,gt,je),Pt=le(gt,mt,He,Ie);var en=de(ye,Pt),cn=en.pointNumbers.length>0;if(cn?we(Pt,en):Oe(Pt)&&(Rr=_e(en))){for(pe&&pe.remove(),Gr=0;Gr=0}function K(rt){return rt._fullLayout._activeSelectionIndex>=0}function X(rt,gt){var mt=rt.dragmode,He=rt.plotinfo,Ie=rt.gd;Y(Ie)&&Ie._fullLayout._deactivateShape(Ie),K(Ie)&&Ie._fullLayout._deactivateSelection(Ie);var je=Ie._fullLayout,pe=je._zoomlayer,ye=u(mt),Se=h(mt);if(ye||Se){var Pe=pe.selectAll(".select-outline-"+He.id);if(Pe&&Ie._fullLayout._outlining){var it;ye&&(it=T(Pe,rt)),it&&r.call("_guiRelayout",Ie,{shapes:it});var vt;Se&&!$(rt)&&(vt=S(Pe,rt)),vt&&(Ie._fullLayout._noEmitSelectedAtStart=!0,r.call("_guiRelayout",Ie,{selections:vt}).then(function(){gt&&A(Ie)})),Ie._fullLayout._outlining=!1}}He.selection={},He.selection.selectionDefs=rt.selectionDefs=[],He.selection.mergedPolygons=rt.mergedPolygons=[]}function ee(rt){return rt._id}function le(rt,gt,mt,He){if(!rt.calcdata)return[];var Ie=[],je=gt.map(ee),pe=mt.map(ee),ye,Se,Pe;for(Pe=0;Pe0,je=Ie?He[0]:mt;return gt.selectedpoints?gt.selectedpoints.indexOf(je)>-1:!1}function we(rt,gt){var mt=[],He,Ie,je,pe;for(pe=0;pe0&&mt.push(He);if(mt.length===1&&(je=mt[0]===gt.searchInfo,je&&(Ie=gt.searchInfo.cd[0].trace,Ie.selectedpoints.length===gt.pointNumbers.length))){for(pe=0;pe1||(gt+=He.selectedpoints.length,gt>1)))return!1;return gt===1}function be(rt,gt,mt){var He;for(He=0;He-1&>if(!pe&>){var Sn=Ce(rt,!0);if(Sn.length){var Fn=Sn[0].xref,ea=Sn[0].yref;if(Fn&&ea){var An=ot(Sn),Hn=ht([_(rt,Fn,"x"),_(rt,ea,"y")]);Hn(Cr,An)}}rt._fullLayout._noEmitSelectedAtStart?rt._fullLayout._noEmitSelectedAtStart=!1:jr&&Jt(rt,Cr),Pt._reselect=!1}if(!pe&&Pt._deselect){var In=Pt._deselect;ye=In.xref,Se=In.yref,Qe(ye,Se,it)||De(rt,ye,Se,He),jr&&(Cr.points.length?Jt(rt,Cr):Tt(rt)),Pt._deselect=!1}return{eventData:Cr,selectionTesters:mt}}function We(rt){var gt=rt.calcdata;if(gt)for(var mt=0;mt), bold (), italics (),","hyperlinks (). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:t({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:e.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:e.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[a("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[a("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",r.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",o.axisRefDescription("x","left","right"),s("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",r.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",o.axisRefDescription("y","bottom","top"),s("y")].join(" ")},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:t({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),J4}var Q4,Pre;function ig(){return Pre||(Pre=1,Q4={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}),Q4}var eR,Dre;function og(){return Dre||(Dre=1,eR=function(t){return{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."+(t?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}}),eR}var tR,Ire;function Yl(){if(Ire)return tR;Ire=1;var e=ll().axisHoverFormat,t=bi().texttemplateAttrs,r=bi().hovertemplateAttrs,n=os(),o=Gs(),s=lc().dash,a=lc().pattern,f=Ba(),i=ig(),l=ja().extendFlat,u=og();function c(v){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+v+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function h(v){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+v+" axis.","When `"+v+"period` is round number of weeks,","the `"+v+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function d(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+v+" axis."].join(" ")}}return tR={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:c("x"),yperiod:c("y"),xperiod0:h("x0"),yperiod0:h("y0"),xperiodalignment:d("x"),yperiodalignment:d("y"),xhoverformat:e("x"),yhoverformat:e("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:t({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+i.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:r({},{keys:i.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:l({},s,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:u(!0),fillgradient:l({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:a,marker:l({symbol:{valType:"enumerated",values:f.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:l({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},n("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},n("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:o({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},tR}var rR,Ore;function OAe(){if(Ore)return rR;Ore=1;var e=Gx(),t=Yl().line,r=lc().dash,n=ja().extendFlat,o=ws().overrideAll,s=go().templatedArray,a=US();return rR=o(s("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:n({},e.xref,{description:["Sets the selection's x coordinate axis.",a.axisRefDescription("x","left","right")].join(" ")}),yref:n({},e.yref,{description:["Sets the selection's x coordinate axis.",a.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:t.color,width:n({},t.width,{min:1,dflt:1}),dash:n({},r,{dflt:"dot"})}}),"arraydraw","from-root"),rR}var nR,zre;function cFe(){if(zre)return nR;zre=1;var e=rr(),t=Ia(),r=uh(),n=OAe(),o=qm();nR=function(f,i){r(f,i,{name:"selections",handleItemDefaults:s});for(var l=i.selections,u=0;u=0){ur._fullLayout._deactivateShape(ur);return}var fr=ur._fullLayout.clickmode;if(Z(ur),Xt===2&&!Le&&Ne(),Ee)fr.indexOf("select")>-1&&w($t,ur,De,me,fe.id,it),fr.indexOf("event")>-1&&u.click(ur,$t,fe.id);else if(Xt===1&&Le){var mr=be?qe:Fe,br=be==="s"||Te==="w"?0:1,Pr=mr._name+".range["+br+"]",Cr=N(mr,br),Zr="left",jr="middle";if(mr.fixedrange)return;be?(jr=be==="n"?"top":"bottom",mr.side==="right"&&(Zr="right")):Te==="e"&&(Zr="right"),ur._context.showAxisRangeEntryBoxes&&e.select(Pe).call(f.makeEditable,{gd:ur,immediate:!0,background:ur._fullLayout.paper_bgcolor,text:String(Cr),fill:mr.tickfont?mr.tickfont.color:"#444",horizontalAlign:Zr,verticalAlign:jr}).on("edit",function(Sn){var Fn=mr.d2r(Sn);Fn!==void 0&&s.call("_guiRelayout",ur,Pr,Fn)})}}d.init(it);var Bt,It,qt,pr,_r,Rr,an,Br,Gr,en;function cn(Xt,$t,ur){var fr=Pe.getBoundingClientRect();Bt=$t-fr.left,It=ur-fr.top,oe._fullLayout._calcInverseTransform(oe);var mr=t.apply3DTransform(oe._fullLayout._invTransform)(Bt,It);Bt=mr[0],It=mr[1],qt={l:Bt,r:Bt,w:0,t:It,b:It,h:0},pr=oe._hmpixcount?oe._hmlumcount/oe._hmpixcount:n(oe._fullLayout.plot_bgcolor).getLuminance(),_r="M0,0H"+st+"V"+ot+"H0V0",Rr=!1,an="xy",en=!1,Br=Q(ke,pr,Ce,et,_r),Gr=J(ke,Ce,et)}function hn(Xt,$t){if(oe._transitioningWithDuration)return!1;var ur=Math.max(0,Math.min(st,je*Xt+Bt)),fr=Math.max(0,Math.min(ot,pe*$t+It)),mr=Math.abs(ur-Bt),br=Math.abs(fr-It);qt.l=Math.min(Bt,ur),qt.r=Math.max(Bt,ur),qt.t=Math.min(It,fr),qt.b=Math.max(It,fr);function Pr(){an="",qt.r=qt.l,qt.t=qt.b,Gr.attr("d","M0,0Z")}if(ut.isSubplotConstrained)mr>k||br>k?(an="xy",mr/st>br/ot?(br=mr*ot/st,It>fr?qt.t=It-br:qt.b=It+br):(mr=br*st/ot,Bt>ur?qt.l=Bt-mr:qt.r=Bt+mr),Gr.attr("d",K(qt))):Pr();else if(ht.isSubplotConstrained)if(mr>k||br>k){an="xy";var Cr=Math.min(qt.l/st,(ot-qt.b)/ot),Zr=Math.max(qt.r/st,(ot-qt.t)/ot);qt.l=Cr*st,qt.r=Zr*st,qt.b=(1-Cr)*ot,qt.t=(1-Zr)*ot,Gr.attr("d",K(qt))}else Pr();else!Et||br0){var Sn;if(ht.isSubplotConstrained||!Ht&&Et.length===1){for(Sn=0;Sn1&&(Pr.maxallowed!==void 0&&Tt===(Pr.range[0]1&&(Cr.maxallowed!==void 0&&rt===(Cr.range[0]=0?Math.min(oe,.9):1/(1/Math.max(oe,-.3)+3.222))}function $(oe,fe,de){return oe?oe==="nsew"?de?"":fe==="pan"?"move":"crosshair":oe.toLowerCase()+"-resize":"pointer"}function Q(oe,fe,de,_e,we){return oe.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",a(de,_e)).attr("d",we+"Z")}function J(oe,fe,de){return oe.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1,opacity:0}).attr("transform",a(fe,de)).attr("d","M0,0Z")}function ne(oe,fe,de,_e,we,Oe){oe.attr("d",_e+"M"+de.l+","+de.t+"v"+de.h+"h"+de.w+"v-"+de.h+"h-"+de.w+"Z"),te(oe,fe,we,Oe)}function te(oe,fe,de,_e){de||(oe.transition().style("fill",_e>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function Z(oe){e.select(oe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function G(oe){E&&oe.data&&oe._context.showTips&&(t.notifier(t._(oe,"Double-click to zoom back out"),"long"),E=!1)}function j(oe,fe){return"M"+(oe.l-.5)+","+(fe-k-.5)+"h-3v"+(2*k+1)+"h3ZM"+(oe.r+.5)+","+(fe-k-.5)+"h3v"+(2*k+1)+"h-3Z"}function Y(oe,fe){return"M"+(fe-k-.5)+","+(oe.t-.5)+"v-3h"+(2*k+1)+"v3ZM"+(fe-k-.5)+","+(oe.b+.5)+"v3h"+(2*k+1)+"v-3Z"}function K(oe){var fe=Math.floor(Math.min(oe.b-oe.t,oe.r-oe.l,k)/2);return"M"+(oe.l-3.5)+","+(oe.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(oe.r+3.5)+","+(oe.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(oe.r+3.5)+","+(oe.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(oe.l-3.5)+","+(oe.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function X(oe,fe,de,_e,we){for(var Oe=!1,be={},Te={},ke,Ee,Le,Fe,qe=(we||{}).xaHash,We=(we||{}).yaHash,Qe=0;Qe1&&r.warn("Full array edits are incompatible with other edits",d);var T=u[""][""];if(a(T))l.set(null);else if(Array.isArray(T))l.set(T);else return r.warn("Unrecognized full array edit value",d,T),!0;return y?!1:(v(b,g),p(i),!0)}var S=Object.keys(u).map(Number).sort(n),A=l.get(),M=A||[],w=h(g,d).get(),C=[],x=-1,_=M.length,k,E,I,F,D,z,N,q;for(k=0;kM.length-(N?0:1)){r.warn("index out of range",d,I);continue}if(z!==void 0)D.length>1&&r.warn("Insertion & removal are incompatible with edits to the same index.",d,I),a(z)?C.push(I):N?(z==="add"&&(z={}),M.splice(I,0,z),w&&w.splice(I,0,{})):r.warn("Unrecognized full object edit value",d,I,z),x===-1&&(x=I);else for(E=0;E=0;k--)M.splice(C[k],1),w&&w.splice(C[k],1);if(M.length?A||l.set(M):l.set(null),y)return!1;if(v(b,g),m!==t){var P;if(x===-1)P=S;else{for(_=Math.max(M.length,_),P=[],k=0;k=x));k++)P.push(I);for(k=x;k<_;k++)P.push(k)}for(k=0;k0&&o.log("Clearing previous rejected promises from queue."),T._promises=[]},e.cleanLayout=function(T){var S,A;T||(T={}),T.xaxis1&&(T.xaxis||(T.xaxis=T.xaxis1),delete T.xaxis1),T.yaxis1&&(T.yaxis||(T.yaxis=T.yaxis1),delete T.yaxis1),T.scene1&&(T.scene||(T.scene=T.scene1),delete T.scene1);var M=(s.subplotsRegistry.cartesian||{}).attrRegex,w=(s.subplotsRegistry.polar||{}).attrRegex,C=(s.subplotsRegistry.ternary||{}).attrRegex,x=(s.subplotsRegistry.gl3d||{}).attrRegex,_=Object.keys(T);for(S=0;S<_.length;S++){var k=_[S];if(M&&M.test(k)){var E=T[k];E.anchor&&E.anchor!=="free"&&(E.anchor=i(E.anchor)),E.overlaying&&(E.overlaying=i(E.overlaying)),E.type||(E.isdate?E.type="date":E.islog?E.type="log":E.isdate===!1&&E.islog===!1&&(E.type="linear")),(E.autorange==="withzero"||E.autorange==="tozero")&&(E.autorange=!0,E.rangemode="tozero"),E.insiderange&&delete E.range,delete E.islog,delete E.isdate,delete E.categories,m(E,"domain")&&delete E.domain,E.autotick!==void 0&&(E.tickmode===void 0&&(E.tickmode=E.autotick?"auto":"linear"),delete E.autotick),h(E)}else if(w&&w.test(k)){var I=T[k];h(I.radialaxis)}else if(C&&C.test(k)){var F=T[k];h(F.aaxis),h(F.baxis),h(F.caxis)}else if(x&&x.test(k)){var D=T[k],z=D.cameraposition;if(Array.isArray(z)&&z[0].length===4){var N=z[0],q=z[1],P=z[2],B=r([],N),$=[];for(A=0;A<3;++A)$[A]=q[A]+P*B[2+4*A];D.camera={eye:{x:$[0],y:$[1],z:$[2]},center:{x:q[0],y:q[1],z:q[2]},up:{x:0,y:0,z:1}},delete D.cameraposition}h(D.xaxis),h(D.yaxis),h(D.zaxis)}}var Q=Array.isArray(T.annotations)?T.annotations.length:0;for(S=0;S3?(j.x=1.02,j.xanchor="left"):j.x<-2&&(j.x=-.02,j.xanchor="right"),j.y>3?(j.y=1.02,j.yanchor="bottom"):j.y<-2&&(j.y=-.02,j.yanchor="top")),h(T),T.dragmode==="rotate"&&(T.dragmode="orbit"),f.clean(T),T.template&&T.template.layout&&e.cleanLayout(T.template.layout),T};function c(T,S){var A=T[S],M=S.charAt(0);A&&A!=="paper"&&(T[S]=i(A,M,!0))}function h(T){T&&((typeof T.title=="string"||typeof T.title=="number")&&(T.title={text:T.title}),S("titlefont","font"),S("titleposition","position"),S("titleside","side"),S("titleoffset","offset"));function S(A,M){var w=T[A],C=T.title&&T.title[M];w&&!C&&(T.title||(T.title={}),T.title[M]=T[A],delete T[A])}}e.cleanData=function(T){for(var S=0;S0)return T.substr(0,S)}e.hasParent=function(T,S){for(var A=b(S);A;){if(A in T)return!0;A=b(A)}return!1};var g=["x","y","z"];e.clearAxisTypes=function(T,S,A){for(var M=0;M=pe.data.length||it<-pe.data.length)throw new Error(Se+" must be valid indices for gd.data.");if(ye.indexOf(it,Pe+1)>-1||it>=0&&ye.indexOf(-pe.data.length+it)>-1||it<0&&ye.indexOf(pe.data.length+it)>-1)throw new Error("each index in "+Se+" must be unique.")}}function B(pe,ye,Se){if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(ye)||(ye=[ye]),P(pe,ye,"currentIndices"),typeof Se<"u"&&!Array.isArray(Se)&&(Se=[Se]),typeof Se<"u"&&P(pe,Se,"newIndices"),typeof Se<"u"&&ye.length!==Se.length)throw new Error("current and new indices must be of equal length.")}function $(pe,ye,Se){var Pe,it;if(!Array.isArray(pe.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("traces must be defined.");for(Array.isArray(ye)||(ye=[ye]),Pe=0;Pe"u")throw new Error("indices must be an integer or array of integers");P(pe,Se,"indices");for(var vt in ye){if(!Array.isArray(ye[vt])||ye[vt].length!==Se.length)throw new Error("attribute "+vt+" must be an array of length equal to indices array length");if(it&&(!(vt in Pe)||!Array.isArray(Pe[vt])||Pe[vt].length!==ye[vt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function J(pe,ye,Se,Pe){var it=o.isPlainObject(Pe),vt=[],Pt,Bt,It,qt,pr;Array.isArray(Se)||(Se=[Se]),Se=q(Se,pe.data.length-1);for(var _r in ye)for(var Rr=0;Rr=0&&pr<_r.length?_r.splice(0,_r.length-pr):[];return[_r,Rr]}var vt=ne(pe,ye,Se,Pe,it),Pt=e.redraw(pe),Bt=[pe,vt.update,Se,vt.maxPoints];return f.add(pe,e.prependTraces,Bt,Z,arguments),Pt}function G(pe,ye,Se,Pe){pe=o.getGraphDiv(pe);function it(It,qt,pr){var _r,Rr;if(o.isTypedArray(It))if(pr<=0){var an=new It.constructor(0),Br=te(qt,It);pr<0?(_r=Br,Rr=an):(_r=an,Rr=Br)}else if(_r=new It.constructor(pr),Rr=new It.constructor(It.length+qt.length-pr),pr===qt.length)_r.set(qt),Rr.set(It);else if(pr=0&&pr<_r.length?_r.splice(pr,_r.length):[];return[_r,Rr]}var vt=ne(pe,ye,Se,Pe,it),Pt=e.redraw(pe),Bt=[pe,vt.update,Se,vt.maxPoints];return f.add(pe,e.extendTraces,Bt,G,arguments),Pt}function j(pe,ye,Se){pe=o.getGraphDiv(pe);var Pe=[],it=e.deleteTraces,vt=j,Pt=[pe,Pe],Bt=[pe,ye],It,qt;for($(pe,ye,Se),Array.isArray(ye)||(ye=[ye]),ye=ye.map(function(pr){return o.extendFlat({},pr)}),S.cleanData(ye),It=0;It"u")return qt=e.redraw(pe),f.add(pe,it,Pt,vt,Bt),qt;Array.isArray(Se)||(Se=[Se]);try{B(pe,Pe,Se)}catch(pr){throw pe.data.splice(pe.data.length-ye.length,ye.length),pr}return f.startSequence(pe),f.add(pe,it,Pt,vt,Bt),qt=e.moveTraces(pe,Pe,Se),f.stopSequence(pe),qt}function Y(pe,ye){pe=o.getGraphDiv(pe);var Se=[],Pe=e.addTraces,it=Y,vt=[pe,Se,ye],Pt=[pe,ye],Bt,It;if(typeof ye>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ye)||(ye=[ye]),P(pe,ye,"indices"),ye=q(ye,pe.data.length-1),ye.sort(o.sorterDes),Bt=0;Bt"u")for(Se=[],qt=0;qt-1&&vt.indexOf("grouptitlefont")===-1?Bt(vt,vt.replace("titlefont","title.font")):vt.indexOf("titleposition")>-1?Bt(vt,vt.replace("titleposition","title.position")):vt.indexOf("titleside")>-1?Bt(vt,vt.replace("titleside","title.side")):vt.indexOf("titleoffset")>-1&&Bt(vt,vt.replace("titleoffset","title.offset"));function Bt(It,qt){pe[qt]=pe[It],delete pe[It]}}function we(pe,ye,Se){pe=o.getGraphDiv(pe),S.clearPromiseQueue(pe);var Pe={};if(typeof ye=="string")Pe[ye]=Se;else if(o.isPlainObject(ye))Pe=o.extendFlat({},ye);else return o.warn("Relayout fail.",ye,Se),Promise.reject();Object.keys(Pe).length&&(pe.changed=!0);var it=Le(pe,Pe),vt=it.flags;vt.calc&&(pe.calcdata=void 0);var Pt=[u.previousPromises];vt.layoutReplot?Pt.push(A.layoutReplot):Object.keys(Pe).length&&(Oe(pe,vt,it)||u.supplyDefaults(pe),vt.legend&&Pt.push(A.doLegend),vt.layoutstyle&&Pt.push(A.layoutStyles),vt.axrange&&be(Pt,it.rangesAltered),vt.ticks&&Pt.push(A.doTicksRelayout),vt.modebar&&Pt.push(A.doModeBar),vt.camera&&Pt.push(A.doCamera),vt.colorbars&&Pt.push(A.doColorBars),Pt.push(k)),Pt.push(u.rehover,u.redrag,u.reselect),f.add(pe,we,[pe,it.undoit],we,[pe,it.redoit]);var Bt=o.syncOrAsync(Pt,pe);return(!Bt||!Bt.then)&&(Bt=Promise.resolve(pe)),Bt.then(function(){return pe.emit("plotly_relayout",it.eventData),pe})}function Oe(pe,ye,Se){var Pe=pe._fullLayout;if(!ye.axrange)return!1;for(var it in ye)if(it!=="axrange"&&ye[it])return!1;var vt,Pt,Bt=function(an,Br){return o.coerce(vt,Pt,d,an,Br)},It={};for(var qt in Se.rangesAltered){var pr=c.id2name(qt);if(vt=pe.layout[pr],Pt=Pe[pr],h(vt,Pt,Bt,It),Pt._matchGroup){for(var _r in Pt._matchGroup)if(_r!==qt){var Rr=Pe[c.id2name(_r)];Rr.autorange=Pt.autorange,Rr.range=Pt.range.slice(),Rr._input.range=Pt.range.slice()}}}return!0}function be(pe,ye){var Se=ye?function(Pe){var it=[],vt=!0;for(var Pt in ye){var Bt=c.getFromId(Pe,Pt);if(it.push(Pt),(Bt.ticklabelposition||"").indexOf("inside")!==-1&&Bt._anchorAxis&&it.push(Bt._anchorAxis._id),Bt._matchGroup)for(var It in Bt._matchGroup)ye[It]||it.push(It)}return c.draw(Pe,it,{skipTitle:vt})}:function(Pe){return c.draw(Pe,"redraw")};pe.push(b,A.doAutoRangeAndConstraints,Se,A.drawData,A.finalDraw)}var Te=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ke=/^[xyz]axis[0-9]*\.autorange$/,Ee=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Le(pe,ye){var Se=pe.layout,Pe=pe._fullLayout,it=Pe._guiEditing,vt=le(Pe._preGUI,it),Pt=Object.keys(ye),Bt=c.list(pe),It=o.extendDeepAll({},ye),qt={},pr,_r,Rr;for(_e(ye),Pt=Object.keys(ye),_r=0;_r0&&typeof Ft.parts[lr]!="string";)lr--;var Ue=Ft.parts[lr],Ne=Ft.parts[lr-1]+"."+Ue,At=Ft.parts.slice(0,lr).join("."),Rt=s(pe.layout,At).get(),Ct=s(Pe,At).get(),Wt=Ft.get();if(er!==void 0){cn[wt]=er,hn[wt]=Ue==="reverse"?er:ee(Wt);var Qt=l.getLayoutValObject(Pe,Ft.parts);if(Qt&&Qt.impliedEdits&&er!==null)for(var Xt in Qt.impliedEdits)Wr(o.relativeAttr(wt,Xt),Qt.impliedEdits[Xt]);if(["width","height"].indexOf(wt)!==-1)if(er){Wr("autosize",null);var $t=wt==="height"?"width":"height";Wr($t,Pe[$t])}else Pe[wt]=pe._initialAutoSize[wt];else if(wt==="autosize")Wr("width",er?null:Pe.width),Wr("height",er?null:Pe.height);else if(Ne.match(Te))yt(Ne),s(Pe,At+"._inputRange").set(null);else if(Ne.match(ke)){yt(Ne),s(Pe,At+"._inputRange").set(null);var ur=s(Pe,At).get();ur._inputDomain&&(ur._input.domain=ur._inputDomain.slice())}else Ne.match(Ee)&&s(Pe,At+"._inputDomain").set(null);if(Ue==="type"){tt=Rt;var fr=Ct.type==="linear"&&er==="log",mr=Ct.type==="log"&&er==="linear";if(fr||mr){if(!tt||!tt.range)Wr(At+".autorange",!0);else if(Ct.autorange)fr&&(tt.range=tt.range[1]>tt.range[0]?[1,2]:[2,1]);else{var br=tt.range[0],Pr=tt.range[1];fr?(br<=0&&Pr<=0&&Wr(At+".autorange",!0),br<=0?br=Pr/1e6:Pr<=0&&(Pr=br/1e6),Wr(At+".range[0]",Math.log(br)/Math.LN10),Wr(At+".range[1]",Math.log(Pr)/Math.LN10)):(Wr(At+".range[0]",Math.pow(10,br)),Wr(At+".range[1]",Math.pow(10,Pr)))}Array.isArray(Pe._subplots.polar)&&Pe._subplots.polar.length&&Pe[Ft.parts[0]]&&Ft.parts[1]==="radialaxis"&&delete Pe[Ft.parts[0]]._subplot.viewInitial["radialaxis.range"],i.getComponentMethod("annotations","convertCoords")(pe,Ct,er,Wr),i.getComponentMethod("images","convertCoords")(pe,Ct,er,Wr)}else Wr(At+".autorange",!0),Wr(At+".range",null);s(Pe,At+"._inputRange").set(null)}else if(Ue.match(w)){var Cr=s(Pe,wt).get(),Zr=(er||{}).type;(!Zr||Zr==="-")&&(Zr="linear"),i.getComponentMethod("annotations","convertCoords")(pe,Cr,Zr,Wr),i.getComponentMethod("images","convertCoords")(pe,Cr,Zr,Wr)}var jr=T.containerArrayMatch(wt);if(jr){pr=jr.array,_r=jr.index;var Sn=jr.property,Fn=Qt||{editType:"calc"};_r!==""&&Sn===""&&(T.isAddVal(er)?hn[wt]=null:T.isRemoveVal(er)?hn[wt]=(s(Se,pr).get()||[])[_r]:o.warn("unrecognized full object value",ye)),M.update(en,Fn),qt[pr]||(qt[pr]={});var ea=qt[pr][_r];ea||(ea=qt[pr][_r]={}),ea[Sn]=er,delete ye[wt]}else Ue==="reverse"?(Rt.range?Rt.range.reverse():(Wr(At+".autorange",!0),Rt.range=[1,0]),Ct.autorange?en.calc=!0:en.plot=!0):(wt==="dragmode"&&(er===!1&&Wt!==!1||er!==!1&&Wt===!1)||Pe._has("scatter-like")&&Pe._has("regl")&&wt==="dragmode"&&(er==="lasso"||er==="select")&&!(Wt==="lasso"||Wt==="select")||Pe._has("gl2d")?en.plot=!0:Qt?M.update(en,Qt):en.calc=!0,Ft.set(er))}}for(pr in qt){var An=T.applyContainerArrayChanges(pe,vt(Se,pr),qt[pr],en,vt);An||(en.plot=!0)}for(var Hn in bt){tt=c.getFromId(pe,Hn);var In=tt&&tt._constraintGroup;if(In){en.calc=!0;for(var ua in In)bt[ua]||(c.getFromId(pe,ua)._constraintShrinkable=!0)}}(Fe(pe)||ye.height||ye.width)&&(en.plot=!0);var Ln=Pe.shapes;for(_r=0;_r1;)if(Pe.pop(),Se=s(ye,Pe.join(".")+".uirevision").get(),Se!==void 0)return Se;return ye.uirevision}function et(pe,ye){for(var Se=0;Se=it.length?it[0]:it[qt]:it}function Bt(qt){return Array.isArray(vt)?qt>=vt.length?vt[0]:vt[qt]:vt}function It(qt,pr){var _r=0;return function(){if(qt&&++_r===pr)return qt()}}return new Promise(function(qt,pr){function _r(){if(Pe._frameQueue.length!==0){for(;Pe._frameQueue.length;){var Ue=Pe._frameQueue.pop();Ue.onInterrupt&&Ue.onInterrupt()}pe.emit("plotly_animationinterrupted",[])}}function Rr(Ue){if(Ue.length!==0){for(var Ne=0;NePe._timeToNext&&Br()};Ue()}var en=0;function cn(Ue){return Array.isArray(it)?en>=it.length?Ue.transitionOpts=it[en]:Ue.transitionOpts=it[0]:Ue.transitionOpts=it,en++,Ue}var hn,Wr,bt=[],tt=ye==null,yt=Array.isArray(ye),wt=!tt&&!yt&&o.isPlainObject(ye);if(wt)bt.push({type:"object",data:cn(o.extendFlat({},ye))});else if(tt||["string","number"].indexOf(typeof ye)!==-1)for(hn=0;hn0&&crcr)&&lr.push(Wr);bt=lr}}bt.length>0?Rr(bt):(pe.emit("plotly_animated"),qt())})}function gt(pe,ye,Se){if(pe=o.getGraphDiv(pe),ye==null)return Promise.resolve();if(!o.isPlotDiv(pe))throw new Error("This element is not a Plotly plot: "+pe+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Pe,it,vt,Pt,Bt=pe._transitionData._frames,It=pe._transitionData._frameHash;if(!Array.isArray(ye))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ye);var qt=Bt.length+ye.length*2,pr=[],_r={};for(Pe=ye.length-1;Pe>=0;Pe--)if(o.isPlainObject(ye[Pe])){var Rr=ye[Pe].name,an=(It[Rr]||_r[Rr]||{}).name,Br=ye[Pe].name,Gr=It[an]||_r[an];an&&Br&&typeof Br=="number"&&Gr&&CFt.index?-1:wt.index=0;Pe--){if(it=pr[Pe].frame,typeof it.name=="number"&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!it.name)for(;It[it.name="frame "+pe._transitionData._counter++];);if(It[it.name]){for(vt=0;vt=0;Se--)Pe=ye[Se],vt.push({type:"delete",index:Pe}),Pt.unshift({type:"insert",index:Pe,value:it[Pe]});var Bt=u.modifyFrames,It=u.modifyFrames,qt=[pe,Pt],pr=[pe,vt];return f&&f.add(pe,Bt,qt,It,pr),u.modifyFrames(pe,vt)}function He(pe){pe=o.getGraphDiv(pe);var ye=pe._fullLayout||{},Se=pe._fullData||[];return u.cleanPlot([],{},Se,ye),u.purge(pe),a.purge(pe),ye._container&&ye._container.remove(),delete pe._context,pe}function Ie(pe){var ye=pe._fullLayout,Se=pe.getBoundingClientRect();if(!o.equalDomRects(Se,ye._lastBBox)){var Pe=ye._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(pe));ye._invScaleX=Math.sqrt(Pe[0][0]*Pe[0][0]+Pe[0][1]*Pe[0][1]+Pe[0][2]*Pe[0][2]),ye._invScaleY=Math.sqrt(Pe[1][0]*Pe[1][0]+Pe[1][1]*Pe[1][1]+Pe[1][2]*Pe[1][2]),ye._lastBBox=Se}}function je(pe){var ye=t.select(pe),Se=pe._fullLayout;if(Se._calcInverseTransform=Ie,Se._calcInverseTransform(pe),Se._container=ye.selectAll(".plot-container").data([0]),Se._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Se._paperdiv=Se._container.selectAll(".svg-container").data([0]),Se._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Se._glcontainer=Se._paperdiv.selectAll(".gl-container").data([{}]),Se._glcontainer.enter().append("div").classed("gl-container",!0),Se._paperdiv.selectAll(".main-svg").remove(),Se._paperdiv.select(".modebar-container").remove(),Se._paper=Se._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Se._toppaper=Se._paperdiv.append("svg").classed("main-svg",!0),Se._modebardiv=Se._paperdiv.append("div"),delete Se._modeBar,Se._hoverpaper=Se._paperdiv.append("svg").classed("main-svg",!0),!Se._uid){var Pe={};t.selectAll("defs").each(function(){this.id&&(Pe[this.id.split("-")[1]]=1)}),Se._uid=o.randstr(Pe)}Se._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),Se._defs=Se._paper.append("defs").attr("id","defs-"+Se._uid),Se._clips=Se._defs.append("g").classed("clips",!0),Se._topdefs=Se._toppaper.append("defs").attr("id","topdefs-"+Se._uid),Se._topclips=Se._topdefs.append("g").classed("clips",!0),Se._bgLayer=Se._paper.append("g").classed("bglayer",!0),Se._draggers=Se._paper.append("g").classed("draglayer",!0);var it=Se._paper.append("g").classed("layer-below",!0);Se._imageLowerLayer=it.append("g").classed("imagelayer",!0),Se._shapeLowerLayer=it.append("g").classed("shapelayer",!0),Se._cartesianlayer=Se._paper.append("g").classed("cartesianlayer",!0),Se._polarlayer=Se._paper.append("g").classed("polarlayer",!0),Se._smithlayer=Se._paper.append("g").classed("smithlayer",!0),Se._ternarylayer=Se._paper.append("g").classed("ternarylayer",!0),Se._geolayer=Se._paper.append("g").classed("geolayer",!0),Se._funnelarealayer=Se._paper.append("g").classed("funnelarealayer",!0),Se._pielayer=Se._paper.append("g").classed("pielayer",!0),Se._iciclelayer=Se._paper.append("g").classed("iciclelayer",!0),Se._treemaplayer=Se._paper.append("g").classed("treemaplayer",!0),Se._sunburstlayer=Se._paper.append("g").classed("sunburstlayer",!0),Se._indicatorlayer=Se._toppaper.append("g").classed("indicatorlayer",!0),Se._glimages=Se._paper.append("g").classed("glimages",!0);var vt=Se._toppaper.append("g").classed("layer-above",!0);Se._imageUpperLayer=vt.append("g").classed("imagelayer",!0),Se._shapeUpperLayer=vt.append("g").classed("shapelayer",!0),Se._selectionLayer=Se._toppaper.append("g").classed("selectionlayer",!0),Se._infolayer=Se._toppaper.append("g").classed("infolayer",!0),Se._menulayer=Se._toppaper.append("g").classed("menulayer",!0),Se._zoomlayer=Se._toppaper.append("g").classed("zoomlayer",!0),Se._hoverlayer=Se._hoverpaper.append("g").classed("hoverlayer",!0),Se._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),pe.emit("plotly_framework")}e.animate=rt,e.addFrames=gt,e.deleteFrames=mt,e.addTraces=j,e.deleteTraces=Y,e.extendTraces=Z,e.moveTraces=K,e.prependTraces=G,e.newPlot=N,e._doPlot=_,e.purge=He,e.react=ht,e.redraw=z,e.relayout=we,e.restyle=X,e.setPlotConfig=E,e.update=qe,e._guiRelayout=We(we),e._guiRestyle=We(X),e._guiUpdate=We(qe),e._storeDirectGUIEdit=fe})(WC)),WC}var gv={},Yre;function fy(){if(Yre)return gv;Yre=1;var e=ga();gv.getDelay=function(n){return n._has&&(n._has("gl3d")||n._has("gl2d")||n._has("mapbox"))?500:0},gv.getRedrawFunc=function(n){return function(){e.getComponentMethod("colorbar","draw")(n)}},gv.encodeSVG=function(n){return"data:image/svg+xml,"+encodeURIComponent(n)},gv.encodeJSON=function(n){return"data:application/json,"+encodeURIComponent(n)};var t=window.URL||window.webkitURL;gv.createObjectURL=function(n){return t.createObjectURL(n)},gv.revokeObjectURL=function(n){return t.revokeObjectURL(n)},gv.createBlob=function(n,o){if(o==="svg")return new window.Blob([n],{type:"image/svg+xml;charset=utf-8"});if(o==="full-json")return new window.Blob([n],{type:"application/json;charset=utf-8"});var s=r(window.atob(n));return new window.Blob([s],{type:"image/"+o})},gv.octetStream=function(n){document.location.href="data:application/octet-stream"+n};function r(n){for(var o=n.length,s=new ArrayBuffer(o),a=new Uint8Array(s),f=0;f")!==-1?"":c.html(d).text()});return c.remove(),h}function l(u){return u.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}return fR=function(c,h,d){var v=c._fullLayout,p=v._paper,m=v._toppaper,y=v.width,b=v.height,g;p.insert("rect",":first-child").call(r.setRect,0,0,y,b).call(n.fill,v.paper_bgcolor);var T=v._basePlotModules||[];for(g=0;g1&&S.push(c("object","layout"))),t.supplyDefaults(A);for(var C=A._fullData,x=M.length,_=0;_k.length&&T.push(c("unused",S,x.concat(k.length)));var N=k.length,q=Array.isArray(z);q&&(N=Math.min(N,z.length));var P,B,$,Q,J;if(E.dimensions===2)for(B=0;Bk[B].length&&T.push(c("unused",S,x.concat(B,k[B].length)));var ne=k[B].length;for(P=0;P<(q?Math.min(ne,z[B].length):ne);P++)$=q?z[B][P]:z,Q=_[B][P],J=k[B][P],e.validate(Q,$)?J!==Q&&J!==+Q&&T.push(c("dynamic",S,x.concat(B,P),Q,J)):T.push(c("value",S,x.concat(B,P),Q))}else T.push(c("array",S,x.concat(B),_[B]));else for(B=0;BD?S.push({code:"unused",traceType:k,templateCount:F,dataCount:D}):D>F&&S.push({code:"reused",traceType:k,templateCount:F,dataCount:D})}}function z(N,q){for(var P in N)if(P.charAt(0)!=="_"){var B=N[P],$=h(N,P,q);t(B)?(Array.isArray(N)&&B._template===!1&&B.templateitemname&&S.push({code:"missing",path:$,templateitemname:B.templateitemname}),z(B,$)):Array.isArray(B)&&d(B)&&z(B,$)}}if(z({data:M,layout:A},""),S.length)return S.map(v)};function d(p){for(var m=0;m=0;h--){var d=o[h];if(d.type==="scatter"&&d.xaxis===u.xaxis&&d.yaxis===u.yaxis){d.opacity=void 0;break}}}}},MR}var ER,hne;function wFe(){if(hne)return ER;hne=1;var e=rr(),t=o$();return ER=function(r,n){function o(a,f){return e.coerce(r,n,t,a,f)}var s=n.barmode==="group";n.scattermode==="group"&&o("scattergap",s?n.bargap:.2)},ER}var kR,dne;function x0(){if(dne)return kR;dne=1;var e=Ua(),t=rr(),r=t.dateTime2ms,n=t.incrementMonth,o=Pi(),s=o.ONEAVGMONTH;return kR=function(f,i,l,u){if(i.type!=="date")return{vals:u};var c=f[l+"periodalignment"];if(!c)return{vals:u};var h=f[l+"period"],d;if(e(h)){if(h=+h,h<=0)return{vals:u}}else if(typeof h=="string"&&h.charAt(0)==="M"){var v=+h.substring(1);if(v>0&&Math.round(v)===v)d=v;else return{vals:u}}for(var p=i.calendar,m=c==="start",y=c==="end",b=f[l+"period0"],g=r(b,p)||0,T=[],S=[],A=[],M=u.length,w=0;wC;)k=n(k,-d,p);for(;k<=C;)k=n(k,d,p);_=n(k,-d,p)}else{for(x=Math.round((C-g)/h),k=g+x*h;k>C;)k-=h;for(;k<=C;)k+=h;_=k-h}T[w]=m?_:y?k:(_+k)/2,S[w]=_,A[w]=k}return{vals:T,starts:S,ends:A}},kR}var CR,vne;function yp(){if(vne)return CR;vne=1;var e=Bh().hasColorscale,t=md(),r=As();return CR=function(o,s){r.hasLines(s)&&e(s,"line")&&t(o,s,{vals:s.line.color,containerStr:"line",cLetter:"c"}),r.hasMarkers(s)&&(e(s,"marker")&&t(o,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),e(s,"marker.line")&&t(o,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},CR}var RR,pne;function lg(){if(pne)return RR;pne=1;var e=rr();return RR=function(r,n){for(var o=0;oD&&_[N].gap;)N--;for(P=_[N].s,z=_.length-1;z>N;z--)_[z].s=P;for(;DP+N||!e(q))}for(var $=0;$I[p]&&p0?o:s)/(p._m*b*(p._m>0?o:s)))),vt*=1e3}if(Pt===r){if(y&&(Pt=p.c2p(it.y,!0)),Pt===r)return!1;Pt*=1e3}return[vt,Pt]}function ee(Pe,it,vt,Pt){var Bt=vt-Pe,It=Pt-it,qt=.5-Pe,pr=.5-it,_r=Bt*Bt+It*It,Rr=Bt*qt+It*pr;if(Rr>0&&Rr<_r){var an=qt*It-pr*Bt;if(an*an<_r)return!0}}var le,oe;function fe(Pe,it){var vt=Pe[0]/b,Pt=Pe[1]/g,Bt=Math.max(0,-vt,vt-1,-Pt,Pt-1);return Bt&&le!==void 0&&ee(vt,Pt,le,oe)&&(Bt=0),Bt&&it&&ee(vt,Pt,it[0]/b,it[1]/g)&&(Bt=0),(1+l.toleranceGrowth*Bt)*M}function de(Pe,it){var vt=Pe[0]-it[0],Pt=Pe[1]-it[1];return Math.sqrt(vt*vt+Pt*Pt)}var _e=l.maxScreensAway,we=-b*_e,Oe=b*(1+_e),be=-g*_e,Te=g*(1+_e),ke=[[we,be,Oe,be],[Oe,be,Oe,Te],[Oe,Te,we,Te],[we,Te,we,be]],Ee,Le,Fe,qe,We,Qe;function De(Pe,it){for(var vt=[],Pt=0,Bt=0;Bt<4;Bt++){var It=ke[Bt],qt=f(Pe[0],Pe[1],it[0],it[1],It[0],It[1],It[2],It[3]);qt&&(!Pt||Math.abs(qt.x-vt[0][0])>1||Math.abs(qt.y-vt[0][1])>1)&&(qt=[qt.x,qt.y],Pt&&de(qt,Pe)Oe||Pe[1]Te)return[i(Pe[0],we,Oe),i(Pe[1],be,Te)]}function Ce(Pe,it){if(Pe[0]===it[0]&&(Pe[0]===we||Pe[0]===Oe)||Pe[1]===it[1]&&(Pe[1]===be||Pe[1]===Te))return!0}function et(Pe,it){var vt=[],Pt=me(Pe),Bt=me(it);return Pt&&Bt&&Ce(Pt,Bt)||(Pt&&vt.push(Pt),Bt&&vt.push(Bt)),vt}function st(Pe,it,vt){return function(Pt,Bt){var It=me(Pt),qt=me(Bt),pr=[];if(It&&qt&&Ce(It,qt))return pr;It&&pr.push(It),qt&&pr.push(qt);var _r=2*a.constrain((Pt[Pe]+Bt[Pe])/2,it,vt)-((It||Pt)[Pe]+(qt||Bt)[Pe]);if(_r){var Rr;It&&qt?Rr=_r>0==It[Pe]>qt[Pe]?It:qt:Rr=It||qt,Rr[Pe]+=_r}return pr}}var ot;w==="linear"||w==="spline"?ot=De:w==="hv"||w==="vh"?ot=et:w==="hvh"?ot=st(0,we,Oe):w==="vhv"&&(ot=st(1,be,Te));function ut(Pe,it){var vt=it[0]-Pe[0],Pt=(it[1]-Pe[1])/vt,Bt=(Pe[1]*it[0]-it[1]*Pe[0])/vt;return Bt>0?[Pt>0?we:Oe,Te]:[Pt>0?Oe:we,be]}function ht(Pe){var it=Pe[0],vt=Pe[1],Pt=it===I[F-1][0],Bt=vt===I[F-1][1];if(!(Pt&&Bt))if(F>1){var It=it===I[F-2][0],qt=vt===I[F-2][1];Pt&&(it===we||it===Oe)&&It?qt?F--:I[F-1]=Pe:Bt&&(vt===be||vt===Te)&&qt?It?F--:I[F-1]=Pe:I[F++]=Pe}else I[F++]=Pe}function Ht(Pe){I[F-1][0]!==Pe[0]&&I[F-1][1]!==Pe[1]&&ht([Fe,qe]),ht(Pe),We=null,Fe=qe=0}var Et=a.isArrayOrTypedArray(S);function Jt(Pe){if(Pe&&T&&(Pe.i=D,Pe.d=c,Pe.trace=d,Pe.marker=Et?S[Pe.i]:S,Pe.backoff=T),le=Pe[0]/b,oe=Pe[1]/g,Ee=Pe[0]Oe?Oe:0,Le=Pe[1]Te?Te:0,Ee||Le){if(!F)I[F++]=[Ee||Pe[0],Le||Pe[1]];else if(We){var it=ot(We,Pe);it.length>1&&(Ht(it[0]),I[F++]=it[1])}else Qe=ot(I[F-1],Pe)[0],I[F++]=Qe;var vt=I[F-1];Ee&&Le&&(vt[0]!==Ee||vt[1]!==Le)?(We&&(Fe!==Ee&&qe!==Le?ht(Fe&&qe?ut(We,Pe):[Fe||Ee,qe||Le]):Fe&&qe&&ht([Fe,qe])),ht([Ee,Le])):Fe-Ee&&qe-Le&&ht([Ee||Fe,Le||qe]),We=Pe,Fe=Ee,qe=Le}else We&&Ht(ot(We,Pe)[0]),I[F++]=Pe}for(D=0;Dfe(B,Tt))break;N=B,G=J[0]*Q[0]+J[1]*Q[1],G>te?(te=G,q=B,$=!1):G=c.length||!B)break;Jt(B),z=B}}We&&ht([Fe||We[0],qe||We[1]]),_.push(I.slice(0,F))}var rt=w.slice(w.length-1);if(T&&rt!=="h"&&rt!=="v"){for(var gt=!1,mt=-1,He=[],Ie=0;Ie<_.length;Ie++)for(var je=0;je<_[Ie].length-1;je++){var pe=_[Ie][je],ye=_[Ie][je+1],Se=e.applyBackoff(ye,pe);(Se[0]!==ye[0]||Se[1]!==ye[1])&&(gt=!0),He[mt+1]||(mt++,He[mt]=[pe,[Se[0],Se[1]]])}return gt?He:_}return _},zR}var FR,wne;function UAe(){if(wne)return FR;wne=1;var e={tonextx:1,tonexty:1,tonext:1};return FR=function(r,n,o){var s,a,f,i,l,u={},c=!1,h=-1,d=0,v=-1;for(a=0;a=0?l=v:(l=v=d,d++),l0,w=i(v,p,m);if(T=y.selectAll("g.trace").data(w,function(x){return x[0].trace.uid}),T.enter().append("g").attr("class",function(x){return"trace scatter trace"+x[0].trace.uid}).style("stroke-miterlimit",2),T.order(),u(v,T,p),M){g&&(S=g());var C=e.transition().duration(b.duration).ease(b.easing).each("end",function(){S&&S()}).each("interrupt",function(){S&&S()});C.each(function(){y.selectAll("g.trace").each(function(x,_){c(v,_,p,x,w,this,b)})})}else T.each(function(x,_){c(v,_,p,x,w,this,b)});A&&T.exit().remove(),y.selectAll("path:not([d])").remove()};function u(d,v,p){v.each(function(m){var y=n(e.select(this),"g","fills");s.setClipUrl(y,p.layerClipId,d);var b=m[0].trace,g=[];b._ownfill&&g.push("_ownFill"),b._nexttrace&&g.push("_nextFill");var T=y.selectAll("g").data(g,o);T.enter().append("g"),T.exit().each(function(S){b[S]=null}).remove(),T.order().each(function(S){b[S]=n(e.select(this),"path","js-fill")})})}function c(d,v,p,m,y,b,g){var T=d._context.staticPlot,S;h(d,v,p,m,y);var A=!!g&&g.duration>0;function M(ht){return A?ht.transition():ht}var w=p.xaxis,C=p.yaxis,x=m[0].trace,_=x.line,k=e.select(b),E=n(k,"g","errorbars"),I=n(k,"g","lines"),F=n(k,"g","points"),D=n(k,"g","text");if(t.getComponentMethod("errorbars","plot")(d,E,p,g),x.visible!==!0)return;M(k).style("opacity",x.opacity);var z,N,q=x.fill.charAt(x.fill.length-1);q!=="x"&&q!=="y"&&(q="");var P,B;q==="y"?(P=1,B=C.c2p(0,!0)):q==="x"&&(P=0,B=w.c2p(0,!0)),m[0][p.isRangePlot?"nodeRangePlot3":"node3"]=k;var $="",Q=[],J=x._prevtrace,ne=null,te=null;J&&($=J._prevRevpath||"",N=J._nextFill,Q=J._ownPolygons,ne=J._fillsegments,te=J._fillElement);var Z,G,j="",Y="",K,X,ee,le,oe,fe,de=[];x._polygons=[];var _e=[],we=[],Oe=r.noop;if(z=x._ownFill,a.hasLines(x)||x.fill!=="none"){N&&N.datum(m),["hv","vh","hvh","vhv"].indexOf(_.shape)!==-1?(K=s.steps(_.shape),X=s.steps(_.shape.split("").reverse().join(""))):_.shape==="spline"?K=X=function(ht){var Ht=ht[ht.length-1];return ht.length>1&&ht[0][0]===Ht[0]&&ht[0][1]===Ht[1]?s.smoothclosed(ht.slice(1),_.smoothing):s.smoothopen(ht,_.smoothing)}:K=X=function(ht){return"M"+ht.join("L")},ee=function(ht){return X(ht.reverse())},we=f(m,{xaxis:w,yaxis:C,trace:x,connectGaps:x.connectgaps,baseTolerance:Math.max(_.width||1,3)/4,shape:_.shape,backoff:_.backoff,simplify:_.simplify,fill:x.fill}),_e=new Array(we.length);var be=0;for(S=0;S=T[0]&&k.x<=T[1]&&k.y>=S[0]&&k.y<=S[1]}),C=Math.ceil(w.length/M),x=0;y.forEach(function(k,E){var I=k[0].trace;a.hasMarkers(I)&&I.marker.maxdisplayed>0&&E=Math.min(J,ne)&&p<=Math.max(J,ne)?0:1/0}var te=Math.max(3,Q.mrc||0),Z=1-1/te,G=Math.abs(d.c2p(Q.x)-p);return G=Math.min(J,ne)&&m<=Math.max(J,ne)?0:1/0}var te=Math.max(3,Q.mrc||0),Z=1-1/te,G=Math.abs(v.c2p(Q.y)-m);return GY!=_e>=Y&&(oe=ee[X-1][0],fe=ee[X][0],_e-de&&(le=oe+(fe-oe)*(Y-de)/(_e-de),te=Math.min(te,le),Z=Math.max(Z,le)));return te=Math.max(te,0),Z=Math.min(Z,d._length),{x0:te,x1:Z,y0:Y,y1:Y}}if(b.indexOf("fills")!==-1&&h._fillElement){var P=N(h._fillElement)&&!N(h._fillExclusionElement);if(P){var B=q(h._polygons);B===null&&(B={x0:y[0],x1:y[0],y0:y[1],y1:y[1]});var $=o.defaultLine;return o.opacity(h.fillcolor)?$=h.fillcolor:o.opacity((h.line||{}).color)&&($=h.line.color),e.extendFlat(f,{distance:f.maxHoverDistance,x0:B.x0,x1:B.x1,y0:B.y0,y1:B.y1,color:$,hovertemplate:!1}),delete f.index,h.text&&!e.isArrayOrTypedArray(h.text)?f.text=String(h.text):f.text=h.name,[f]}}},HR}var GR,Cne;function B2(){if(Cne)return GR;Cne=1;var e=As();return GR=function(r,n){var o=r.cd,s=r.xaxis,a=r.yaxis,f=[],i=o[0].trace,l,u,c,h,d=!e.hasMarkers(i)&&!e.hasText(i);if(d)return[];if(n===!1)for(l=0;l0&&(u["_"+i+"axes"]||{})[f])return u;if((u[i+"axis"]||i)===f){if(s(u,i))return u;if((u[i]||[]).length||u[i+"0"])return u}}}function o(a){return{v:"x",h:"y"}[a.orientation||"v"]}function s(a,f){var i=o(a),l=e(a,"box-violin"),u=e(a._fullInput||{},"candlestick");return l&&!u&&f===i&&a[i]===void 0&&a[i+"0"]===void 0}return YR}var $R,Pne;function m$(){if(Pne)return $R;Pne=1;var e=lh().isTypedArraySpec;function t(r,n){var o=n.dataAttr||r._id.charAt(0),s={},a,f,i;if(n.axData)a=n.axData;else for(a=[],f=0;f0||e(f),l;i&&(l="array");var u=s("categoryorder",l),c;u==="array"&&(c=s("categoryarray")),!i&&u==="array"&&(u=o.categoryorder="trace"),u==="trace"?o._initialCategories=[]:u==="array"?o._initialCategories=c.slice():(c=t(o,a).sort(),u==="category ascending"?o._initialCategories=c:u==="category descending"&&(o._initialCategories=c.reverse()))}},$R}var WR,Dne;function GS(){if(Dne)return WR;Dne=1;var e=wf().mix,t=Cu(),r=rr();return WR=function(o,s,a,f){f=f||{};var i=f.dfltColor;function l(x,_){return r.coerce2(o,s,f.attributes,x,_)}var u=l("linecolor",i),c=l("linewidth"),h=a("showline",f.showLine||!!u||!!c);h||(delete s.linecolor,delete s.linewidth);var d=e(i,f.bgColor,f.blend||t.lightFraction).toRgbString(),v=l("gridcolor",d),p=l("gridwidth"),m=l("griddash"),y=a("showgrid",f.showGrid||!!v||!!p||!!m);if(y||(delete s.gridcolor,delete s.gridwidth,delete s.griddash),f.hasMinor){var b=e(s.gridcolor,f.bgColor,67).toRgbString(),g=l("minor.gridcolor",b),T=l("minor.gridwidth",s.gridwidth||1),S=l("minor.griddash",s.griddash||"solid"),A=a("minor.showgrid",!!g||!!T||!!S);A||(delete s.minor.gridcolor,delete s.minor.gridwidth,delete s.minor.griddash)}if(!f.noZeroLine){var M=l("zerolinecolor",i),w=l("zerolinewidth"),C=a("zeroline",f.showGrid||!!M||!!w);C||(delete s.zerolinecolor,delete s.zerolinewidth)}},WR}var XR,Ine;function VS(){if(Ine)return XR;Ine=1;var e=Ua(),t=ga(),r=rr(),n=go(),o=uh(),s=hc(),a=Ux(),f=L2(),i=zm(),l=Fm(),u=m$(),c=GS(),h=yAe(),d=ag(),v=Wu().WEEKDAY_PATTERN,p=Wu().HOUR_PATTERN;XR=function(T,S,A,M,w){var C=M.letter,x=M.font||{},_=M.splomStash||{},k=A("visible",!M.visibleDflt),E=S._template||{},I=S.type||E.type||"-",F;if(I==="date"){var D=t.getComponentMethod("calendars","handleDefaults");D(T,S,"calendar",M.calendar),M.noTicklabelmode||(F=A("ticklabelmode"))}var z="";(!M.noTicklabelposition||I==="multicategory")&&(z=r.coerce(T,S,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:C==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),M.noTicklabeloverflow||A("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":I==="category"||I==="multicategory"?"allow":"hide past div"),d(S,w),h(T,S,A,M),u(T,S,A,M),I!=="category"&&!M.noHover&&A("hoverformat");var N=A("color"),q=N!==s.color.dflt?N:x.color,P=_.label||w._dfltTitle[C];if(l(T,S,A,I,M),!k)return S;A("title.text",P),r.coerceFont(A,"title.font",{family:x.family,size:r.bigFont(x.size),color:q}),a(T,S,A,I);var B=M.hasMinor;if(B&&(n.newContainer(S,"minor"),a(T,S,A,I,{isMinor:!0})),i(T,S,A,I,M),f(T,S,A,M),B){var $=M.isMinor;M.isMinor=!0,f(T,S,A,M),M.isMinor=$}c(T,S,A,{dfltColor:N,bgColor:M.bgColor,showGrid:M.showGrid,hasMinor:B,attributes:s}),B&&!S.minor.ticks&&!S.minor.showgrid&&delete S.minor,(S.showline||S.ticks)&&A("mirror");var Q=I==="multicategory";if(!M.noTickson&&(I==="category"||Q)&&(S.ticks||S.showgrid)){var J;Q&&(J="boundaries");var ne=A("tickson",J);ne==="boundaries"&&delete S.ticklabelposition}if(Q){var te=A("showdividers");te&&(A("dividercolor"),A("dividerwidth"))}if(I==="date")if(o(T,S,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:m}),!S.rangebreaks.length)delete S.rangebreaks;else{for(var Z=0;Z=2){var C="",x,_;if(w.length===2){for(x=0;x<2;x++)if(_=b(w[x]),_){C=v;break}}var k=A("pattern",C);if(k===v)for(x=0;x<2;x++)_=b(w[x]),_&&(T.bounds[x]=w[x]=_-1);if(k)for(x=0;x<2;x++)switch(_=w[x],k){case v:if(!e(_)){T.enabled=!1;return}if(_=+_,_!==Math.floor(_)||_<0||_>=7){T.enabled=!1;return}T.bounds[x]=w[x]=_;break;case p:if(!e(_)){T.enabled=!1;return}if(_=+_,_<0||_>24){T.enabled=!1;return}T.bounds[x]=w[x]=_;break}if(S.autorange===!1){var E=S.range;if(E[0]E[1]){T.enabled=!1;return}}else if(w[0]>E[0]&&w[1]A[1]-1/4096&&(o.domain=d),t.noneOrAll(n.domain,o.domain,d),o.tickmode==="sync"&&(o.tickmode="auto")}return s("layer"),o},ZR}var KR,zne;function SFe(){if(zne)return KR;zne=1;var e=rr(),t=va(),r=Wd().isUnifiedHover,n=SAe(),o=go(),s=Bx(),a=hc(),f=GAe(),i=VS(),l=jm(),u=x$(),c=xl(),h=c.id2name,d=c.name2id,v=Wu().AX_ID_PATTERN,p=ga(),m=p.traceIs,y=p.getComponentMethod;function b(g,T,S){Array.isArray(g[T])?g[T].push(S):g[T]=[S]}return KR=function(T,S,A){var M=S.autotypenumbers,w={},C={},x={},_={},k={},E={},I={},F={},D={},z={},N,q;for(N=0;N rect").call(n.setTranslate,0,0).call(n.setScale,1,1),S.plot.call(n.setTranslate,A._offset,M._offset).call(n.setScale,1,1);var w=S.plot.selectAll(".scatterlayer .trace");w.selectAll(".point").call(n.setPointGroupScale,1,1),w.selectAll(".textpoint").call(n.setTextPointsScale,1,1),w.call(n.hideOutsideRangePoints,S)}function h(S,A){var M=S.plotinfo,w=M.xaxis,C=M.yaxis,x=w._length,_=C._length,k=!!S.xr1,E=!!S.yr1,I=[];if(k){var F=r.simpleMap(S.xr0,w.r2l),D=r.simpleMap(S.xr1,w.r2l),z=F[1]-F[0],N=D[1]-D[0];I[0]=(F[0]*(1-A)+A*D[0]-F[0])/(F[1]-F[0])*x,I[2]=x*(1-A+A*N/z),w.range[0]=w.l2r(F[0]*(1-A)+A*D[0]),w.range[1]=w.l2r(F[1]*(1-A)+A*D[1])}else I[0]=0,I[2]=x;if(E){var q=r.simpleMap(S.yr0,C.r2l),P=r.simpleMap(S.yr1,C.r2l),B=q[1]-q[0],$=P[1]-P[0];I[1]=(q[1]*(1-A)+A*P[1]-q[1])/(q[0]-q[1])*_,I[3]=_*(1-A+A*$/B),C.range[0]=w.l2r(q[0]*(1-A)+A*P[0]),C.range[1]=C.l2r(q[1]*(1-A)+A*P[1])}else I[1]=0,I[3]=_;o.drawOne(a,w,{skipTitle:!0}),o.drawOne(a,C,{skipTitle:!0}),o.redrawComponents(a,[w._id,C._id]);var Q=k?x/I[2]:1,J=E?_/I[3]:1,ne=k?I[0]:0,te=E?I[1]:0,Z=k?I[0]/I[2]*x:0,G=E?I[1]/I[3]*_:0,j=w._offset-Z,Y=C._offset-G;M.clipRect.call(n.setTranslate,ne,te).call(n.setScale,1/Q,1/J),M.plot.call(n.setTranslate,j,Y).call(n.setScale,Q,J),n.setPointGroupScale(M.zoomScalePts,1/Q,1/J),n.setTextPointsScale(M.zoomScaleTxt,1/Q,1/J)}var d;l&&(d=l());function v(){for(var S={},A=0;Ai.duration?(v(),b=window.cancelAnimationFrame(T)):b=window.requestAnimationFrame(T)}return m=Date.now(),b=window.requestAnimationFrame(T),Promise.resolve()},JR}var Nne;function $l(){if(Nne)return Qf;Nne=1;var e=ya(),t=ga(),r=rr(),n=Ts(),o=Ba(),s=cc().getModuleCalcData,a=xl(),f=Wu(),i=Dv(),l=r.ensureSingle;function u(m,y,b){return r.ensureSingle(m,y,b,function(g){g.datum(b)})}Qf.name="cartesian",Qf.attr=["xaxis","yaxis"],Qf.idRoot=["x","y"],Qf.idRegex=f.idRegex,Qf.attrRegex=f.attrRegex,Qf.attributes=HAe(),Qf.layoutAttributes=hc(),Qf.supplyLayoutDefaults=SFe(),Qf.transitionAxes=MFe(),Qf.finalizeSubplots=function(m,y){var b=y._subplots,g=b.xaxis,T=b.yaxis,S=b.cartesian,A=S.concat(b.gl2d||[]),M={},w={},C,x,_;for(C=0;C=0,y=l.indexOf("end")>=0,b=h.backoff*v+u.standoff,g=d.backoff*p+u.startstandoff,T,S,A,M;if(c.nodeName==="line"){T={x:+i.attr("x1"),y:+i.attr("y1")},S={x:+i.attr("x2"),y:+i.attr("y2")};var w=T.x-S.x,C=T.y-S.y;if(A=Math.atan2(C,w),M=A+Math.PI,b&&g&&b+g>Math.sqrt(w*w+C*C)){B();return}if(b){if(b*b>w*w+C*C){B();return}var x=b*Math.cos(A),_=b*Math.sin(A);S.x+=x,S.y+=_,i.attr({x2:S.x,y2:S.y})}if(g){if(g*g>w*w+C*C){B();return}var k=g*Math.cos(A),E=g*Math.sin(A);T.x-=k,T.y-=E,i.attr({x1:T.x,y1:T.y})}}else if(c.nodeName==="path"){var I=c.getTotalLength(),F="";if(I2/3?Gr="right":Gr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Gr]}for(var Qe=!1,De=["x","y"],me=0;me1)&&(st===et?(ye=ot.r2fraction(g["a"+Ce]),(ye<0||ye>1)&&(Qe=!0)):Qe=!0),gt=ot._offset+ot.r2p(g[Ce]),Ie=.5}else{var Se=pe==="domain";Ce==="x"?(He=g[Ce],gt=Se?ot._offset+ot._length*He:gt=C.l+C.w*He):(He=1-g[Ce],gt=Se?ot._offset+ot._length*He:gt=C.t+C.h*He),Ie=g.showarrow?.5:He}if(g.showarrow){rt.head=gt;var Pe=g["a"+Ce];if(je=ht*We(.5,g.xanchor)-Ht*We(.5,g.yanchor),st===et){var it=s.getRefType(st);it==="domain"?(Ce==="y"&&(Pe=1-Pe),rt.tail=ot._offset+ot._length*Pe):it==="paper"?Ce==="y"?(Pe=1-Pe,rt.tail=C.t+C.h*Pe):rt.tail=C.l+C.w*Pe:rt.tail=ot._offset+ot.r2p(Pe),mt=je}else rt.tail=gt+Pe,mt=je+Pe;rt.text=rt.tail+je;var vt=w[Ce==="x"?"width":"height"];if(et==="paper"&&(rt.head=n.constrain(rt.head,1,vt-1)),st==="pixel"){var Pt=-Math.max(rt.tail-3,rt.text),Bt=Math.min(rt.tail+3,rt.text)-vt;Pt>0?(rt.tail+=Pt,rt.text+=Pt):Bt>0&&(rt.tail-=Bt,rt.text-=Bt)}rt.tail+=Tt,rt.head+=Tt}else je=Et*We(Ie,Jt),mt=je,rt.text=gt+je;rt.text+=Tt,je+=Tt,mt+=Tt,g["_"+Ce+"padplus"]=Et/2+mt,g["_"+Ce+"padminus"]=Et/2-mt,g["_"+Ce+"size"]=Et,g["_"+Ce+"shift"]=je}if(Qe){ne.remove();return}var It=0,qt=0;if(g.align!=="left"&&(It=(Ee-Te)*(g.align==="center"?.5:1)),g.valign!=="top"&&(qt=(Le-ke)*(g.valign==="middle"?.5:1)),Oe)we.select("svg").attr({x:G+It-1,y:G+qt}).call(f.setClipUrl,Y?z:null,b);else{var pr=G+qt-be.top,_r=G+It-be.left;le.call(l.positionText,_r,pr).call(f.setClipUrl,Y?z:null,b)}K.select("rect").call(f.setRect,G,G,Ee,Le),j.call(f.setRect,te/2,te/2,Fe-te,qe-te),ne.call(f.setTranslate,Math.round(N.x.text-Fe/2),Math.round(N.y.text-qe/2)),B.attr({transform:"rotate("+q+","+N.x.text+","+N.y.text+")"});var Rr=function(Br,Gr){P.selectAll(".annotation-arrow-g").remove();var en=N.x.head,cn=N.y.head,hn=N.x.tail+Br,Wr=N.y.tail+Gr,bt=N.x.text+Br,tt=N.y.text+Gr,yt=n.rotationXYMatrix(q,bt,tt),wt=n.apply2DTransform(yt),Ft=n.apply2DTransform2(yt),er=+j.attr("width"),cr=+j.attr("height"),lr=bt-.5*er,Ue=lr+er,Ne=tt-.5*cr,At=Ne+cr,Rt=[[lr,Ne,lr,At],[lr,At,Ue,At],[Ue,At,Ue,Ne],[Ue,Ne,lr,Ne]].map(Ft);if(!Rt.reduce(function(Zr,jr){return Zr^!!n.segmentsIntersect(en,cn,en+1e6,cn+1e6,jr[0],jr[1],jr[2],jr[3])},!1)){Rt.forEach(function(Zr){var jr=n.segmentsIntersect(hn,Wr,en,cn,Zr[0],Zr[1],Zr[2],Zr[3]);jr&&(hn=jr.x,Wr=jr.y)});var Ct=g.arrowwidth,Wt=g.arrowcolor,Qt=g.arrowside,Xt=P.append("g").style({opacity:a.opacity(Wt)}).classed("annotation-arrow-g",!0),$t=Xt.append("path").attr("d","M"+hn+","+Wr+"L"+en+","+cn).style("stroke-width",Ct+"px").call(a.stroke,a.rgb(Wt));if(d($t,Qt,g),x.annotationPosition&&$t.node().parentNode&&!S){var ur=en,fr=cn;if(g.standoff){var mr=Math.sqrt(Math.pow(en-hn,2)+Math.pow(cn-Wr,2));ur+=g.standoff*(hn-en)/mr,fr+=g.standoff*(Wr-cn)/mr}var br=Xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(hn-ur)+","+(Wr-fr),transform:o(ur,fr)}).style("stroke-width",Ct+6+"px").call(a.stroke,"rgba(0,0,0,0)").call(a.fill,"rgba(0,0,0,0)"),Pr,Cr;c.init({element:br.node(),gd:b,prepFn:function(){var Zr=f.getTranslate(ne);Pr=Zr.x,Cr=Zr.y,A&&A.autorange&&I(A._name+".autorange",!0),M&&M.autorange&&I(M._name+".autorange",!0)},moveFn:function(Zr,jr){var Sn=wt(Pr,Cr),Fn=Sn[0]+Zr,ea=Sn[1]+jr;ne.call(f.setTranslate,Fn,ea),F("x",m(A,Zr,"x",C,g)),F("y",m(M,jr,"y",C,g)),g.axref===g.xref&&F("ax",m(A,Zr,"ax",C,g)),g.ayref===g.yref&&F("ay",m(M,jr,"ay",C,g)),Xt.attr("transform",o(Zr,jr)),B.attr({transform:"rotate("+q+","+Fn+","+ea+")"})},doneFn:function(){t.call("_guiRelayout",b,D());var Zr=document.querySelector(".js-notes-box-panel");Zr&&Zr.redraw(Zr.selectedObj)}})}}};if(g.showarrow&&Rr(0,0),$){var an;c.init({element:ne.node(),gd:b,prepFn:function(){an=B.attr("transform")},moveFn:function(Br,Gr){var en="pointer";if(g.showarrow)g.axref===g.xref?F("ax",m(A,Br,"ax",C,g)):F("ax",g.ax+Br),g.ayref===g.yref?F("ay",m(M,Gr,"ay",C.w,g)):F("ay",g.ay+Gr),Rr(Br,Gr);else{if(S)return;var cn,hn;if(A)cn=m(A,Br,"x",C,g);else{var Wr=g._xsize/C.w,bt=g.x+(g._xshift-g.xshift)/C.w-Wr/2;cn=c.align(bt+Br/C.w,Wr,0,1,g.xanchor)}if(M)hn=m(M,Gr,"y",C,g);else{var tt=g._ysize/C.h,yt=g.y-(g._yshift+g.yshift)/C.h-tt/2;hn=c.align(yt-Gr/C.h,tt,0,1,g.yanchor)}F("x",cn),F("y",hn),(!A||!M)&&(en=c.getCursor(A?.5:cn,M?.5:hn,g.xanchor,g.yanchor))}B.attr({transform:o(Br,Gr)+an}),u(ne,en)},clickFn:function(Br,Gr){g.captureevents&&b.emit("plotly_clickannotation",J(Gr))},doneFn:function(){u(ne),t.call("_guiRelayout",b,D());var Br=document.querySelector(".js-notes-box-panel");Br&&Br.redraw(Br.selectedObj)}})}}x.annotationText?le.call(l.makeEditable,{delegate:ne,gd:b}).call(oe).on("edit",function(de){g.text=de,this.call(oe),F("text",de),A&&A.autorange&&I(A._name+".autorange",!0),M&&M.autorange&&I(M._name+".autorange",!0),t.call("_guiRelayout",b,D())}):le.call(oe)}return tL}var rL,Une;function CFe(){if(Une)return rL;Une=1;var e=rr(),t=ga(),r=go().arrayEditor;rL={hasClickToShow:n,onClick:o};function n(f,i){var l=s(f,i);return l.on.length>0||l.explicitOff.length>0}function o(f,i){var l=s(f,i),u=l.on,c=l.off.concat(l.explicitOff),h={},d=f._fullLayout.annotations,v,p;if(u.length||c.length){for(v=0;v1){u=!0;break}}u?o.fullLayout._infolayer.select(".annotation-"+o.id+'[data-index="'+i+'"]').remove():(l._pdata=t(o.glplot.cameraParams,[s.xaxis.r2l(l.x)*a[0],s.yaxis.r2l(l.y)*a[1],s.zaxis.r2l(l.z)*a[2]]),e(o.graphDiv,l,i,o.id,l._xa,l._ya))}},hL}var dL,Qne;function FFe(){if(Qne)return dL;Qne=1;var e=ga(),t=rr();dL={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:JG()}}},layoutAttributes:JG(),handleDefaults:IFe(),includeBasePlot:r,convert:OFe(),draw:zFe()};function r(n,o){var s=e.subplotsRegistry.gl3d;if(s)for(var a=s.attrRegex,f=Object.keys(n),i=0;i0?y+v:v;return{ppad:v,ppadplus:p?g:T,ppadminus:p?T:g}}else return{ppad:v}}function f(i,l,u,c,h){var d=i.type==="category"||i.type==="multicategory"?i.r2c:i.d2c;if(l!==void 0)return[d(l),d(u)];if(c){var v=1/0,p=-1/0,m=c.match(r.segmentRE),y,b,g,T,S;for(i.type==="date"&&(d=n.decodeDate(d)),y=0;yp&&(p=S)));if(p>=v)return[v,p]}}return yL}var mL,aae;function jFe(){if(aae)return mL;aae=1;var e=d$();return mL={moduleType:"component",name:"shapes",layoutAttributes:$Ae(),supplyLayoutDefaults:NFe(),supplyDrawNewShapeDefaults:BFe(),includeBasePlot:HS()("shapes"),calcAutorange:qFe(),draw:e.draw,drawOne:e.drawOne},mL}var xL,iae;function WAe(){if(iae)return xL;iae=1;var e=Wu(),t=go().templatedArray,r=US();return xL=t("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",r.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",r.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),xL}var bL,oae;function UFe(){if(oae)return bL;oae=1;var e=rr(),t=Ia(),r=uh(),n=WAe(),o="images";bL=function(f,i){var l={name:o,handleItemDefaults:s};r(f,i,l)};function s(a,f,i){function l(b,g){return e.coerce(a,f,n,b,g)}var u=l("source"),c=l("visible",!!u);if(!c)return f;l("layer"),l("xanchor"),l("yanchor"),l("sizex"),l("sizey"),l("sizing"),l("opacity");for(var h={_fullLayout:i},d=["x","y"],v=0;v<2;v++){var p=d[v],m=t.coerceRef(a,f,h,p,"paper",void 0);if(m!=="paper"){var y=t.getFromId(h,m);y._imgIndices.push(f._index)}t.coercePosition(f,h,l,m,p,0)}return f}return bL}var _L,sae;function HFe(){if(sae)return _L;sae=1;var e=ya(),t=Ba(),r=Ia(),n=xl(),o=Dv();return _L=function(a){var f=a._fullLayout,i=[],l={},u=[],c,h;for(h=0;h0);d&&(c("active"),c("direction"),c("type"),c("showactive"),c("x"),c("y"),e.noneOrAll(i,l,["x","y"]),c("xanchor"),c("yanchor"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),e.coerceFont(c,"font",u.font),c("bgcolor",u.paper_bgcolor),c("bordercolor"),c("borderwidth"))}function f(i,l){function u(h,d){return e.coerce(i,l,s,h,d)}var c=u("visible",i.method==="skip"||Array.isArray(i.args));c&&(u("method"),u("args"),u("args2"),u("label"),u("execute"))}return ML}var EL,dae;function $Fe(){if(dae)return EL;dae=1,EL=o;var e=ya(),t=va(),r=Ba(),n=rr();function o(s,a,f){this.gd=s,this.container=a,this.id=f,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}return o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(a,f,i){var l=this.gd._fullLayout,u=l.width,c=l.height;this.position=a;var h=this.position.l,d=this.position.w,v=this.position.t,p=this.position.h,m=this.position.direction,y=m==="down",b=m==="left",g=m==="right",T=m==="up",S=d,A=p,M,w,C,x;!y&&!b&&!g&&!T&&(this.position.direction="down",y=!0);var _=y||T;_?(M=h,w=M+S,y?(C=v,x=Math.min(C+A,c),A=x-C):(x=v+A,C=Math.max(x-A,0),A=x-C)):(C=v,x=C+A,b?(w=h+S,M=Math.max(w-S,0),S=w-M):(M=h,w=Math.min(M+S,u),S=w-M)),this._box={l:M,t:C,w:S,h:A};var k=d>S,E=o.barLength+2*o.barPad,I=o.barWidth+2*o.barPad,F=h,D=v+p;D+I>c&&(D=c-I);var z=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(t.fill,o.barColor),k?(this.hbar=z.attr({rx:o.barRadius,ry:o.barRadius,x:F,y:D,width:E,height:I}),this._hbarXMin=F+E/2,this._hbarTranslateMax=S-E):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var N=p>A,q=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,B=h+d,$=v;B+q>u&&(B=u-q);var Q=this.container.selectAll("rect.scrollbar-vertical").data(N?[0]:[]);Q.exit().on(".drag",null).remove(),Q.enter().append("rect").classed("scrollbar-vertical",!0).call(t.fill,o.barColor),N?(this.vbar=Q.attr({rx:o.barRadius,ry:o.barRadius,x:B,y:$,width:q,height:P}),this._vbarYMin=$+P/2,this._vbarTranslateMax=A-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var J=this.id,ne=M-.5,te=N?w+q+.5:w+.5,Z=C-.5,G=k?x+I+.5:x+.5,j=l._topdefs.selectAll("#"+J).data(k||N?[0]:[]);if(j.exit().remove(),j.enter().append("clipPath").attr("id",J).append("rect"),k||N?(this._clipRect=j.select("rect").attr({x:Math.floor(ne),y:Math.floor(Z),width:Math.ceil(te)-Math.floor(ne),height:Math.ceil(G)-Math.floor(Z)}),this.container.call(r.setClipUrl,J,this.gd),this.bg.attr({x:h,y:v,width:d,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(r.setClipUrl,null),delete this._clipRect),k||N){var Y=e.behavior.drag().on("dragstart",function(){e.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var K=e.behavior.drag().on("dragstart",function(){e.event.sourceEvent.preventDefault(),e.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(K),N&&this.vbar.on(".drag",null).call(K)}this.setTranslate(f,i)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(r.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},o.prototype._onBoxDrag=function(){var a=this.translateX,f=this.translateY;this.hbar&&(a-=e.event.dx),this.vbar&&(f-=e.event.dy),this.setTranslate(a,f)},o.prototype._onBoxWheel=function(){var a=this.translateX,f=this.translateY;this.hbar&&(a+=e.event.deltaY),this.vbar&&(f+=e.event.deltaY),this.setTranslate(a,f)},o.prototype._onBarDrag=function(){var a=this.translateX,f=this.translateY;if(this.hbar){var i=a+this._hbarXMin,l=i+this._hbarTranslateMax,u=n.constrain(e.event.x,i,l),c=(u-i)/(l-i),h=this.position.w-this._box.w;a=c*h}if(this.vbar){var d=f+this._vbarYMin,v=d+this._vbarTranslateMax,p=n.constrain(e.event.y,d,v),m=(p-d)/(v-d),y=this.position.h-this._box.h;f=m*y}this.setTranslate(a,f)},o.prototype.setTranslate=function(a,f){var i=this.position.w-this._box.w,l=this.position.h-this._box.h;if(a=n.constrain(a||0,0,i),f=n.constrain(f||0,0,l),this.translateX=a,this.translateY=f,this.container.call(r.setTranslate,this._box.l-this.position.l-a,this._box.t-this.position.t-f),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+a-.5),y:Math.floor(this.position.t+f-.5)}),this.hbar){var u=a/i;this.hbar.call(r.setTranslate,a+u*this._hbarTranslateMax,f)}if(this.vbar){var c=f/l;this.vbar.call(r.setTranslate,a,f+c*this._vbarTranslateMax)}},EL}var kL,vae;function WFe(){if(vae)return kL;vae=1;var e=ya(),t=Ts(),r=va(),n=Ba(),o=rr(),s=ns(),a=go().arrayEditor,f=Zu().LINE_SPACING,i=_$(),l=$Fe();kL=function(E){var I=E._fullLayout,F=o.filterVisible(I[i.name]);function D(J){t.autoMargin(E,C(J))}var z=I._menulayer.selectAll("g."+i.containerClassName).data(F.length>0?[0]:[]);if(z.enter().append("g").classed(i.containerClassName,!0).style("cursor","pointer"),z.exit().each(function(){e.select(this).selectAll("g."+i.headerGroupClassName).each(D)}).remove(),F.length!==0){var N=z.selectAll("g."+i.headerGroupClassName).data(F,u);N.enter().append("g").classed(i.headerGroupClassName,!0);for(var q=o.ensureSingle(z,"g",i.dropdownButtonGroupClassName,function(J){J.style("pointer-events","all")}),P=0;P0?[0]:[]);B.enter().append("g").classed(i.containerClassName,!0).style("cursor",N?null:"ew-resize");function $(te){te._commandObserver&&(te._commandObserver.remove(),delete te._commandObserver),t.autoMargin(z,d(te))}if(B.exit().each(function(){e.select(this).selectAll("g."+i.groupClassName).each($)}).remove(),P.length!==0){var Q=B.selectAll("g."+i.groupClassName).data(P,p);Q.enter().append("g").classed(i.groupClassName,!0),Q.exit().each($).remove();for(var J=0;J0&&(Q=Q.transition().duration(z.transition.duration).ease(z.transition.easing)),Q.attr("transform",s($-i.gripWidth*.5,z._dims.currentValueTotalHeight))}}function k(D,z){var N=D._dims;return N.inputAreaStart+i.stepInset+(N.inputAreaLength-2*i.stepInset)*Math.min(1,Math.max(0,z))}function E(D,z){var N=D._dims;return Math.min(1,Math.max(0,(z-i.stepInset-N.inputAreaStart)/(N.inputAreaLength-2*i.stepInset-2*N.inputAreaStart)))}function I(D,z,N){var q=N._dims,P=o.ensureSingle(D,"rect",i.railTouchRectClass,function(B){B.call(w,z,D,N).style("pointer-events","all")});P.attr({width:q.inputAreaLength,height:Math.max(q.inputAreaWidth,i.tickOffset+N.ticklen+q.labelHeight)}).call(r.fill,N.bgcolor).attr("opacity",0),n.setTranslate(P,0,q.currentValueTotalHeight)}function F(D,z){var N=z._dims,q=N.inputAreaLength-i.railInset*2,P=o.ensureSingle(D,"rect",i.railRectClass);P.attr({width:q,height:i.railWidth,rx:i.railRadius,ry:i.railRadius,"shape-rendering":"crispEdges"}).call(r.stroke,z.bordercolor).call(r.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px"),n.setTranslate(P,i.railInset,(N.inputAreaWidth-i.railWidth)*.5+N.currentValueTotalHeight)}return DL}var IL,bae;function JFe(){if(bae)return IL;bae=1;var e=YS();return IL={moduleType:"component",name:e.name,layoutAttributes:ZAe(),supplyLayoutDefaults:ZFe(),draw:KFe()},IL}var OL,_ae;function QG(){if(_ae)return OL;_ae=1;var e=Cu();return OL={bgcolor:{valType:"color",dflt:e.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"},OL}var zL,wae;function KAe(){return wae||(wae=1,zL={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}),zL}var v_={},FL,Tae;function w$(){return Tae||(Tae=1,FL={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}),FL}var Aae;function QFe(){if(Aae)return v_;Aae=1;var e=xl(),t=ns(),r=w$(),n=Zu().LINE_SPACING,o=r.name;function s(a){var f=a&&a[o];return f&&f.visible}return v_.isVisible=s,v_.makeData=function(a){var f=e.list({_fullLayout:a},"x",!0),i=a.margin,l=[];if(!a._has("gl2d"))for(var u=0;u=Te.max)Oe=oe[be+1];else if(we=Te.pmax)Oe=oe[be+1];else if(we0?w.touches[0].clientX:0}function v(w,C,x,_){if(C._context.staticPlot)return;var k=w.select("rect."+h.slideBoxClassName).node(),E=w.select("rect."+h.grabAreaMinClassName).node(),I=w.select("rect."+h.grabAreaMaxClassName).node();function F(){var D=e.event,z=D.target,N=d(D),q=N-w.node().getBoundingClientRect().left,P=_.d2p(x._rl[0]),B=_.d2p(x._rl[1]),$=u.coverSlip();this.addEventListener("touchmove",Q),this.addEventListener("touchend",J),$.addEventListener("mousemove",Q),$.addEventListener("mouseup",J);function Q(ne){var te=d(ne),Z=+te-N,G,j,Y;switch(z){case k:if(Y="ew-resize",P+Z>x._length||B+Z<0)return;G=P+Z,j=B+Z;break;case E:if(Y="col-resize",P+Z>x._length)return;G=P+Z,j=B;break;case I:if(Y="col-resize",B+Z<0)return;G=P,j=B+Z;break;default:Y="ew-resize",G=q,j=q+Z;break}if(j0);if(b){var g=f(u,c,h);m("x",g[0]),m("y",g[1]),e.noneOrAll(l,u,["x","y"]),m("xanchor"),m("yanchor"),e.coerceFont(m,"font",c.font);var T=m("bgcolor");m("activecolor",t.contrast(T,s.lightAmount,s.darkAmount)),m("bordercolor"),m("borderwidth")}};function a(i,l,u,c){var h=c.calendar;function d(m,y){return e.coerce(i,l,o.buttons,m,y)}var v=d("visible");if(v){var p=d("step");p!=="all"&&(h&&h!=="gregorian"&&(p==="month"||p==="year")?l.stepmode="backward":d("stepmode"),d("count")),d("label")}}function f(i,l,u){for(var c=u.filter(function(p){return l[p].anchor===i._id}),h=0,d=0;d1)){delete h.grid;return}if(!m&&!y&&!b){var x=M("pattern")==="independent";x&&(m=!0)}A._hasSubplotGrid=m;var _=M("roworder"),k=_==="top to bottom",E=m?.2:.1,I=m?.3:.1,F,D;g&&h._splomGridDflt&&(F=h._splomGridDflt.xside,D=h._splomGridDflt.yside),A._domains={x:i("x",M,E,F,C),y:i("y",M,I,D,w,k)}}function i(c,h,d,v,p,m){var y=h(c+"gap",d),b=h("domain."+c);h(c+"side",v);for(var g=new Array(p),T=b[0],S=(b[1]-T)/(p-y),A=S*(1-y),M=0;M0,v=a._context.staticPlot;f.each(function(p){var m=p[0].trace,y=m.error_x||{},b=m.error_y||{},g;m.ids&&(g=function(M){return M.id});var T=n.hasMarkers(m)&&m.marker.maxdisplayed>0;!b.visible&&!y.visible&&(p=[]);var S=e.select(this).selectAll("g.errorbar").data(p,g);if(S.exit().remove(),!!p.length){y.visible||S.selectAll("path.xerror").remove(),b.visible||S.selectAll("path.yerror").remove(),S.style("opacity",1);var A=S.enter().append("g").classed("errorbar",!0);d&&A.style("opacity",0).transition().duration(l.duration).style("opacity",1),r.setClipUrl(S,i.layerClipId,a),S.each(function(M){var w=e.select(this),C=o(M,c,h);if(!(T&&!M.vis)){var x,_=w.select("path.yerror");if(b.visible&&t(C.x)&&t(C.yh)&&t(C.ys)){var k=b.width;x="M"+(C.x-k)+","+C.yh+"h"+2*k+"m-"+k+",0V"+C.ys,C.noYS||(x+="m-"+k+",0h"+2*k),u=!_.size(),u?_=w.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("yerror",!0):d&&(_=_.transition().duration(l.duration).ease(l.easing)),_.attr("d",x)}else _.remove();var E=w.select("path.xerror");if(y.visible&&t(C.y)&&t(C.xh)&&t(C.xs)){var I=(y.copy_ystyle?b:y).width;x="M"+C.xh+","+(C.y-I)+"v"+2*I+"m0,-"+I+"H"+C.xs,C.noXS||(x+="m0,-"+I+"v"+2*I),u=!E.size(),u?E=w.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("xerror",!0):d&&(E=E.transition().duration(l.duration).ease(l.easing)),E.attr("d",x)}else E.remove()}})}})};function o(s,a,f){var i={x:a.c2p(s.x),y:f.c2p(s.y)};return s.yh!==void 0&&(i.yh=f.c2p(s.yh),i.ys=f.c2p(s.ys),t(i.ys)||(i.noYS=!0,i.ys=f.c2p(s.ys,!0))),s.xh!==void 0&&(i.xh=a.c2p(s.xh),i.xs=a.c2p(s.xs),t(i.xs)||(i.noXS=!0,i.xs=a.c2p(s.xs,!0))),i}return QL}var eP,Uae;function hNe(){if(Uae)return eP;Uae=1;var e=ya(),t=va();return eP=function(n){n.each(function(o){var s=o[0].trace,a=s.error_y||{},f=s.error_x||{},i=e.select(this);i.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(t.stroke,a.color),f.copy_ystyle&&(f=a),i.selectAll("path.xerror").style("stroke-width",f.thickness+"px").call(t.stroke,f.color)})},eP}var tP,Hae;function dNe(){if(Hae)return tP;Hae=1;var e=rr(),t=ws().overrideAll,r=eSe(),n={error_x:e.extendFlat({},r),error_y:e.extendFlat({},r)};delete n.error_x.copy_zstyle,delete n.error_y.copy_zstyle,delete n.error_y.copy_ystyle;var o={error_x:e.extendFlat({},r),error_y:e.extendFlat({},r),error_z:e.extendFlat({},r)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,tP={moduleType:"component",name:"errorbars",schema:{traces:{scatter:n,bar:n,histogram:n,scatter3d:t(o,"calc","nested"),scattergl:t(n,"calc","nested")}},supplyDefaults:uNe(),calc:fNe(),makeComputeError:tSe(),plot:cNe(),style:hNe(),hoverInfo:s};function s(a,f,i){(f.error_y||{}).visible&&(i.yerr=a.yh-a.y,f.error_y.symmetric||(i.yerrneg=a.y-a.ys)),(f.error_x||{}).visible&&(i.xerr=a.xh-a.x,f.error_x.symmetric||(i.xerrneg=a.x-a.xs))}return tP}var rP,Gae;function vNe(){return Gae||(Gae=1,rP={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}),rP}var nP,Vae;function pNe(){if(Vae)return nP;Vae=1;var e=ya(),t=wf(),r=Ts(),n=ga(),o=Ia(),s=Gh(),a=rr(),f=a.strTranslate,i=ja().extendFlat,l=v0(),u=Ba(),c=va(),h=Hx(),d=ns(),v=Bh().flipScale,p=VS(),m=x$(),y=hc(),b=Zu(),g=b.LINE_SPACING,T=b.FROM_TL,S=b.FROM_BR,A=vNe().cn;function M(E){var I=E._fullLayout,F=I._infolayer.selectAll("g."+A.colorbar).data(w(E),function(D){return D._id});F.enter().append("g").attr("class",function(D){return D._id}).classed(A.colorbar,!0),F.each(function(D){var z=e.select(this);a.ensureSingle(z,"rect",A.cbbg),a.ensureSingle(z,"g",A.cbfills),a.ensureSingle(z,"g",A.cblines),a.ensureSingle(z,"g",A.cbaxis,function(q){q.classed(A.crisp,!0)}),a.ensureSingle(z,"g",A.cbtitleunshift,function(q){q.append("g").classed(A.cbtitle,!0)}),a.ensureSingle(z,"rect",A.cboutline);var N=C(z,D,E);N&&N.then&&(E._promises||[]).push(N),E._context.edits.colorbarPosition&&x(z,D,E)}),F.exit().each(function(D){r.autoMargin(E,D._id)}).remove(),F.order()}function w(E){var I=E._fullLayout,F=E.calcdata,D=[],z,N,q,P;function B(X){return i(X,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function $(){typeof P.calc=="function"?P.calc(E,q,z):(z._fillgradient=N.reversescale?v(N.colorscale):N.colorscale,z._zrange=[N[P.min],N[P.max]])}for(var Q=0;Q1){var rt=Math.pow(10,Math.floor(Math.log(Tt)/Math.LN10));Et*=rt*a.roundUp(Tt/rt,[2,5,10]),(Math.abs(be.start)/be.size+1e-6)%1<2e-6&&(ht.tick0=0)}ht.dtick=Et}ht.domain=D?[ot+Z/ee.h,ot+We-Z/ee.h]:[ot+te/ee.w,ot+We-te/ee.w],ht.setScale(),E.attr("transform",f(Math.round(ee.l),Math.round(ee.t)));var gt=E.select("."+A.cbtitleunshift).attr("transform",f(-Math.round(ee.l),-Math.round(ee.t))),mt=ht.ticklabelposition,He=ht.title.font.size,Ie=E.select("."+A.cbaxis),je,pe=0,ye=0;function Se(Bt,It){var qt={propContainer:ht,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:X._dfltTitle.colorbar,containerGroup:E.select("."+A.cbtitle)},pr=Bt.charAt(0)==="h"?Bt.substr(1):"h"+Bt;E.selectAll("."+pr+",."+pr+"-math-group").remove(),h.draw(F,Bt,i(qt,It||{}))}function Pe(){if(D&&Ht||!D&&!Ht){var Bt,It;de==="top"&&(Bt=te+ee.l+Qe*G,It=Z+ee.t+De*(1-ot-We)+3+He*.75),de==="bottom"&&(Bt=te+ee.l+Qe*G,It=Z+ee.t+De*(1-ot)-3-He*.25),de==="right"&&(It=Z+ee.t+De*j+3+He*.75,Bt=te+ee.l+Qe*ot),Se(ht._id+"title",{attributes:{x:Bt,y:It,"text-anchor":D?"start":"middle"}})}}function it(){if(D&&!Ht||!D&&Ht){var Bt=ht.position||0,It=ht._offset+ht._length/2,qt,pr;if(de==="right")pr=It,qt=ee.l+Qe*Bt+10+He*(ht.showticklabels?1:.5);else if(qt=It,de==="bottom"&&(pr=ee.t+De*Bt+10+(mt.indexOf("inside")===-1?ht.tickfont.size:0)+(ht.ticks!=="intside"&&I.ticklen||0)),de==="top"){var _r=fe.text.split("
").length;pr=ee.t+De*Bt+10-Le-g*He*_r}Se((D?"h":"v")+ht._id+"title",{avoid:{selection:e.select(F).selectAll("g."+ht._id+"tick"),side:de,offsetTop:D?0:ee.t,offsetLeft:D?ee.l:0,maxShift:D?X.width:X.height},attributes:{x:qt,y:pr,"text-anchor":"middle"},transform:{rotate:D?-90:0,offset:0}})}}function vt(){if(!D&&!Ht||D&&Ht){var Bt=E.select("."+A.cbtitle),It=Bt.select("text"),qt=[-B/2,B/2],pr=Bt.select(".h"+ht._id+"title-math-group").node(),_r=15.6;It.node()&&(_r=parseInt(It.node().style.fontSize,10)*g);var Rr;if(pr?(Rr=u.bBox(pr),ye=Rr.width,pe=Rr.height,pe>_r&&(qt[1]-=(pe-_r)/2)):It.node()&&!It.classed(A.jsPlaceholder)&&(Rr=u.bBox(It.node()),ye=Rr.width,pe=Rr.height),D){if(pe){if(pe+=5,de==="top")ht.domain[1]-=pe/ee.h,qt[1]*=-1;else{ht.domain[0]+=pe/ee.h;var an=d.lineCount(It);qt[1]+=(1-an)*_r}Bt.attr("transform",f(qt[0],qt[1])),ht.setScale()}}else ye&&(de==="right"&&(ht.domain[0]+=(ye+He/2)/ee.w),Bt.attr("transform",f(qt[0],qt[1])),ht.setScale())}E.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",D?f(0,Math.round(ee.h*(1-ht.domain[1]))):f(Math.round(ee.w*ht.domain[0]),0)),Ie.attr("transform",D?f(0,Math.round(-ee.t)):f(Math.round(-ee.l),0));var Br=E.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(ke);Br.enter().append("rect").classed(A.cbfill,!0).attr("style",""),Br.exit().remove();var Gr=_e.map(ht.c2p).map(Math.round).sort(function(bt,tt){return bt-tt});Br.each(function(bt,tt){var yt=[tt===0?_e[0]:(ke[tt]+ke[tt-1])/2,tt===ke.length-1?_e[1]:(ke[tt]+ke[tt+1])/2].map(ht.c2p).map(Math.round);D&&(yt[1]=a.constrain(yt[1]+(yt[1]>yt[0])?1:-1,Gr[0],Gr[1]));var wt=e.select(this).attr(D?"x":"y",me).attr(D?"y":"x",e.min(yt)).attr(D?"width":"height",Math.max(Le,2)).attr(D?"height":"width",Math.max(e.max(yt)-e.min(yt),2));if(I._fillgradient)u.gradient(wt,F,I._id,D?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var Ft=Oe(bt).replace("e-","");wt.attr("fill",t(Ft).toHexString())}});var en=E.select("."+A.cblines).selectAll("path."+A.cbline).data(oe.color&&oe.width?Ee:[]);en.enter().append("path").classed(A.cbline,!0),en.exit().remove(),en.each(function(bt){var tt=me,yt=Math.round(ht.c2p(bt))+oe.width/2%1;e.select(this).attr("d","M"+(D?tt+","+yt:yt+","+tt)+(D?"h":"v")+Le).call(u.lineGroupStyle,oe.width,we(bt),oe.dash)}),Ie.selectAll("g."+ht._id+"tick,path").remove();var cn=me+Le+(B||0)/2-(I.ticks==="outside"?1:0),hn=o.calcTicks(ht),Wr=o.getTickSigns(ht)[2];return o.drawTicks(F,ht,{vals:ht.ticks==="inside"?o.clipEnds(ht,hn):hn,layer:Ie,path:o.makeTickPath(ht,cn,Wr),transFn:o.makeTransTickFn(ht)}),o.drawLabels(F,ht,{vals:hn,layer:Ie,transFn:o.makeTransTickLabelFn(ht),labelFns:o.makeLabelFns(ht,cn)})}function Pt(){var Bt,It=Le+B/2;mt.indexOf("inside")===-1&&(Bt=u.bBox(Ie.node()),It+=D?Bt.width:Bt.height),je=gt.select("text");var qt=0,pr=D&&de==="top",_r=!D&&de==="right",Rr=0;if(je.node()&&!je.classed(A.jsPlaceholder)){var an,Br=gt.select(".h"+ht._id+"title-math-group").node();Br&&(D&&Ht||!D&&!Ht)?(Bt=u.bBox(Br),qt=Bt.width,an=Bt.height):(Bt=u.bBox(gt.node()),qt=Bt.right-ee.l-(D?me:ut),an=Bt.bottom-ee.t-(D?ut:me),!D&&de==="top"&&(It+=Bt.height,Rr=Bt.height)),_r&&(je.attr("transform",f(qt/2+He/2,0)),qt*=2),It=Math.max(It,D?qt:an)}var Gr=(D?te:Z)*2+It+$+B/2,en=0;!D&&fe.text&&ne==="bottom"&&j<=0&&(en=Gr/2,Gr+=en,Rr+=en),X._hColorbarMoveTitle=en,X._hColorbarMoveCBTitle=Rr;var cn=$+B,hn=(D?me:ut)-cn/2-(D?te:0),Wr=(D?ut:me)-(D?qe:Z+Rr-en);E.select("."+A.cbbg).attr("x",hn).attr("y",Wr).attr(D?"width":"height",Math.max(Gr-en,2)).attr(D?"height":"width",Math.max(qe+cn,2)).call(c.fill,Q).call(c.stroke,I.bordercolor).style("stroke-width",$);var bt=_r?Math.max(qt-10,0):0;E.selectAll("."+A.cboutline).attr("x",(D?me:ut+te)+bt).attr("y",(D?ut+Z-qe:me)+(pr?pe:0)).attr(D?"width":"height",Math.max(Le,2)).attr(D?"height":"width",Math.max(qe-(D?2*Z+pe:2*te+bt),2)).call(c.stroke,I.outlinecolor).style({fill:"none","stroke-width":B});var tt=D?Ce*Gr:0,yt=D?0:(1-et)*Gr-Rr;if(tt=K?ee.l-tt:-tt,yt=Y?ee.t-yt:-yt,E.attr("transform",f(tt,yt)),!D&&($||t(Q).getAlpha()&&!t.equals(X.paper_bgcolor,Q))){var wt=Ie.selectAll("text"),Ft=wt[0].length,er=E.select("."+A.cbbg).node(),cr=u.bBox(er),lr=u.getTranslate(E),Ue=2;wt.each(function(fr,mr){var br=0,Pr=Ft-1;if(mr===br||mr===Pr){var Cr=u.bBox(this),Zr=u.getTranslate(this),jr;if(mr===Pr){var Sn=Cr.right+Zr.x,Fn=cr.right+lr.x+ut-$-Ue+G;jr=Fn-Sn,jr>0&&(jr=0)}else if(mr===br){var ea=Cr.left+Zr.x,An=cr.left+lr.x+ut+$+Ue;jr=An-ea,jr<0&&(jr=0)}jr&&(Ft<3?this.setAttribute("transform","translate("+jr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ne={},At=T[J],Rt=S[J],Ct=T[ne],Wt=S[ne],Qt=Gr-Le;D?(N==="pixels"?(Ne.y=j,Ne.t=qe*Ct,Ne.b=qe*Wt):(Ne.t=Ne.b=0,Ne.yt=j+z*Ct,Ne.yb=j-z*Wt),P==="pixels"?(Ne.x=G,Ne.l=Gr*At,Ne.r=Gr*Rt):(Ne.l=Qt*At,Ne.r=Qt*Rt,Ne.xl=G-q*At,Ne.xr=G+q*Rt)):(N==="pixels"?(Ne.x=G,Ne.l=qe*At,Ne.r=qe*Rt):(Ne.l=Ne.r=0,Ne.xl=G+z*At,Ne.xr=G-z*Rt),P==="pixels"?(Ne.y=1-j,Ne.t=Gr*Ct,Ne.b=Gr*Wt):(Ne.t=Qt*Ct,Ne.b=Qt*Wt,Ne.yt=j-q*Ct,Ne.yb=j+q*Wt));var Xt=I.y<.5?"b":"t",$t=I.x<.5?"l":"r";F._fullLayout._reservedMargin[I._id]={};var ur={r:X.width-hn-tt,l:hn+Ne.r,b:X.height-Wr-yt,t:Wr+Ne.b};K&&Y?r.autoMargin(F,I._id,Ne):K?F._fullLayout._reservedMargin[I._id][Xt]=ur[Xt]:Y||D?F._fullLayout._reservedMargin[I._id][$t]=ur[$t]:F._fullLayout._reservedMargin[I._id][Xt]=ur[Xt]}return a.syncOrAsync([r.previousPromises,Pe,vt,it,r.previousPromises,Pt],F)}function x(E,I,F){var D=I.orientation==="v",z=F._fullLayout,N=z._size,q,P,B;s.init({element:E.node(),gd:F,prepFn:function(){q=E.attr("transform"),l(E)},moveFn:function($,Q){E.attr("transform",q+f($,Q)),P=s.align((D?I._uFrac:I._vFrac)+$/N.w,D?I._thickFrac:I._lenFrac,0,1,I.xanchor),B=s.align((D?I._vFrac:1-I._uFrac)-Q/N.h,D?I._lenFrac:I._thickFrac,0,1,I.yanchor);var J=s.getCursor(P,B,I.xanchor,I.yanchor);l(E,J)},doneFn:function(){if(l(E),P!==void 0&&B!==void 0){var $={};$[I._propPrefix+"x"]=P,$[I._propPrefix+"y"]=B,I._traceIndex!==void 0?n.call("_guiRestyle",F,$,I._traceIndex):n.call("_guiRelayout",F,$)}}})}function _(E,I,F){var D=I._levels,z=[],N=[],q,P,B=D.end+D.size/100,$=D.size,Q=1.001*F[0]-.001*F[1],J=1.001*F[1]-.001*F[0];for(P=0;P<1e5&&(q=D.start+P*$,!($>0?q>=B:q<=B));P++)q>Q&&q0?q>=B:q<=B));P++)q>F[0]&&q-1}return lP=function(f,i){var l,u=f.data,c=f.layout,h=n([],u),d=n({},c,o(i.tileClass)),v=f._context||{};if(i.width&&(d.width=i.width),i.height&&(d.height=i.height),i.tileClass==="thumbnail"||i.tileClass==="themes__thumb"){d.annotations=[];var p=Object.keys(d);for(l=0;l=0)return v}else if(typeof v=="string"&&(v=v.trim(),v.slice(-1)==="%"&&e(v.slice(0,-1))&&(v=+v.slice(0,-1),v>=0)))return v+"%"}function d(v,p,m,y,b,g){g=g||{};var T=g.moduleHasSelected!==!1,S=g.moduleHasUnselected!==!1,A=g.moduleHasConstrain!==!1,M=g.moduleHasCliponaxis!==!1,w=g.moduleHasTextangle!==!1,C=g.moduleHasInsideanchor!==!1,x=!!g.hasPathbar,_=Array.isArray(b)||b==="auto",k=_||b==="inside",E=_||b==="outside";if(k||E){var I=l(y,"textfont",m.font),F=t.extendFlat({},I),D=v.textfont&&v.textfont.color,z=!D;if(z&&delete F.color,l(y,"insidetextfont",F),x){var N=t.extendFlat({},I);z&&delete N.color,l(y,"pathbar.textfont",N)}E&&l(y,"outsidetextfont",I),T&&y("selected.textfont.color"),S&&y("unselected.textfont.color"),A&&y("constraintext"),M&&y("cliponaxis"),w&&y("textangle"),y("texttemplate")}k&&C&&y("insidetextanchor")}return gP={supplyDefaults:u,crossTraceDefaults:c,handleText:d,validateCornerradius:h},gP}var yP,oie;function nSe(){if(oie)return yP;oie=1;var e=ga(),t=Ia(),r=rr(),n=T$(),o=Ev().validateCornerradius;return yP=function(s,a,f){function i(g,T){return r.coerce(s,a,n,g,T)}for(var l=!1,u=!1,c=!1,h={},d=i("barmode"),v=0;vf;if(!i)return o}return s!==void 0?s:n.dflt},Hg.coerceColor=function(n,o,s){return t(o).isValid()?o:s!==void 0?s:n.dflt},Hg.coerceEnumerated=function(n,o,s){return n.coerceNumber&&(o=+o),n.values.indexOf(o)!==-1?o:s!==void 0?s:n.dflt},Hg.getValue=function(n,o){var s;return r(n)?o1||x.bargap===0&&x.bargroupgap===0&&!_[0].trace.marker.line.width)&&e.select(this).attr("shape-rendering","crispEdges")}),w.selectAll("g.points").each(function(_){var k=e.select(this),E=_[0].trace;h(k,E,M)}),o.getComponentMethod("errorbars","style")(w)}function h(M,w,C){r.pointStyle(M.selectAll("path"),w,C),d(M,w,C)}function d(M,w,C){M.selectAll("text").each(function(x){var _=e.select(this),k=n.ensureUniformFontSize(C,y(_,x,w,C));r.font(_,k)})}function v(M,w,C){var x=w[0].trace;x.selectedpoints?p(C,x,M):(h(C,x,M),o.getComponentMethod("errorbars","style")(C))}function p(M,w,C){r.selectedPointStyle(M.selectAll("path"),w),m(M.selectAll("text"),w,C)}function m(M,w,C){M.each(function(x){var _=e.select(this),k;if(x.selected){k=n.ensureUniformFontSize(C,y(_,x,w,C));var E=w.selected.textfont&&w.selected.textfont.color;E&&(k.color=E),r.font(_,k)}else r.selectedTextStyle(_,w)})}function y(M,w,C,x){var _=x._fullLayout.font,k=C.textfont;if(M.classed("bartext-inside")){var E=A(w,C);k=g(C,w.i,_,E)}else M.classed("bartext-outside")&&(k=T(C,w.i,_));return k}function b(M,w,C){return S(f,M.textfont,w,C)}function g(M,w,C,x){var _=b(M,w,C),k=M._input.textfont===void 0||M._input.textfont.color===void 0||Array.isArray(M.textfont.color)&&M.textfont.color[w]===void 0;return k&&(_={color:t.contrast(x),family:_.family,size:_.size}),S(i,M.insidetextfont,w,_)}function T(M,w,C){var x=b(M,w,C);return S(l,M.outsidetextfont,w,x)}function S(M,w,C,x){w=w||{};var _=u.getValue(w.family,C),k=u.getValue(w.size,C),E=u.getValue(w.color,C);return{family:u.coerceString(M.family,_,x.family),size:u.coerceNumber(M.size,k,x.size),color:u.coerceColor(M.color,E,x.color)}}function A(M,w){return w.type==="waterfall"?w[M.dir].marker.color:M.mcc||M.mc||w.marker.color}return _P={style:c,styleTextPoints:d,styleOnSelect:v,getInsideTextFont:g,getOutsideTextFont:T,getBarColor:A,resizeText:s},_P}var wP,hie;function Wx(){if(hie)return wP;hie=1;var e=ya(),t=Ua(),r=rr(),n=ns(),o=va(),s=Ba(),a=ga(),f=Ia().tickText,i=ch(),l=i.recordMinTextSize,u=i.clearMinTextSize,c=dp(),h=S$(),d=$x(),v=ug(),p=v.text,m=v.textposition,y=Wd().appendArrayPointValue,b=d.TEXTPAD;function g($){return $.id}function T($){if($.ids)return g}function S($){return($>0)-($<0)}function A($,Q){return $0}function x($,Q,J,ne,te,Z){var G=Q.xaxis,j=Q.yaxis,Y=$._fullLayout,K=$._context.staticPlot;te||(te={mode:Y.barmode,norm:Y.barmode,gap:Y.bargap,groupgap:Y.bargroupgap},u("bar",Y));var X=r.makeTraceGroups(ne,J,"trace bars").each(function(ee){var le=e.select(this),oe=ee[0].trace,fe=ee[0].t,de=oe.type==="waterfall",_e=oe.type==="funnel",we=oe.type==="histogram",Oe=oe.type==="bar",be=Oe||_e,Te=0;de&&oe.connector.visible&&oe.connector.mode==="between"&&(Te=oe.connector.line.width/2);var ke=oe.orientation==="h",Ee=C(te),Le=r.ensureSingle(le,"g","points"),Fe=T(oe),qe=Le.selectAll("g.point").data(r.identity,Fe);qe.enter().append("g").classed("point",!0),qe.exit().remove(),qe.each(function(Qe,De){var me=e.select(this),Ce=M(Qe,G,j,ke),et=Ce[0][0],st=Ce[0][1],ot=Ce[1][0],ut=Ce[1][1],ht=(ke?st-et:ut-ot)===0;ht&&be&&h.getLineWidth(oe,Qe)&&(ht=!1),ht||(ht=!t(et)||!t(st)||!t(ot)||!t(ut)),Qe.isBlank=ht,ht&&(ke?st=et:ut=ot),Te&&!ht&&(ke?(et-=A(et,st)*Te,st+=A(et,st)*Te):(ot-=A(ot,ut)*Te,ut+=A(ot,ut)*Te));var Ht,Et;if(oe.type==="waterfall"){if(!ht){var Jt=oe[Qe.dir].marker;Ht=Jt.line.width,Et=Jt.color}}else Ht=h.getLineWidth(oe,Qe),Et=Qe.mc||oe.marker.color;function Tt(cn){var hn=e.round(Ht/2%1,2);return te.gap===0&&te.groupgap===0?e.round(Math.round(cn)-hn,2):cn}function rt(cn,hn,Wr){return Wr&&cn===hn?cn:Math.abs(cn-hn)>=2?Tt(cn):cn>hn?Math.ceil(cn):Math.floor(cn)}var gt=o.opacity(Et),mt=gt<1||Ht>.01?Tt:rt;$._context.staticPlot||(et=mt(et,st,ke),st=mt(st,et,ke),ot=mt(ot,ut,!ke),ut=mt(ut,ot,!ke));var He=ke?G.c2p:j.c2p,Ie;Qe.s0>0?Ie=Qe._sMax:Qe.s0<0?Ie=Qe._sMin:Ie=Qe.s1>0?Qe._sMax:Qe._sMin;function je(cn,hn){if(!cn)return 0;var Wr=Math.abs(ke?ut-ot:st-et),bt=Math.abs(ke?st-et:ut-ot),tt=mt(Math.abs(He(Ie,!0)-He(0,!0))),yt=Qe.hasB?Math.min(Wr/2,bt/2):Math.min(Wr/2,tt),wt;if(hn==="%"){var Ft=Math.min(50,cn);wt=Wr*(Ft/100)}else wt=cn;return mt(Math.max(Math.min(wt,yt),0))}var pe=Oe||we?je(fe.cornerradiusvalue,fe.cornerradiusform):0,ye,Se,Pe="M"+et+","+ot+"V"+ut+"H"+st+"V"+ot+"Z",it=0;if(pe&&Qe.s){var vt=S(Qe.s0)===0||S(Qe.s)===S(Qe.s0)?Qe.s1:Qe.s0;if(it=mt(Qe.hasB?0:Math.abs(He(Ie,!0)-He(vt,!0))),it0?Math.sqrt(it*(2*pe-it)):0,_r=Pt>0?Math.max:Math.min;ye="M"+et+","+ot+"V"+(ut-qt*Bt)+"H"+_r(st-(pe-it)*Pt,et)+"A "+pe+","+pe+" 0 0 "+It+" "+st+","+(ut-pe*Bt-pr)+"V"+(ot+pe*Bt+pr)+"A "+pe+","+pe+" 0 0 "+It+" "+_r(st-(pe-it)*Pt,et)+","+(ot+qt*Bt)+"Z"}else if(Qe.hasB)ye="M"+(et+pe*Pt)+","+ot+"A "+pe+","+pe+" 0 0 "+It+" "+et+","+(ot+pe*Bt)+"V"+(ut-pe*Bt)+"A "+pe+","+pe+" 0 0 "+It+" "+(et+pe*Pt)+","+ut+"H"+(st-pe*Pt)+"A "+pe+","+pe+" 0 0 "+It+" "+st+","+(ut-pe*Bt)+"V"+(ot+pe*Bt)+"A "+pe+","+pe+" 0 0 "+It+" "+(st-pe*Pt)+","+ot+"Z";else{Se=Math.abs(ut-ot)+it;var Rr=Se0?Math.sqrt(it*(2*pe-it)):0,Br=Bt>0?Math.max:Math.min;ye="M"+(et+Rr*Pt)+","+ot+"V"+Br(ut-(pe-it)*Bt,ot)+"A "+pe+","+pe+" 0 0 "+It+" "+(et+pe*Pt-an)+","+ut+"H"+(st-pe*Pt+an)+"A "+pe+","+pe+" 0 0 "+It+" "+(st-Rr*Pt)+","+Br(ut-(pe-it)*Bt,ot)+"V"+ot+"Z"}}else ye=Pe}else ye=Pe;var Gr=w(r.ensureSingle(me,"path"),Y,te,Z);if(Gr.style("vector-effect",K?"none":"non-scaling-stroke").attr("d",isNaN((st-et)*(ut-ot))||ht&&$._context.staticPlot?"M0,0Z":ye).call(s.setClipUrl,Q.layerClipId,$),!Y.uniformtext.mode&&Ee){var en=s.makePointStyleFns(oe);s.singlePointStyle(Qe,Gr,oe,en,$)}_($,Q,me,ee,De,et,st,ot,ut,pe,it,te,Z),Q.layerClipId&&s.hideOutsideRangePoint(Qe,me.select("text"),G,j,oe.xcalendar,oe.ycalendar)});var We=oe.cliponaxis===!1;s.setClipUrl(le,We?null:Q.layerClipId,$)});a.getComponentMethod("errorbars","plot")($,X,Q,te)}function _($,Q,J,ne,te,Z,G,j,Y,K,X,ee,le){var oe=Q.xaxis,fe=Q.yaxis,de=$._fullLayout,_e;function we(Se,Pe,it){var vt=r.ensureSingle(Se,"text").text(Pe).attr({class:"bartext bartext-"+_e,"text-anchor":"middle","data-notex":1}).call(s.font,it).call(n.convertToTspans,$);return vt}var Oe=ne[0].trace,be=Oe.orientation==="h",Te=N(de,ne,te,oe,fe);_e=q(Oe,te);var ke=ee.mode==="stack"||ee.mode==="relative",Ee=ne[te],Le=!ke||Ee._outmost,Fe=Ee.hasB,qe=K&&K-X>b;if(!Te||_e==="none"||(Ee.isBlank||Z===G||j===Y)&&(_e==="auto"||_e==="inside")){J.select("text").remove();return}var We=de.font,Qe=c.getBarColor(ne[te],Oe),De=c.getInsideTextFont(Oe,te,We,Qe),me=c.getOutsideTextFont(Oe,te,We),Ce=Oe.insidetextanchor||"end",et=J.datum();be?oe.type==="log"&&et.s0<=0&&(oe.range[0]0&&Tt>0,mt;qe?Fe?mt=k(ut-2*K,ht,Jt,Tt,be)||k(ut,ht-2*K,Jt,Tt,be):be?mt=k(ut-(K-X),ht,Jt,Tt,be)||k(ut,ht-2*(K-X),Jt,Tt,be):mt=k(ut,ht-(K-X),Jt,Tt,be)||k(ut-2*(K-X),ht,Jt,Tt,be):mt=k(ut,ht,Jt,Tt,be),gt&&mt?_e="inside":(_e="outside",Ht.remove(),Ht=null)}else _e="inside";if(!Ht){rt=r.ensureUniformFontSize($,_e==="outside"?me:De),Ht=we(J,Te,rt);var He=Ht.attr("transform");if(Ht.attr("transform",""),Et=s.bBox(Ht.node()),Jt=Et.width,Tt=Et.height,Ht.attr("transform",He),Jt<=0||Tt<=0){Ht.remove();return}}var Ie=Oe.textangle,je,pe;_e==="outside"?(pe=Oe.constraintext==="both"||Oe.constraintext==="outside",je=z(Z,G,j,Y,Et,{isHorizontal:be,constrained:pe,angle:Ie})):(pe=Oe.constraintext==="both"||Oe.constraintext==="inside",je=F(Z,G,j,Y,Et,{isHorizontal:be,constrained:pe,angle:Ie,anchor:Ce,hasB:Fe,r:K,overhead:X})),je.fontSize=rt.size,l(Oe.type==="histogram"?"bar":Oe.type,je,de),Ee.transform=je;var ye=w(Ht,de,ee,le);r.setTransormAndDisplay(ye,je)}function k($,Q,J,ne,te){if($<0||Q<0)return!1;var Z=J<=$&&ne<=Q,G=J<=Q&&ne<=$,j=te?$>=J*(Q/ne):Q>=ne*($/J);return Z||G||j}function E($){return $==="auto"?0:$}function I($,Q){var J=Math.PI/180*Q,ne=Math.abs(Math.sin(J)),te=Math.abs(Math.cos(J));return{x:$.width*te+$.height*ne,y:$.width*ne+$.height*te}}function F($,Q,J,ne,te,Z){var G=!!Z.isHorizontal,j=!!Z.constrained,Y=Z.angle||0,K=Z.anchor,X=K==="end",ee=K==="start",le=Z.leftToRight||0,oe=(le+1)/2,fe=1-oe,de=Z.hasB,_e=Z.r,we=Z.overhead,Oe=te.width,be=te.height,Te=Math.abs(Q-$),ke=Math.abs(ne-J),Ee=Te>2*b&&ke>2*b?b:0;Te-=2*Ee,ke-=2*Ee;var Le=E(Y);Y==="auto"&&!(Oe<=Te&&be<=ke)&&(Oe>Te||be>ke)&&(!(Oe>ke||be>Te)||Oeb){var Qe=D($,Q,J,ne,Fe,_e,we,G,de);qe=Qe.scale,We=Qe.pad}else qe=1,j&&(qe=Math.min(1,Te/Fe.x,ke/Fe.y)),We=0;var De=te.left*fe+te.right*oe,me=(te.top+te.bottom)/2,Ce=($+b)*fe+(Q-b)*oe,et=(J+ne)/2,st=0,ot=0;if(ee||X){var ut=(G?Fe.x:Fe.y)/2;_e&&(X||de)&&(Ee+=We);var ht=G?A($,Q):A(J,ne);G?ee?(Ce=$+ht*Ee,st=-ht*ut):(Ce=Q-ht*Ee,st=ht*ut):ee?(et=J+ht*Ee,ot=-ht*ut):(et=ne-ht*Ee,ot=ht*ut)}return{textX:De,textY:me,targetX:Ce,targetY:et,anchorX:st,anchorY:ot,scale:qe,rotate:Le}}function D($,Q,J,ne,te,Z,G,j,Y){var K=Math.max(0,Math.abs(Q-$)-2*b),X=Math.max(0,Math.abs(ne-J)-2*b),ee=Z-b,le=G?ee-Math.sqrt(ee*ee-(ee-G)*(ee-G)):ee,oe=Y?ee*2:j?ee-G:2*le,fe=Y?ee*2:j?2*le:ee-G,de,_e,we,Oe,be;return te.y/te.x>=X/(K-oe)?Oe=X/te.y:te.y/te.x<=(X-fe)/K?Oe=K/te.x:!Y&&j?(de=te.x*te.x+te.y*te.y/4,_e=-2*te.x*(K-ee)-te.y*(X/2-ee),we=(K-ee)*(K-ee)+(X/2-ee)*(X/2-ee)-ee*ee,Oe=(-_e+Math.sqrt(_e*_e-4*de*we))/(2*de)):Y?(de=(te.x*te.x+te.y*te.y)/4,_e=-te.x*(K/2-ee)-te.y*(X/2-ee),we=(K/2-ee)*(K/2-ee)+(X/2-ee)*(X/2-ee)-ee*ee,Oe=(-_e+Math.sqrt(_e*_e-4*de*we))/(2*de)):(de=te.x*te.x/4+te.y*te.y,_e=-te.x*(K/2-ee)-2*te.y*(X-ee),we=(K/2-ee)*(K/2-ee)+(X-ee)*(X-ee)-ee*ee,Oe=(-_e+Math.sqrt(_e*_e-4*de*we))/(2*de)),Oe=Math.min(1,Oe),j?be=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(X-te.y*Oe)/2)*(ee-(X-te.y*Oe)/2)))-G):be=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(K-te.x*Oe)/2)*(ee-(K-te.x*Oe)/2)))-G),{scale:Oe,pad:be}}function z($,Q,J,ne,te,Z){var G=!!Z.isHorizontal,j=!!Z.constrained,Y=Z.angle||0,K=te.width,X=te.height,ee=Math.abs(Q-$),le=Math.abs(ne-J),oe;G?oe=le>2*b?b:0:oe=ee>2*b?b:0;var fe=1;j&&(fe=G?Math.min(1,le/X):Math.min(1,ee/K));var de=E(Y),_e=I(te,de),we=(G?_e.x:_e.y)/2,Oe=(te.left+te.right)/2,be=(te.top+te.bottom)/2,Te=($+Q)/2,ke=(J+ne)/2,Ee=0,Le=0,Fe=G?A(Q,$):A(J,ne);return G?(Te=Q-Fe*oe,Ee=Fe*we):(ke=ne+Fe*oe,Le=-Fe*we),{textX:Oe,textY:be,targetX:Te,targetY:ke,anchorX:Ee,anchorY:Le,scale:fe,rotate:de}}function N($,Q,J,ne,te){var Z=Q[0].trace,G=Z.texttemplate,j;return G?j=P($,Q,J,ne,te):Z.textinfo?j=B(Q,J,ne,te):j=h.getValue(Z.text,J),h.coerceString(p,j)}function q($,Q){var J=h.getValue($.textposition,Q);return h.coerceEnumerated(m,J)}function P($,Q,J,ne,te){var Z=Q[0].trace,G=r.castOption(Z,J,"texttemplate");if(!G)return"";var j=Z.type==="histogram",Y=Z.type==="waterfall",K=Z.type==="funnel",X=Z.orientation==="h",ee,le,oe,fe;X?(ee="y",le=te,oe="x",fe=ne):(ee="x",le=ne,oe="y",fe=te);function de(Ee){return f(le,le.c2l(Ee),!0).text}function _e(Ee){return f(fe,fe.c2l(Ee),!0).text}var we=Q[J],Oe={};Oe.label=we.p,Oe.labelLabel=Oe[ee+"Label"]=de(we.p);var be=r.castOption(Z,we.i,"text");(be===0||be)&&(Oe.text=be),Oe.value=we.s,Oe.valueLabel=Oe[oe+"Label"]=_e(we.s);var Te={};y(Te,Z,we.i),(j||Te.x===void 0)&&(Te.x=X?Oe.value:Oe.label),(j||Te.y===void 0)&&(Te.y=X?Oe.label:Oe.value),(j||Te.xLabel===void 0)&&(Te.xLabel=X?Oe.valueLabel:Oe.labelLabel),(j||Te.yLabel===void 0)&&(Te.yLabel=X?Oe.labelLabel:Oe.valueLabel),Y&&(Oe.delta=+we.rawS||we.s,Oe.deltaLabel=_e(Oe.delta),Oe.final=we.v,Oe.finalLabel=_e(Oe.final),Oe.initial=Oe.final-Oe.delta,Oe.initialLabel=_e(Oe.initial)),K&&(Oe.value=we.s,Oe.valueLabel=_e(Oe.value),Oe.percentInitial=we.begR,Oe.percentInitialLabel=r.formatPercent(we.begR),Oe.percentPrevious=we.difR,Oe.percentPreviousLabel=r.formatPercent(we.difR),Oe.percentTotal=we.sumR,Oe.percenTotalLabel=r.formatPercent(we.sumR));var ke=r.castOption(Z,we.i,"customdata");return ke&&(Oe.customdata=ke),r.texttemplateString(G,Oe,$._d3locale,Te,Oe,Z._meta||{})}function B($,Q,J,ne){var te=$[0].trace,Z=te.orientation==="h",G=te.type==="waterfall",j=te.type==="funnel";function Y(ke){var Ee=Z?ne:J;return f(Ee,ke,!0).text}function K(ke){var Ee=Z?J:ne;return f(Ee,+ke,!0).text}var X=te.textinfo,ee=$[Q],le=X.split("+"),oe=[],fe,de=function(ke){return le.indexOf(ke)!==-1};if(de("label")&&oe.push(Y($[Q].p)),de("text")&&(fe=r.castOption(te,ee.i,"text"),(fe===0||fe)&&oe.push(fe)),G){var _e=+ee.rawS||ee.s,we=ee.v,Oe=we-_e;de("initial")&&oe.push(K(Oe)),de("delta")&&oe.push(K(_e)),de("final")&&oe.push(K(we))}if(j){de("value")&&oe.push(K(ee.s));var be=0;de("percent initial")&&be++,de("percent previous")&&be++,de("percent total")&&be++;var Te=be>1;de("percent initial")&&(fe=r.formatPercent(ee.begR),Te&&(fe+=" of initial"),oe.push(fe)),de("percent previous")&&(fe=r.formatPercent(ee.difR),Te&&(fe+=" of previous"),oe.push(fe)),de("percent total")&&(fe=r.formatPercent(ee.sumR),Te&&(fe+=" of total"),oe.push(fe))}return oe.join("
")}return wP={plot:x,toMoveInsideBar:F},wP}var TP,die;function q2(){if(die)return TP;die=1;var e=yl(),t=ga(),r=va(),n=rr().fillText,o=S$().getLineWidth,s=Ia().hoverLabelText,a=Pi().BADNUM;function f(u,c,h,d,v){var p=i(u,c,h,d,v);if(p){var m=p.cd,y=m[0].trace,b=m[p.index];return p.color=l(y,b),t.getComponentMethod("errorbars","hoverInfo")(b,y,p),[p]}}function i(u,c,h,d,v){var p=u.cd,m=p[0].trace,y=p[0].t,b=d==="closest",g=m.type==="waterfall",T=u.maxHoverDistance,S=u.maxSpikeDistance,A,M,w,C,x,_,k;m.orientation==="h"?(A=h,M=c,w="y",C="x",x=ne,_=$):(A=c,M=h,w="x",C="y",_=ne,x=$);var E=m[w+"period"],I=b||E;function F(fe){return z(fe,-1)}function D(fe){return z(fe,1)}function z(fe,de){var _e=fe.w;return fe[w]+de*_e/2}function N(fe){return fe[w+"End"]-fe[w+"Start"]}var q=b?F:E?function(fe){return fe.p-N(fe)/2}:function(fe){return Math.min(F(fe),fe.p-y.bardelta/2)},P=b?D:E?function(fe){return fe.p+N(fe)/2}:function(fe){return Math.max(D(fe),fe.p+y.bardelta/2)};function B(fe,de,_e){return v.finiteRange&&(_e=0),e.inbox(fe-A,de-A,_e+Math.min(1,Math.abs(de-fe)/k)-1)}function $(fe){return B(q(fe),P(fe),T)}function Q(fe){return B(F(fe),D(fe),S)}function J(fe){var de=fe[C];if(g){var _e=Math.abs(fe.rawS)||0;M>0?de+=_e:M<0&&(de-=_e)}return de}function ne(fe){var de=M,_e=fe.b,we=J(fe);return e.inbox(_e-de,we-de,T+(we-de)/(we-_e)-1)}function te(fe){var de=M,_e=fe.b,we=J(fe);return e.inbox(_e-de,we-de,S+(we-de)/(we-_e)-1)}var Z=u[w+"a"],G=u[C+"a"];k=Math.abs(Z.r2c(Z.range[1])-Z.r2c(Z.range[0]));function j(fe){return(x(fe)+_(fe))/2}var Y=e.getDistanceFunction(d,x,_,j);if(e.getClosest(p,Y,u),u.index!==!1&&p[u.index].p!==a){I||(q=function(fe){return Math.min(F(fe),fe.p-y.bargroupwidth/2)},P=function(fe){return Math.max(D(fe),fe.p+y.bargroupwidth/2)});var K=u.index,X=p[K],ee=m.base?X.b+X.s:X.s;u[C+"0"]=u[C+"1"]=G.c2p(X[C],!0),u[C+"LabelVal"]=ee;var le=y.extents[y.extents.round(X.p)];u[w+"0"]=Z.c2p(b?q(X):le[0],!0),u[w+"1"]=Z.c2p(b?P(X):le[1],!0);var oe=X.orig_p!==void 0;return u[w+"LabelVal"]=oe?X.orig_p:X.p,u.labelLabel=s(Z,u[w+"LabelVal"],m[w+"hoverformat"]),u.valueLabel=s(G,u[C+"LabelVal"],m[C+"hoverformat"]),u.baseLabel=s(G,X.b,m[C+"hoverformat"]),u.spikeDistance=(te(X)+Q(X))/2,u[w+"Spike"]=Z.c2p(X.p,!0),n(X,m,u),u.hovertemplate=m.hovertemplate,u}}function l(u,c){var h=c.mcc||u.marker.color,d=c.mlcc||u.marker.line.color,v=o(u,c);if(r.opacity(h))return h;if(r.opacity(d)&&v)return d}return TP={hoverPoints:f,hoverOnBars:i,getTraceColor:l},TP}var AP,vie;function SNe(){return vie||(vie=1,AP=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}),AP}var SP,pie;function j2(){if(pie)return SP;pie=1,SP=function(r,n){var o=r.cd,s=r.xaxis,a=r.yaxis,f=o[0].trace,i=f.type==="funnel",l=f.orientation==="h",u=[],c;if(n===!1)for(c=0;c0?(E="v",w>0?I=Math.min(x,C):I=Math.min(C)):w>0?(E="h",I=Math.min(x)):I=0;if(!I){h.visible=!1;return}h._length=I;var q=d("orientation",E);h._hasPreCompStats?q==="v"&&w===0?(d("x0",0),d("dx",1)):q==="h"&&M===0&&(d("y0",0),d("dy",1)):q==="v"&&w===0?d("x0"):q==="h"&&M===0&&d("y0");var P=t.getComponentMethod("calendars","handleTraceDefaults");P(c,h,["x","y"],v)}function l(c,h,d,v){var p=v.prefix,m=e.coerce2(c,h,a,"marker.outliercolor"),y=d("marker.line.outliercolor"),b="outliers";h._hasPreCompStats?b="all":(m||y)&&(b="suspectedoutliers");var g=d(p+"points",b);g?(d("jitter",g==="all"?.3:0),d("pointpos",g==="all"?-1.5:0),d("marker.symbol"),d("marker.opacity"),d("marker.size"),d("marker.angle"),d("marker.color",h.line.color),d("marker.line.color"),d("marker.line.width"),g==="suspectedoutliers"&&(d("marker.line.outliercolor",h.marker.color),d("marker.line.outlierwidth")),d("selected.marker.color"),d("unselected.marker.color"),d("selected.marker.size"),d("unselected.marker.size"),d("text"),d("hovertext")):delete h.marker;var T=d("hoveron");(T==="all"||T.indexOf("points")!==-1)&&d("hovertemplate"),e.coerceSelectionMarkerOpacity(h,d)}function u(c,h){var d,v;function p(b){return e.coerce(v._input,v,a,b)}for(var m=0;mJ.uf};if(S._hasPreCompStats){var K=S[I],X=function(ht){return E.d2c((S[ht]||[])[_])},ee=1/0,le=-1/0;for(_=0;_=J.q1&&J.q3>=J.med){var fe=X("lowerfence");J.lf=fe!==o&&fe<=J.q1?fe:v(J,te,Z);var de=X("upperfence");J.uf=de!==o&&de>=J.q3?de:p(J,te,Z);var _e=X("mean");J.mean=_e!==o?_e:Z?n.mean(te,Z):(J.q1+J.q3)/2;var we=X("sd");J.sd=_e!==o&&we>=0?we:Z?n.stdev(te,Z,J.mean):J.q3-J.q1,J.lo=m(J),J.uo=y(J);var Oe=X("notchspan");Oe=Oe!==o&&Oe>0?Oe:b(J,Z),J.ln=J.med-Oe,J.un=J.med+Oe;var be=J.lf,Te=J.uf;S.boxpoints&&te.length&&(be=Math.min(be,te[0]),Te=Math.max(Te,te[Z-1])),S.notched&&(be=Math.min(be,J.ln),Te=Math.max(Te,J.un)),J.min=be,J.max=Te}else{n.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+J.q1,"median = "+J.med,"q3 = "+J.q3].join(` +`));var ke;J.med!==o?ke=J.med:J.q1!==o?J.q3!==o?ke=(J.q1+J.q3)/2:ke=J.q1:J.q3!==o?ke=J.q3:ke=0,J.med=ke,J.q1=J.q3=ke,J.lf=J.uf=ke,J.mean=J.sd=ke,J.ln=J.un=ke,J.min=J.max=ke}ee=Math.min(ee,J.min),le=Math.max(le,J.max),J.pts2=ne.filter(Y),C.push(J)}}S._extremes[E._id]=t.findExtremes(E,[ee,le],{padded:!0})}else{var Ee=E.makeCalcdata(S,I),Le=f($,Q),Fe=$.length,qe=i(Fe);for(_=0;_=0&&We0){if(J={},J.pos=J[D]=$[_],ne=J.pts=qe[_].sort(h),te=J[I]=ne.map(d),Z=te.length,J.min=te[0],J.max=te[Z-1],J.mean=n.mean(te,Z),J.sd=n.stdev(te,Z,J.mean)*S.sdmultiple,J.med=n.interp(te,.5),Z%2&&(Ce||et)){var st,ot;Ce?(st=te.slice(0,Z/2),ot=te.slice(Z/2+1)):et&&(st=te.slice(0,Z/2+1),ot=te.slice(Z/2)),J.q1=n.interp(st,.5),J.q3=n.interp(ot,.5)}else J.q1=n.interp(te,.25),J.q3=n.interp(te,.75);J.lf=v(J,te,Z),J.uf=p(J,te,Z),J.lo=m(J),J.uo=y(J);var ut=b(J,Z);J.ln=J.med-ut,J.un=J.med+ut,Qe=Math.min(Qe,J.ln),De=Math.max(De,J.un),J.pts2=ne.filter(Y),C.push(J)}S.notched&&n.isTypedArray(Ee)&&(Ee=Array.from(Ee)),S._extremes[E._id]=t.findExtremes(E,S.notched?Ee.concat([Qe,De]):Ee,{padded:!0})}return c(C,S),C.length>0?(C[0].t={num:A[x],dPos:Q,posLetter:D,valLetter:I,labels:{med:s(T,"median:"),min:s(T,"min:"),q1:s(T,"q1:"),q3:s(T,"q3:"),max:s(T,"max:"),mean:S.boxmean==="sd"||S.sizemode==="sd"?s(T,"mean ± σ:").replace("σ",S.sdmultiple===1?"σ":S.sdmultiple+"σ"):s(T,"mean:"),lf:s(T,"lower fence:"),uf:s(T,"upper fence:")}},A[x]++,C):[{t:{empty:!0}}]};function a(g,T,S,A){var M=T in g,w=T+"0"in g,C="d"+T in g;if(M||w&&C){var x=S.makeCalcdata(g,T),_=r(g,S,T,x).vals;return[_,x]}var k;w?k=g[T+"0"]:"name"in g&&(S.type==="category"||e(g.name)&&["linear","log"].indexOf(S.type)!==-1||n.isDateTime(g.name)&&S.type==="date")?k=g.name:k=A;for(var E=S.type==="multicategory"?S.r2c_just_indices(k):S.d2c(k,0,g[T+"calendar"]),I=g._length,F=new Array(I),D=0;D1,w=1-c[a+"gap"],C=1-c[a+"groupgap"];for(v=0;v0;if(E==="positive"?(J=I*(k?1:.5),Z=te,ne=Z=D):E==="negative"?(J=Z=D,ne=I*(k?1:.5),G=te):(J=ne=I,Z=G=te),le){var oe=x.pointpos,fe=x.jitter,de=x.marker.size/2,_e=0;oe+fe>=0&&(_e=te*(oe+fe),_e>J?(ee=!0,K=de,j=_e):_e>Z&&(K=de,j=J)),_e<=J&&(j=J);var we=0;oe-fe<=0&&(we=-te*(oe-fe),we>ne?(ee=!0,X=de,Y=we):we>G&&(X=de,Y=ne)),we<=ne&&(Y=ne)}else j=J,Y=ne;var Oe=new Array(m.length);for(p=0;pS.lo&&(q.so=!0)}return M});T.enter().append("path").classed("point",!0),T.exit().remove(),T.call(r.translatePoints,d,v)}function i(l,u,c,h){var d=u.val,v=u.pos,p=!!v.rangebreaks,m=h.bPos,y=h.bPosPxOffset||0,b=c.boxmean||(c.meanline||{}).visible,g,T;Array.isArray(h.bdPos)?(g=h.bdPos[0],T=h.bdPos[1]):(g=h.bdPos,T=h.bdPos);var S=l.selectAll("path.mean").data(c.type==="box"&&c.boxmean||c.type==="violin"&&c.box.visible&&c.meanline.visible?t.identity:[]);S.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),S.exit().remove(),S.each(function(A){var M=v.c2l(A.pos+m,!0),w=v.l2p(M-g)+y,C=v.l2p(M+T)+y,x=p?(w+C)/2:v.l2p(M)+y,_=d.c2p(A.mean,!0),k=d.c2p(A.mean-A.sd,!0),E=d.c2p(A.mean+A.sd,!0);c.orientation==="h"?e.select(this).attr("d","M"+_+","+w+"V"+C+(b==="sd"?"m0,0L"+k+","+x+"L"+_+","+w+"L"+E+","+x+"Z":"")):e.select(this).attr("d","M"+w+","+_+"H"+C+(b==="sd"?"m0,0L"+x+","+k+"L"+w+","+_+"L"+x+","+E+"Z":""))})}return IP={plot:s,plotBoxAndWhiskers:a,plotPoints:f,plotBoxMean:i},IP}var OP,Sie;function tV(){if(Sie)return OP;Sie=1;var e=ya(),t=va(),r=Ba();function n(s,a,f){var i=f||e.select(s).selectAll("g.trace.boxes");i.style("opacity",function(l){return l[0].trace.opacity}),i.each(function(l){var u=e.select(this),c=l[0].trace,h=c.line.width;function d(m,y,b,g){m.style("stroke-width",y+"px").call(t.stroke,b).call(t.fill,g)}var v=u.selectAll("path.box");if(c.type==="candlestick")v.each(function(m){if(!m.empty){var y=e.select(this),b=c[m.dir];d(y,b.line.width,b.line.color,b.fillcolor),y.style("opacity",c.selectedpoints&&!m.selected?.3:1)}});else{d(v,h,c.line.color,c.fillcolor),u.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(t.stroke,c.line.color);var p=u.selectAll("path.point");r.pointStyle(p,c,s)}})}function o(s,a,f){var i=a[0].trace,l=f.selectAll("path.point");i.selectedpoints?r.selectedPointStyle(l,i):r.pointStyle(l,i,s)}return OP={style:n,styleOnSelect:o},OP}var zP,Mie;function iSe(){if(Mie)return zP;Mie=1;var e=Ia(),t=rr(),r=yl(),n=va(),o=t.fillText;function s(i,l,u,c){var h=i.cd,d=h[0].trace,v=d.hoveron,p=[],m;return v.indexOf("boxes")!==-1&&(p=p.concat(a(i,l,u,c))),v.indexOf("points")!==-1&&(m=f(i,l,u)),c==="closest"?m?[m]:p:(m&&p.push(m),p)}function a(i,l,u,c){var h=i.cd,d=i.xa,v=i.ya,p=h[0].trace,m=h[0].t,y=p.type==="violin",b,g,T,S,A,M,w,C,x,_,k,E=m.bdPos,I,F,D=m.wHover,z=function(we){return T.c2l(we.pos)+m.bPos-T.c2l(M)};y&&p.side!=="both"?(p.side==="positive"&&(x=function(we){var Oe=z(we);return r.inbox(Oe,Oe+D,_)},I=E,F=0),p.side==="negative"&&(x=function(we){var Oe=z(we);return r.inbox(Oe-D,Oe,_)},I=0,F=E)):(x=function(we){var Oe=z(we);return r.inbox(Oe-D,Oe+D,_)},I=F=E);var N;y?N=function(we){return r.inbox(we.span[0]-A,we.span[1]-A,_)}:N=function(we){return r.inbox(we.min-A,we.max-A,_)},p.orientation==="h"?(A=l,M=u,w=N,C=x,b="y",T=v,g="x",S=d):(A=u,M=l,w=x,C=N,b="x",T=d,g="y",S=v);var q=Math.min(1,E/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));_=i.maxHoverDistance-q,k=i.maxSpikeDistance-q;function P(we){return(w(we)+C(we))/2}var B=r.getDistanceFunction(c,w,C,P);if(r.getClosest(h,B,i),i.index===!1)return[];var $=h[i.index],Q=p.line.color,J=(p.marker||{}).color;n.opacity(Q)&&p.line.width?i.color=Q:n.opacity(J)&&p.boxpoints?i.color=J:i.color=p.fillcolor,i[b+"0"]=T.c2p($.pos+m.bPos-F,!0),i[b+"1"]=T.c2p($.pos+m.bPos+I,!0),i[b+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var ne=b+"Spike";i.spikeDistance=P($)*k/_,i[ne]=T.c2p($.pos,!0);var te=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,Z=p.boxpoints||p.points,G=Z&&te?["max","uf","q3","med","mean","q1","lf","min"]:Z&&!te?["max","uf","q3","med","q1","lf","min"]:!Z&&te?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],j=S.range[1]0&&(f=!0);for(var c=0;cs){var a=s-n[t];return n[t]=s,a}}else return n[t]=s,s;return 0},max:function(t,r,n,o){var s=o[r];if(e(s))if(s=Number(s),e(n[t])){if(n[t]w&&wn){var _=C===t?1:6,k=C===t?"M12":"M1";return function(E,I){var F=m.c2d(E,t,y),D=F.indexOf("-",_);D>0&&(F=F.substr(0,D));var z=m.d2c(F,0,y);if(za?h>n?h>t*1.1?t:h>r*1.1?r:n:h>o?o:h>s?s:a:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function u(h,d,v,p,m,y){if(p&&h>n){var b=c(d,m,y),g=c(v,m,y),T=h===t?0:1;return b[T]!==g[T]}return Math.floor(v/h)-Math.floor(d/h)>.1}function c(h,d,v){var p=d.c2d(h,t,v).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}return XP}var ZP,qie;function hSe(){if(qie)return ZP;qie=1;var e=Ua(),t=rr(),r=ga(),n=Ia(),o=$S(),s=lSe(),a=uSe(),f=fSe(),i=cSe();function l(v,p){var m=[],y=[],b=p.orientation==="h",g=n.getFromId(v,b?p.yaxis:p.xaxis),T=b?"y":"x",S={x:"y",y:"x"}[T],A=p[T+"calendar"],M=p.cumulative,w,C=u(v,p,g,T),x=C[0],_=C[1],k=typeof x.size=="string",E=[],I=k?E:x,F=[],D=[],z=[],N=0,q=p.histnorm,P=p.histfunc,B=q.indexOf("density")!==-1,$,Q,J;M.enabled&&B&&(q=q.replace(/ ?density$/,""),B=!1);var ne=P==="max"||P==="min",te=ne?null:0,Z=s.count,G=a[q],j=!1,Y=function(Fe){return g.r2c(Fe,0,A)},K;for(t.isArrayOrTypedArray(p[S])&&P!=="count"&&(K=p[S],j=P==="avg",Z=s[P]),w=Y(x.start),Q=Y(x.end)+(w-n.tickIncrement(w,x.size,!1,A))/1e6;w=0&&J=ke;w--)if(y[w]){Ee=w;break}for(w=ke;w<=Ee;w++)if(e(m[w])&&e(y[w])){var Le={p:m[w],s:y[w],b:0};M.enabled||(Le.pts=z[w],oe?Le.ph0=Le.ph1=z[w].length?_[z[w][0]]:m[w]:(p._computePh=!0,Le.ph0=Oe(E[w]),Le.ph1=Oe(E[w+1],!0))),Te.push(Le)}return Te.length===1&&(Te[0].width1=n.tickIncrement(Te[0].p,x.size,!1,A)-Te[0].p),o(Te,p),t.isArrayOrTypedArray(p.selectedpoints)&&t.tagSelected(Te,p,_e),Te}function u(v,p,m,y,b){var g=y+"bins",T=v._fullLayout,S=p["_"+y+"bingroup"],A=T._histogramBinOpts[S],M=T.barmode==="overlay",w,C,x,_,k,E,I,F=function(we){return m.r2c(we,0,_)},D=function(we){return m.c2r(we,0,_)},z=m.type==="date"?function(we){return we||we===0?t.cleanDate(we,null,_):null}:function(we){return e(we)?Number(we):null};function N(we,Oe,be){Oe[we+"Found"]?(Oe[we]=z(Oe[we]),Oe[we]===null&&(Oe[we]=be[we])):(E[we]=Oe[we]=be[we],t.nestedProperty(C[0],g+"."+we).set(be[we]))}if(p["_"+y+"autoBinFinished"])delete p["_"+y+"autoBinFinished"];else{C=A.traces;var q=[],P=!0,B=!1,$=!1;for(w=0;w"u"){if(b)return[J,k,!0];J=c(v,p,m,y,g)}I=x.cumulative||{},I.enabled&&I.currentbin!=="include"&&(I.direction==="decreasing"?J.start=D(n.tickIncrement(F(J.start),J.size,!0,_)):J.end=D(n.tickIncrement(F(J.end),J.size,!1,_))),A.size=J.size,A.sizeFound||(E.size=J.size,t.nestedProperty(C[0],g+".size").set(J.size)),N("start",A,J),N("end",A,J)}k=p["_"+y+"pos0"],delete p["_"+y+"pos0"];var te=p._input[g]||{},Z=t.extendFlat({},A),G=A.start,j=m.r2l(te.start),Y=j!==void 0;if((A.startFound||Y)&&j!==m.r2l(G)){var K=Y?j:t.aggNums(Math.min,null,k),X={type:m.type==="category"||m.type==="multicategory"?"linear":m.type,r2l:m.r2l,dtick:A.size,tick0:G,calendar:_,range:[K,n.tickIncrement(K,A.size,!1,_)].map(m.l2r)},ee=n.tickFirst(X);ee>m.r2l(K)&&(ee=n.tickIncrement(ee,A.size,!0,_)),Z.start=m.l2r(ee),Y||t.nestedProperty(p,g+".start").set(Z.start)}var le=A.end,oe=m.r2l(te.end),fe=oe!==void 0;if((A.endFound||fe)&&oe!==m.r2l(le)){var de=fe?oe:t.aggNums(Math.max,null,k);Z.end=m.l2r(de),fe||t.nestedProperty(p,g+".start").set(Z.end)}var _e="autobin"+y;return p._input[_e]===!1&&(p._input[g]=t.extendFlat({},p[g]||{}),delete p._input[_e],delete p[_e]),[Z,k]}function c(v,p,m,y,b){var g=v._fullLayout,T=h(v,p),S=!1,A=1/0,M=[p],w,C,x;for(w=0;w=0;y--)S(y);else if(p==="increasing"){for(y=1;y=0;y--)v[y]+=v[y+1];m==="exclude"&&(v.push(0),v.shift())}}return ZP={calc:l,calcAllAutoBins:u},ZP}var KP,jie;function PNe(){if(jie)return KP;jie=1;var e=rr(),t=Ia(),r=lSe(),n=uSe(),o=fSe(),s=cSe(),a=hSe().calcAllAutoBins;KP=function(c,h){var d=t.getFromId(c,h.xaxis),v=t.getFromId(c,h.yaxis),p=h.xcalendar,m=h.ycalendar,y=function(rt){return d.r2c(rt,0,p)},b=function(rt){return v.r2c(rt,0,m)},g=function(rt){return d.c2r(rt,0,p)},T=function(rt){return v.c2r(rt,0,m)},S,A,M,w,C=a(c,h,d,"x"),x=C[0],_=C[1],k=a(c,h,v,"y"),E=k[0],I=k[1],F=h._length;_.length>F&&_.splice(F,_.length-F),I.length>F&&I.splice(F,I.length-F);var D=[],z=[],N=[],q=typeof x.size=="string",P=typeof E.size=="string",B=[],$=[],Q=q?B:x,J=P?$:E,ne=0,te=[],Z=[],G=h.histnorm,j=h.histfunc,Y=G.indexOf("density")!==-1,K=j==="max"||j==="min",X=K?null:0,ee=r.count,le=n[G],oe=!1,fe=[],de=[],_e="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";_e&&j!=="count"&&(oe=j==="avg",ee=r[j]);var we=x.size,Oe=y(x.start),be=y(x.end)+(Oe-t.tickIncrement(Oe,we,!1,p))/1e6;for(S=Oe;S=0&&M=0&&wt;l++)i=o(a,f,n(i));return i>t&&e.log("interp2d didn't converge quickly",i),a};function o(s,a,f){var i=0,l,u,c,h,d,v,p,m,y,b,g,T,S;for(h=0;hT&&(i=Math.max(i,Math.abs(s[u][c]-g)/(S-T))))}return i}return eD}var tD,Vie;function P$(){if(Vie)return tD;Vie=1;var e=rr().maxRowLength;return tD=function(r){var n=[],o={},s=[],a=r[0],f=[],i=[0,0,0],l=e(r),u,c,h,d,v,p,m,y;for(c=0;c=0;v--)d=s[v],c=d[0],h=d[1],p=((o[[c-1,h]]||i)[2]+(o[[c+1,h]]||i)[2]+(o[[c,h-1]]||i)[2]+(o[[c,h+1]]||i)[2])/20,p&&(m[d]=[c,h,p],s.splice(v,1),y=!0);if(!y)throw"findEmpties iterated with no new neighbors";for(d in m)o[d]=m[d],n.push(m[d])}return n.sort(function(b,g){return g[2]-b[2]})},tD}var rD,Yie;function dSe(){if(Yie)return rD;Yie=1;var e=ga(),t=rr().isArrayOrTypedArray;return rD=function(n,o,s,a,f,i){var l=[],u=e.traceIs(n,"contour"),c=e.traceIs(n,"histogram"),h=e.traceIs(n,"gl2d"),d,v,p,m=t(o)&&o.length>1;if(m&&!c&&i.type!=="category"){var y=o.length;if(y<=f){if(u||h)l=Array.from(o).slice(0,f);else if(f===1)i.type==="log"?l=[.5*o[0],2*o[0]]:l=[o[0]-.5,o[0]+.5];else if(i.type==="log"){for(l=[Math.pow(o[0],1.5)/Math.pow(o[1],.5)],p=1;p1){var j=(G[G.length-1]-G[0])/(G.length-1),Y=Math.abs(j/100);for(D=0;DY)return!1}return!0}m._islinear=!1,y.type==="log"||b.type==="log"?A==="fast"&&q("log axis found"):P(M)?P(_)?m._islinear=!0:A==="fast"&&q("y scale is not linear"):A==="fast"&&q("x scale is not linear");var B=t.maxRowLength(F),$=m.xtype==="scaled"?"":M,Q=u(m,$,w,C,B,y),J=m.ytype==="scaled"?"":_,ne=u(m,J,k,E,F.length,b);S||(m._extremes[y._id]=r.findExtremes(y,Q),m._extremes[b._id]=r.findExtremes(b,ne));var te={x:Q,y:ne,z:F,text:m._text||m.text,hovertext:m._hovertext||m.hovertext};if(m.xperiodalignment&&x&&(te.orig_x=x),m.yperiodalignment&&I&&(te.orig_y=I),$&&$.length===Q.length-1&&(te.xCenter=$),J&&J.length===ne.length-1&&(te.yCenter=J),T&&(te.xRanges=z.xRanges,te.yRanges=z.yRanges,te.pts=z.pts),g||s(p,m,{vals:F,cLetter:"z"}),g&&m.contours&&m.contours.coloring==="heatmap"){var Z={type:m.type==="contour"?"heatmap":"histogram2d",xcalendar:m.xcalendar,ycalendar:m.ycalendar};te.xfill=u(Z,$,w,C,B,y),te.yfill=u(Z,J,k,E,F.length,b)}return[te]};function h(v){for(var p=[],m=v.length,y=0;y0;)Y=x.c2p(q[le]),le--;for(Y0;)ee=_.c2p(P[le]),le--;ee=x._length||Y<=0||X>=_._length||ee<=0;if(be){var Te=E.selectAll("image").data([]);Te.exit().remove(),b(E);return}var ke,Ee;de==="fast"?(ke=te,Ee=ne):(ke=we,Ee=Oe);var Le=document.createElement("canvas");Le.width=ke,Le.height=Ee;var Fe=Le.getContext("2d",{willReadFrequently:!0}),qe=u(F,{noNumericCheck:!0,returnArray:!0}),We,Qe;de==="fast"?(We=Z?function(Ln){return te-1-Ln}:s.identity,Qe=G?function(Ln){return ne-1-Ln}:s.identity):(We=function(Ln){return s.constrain(Math.round(x.c2p(q[Ln])-j),0,we)},Qe=function(Ln){return s.constrain(Math.round(_.c2p(P[Ln])-X),0,Oe)});var De=Qe(0),me=[De,De],Ce=Z?0:1,et=G?0:1,st=0,ot=0,ut=0,ht=0,Ht,Et,Jt,Tt,rt;function gt(Ln,oa){if(Ln!==void 0){var Ta=qe(Ln);return Ta[0]=Math.round(Ta[0]),Ta[1]=Math.round(Ta[1]),Ta[2]=Math.round(Ta[2]),st+=oa,ot+=Ta[0]*oa,ut+=Ta[1]*oa,ht+=Ta[2]*oa,Ta}return[0,0,0,0]}function mt(Ln,oa,Ta,ba){var Da=Ln[Ta.bin0];if(Da===void 0)return gt(void 0,1);var _i=Ln[Ta.bin1],ci=oa[Ta.bin0],Bi=oa[Ta.bin1],yo=_i-Da||0,es=ci-Da||0,Qa;return _i===void 0?Bi===void 0?Qa=0:ci===void 0?Qa=2*(Bi-Da):Qa=(2*Bi-ci-Da)*2/3:Bi===void 0?ci===void 0?Qa=0:Qa=(2*Da-_i-ci)*2/3:ci===void 0?Qa=(2*Bi-_i-Da)*2/3:Qa=Bi+Da-_i-ci,gt(Da+Ta.frac*yo+ba.frac*(es+Ta.frac*Qa))}if(de!=="default"){var He=0,Ie;try{Ie=new Uint8Array(ke*Ee*4)}catch{Ie=new Array(ke*Ee*4)}if(de==="smooth"){var je=B||q,pe=$||P,ye=new Array(je.length),Se=new Array(pe.length),Pe=new Array(we),it=B?T:g,vt=$?T:g,Pt,Bt,It;for(le=0;lelr||lr>_._length))for(oe=wt;oeNe||Ne>x._length)){var At=f({x:Ue,y:cr},F,A._fullLayout);At.x=Ue,At.y=cr;var Rt=I.z[le][oe];Rt===void 0?(At.z="",At.zLabel=""):(At.z=Rt,At.zLabel=o.tickText(hn,Rt,"hover").text);var Ct=I.text&&I.text[le]&&I.text[le][oe];(Ct===void 0||Ct===!1)&&(Ct=""),At.text=Ct;var Wt=s.texttemplateString(en,At,A._fullLayout._d3locale,At,F._meta||{});if(Wt){var Qt=Wt.split("
"),Xt=Qt.length,$t=0;for(fe=0;fe=b[0].length||k<0||k>b.length)return}else{if(e.inbox(f-m[0],f-m[m.length-1],0)>0||e.inbox(i-y[0],i-y[y.length-1],0)>0)return;if(c){var E;for(M=[2*m[0]-m[1]],E=1;E* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",r?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}}),hD}var dD,noe;function ONe(){return noe||(noe=1,dD={eventDataKeys:["binNumber"]}),dD}var vD,aoe;function F$(){if(aoe)return vD;aoe=1;var e=ug(),t=ll().axisHoverFormat,r=bi().hovertemplateAttrs,n=bi().texttemplateAttrs,o=Gs(),s=pSe(),a=ONe(),f=ja().extendFlat;return vD={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:t("x"),yhoverformat:t("y"),text:f({},e.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:f({},e.hovertext,{description:"Same as `text`."}),orientation:e.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:s("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:s("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:r({},{keys:a.eventDataKeys}),texttemplate:n({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:f({},e.textposition,{arrayOk:!1}),textfont:o({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:o({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:o({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:e.insidetextanchor,textangle:e.textangle,cliponaxis:e.cliponaxis,constraintext:e.constraintext,marker:e.marker,offsetgroup:e.offsetgroup,alignmentgroup:e.alignmentgroup,selected:e.selected,unselected:e.unselected,_deprecated:{bardir:e._deprecated.bardir}},vD}var pD,ioe;function zNe(){if(ioe)return pD;ioe=1;var e=ga(),t=rr(),r=va(),n=Ev().handleText,o=A$(),s=F$();return pD=function(f,i,l,u){function c(w,C){return t.coerce(f,i,s,w,C)}var h=c("x"),d=c("y"),v=c("cumulative.enabled");v&&(c("cumulative.direction"),c("cumulative.currentbin")),c("text");var p=c("textposition");n(f,i,u,c,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c("hovertext"),c("hovertemplate"),c("xhoverformat"),c("yhoverformat");var m=c("orientation",d&&!h?"h":"v"),y=m==="v"?"x":"y",b=m==="v"?"y":"x",g=h&&d?Math.min(t.minRowLength(h)&&t.minRowLength(d)):t.minRowLength(i[y]||[]);if(!g){i.visible=!1;return}i._length=g;var T=e.getComponentMethod("calendars","handleTraceDefaults");T(f,i,["x","y"],u);var S=i[b];S&&c("histfunc"),c("histnorm"),c("autobin"+y),o(f,i,c,l,u),t.coerceSelectionMarkerOpacity(i,c);var A=(i.marker.line||{}).color,M=e.getComponentMethod("errorbars","supplyDefaults");M(f,i,A||r.defaultLine,{axis:"y"}),M(f,i,A||r.defaultLine,{axis:"x",inherit:"y"})},pD}var gD,ooe;function N$(){if(ooe)return gD;ooe=1;var e=rr(),t=xl(),r=ga().traceIs,n=Vx(),o=Ev().validateCornerradius,s=e.nestedProperty,a=jm().getAxisGroup,f=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],i=["x","y"];return gD=function(u,c){var h=c._histogramBinOpts={},d=[],v={},p=[],m,y,b,g,T,S,A;function M(J,ne){return e.coerce(m._input,m,m._module.attributes,J,ne)}function w(J){return J.orientation==="v"?"x":"y"}function C(J,ne){var te=t.getFromTrace({_fullLayout:c},J,ne);return te.type}function x(J,ne,te){var Z=J.uid+"__"+te;ne||(ne=Z);var G=C(J,te),j=J[te+"calendar"]||"",Y=h[ne],K=!0;Y&&(G===Y.axType&&j===Y.calendar?(K=!1,Y.traces.push(J),Y.dirs.push(te)):(ne=Z,G!==Y.axType&&e.warn(["Attempted to group the bins of trace",J.index,"set on a","type:"+G,"axis","with bins on","type:"+Y.axType,"axis."].join(" ")),j!==Y.calendar&&e.warn(["Attempted to group the bins of trace",J.index,"set with a",j,"calendar","with bins",Y.calendar?"on a "+Y.calendar+" calendar":"w/o a set calendar"].join(" ")))),K&&(h[ne]={traces:[J],dirs:[te],axType:G,calendar:J[te+"calendar"]||""}),J["_"+te+"bingroup"]=ne}for(T=0;T=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}),ED}var kD,moe;function eM(){if(moe)return kD;moe=1;var e=Xx(),t=Yl(),r=ll(),n=r.axisHoverFormat,o=r.descriptionOnlyNumbers,s=os(),a=lc().dash,f=Gs(),i=ja().extendFlat,l=QS(),u=l.COMPARISON_OPS2,c=l.INTERVAL_OPS,h=t.line;return kD=i({z:e.z,x:e.x,x0:e.x0,dx:e.dx,y:e.y,y0:e.y0,dy:e.dy,xperiod:e.xperiod,yperiod:e.yperiod,xperiod0:t.xperiod0,yperiod0:t.yperiod0,xperiodalignment:e.xperiodalignment,yperiodalignment:e.yperiodalignment,text:e.text,hovertext:e.hovertext,transpose:e.transpose,xtype:e.xtype,ytype:e.ytype,xhoverformat:n("x"),yhoverformat:n("y"),zhoverformat:n("z",1),hovertemplate:e.hovertemplate,texttemplate:i({},e.texttemplate,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",e.texttemplate.description].join(" ")}),textfont:i({},e.textfont,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",e.textfont.description].join(" ")}),hoverongaps:e.hoverongaps,connectgaps:i({},e.connectgaps,{description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in.","It is defaulted to true if `z` is a","one dimensional array","otherwise it is defaulted to false."].join(" ")}),fillcolor:{valType:"color",editType:"calc",description:["Sets the fill color if `contours.type` is *constraint*.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0},description:["Determines whether or not the contour level attributes are","picked by an algorithm.","If *true*, the number of contour levels can be set in `ncontours`.","If *false*, set the contour level attributes in `contours`."].join(" ")},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc",description:["Sets the maximum number of contour levels. The actual number","of contours will be chosen automatically to be less than or","equal to the value of `ncontours`.","Has an effect only if `autocontour` is *true* or if","`contours.size` is missing."].join(" ")},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc",description:["If `levels`, the data is represented as a contour plot with multiple","levels displayed. If `constraint`, the data is represented as constraints","with the invalid region shaded as specified by the `operation` and","`value` parameters."].join(" ")},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the starting contour level value.","Must be less than `contours.end`"].join(" ")},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the end contour level value.","Must be more than `contours.start`"].join(" ")},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the step between each contour level.","Must be positive."].join(" ")},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *heatmap*, a heatmap gradient coloring is applied","between each contour level.","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},showlines:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not the contour lines are drawn.","Has an effect only if `contours.coloring` is set to *fill*."].join(" ")},showlabels:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether to label the contour lines with their values."].join(" ")},labelfont:f({editType:"plot",colorEditType:"style",description:["Sets the font used for labeling the contour levels.","The default color comes from the lines, if shown.","The default family and size come from `layout.font`."].join(" ")}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(u).concat(c),dflt:"=",editType:"calc",description:["Sets the constraint operation.","*=* keeps regions equal to `value`","*<* and *<=* keep regions less than `value`","*>* and *>=* keep regions greater than `value`","*[]*, *()*, *[)*, and *(]* keep regions inside `value[0]` to `value[1]`","*][*, *)(*, *](*, *)[* keep regions outside `value[0]` to value[1]`","Open vs. closed intervals make no difference to constraint display, but","all versions are allowed for consistency with filter transforms."].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values of the constraint boundary.","When `operation` is set to one of the comparison values","("+u+")","*value* is expected to be a number.","When `operation` is set to one of the interval values","("+c+")","*value* is expected to be an array of two numbers where the first","is the lower bound and the second is the upper bound."].join(" ")},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i({},h.color,{editType:"style+colorbars",description:["Sets the color of the contour level.","Has no effect if `contours.coloring` is set to *lines*."].join(" ")}),width:{valType:"number",min:0,editType:"style+colorbars",description:["Sets the contour line width in (in px)","Defaults to *0.5* when `contours.type` is *levels*.","Defaults to *2* when `contour.type` is *constraint*."].join(" ")},dash:a,smoothing:i({},h.smoothing,{description:["Sets the amount of smoothing for the contour lines,","where *0* corresponds to no smoothing."].join(" ")}),editType:"plot"}},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"})),kD}var CD,xoe;function mSe(){if(xoe)return CD;xoe=1;var e=B$(),t=eM(),r=os(),n=ll().axisHoverFormat,o=ja().extendFlat;return CD=o({x:e.x,y:e.y,z:e.z,marker:e.marker,histnorm:e.histnorm,histfunc:e.histfunc,nbinsx:e.nbinsx,xbins:e.xbins,nbinsy:e.nbinsy,ybins:e.ybins,autobinx:e.autobinx,autobiny:e.autobiny,bingroup:e.bingroup,xbingroup:e.xbingroup,ybingroup:e.ybingroup,autocontour:t.autocontour,ncontours:t.ncontours,contours:t.contours,line:{color:t.line.color,width:o({},t.line.width,{dflt:.5,description:"Sets the contour line width in (in px)"}),dash:t.line.dash,smoothing:t.line.smoothing,editType:"plot"},xhoverformat:n("x"),yhoverformat:n("y"),zhoverformat:n("z",1),hovertemplate:e.hovertemplate,texttemplate:t.texttemplate,textfont:t.textfont},r("",{cLetter:"z",editTypeOverride:"calc"})),CD}var RD,boe;function q$(){return boe||(boe=1,RD=function(t,r,n,o){var s=o("contours.start"),a=o("contours.end"),f=s===!1||a===!1,i=n("contours.size"),l;f?l=r.autocontour=!0:l=n("autocontour",!1),(l||!i)&&n("ncontours")}),RD}var LD,_oe;function xSe(){if(_oe)return LD;_oe=1;var e=rr();return LD=function(r,n,o,s){s||(s={});var a=r("contours.showlabels");if(a){var f=n.font;e.coerceFont(r,"contours.labelfont",{family:f.family,size:f.size,color:o}),r("contours.labelformat")}s.hasHover!==!1&&r("zhoverformat")},LD}var PD,woe;function j$(){if(woe)return PD;woe=1;var e=Tf(),t=xSe();return PD=function(n,o,s,a,f){var i=s("contours.coloring"),l,u="";i==="fill"&&(l=s("contours.showlines")),l!==!1&&(i!=="lines"&&(u=s("line.color","#000")),s("line.width",.5),s("line.dash")),i!=="none"&&(n.showlegend!==!0&&(o.showlegend=!1),o._dfltShowLegend=!1,e(n,o,a,s,{prefix:"",cLetter:"z"})),s("line.smoothing"),t(s,a,u,f)},PD}var DD,Toe;function GNe(){if(Toe)return DD;Toe=1;var e=rr(),t=ySe(),r=q$(),n=j$(),o=KS(),s=mSe();return DD=function(f,i,l,u){function c(d,v){return e.coerce(f,i,s,d,v)}function h(d){return e.coerce2(f,i,s,d)}t(f,i,c,u),i.visible!==!1&&(r(f,i,c,h),n(f,i,c,u),c("xhoverformat"),c("yhoverformat"),c("hovertemplate"),i.contours&&i.contours.coloring==="heatmap"&&o(c,u))},DD}var ID,Aoe;function bSe(){if(Aoe)return ID;Aoe=1;var e=Ia(),t=rr();ID=function(o,s){var a=o.contours;if(o.autocontour){var f=o.zmin,i=o.zmax;(o.zauto||f===void 0)&&(f=t.aggNums(Math.min,null,s)),(o.zauto||i===void 0)&&(i=t.aggNums(Math.max,null,s));var l=r(f,i,o.ncontours);a.size=l.dtick,a.start=e.tickFirst(l),l.range.reverse(),a.end=e.tickFirst(l),a.start===f&&(a.start+=a.size),a.end===i&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),o._input.contours||(o._input.contours={}),t.extendFlat(o._input.contours,{start:a.start,end:a.end,size:a.size}),o._input.autocontour=!0}else if(a.type!=="constraint"){var u=a.start,c=a.end,h=o._input.contours;if(u>c&&(a.start=h.start=c,c=a.end=h.end=u,u=a.start),!(a.size>0)){var d;u===c?d=1:d=r(u,c,o.ncontours).dtick,h.size=a.size=d}}};function r(n,o,s){var a={type:"linear",range:[n,o]};return e.autoTicks(a,(o-n)/(s||15)),a}return ID}var OD,Soe;function tM(){return Soe||(Soe=1,OD=function(t){return t.end+t.size/1e6}),OD}var zD,Moe;function _Se(){if(Moe)return zD;Moe=1;var e=Hs(),t=JS(),r=bSe(),n=tM();return zD=function(s,a){var f=t(s,a),i=f[0].z;r(a,i);var l=a.contours,u=e.extractOpts(a),c;if(l.coloring==="heatmap"&&u.auto&&a.autocontour===!1){var h=l.start,d=n(l),v=l.size||1,p=Math.floor((d-h)/v)+1;isFinite(v)||(v=1,p=1);var m=h-v/2,y=m+p*v;c=[m,y]}else c=i;return e.calc(s,a,{vals:c,cLetter:"z"}),f},zD}var FD={},ND,Eoe;function rM(){return Eoe||(Eoe=1,ND={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}),ND}var BD,koe;function wSe(){if(koe)return BD;koe=1;var e=rM();BD=function(n){var o=n[0].z,s=o.length,a=o[0].length,f=s===2||a===2,i,l,u,c,h,d,v,p,m;for(l=0;lr?0:1)+(n[0][1]>r?0:2)+(n[1][1]>r?0:4)+(n[1][0]>r?0:8);if(o===5||o===10){var s=(n[0][0]+n[0][1]+n[1][0]+n[1][1])/4;return r>s?o===5?713:1114:o===5?104:208}return o===15?0:o}return BD}var qD,Coe;function TSe(){if(Coe)return qD;Coe=1;var e=rr(),t=rM();qD=function(i,l,u){var c,h,d,v,p;for(l=l||.01,u=u||.01,d=0;d20?(d=t.CHOOSESADDLE[d][(v[0]||v[1])<0?0:1],f.crossings[h]=t.SADDLEREMAINDER[d]):delete f.crossings[h],v=t.NEWDELTA[d],!v){e.log("Found bad marching index:",d,i,f.level);break}p.push(a(f,i,v)),i[0]+=v[0],i[1]+=v[1],h=i.join(","),r(p[p.length-1],p[p.length-2],u,c)&&p.pop();var S=v[0]&&(i[0]<0||i[0]>y-2)||v[1]&&(i[1]<0||i[1]>m-2),A=i[0]===b[0]&&i[1]===b[1]&&v[0]===g[0]&&v[1]===g[1];if(A||l&&S)break;d=f.crossings[h]}T===1e4&&e.log("Infinite loop in contour?");var M=r(p[0],p[p.length-1],u,c),w=0,C=.2*f.smoothing,x=[],_=0,k,E,I,F,D,z,N,q,P,B,$;for(T=1;T=_;T--)if(k=x[T],k=_&&k+x[E]q&&P--,f.edgepaths[P]=$.concat(p,B));break}te||(f.edgepaths[q]=p.concat(B))}for(q=0;q20&&i?f===208||f===1114?u=l[0]===0?1:-1:c=l[1]===0?1:-1:t.BOTTOMSTART.indexOf(f)!==-1?c=1:t.LEFTSTART.indexOf(f)!==-1?u=1:t.TOPSTART.indexOf(f)!==-1?c=-1:u=-1,[u,c]}function a(f,i,l){var u=i[0]+Math.max(l[0],0),c=i[1]+Math.max(l[1],0),h=f.z[c][u],d=f.xaxis,v=f.yaxis;if(l[1]){var p=(f.level-h)/(f.z[c][u+1]-h),m=(p!==1?(1-p)*d.c2l(f.x[u]):0)+(p!==0?p*d.c2l(f.x[u+1]):0);return[d.c2p(d.l2c(m),!0),v.c2p(f.y[c],!0),u+p,c]}else{var y=(f.level-h)/(f.z[c+1][u]-h),b=(y!==1?(1-y)*v.c2l(f.y[c]):0)+(y!==0?y*v.c2l(f.y[c+1]):0);return[d.c2p(f.x[u],!0),v.c2p(v.l2c(b),!0),u,c+y]}}return qD}var jD,Roe;function VNe(){if(Roe)return jD;Roe=1;var e=QS(),t=Ua();jD={"[]":n("[]"),"][":n("]["),">":o(">"),"<":o("<"),"=":o("=")};function r(s,a){var f=Array.isArray(a),i;function l(u){return t(u)?+u:null}return e.COMPARISON_OPS2.indexOf(s)!==-1?i=l(f?a[0]:a):e.INTERVAL_OPS.indexOf(s)!==-1?i=f?[l(a[0]),l(a[1])]:[l(a),l(a)]:e.SET_OPS.indexOf(s)!==-1&&(i=f?a.map(l):[l(a)]),i}function n(s){return function(a){a=r(s,a);var f=Math.min(a[0],a[1]),i=Math.max(a[0],a[1]);return{start:f,end:i,size:i-f}}}function o(s){return function(a){return a=r(s,a),{start:a,end:1/0,size:1/0}}}return jD}var UD,Loe;function ASe(){if(Loe)return UD;Loe=1;var e=rr(),t=VNe(),r=tM();return UD=function(o,s,a){for(var f=o.type==="constraint"?t[o._operation](o.value):o,i=f.size,l=[],u=r(f),c=a.trace._carpetTrace,h=c?{xaxis:c.aaxis,yaxis:c.baxis,x:a.a,y:a.b}:{xaxis:s.xaxis,yaxis:s.yaxis,x:a.x,y:a.y},d=f.start;d1e3){e.warn("Too many contours, clipping at 1000",o);break}return l},UD}var HD,Poe;function SSe(){if(Poe)return HD;Poe=1;var e=rr();HD=function(r,n){var o,s,a,f=function(u){return u.reverse()},i=function(u){return u};switch(n){case"=":case"<":return r;case">":for(r.length!==1&&e.warn("Contour data invalid for the specified inequality operation."),s=r[0],o=0;oa.level||a.starts.length&&s===a.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var f=r.x.length,i=r.y.length,l=-1/0,u=1/0;for(o=0;o":c>l&&(r.prefixBoundary=!0);break;case"<":(cl||r.starts.length&&d===u)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),hl&&(r.prefixBoundary=!0);break}break}}),GD}var Ioe;function U$(){return Ioe||(Ioe=1,(function(e){var t=ya(),r=rr(),n=Ba(),o=Hs(),s=ns(),a=Ia(),f=ag(),i=I$(),l=wSe(),u=TSe(),c=ASe(),h=SSe(),d=MSe(),v=rM(),p=v.LABELOPTIMIZER;e.plot=function(w,C,x,_){var k=C.xaxis,E=C.yaxis;r.makeTraceGroups(_,x,"contour").each(function(I){var F=t.select(this),D=I[0],z=D.trace,N=D.x,q=D.y,P=z.contours,B=c(P,C,D),$=r.ensureSingle(F,"g","heatmapcoloring"),Q=[];P.coloring==="heatmap"&&(Q=[I]),i(w,C,Q,$),l(B),u(B);var J=k.c2p(N[0],!0),ne=k.c2p(N[N.length-1],!0),te=E.c2p(q[0],!0),Z=E.c2p(q[q.length-1],!0),G=[[J,Z],[ne,Z],[ne,te],[J,te]],j=B;P.type==="constraint"&&(j=h(B,P._operation)),m(F,G,P),y(F,j,G,P),g(F,B,w,D,P),S(F,C,w,D,G)})};function m(M,w,C){var x=r.ensureSingle(M,"g","contourbg"),_=x.selectAll("path").data(C.coloring==="fill"?[0]:[]);_.enter().append("path"),_.exit().remove(),_.attr("d","M"+w.join("L")+"Z").style("stroke","none")}function y(M,w,C,x){var _=x.coloring==="fill"||x.type==="constraint"&&x._operation!=="=",k="M"+C.join("L")+"Z";_&&d(w,x);var E=r.ensureSingle(M,"g","contourfill"),I=E.selectAll("path").data(_?w:[]);I.enter().append("path"),I.exit().remove(),I.each(function(F){var D=(F.prefixBoundary?k:"")+b(F,C);D?t.select(this).attr("d",D).style("stroke","none"):t.select(this).remove()})}function b(M,w){var C="",x=0,_=M.edgepaths.map(function(J,ne){return ne}),k=!0,E,I,F,D,z,N;function q(J){return Math.abs(J[1]-w[0][1])<.01}function P(J){return Math.abs(J[1]-w[2][1])<.01}function B(J){return Math.abs(J[0]-w[0][0])<.01}function $(J){return Math.abs(J[0]-w[2][0])<.01}for(;_.length;){for(N=n.smoothopen(M.edgepaths[x],M.smoothing),C+=k?N:N.replace(/^M/,"L"),_.splice(_.indexOf(x),1),E=M.edgepaths[x][M.edgepaths[x].length-1],D=-1,F=0;F<4;F++){if(!E){r.log("Missing end?",x,M);break}for(q(E)&&!$(E)?I=w[1]:B(E)?I=w[0]:P(E)?I=w[3]:$(E)&&(I=w[2]),z=0;z=0&&(I=Q,D=z):Math.abs(E[1]-I[1])<.01?Math.abs(E[1]-Q[1])<.01&&(Q[0]-E[0])*(I[0]-Q[0])>=0&&(I=Q,D=z):r.log("endpt to newendpt is not vert. or horz.",E,I,Q)}if(E=I,D>=0)break;C+="L"+I}if(D===M.edgepaths.length){r.log("unclosed perimeter path");break}x=D,k=_.indexOf(x)===-1,k&&(x=_[0],C+="Z")}for(x=0;xp.MAXCOST*2)break;q&&(I/=2),E=D-I/2,F=E+I*1.5}if(N<=p.MAXCOST)return z};function T(M,w,C,x){var _=w.width/2,k=w.height/2,E=M.x,I=M.y,F=M.theta,D=Math.cos(F)*_,z=Math.sin(F)*_,N=(E>x.center?x.right-E:E-x.left)/(D+Math.abs(Math.sin(F)*k)),q=(I>x.middle?x.bottom-I:I-x.top)/(Math.abs(z)+Math.cos(F)*k);if(N<1||q<1)return 1/0;var P=p.EDGECOST*(1/(N-1)+1/(q-1));P+=p.ANGLECOST*F*F;for(var B=E-D,$=I-z,Q=E+D,J=I+z,ne=0;ne=g)&&(a<=b&&(a=b),f>=g&&(f=g),l=Math.floor((f-a)/i)+1,u=0),y=0;yb&&(v.unshift(b),p.unshift(p[0])),v[v.length-1]2?c.value=c.value.slice(2):c.length===0?c.value=[0,1]:c.length<2?(h=parseFloat(c.value[0]),c.value=[h,h+1]):c.value=[parseFloat(c.value[0]),parseFloat(c.value[1])]:e(c.value)&&(h=parseFloat(c.value),c.value=[h,h+1])):(u("contours.value",0),e(c.value)||(a(c.value)?c.value=parseFloat(c.value[0]):c.value=0))}return KD}var JD,Uoe;function WNe(){if(Uoe)return JD;Uoe=1;var e=rr(),t=ZS(),r=g0(),n=CSe(),o=q$(),s=j$(),a=KS(),f=eM();return JD=function(l,u,c,h){function d(y,b){return e.coerce(l,u,f,y,b)}function v(y){return e.coerce2(l,u,f,y)}var p=t(l,u,d,h);if(!p){u.visible=!1;return}r(l,u,h,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate");var m=d("contours.type")==="constraint";d("connectgaps",e.isArray1D(u.z)),m?n(l,u,d,h,c):(o(l,u,d,v),s(l,u,d,h)),u.contours&&u.contours.coloring==="heatmap"&&a(d,h)},JD}var QD,Hoe;function XNe(){return Hoe||(Hoe=1,QD={attributes:eM(),supplyDefaults:WNe(),calc:_Se(),plot:U$().plot,style:H$(),colorbar:G$(),hoverPoints:kSe(),moduleType:"trace",name:"contour",basePlotModule:$l(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{description:["The data from which contour lines are computed is set in `z`.","Data in `z` must be a {2D array} of numbers.","Say that `z` has N rows and M columns, then by default,","these N rows correspond to N y coordinates","(set in `y` or auto-generated) and the M columns","correspond to M x coordinates (set in `x` or auto-generated).","By setting `transpose` to *true*, the above behavior is flipped."].join(" ")}}),QD}var e6,Goe;function ZNe(){return Goe||(Goe=1,e6=XNe()),e6}var t6,Voe;function RSe(){if(Voe)return t6;Voe=1;var e=bi().hovertemplateAttrs,t=bi().texttemplateAttrs,r=og(),n=Yl(),o=qo(),s=os(),a=lc().dash,f=ja().extendFlat,i=n.marker,l=n.line,u=i.line;return t6={a:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},b:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},c:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},sum:{valType:"number",dflt:0,min:0,editType:"calc",description:["The number each triplet should sum to,","if only two of `a`, `b`, and `c` are provided.","This overrides `ternary.sum` to normalize this specific","trace, but does not affect the values displayed on the axes.","0 (or missing) means to use ternary.sum"].join(" ")},mode:f({},n.mode,{dflt:"markers"}),text:f({},n.text,{description:["Sets text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:t({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:f({},n.hovertext,{description:["Sets hover text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:l.color,width:l.width,dash:a,backoff:l.backoff,shape:f({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:f({},n.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:r(),marker:f({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:i.angleref,standoff:i.standoff,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:f({width:u.width,editType:"calc"},s("marker.line")),gradient:i.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:f({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:n.hoveron,hovertemplate:e()},t6}var r6,Yoe;function KNe(){if(Yoe)return r6;Yoe=1;var e=rr(),t=ig(),r=As(),n=gp(),o=y0(),s=O2(),a=m0(),f=sg(),i=RSe();return r6=function(u,c,h,d){function v(S,A){return e.coerce(u,c,i,S,A)}var p=v("a"),m=v("b"),y=v("c"),b;if(p?(b=p.length,m?(b=Math.min(b,m.length),y&&(b=Math.min(b,y.length))):y?b=Math.min(b,y.length):b=0):m&&y&&(b=Math.min(m.length,y.length)),!b){c.visible=!1;return}c._length=b,v("sum"),v("text"),v("hovertext"),c.hoveron!=="fills"&&v("hovertemplate");var g=b"),f.hovertemplate=d.hovertemplate,a},o6}var s6,Koe;function rBe(){return Koe||(Koe=1,s6=function(t,r,n,o,s){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),o[s]){var a=o[s];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}),s6}var yv={},l6,Joe;function nBe(){if(Joe)return l6;Joe=1;var e=ya(),t=wf(),r=ga(),n=rr(),o=n.strTranslate,s=n._,a=va(),f=Ba(),i=ag(),l=ja().extendFlat,u=Ts(),c=Ia(),h=Gh(),d=yl(),v=p0(),p=v.freeMode,m=v.rectMode,y=Hx(),b=Yu().prepSelect,g=Yu().selectOnClick,T=Yu().clearOutline,S=Yu().clearSelectionsCache,A=Wu();function M(N,q){this.id=N.id,this.graphDiv=N.graphDiv,this.init(q),this.makeFramework(q),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}l6=M;var w=M.prototype;w.init=function(N){this.container=N._ternarylayer,this.defs=N._defs,this.layoutId=N._uid,this.traceHash={},this.layers={}},w.plot=function(N,q){var P=this,B=q[P.id],$=q._size;P._hasClipOnAxisFalse=!1;for(var Q=0;QC*Z?(oe=Z,le=oe*C):(le=te,oe=le/C),fe=J*le/te,de=ne*oe/Z,X=q.l+q.w*$-le/2,ee=q.t+q.h*(1-Q)-oe/2,P.x0=X,P.y0=ee,P.w=le,P.h=oe,P.sum=G,P.xaxis={type:"linear",range:[j+2*K-G,G-j-2*Y],domain:[$-fe/2,$+fe/2],_id:"x"},i(P.xaxis,P.graphDiv._fullLayout),P.xaxis.setScale(),P.xaxis.isPtWithinRange=function(We){return We.a>=P.aaxis.range[0]&&We.a<=P.aaxis.range[1]&&We.b>=P.baxis.range[1]&&We.b<=P.baxis.range[0]&&We.c>=P.caxis.range[1]&&We.c<=P.caxis.range[0]},P.yaxis={type:"linear",range:[j,G-Y-K],domain:[Q-de/2,Q+de/2],_id:"y"},i(P.yaxis,P.graphDiv._fullLayout),P.yaxis.setScale(),P.yaxis.isPtWithinRange=function(){return!0};var _e=P.yaxis.domain[0],we=P.aaxis=l({},N.aaxis,{range:[j,G-Y-K],side:"left",tickangle:(+N.aaxis.tickangle||0)-30,domain:[_e,_e+de*C],anchor:"free",position:0,_id:"y",_length:le});i(we,P.graphDiv._fullLayout),we.setScale();var Oe=P.baxis=l({},N.baxis,{range:[G-j-K,Y],side:"bottom",domain:P.xaxis.domain,anchor:"free",position:0,_id:"x",_length:le});i(Oe,P.graphDiv._fullLayout),Oe.setScale();var be=P.caxis=l({},N.caxis,{range:[G-j-Y,K],side:"right",tickangle:(+N.caxis.tickangle||0)+30,domain:[_e,_e+de*C],anchor:"free",position:0,_id:"y",_length:le});i(be,P.graphDiv._fullLayout),be.setScale();var Te="M"+X+","+(ee+oe)+"h"+le+"l-"+le/2+",-"+oe+"Z";P.clipDef.select("path").attr("d",Te),P.layers.plotbg.select("path").attr("d",Te);var ke="M0,"+oe+"h"+le+"l-"+le/2+",-"+oe+"Z";P.clipDefRelative.select("path").attr("d",ke);var Ee=o(X,ee);P.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ee),P.clipDefRelative.select("path").attr("transform",null);var Le=o(X-Oe._offset,ee+oe);P.layers.baxis.attr("transform",Le),P.layers.bgrid.attr("transform",Le);var Fe=o(X+le/2,ee)+"rotate(30)"+o(0,-we._offset);P.layers.aaxis.attr("transform",Fe),P.layers.agrid.attr("transform",Fe);var qe=o(X+le/2,ee)+"rotate(-30)"+o(0,-be._offset);P.layers.caxis.attr("transform",qe),P.layers.cgrid.attr("transform",qe),P.drawAxes(!0),P.layers.aline.select("path").attr("d",we.showline?"M"+X+","+(ee+oe)+"l"+le/2+",-"+oe:"M0,0").call(a.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),P.layers.bline.select("path").attr("d",Oe.showline?"M"+X+","+(ee+oe)+"h"+le:"M0,0").call(a.stroke,Oe.linecolor||"#000").style("stroke-width",(Oe.linewidth||0)+"px"),P.layers.cline.select("path").attr("d",be.showline?"M"+(X+le/2)+","+ee+"l"+le/2+","+oe:"M0,0").call(a.stroke,be.linecolor||"#000").style("stroke-width",(be.linewidth||0)+"px"),P.graphDiv._context.staticPlot||P.initInteractions(),f.setClipUrl(P.layers.frontplot,P._hasClipOnAxisFalse?null:P.clipId,P.graphDiv)},w.drawAxes=function(N){var q=this,P=q.graphDiv,B=q.id.substr(7)+"title",$=q.layers,Q=q.aaxis,J=q.baxis,ne=q.caxis;if(q.drawAx(Q),q.drawAx(J),q.drawAx(ne),N){var te=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),Z=(J.showticklabels?J.tickfont.size:0)+(J.ticks==="outside"?J.ticklen:0)+3;$["a-title"]=y.draw(P,"a"+B,{propContainer:Q,propName:q.id+".aaxis.title",placeholder:s(P,"Click to enter Component A title"),attributes:{x:q.x0+q.w/2,y:q.y0-Q.title.font.size/3-te,"text-anchor":"middle"}}),$["b-title"]=y.draw(P,"b"+B,{propContainer:J,propName:q.id+".baxis.title",placeholder:s(P,"Click to enter Component B title"),attributes:{x:q.x0-Z,y:q.y0+q.h+J.title.font.size*.83+Z,"text-anchor":"middle"}}),$["c-title"]=y.draw(P,"c"+B,{propContainer:ne,propName:q.id+".caxis.title",placeholder:s(P,"Click to enter Component C title"),attributes:{x:q.x0+q.w+Z,y:q.y0+q.h+ne.title.font.size*.83+Z,"text-anchor":"middle"}})}},w.drawAx=function(N){var q=this,P=q.graphDiv,B=N._name,$=B.charAt(0),Q=N._id,J=q.layers[B],ne=30,te=$+"tickLayout",Z=x(N);q[te]!==Z&&(J.selectAll("."+Q+"tick").remove(),q[te]=Z),N.setScale();var G=c.calcTicks(N),j=c.clipEnds(N,G),Y=c.makeTransTickFn(N),K=c.getTickSigns(N)[2],X=n.deg2rad(ne),ee=K*(N.linewidth||1)/2,le=K*N.ticklen,oe=q.w,fe=q.h,de=$==="b"?"M0,"+ee+"l"+Math.sin(X)*le+","+Math.cos(X)*le:"M"+ee+",0l"+Math.cos(X)*le+","+-Math.sin(X)*le,_e={a:"M0,0l"+fe+",-"+oe/2,b:"M0,0l-"+oe/2+",-"+fe,c:"M0,0l-"+fe+","+oe/2}[$];c.drawTicks(P,N,{vals:N.ticks==="inside"?j:G,layer:J,path:de,transFn:Y,crisp:!1}),c.drawGrid(P,N,{vals:j,layer:q.layers[$+"grid"],path:_e,transFn:Y,crisp:!1}),c.drawLabels(P,N,{vals:G,layer:J,transFn:Y,labelFns:c.makeLabelFns(N,0,ne)})};function x(N){return N.ticks+String(N.ticklen)+String(N.showticklabels)}var _=A.MINZOOM/2+.87,k="m-0.87,.5h"+_+"v3h-"+(_+5.2)+"l"+(_/2+2.6)+",-"+(_*.87+4.5)+"l2.6,1.5l-"+_/2+","+_*.87+"Z",E="m0.87,.5h-"+_+"v3h"+(_+5.2)+"l-"+(_/2+2.6)+",-"+(_*.87+4.5)+"l-2.6,1.5l"+_/2+","+_*.87+"Z",I="m0,1l"+_/2+","+_*.87+"l2.6,-1.5l-"+(_/2+2.6)+",-"+(_*.87+4.5)+"l-"+(_/2+2.6)+","+(_*.87+4.5)+"l2.6,1.5l"+_/2+",-"+_*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;w.clearOutline=function(){S(this.dragOptions),T(this.dragOptions.gd)},w.initInteractions=function(){var N=this,q=N.layers.plotbg.select("path").node(),P=N.graphDiv,B=P._fullLayout._zoomlayer,$,Q;this.dragOptions={element:q,gd:P,plotinfo:{id:N.id,domain:P._fullLayout[N.id].domain,xaxis:N.xaxis,yaxis:N.yaxis},subplot:N.id,prepFn:function(Le,Fe,qe){N.dragOptions.xaxes=[N.xaxis],N.dragOptions.yaxes=[N.yaxis],$=P._fullLayout._invScaleX,Q=P._fullLayout._invScaleY;var We=N.dragOptions.dragmode=P._fullLayout.dragmode;p(We)?N.dragOptions.minDrag=1:N.dragOptions.minDrag=void 0,We==="zoom"?(N.dragOptions.moveFn=Oe,N.dragOptions.clickFn=oe,N.dragOptions.doneFn=be,fe(Le,Fe,qe)):We==="pan"?(N.dragOptions.moveFn=ke,N.dragOptions.clickFn=oe,N.dragOptions.doneFn=Ee,Te(),N.clearOutline(P)):(m(We)||p(We))&&b(Le,Fe,qe,N.dragOptions,We)}};var J,ne,te,Z,G,j,Y,K,X,ee;function le(Le){var Fe={};return Fe[N.id+".aaxis.min"]=Le.a,Fe[N.id+".baxis.min"]=Le.b,Fe[N.id+".caxis.min"]=Le.c,Fe}function oe(Le,Fe){var qe=P._fullLayout.clickmode;z(P),Le===2&&(P.emit("plotly_doubleclick",null),r.call("_guiRelayout",P,le({a:0,b:0,c:0}))),qe.indexOf("select")>-1&&Le===1&&g(Fe,P,[N.xaxis],[N.yaxis],N.id,N.dragOptions),qe.indexOf("event")>-1&&d.click(P,Fe,N.id)}function fe(Le,Fe,qe){var We=q.getBoundingClientRect();J=Fe-We.left,ne=qe-We.top,P._fullLayout._calcInverseTransform(P);var Qe=P._fullLayout._invTransform,De=n.apply3DTransform(Qe)(J,ne);J=De[0],ne=De[1],te={a:N.aaxis.range[0],b:N.baxis.range[1],c:N.caxis.range[1]},G=te,Z=N.aaxis.range[1]-te.a,j=t(N.graphDiv._fullLayout[N.id].bgcolor).getLuminance(),Y="M0,"+N.h+"L"+N.w/2+", 0L"+N.w+","+N.h+"Z",K=!1,X=B.append("path").attr("class","zoombox").attr("transform",o(N.x0,N.y0)).style({fill:j>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Y),ee=B.append("path").attr("class","zoombox-corners").attr("transform",o(N.x0,N.y0)).style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),N.clearOutline(P)}function de(Le,Fe){return 1-Fe/N.h}function _e(Le,Fe){return 1-(Le+(N.h-Fe)/Math.sqrt(3))/N.w}function we(Le,Fe){return(Le-(N.h-Fe)/Math.sqrt(3))/N.w}function Oe(Le,Fe){var qe=J+Le*$,We=ne+Fe*Q,Qe=Math.max(0,Math.min(1,de(J,ne),de(qe,We))),De=Math.max(0,Math.min(1,_e(J,ne),_e(qe,We))),me=Math.max(0,Math.min(1,we(J,ne),we(qe,We))),Ce=(Qe/2+me)*N.w,et=(1-Qe/2-De)*N.w,st=(Ce+et)/2,ot=et-Ce,ut=(1-Qe)*N.h,ht=ut-ot/C;ot.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),K=!0),P.emit("plotly_relayouting",le(G))}function be(){z(P),G!==te&&(r.call("_guiRelayout",P,le(G)),D&&P.data&&P._context.showTips&&(n.notifier(s(P,"Double-click to zoom back out"),"long"),D=!1))}function Te(){te={a:N.aaxis.range[0],b:N.baxis.range[1],c:N.caxis.range[1]},G=te}function ke(Le,Fe){var qe=Le/N.xaxis._m,We=Fe/N.yaxis._m;G={a:te.a-We,b:te.b+(qe+We)/2,c:te.c-(qe-We)/2};var Qe=[G.a,G.b,G.c].sort(n.sorterAsc),De={a:Qe.indexOf(G.a),b:Qe.indexOf(G.b),c:Qe.indexOf(G.c)};Qe[0]<0&&(Qe[1]+Qe[0]/2<0?(Qe[2]+=Qe[0]+Qe[1],Qe[0]=Qe[1]=0):(Qe[2]+=Qe[0]/2,Qe[1]+=Qe[0]/2,Qe[0]=0),G={a:Qe[De.a],b:Qe[De.b],c:Qe[De.c]},Fe=(te.a-G.a)*N.yaxis._m,Le=(te.c-G.c-te.b+G.b)*N.xaxis._m);var me=o(N.x0+Le,N.y0+Fe);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",me);var Ce=o(-Le,-Fe);N.clipDefRelative.select("path").attr("transform",Ce),N.aaxis.range=[G.a,N.sum-G.b-G.c],N.baxis.range=[N.sum-G.a-G.c,G.b],N.caxis.range=[N.sum-G.a-G.b,G.c],N.drawAxes(!1),N._hasClipOnAxisFalse&&N.plotContainer.select(".scatterlayer").selectAll(".trace").call(f.hideOutsideRangePoints,N),P.emit("plotly_relayouting",le(G))}function Ee(){r.call("_guiRelayout",P,le(G))}q.onmousemove=function(Le){d.hover(P,Le,N.id),P._fullLayout._lasthover=q,P._fullLayout._hoversubplot=N.id},q.onmouseout=function(Le){P._dragging||h.unhover(P,Le)},h.init(this.dragOptions)};function z(N){e.select(N).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}return l6}var u6={exports:{}},Qoe;function LSe(){if(Qoe)return u6.exports;Qoe=1;var e=Cu(),t=Vs().attributes,r=hc(),n=ws().overrideAll,o=ja().extendFlat,s={title:{text:r.title.text,font:r.title.font},color:r.color,tickmode:r.minor.tickmode,nticks:o({},r.nticks,{dflt:6,min:1}),tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:r.ticks,ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,showtickprefix:r.showtickprefix,tickprefix:r.tickprefix,showticksuffix:r.showticksuffix,ticksuffix:r.ticksuffix,showexponent:r.showexponent,exponentformat:r.exponentformat,minexponent:r.minexponent,separatethousands:r.separatethousands,tickfont:r.tickfont,tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,hoverformat:r.hoverformat,showline:o({},r.showline,{dflt:!0}),linecolor:r.linecolor,linewidth:r.linewidth,showgrid:o({},r.showgrid,{dflt:!0}),gridcolor:r.gridcolor,gridwidth:r.gridwidth,griddash:r.griddash,layer:r.layer,min:{valType:"number",dflt:0,min:0,description:["The minimum value visible on this axis.","The maximum is determined by the sum minus the minimum","values of the other two axes. The full view corresponds to","all the minima set to zero."].join(" ")},_deprecated:{title:r._deprecated.title,titlefont:r._deprecated.titlefont}},a=u6.exports=n({domain:t({name:"ternary"}),bgcolor:{valType:"color",dflt:e.background,description:"Set the background color of the subplot"},sum:{valType:"number",dflt:1,min:0,description:["The number each triplet should sum to,","and the maximum range of each axis"].join(" ")},aaxis:s,baxis:s,caxis:s},"plot","from-root");return a.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min` and `title`,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},a.aaxis.uirevision=a.baxis.uirevision=a.caxis.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min`,","and `title` if in `editable: true` configuration.","Defaults to `ternary.uirevision`."].join(" ")},u6.exports}var f6,ese;function Kx(){if(ese)return f6;ese=1;var e=rr(),t=go(),r=Vs().defaults;return f6=function(o,s,a,f){var i=f.type,l=f.attributes,u=f.handleDefaults,c=f.partition||"x",h=s._subplots[i],d=h.length,v=d&&h[0].replace(/\d+$/,""),p,m;function y(S,A){return e.coerce(p,m,l,S,A)}for(var b=0;b=b&&(M.min=0,w.min=0,C.min=0,d.aaxis&&delete d.aaxis.min,d.baxis&&delete d.baxis.min,d.caxis&&delete d.caxis.min)}function h(d,v,p,m){var y=l[v._name];function b(x,_){return r.coerce(d,v,y,x,_)}b("uirevision",m.uirevision),v.type="linear";var g=b("color"),T=g!==y.color.dflt?g:p.font.color,S=v._name,A=S.charAt(0).toUpperCase(),M="Component "+A,w=b("title.text",M);v._hovertitle=w===M?w:A,r.coerceFont(b,"title.font",{family:p.font.family,size:r.bigFont(p.font.size),color:T}),b("min"),f(d,v,b,"linear"),s(d,v,b,"linear"),o(d,v,b,"linear",{noAutotickangles:!0}),a(d,v,b,{outerTicks:!0});var C=b("showticklabels");C&&(r.coerceFont(b,"tickfont",{family:p.font.family,size:p.font.size,color:T}),b("tickangle"),b("tickformat")),i(d,v,b,{dfltColor:g,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:y}),b("hoverformat"),b("layer")}return c6}var rse;function iBe(){if(rse)return yv;rse=1;var e=nBe(),t=cc().getSubplotCalcData,r=rr().counterRegex,n="ternary";yv.name=n;var o=yv.attr="subplot";yv.idRoot=n,yv.idRegex=yv.attrRegex=r(n);var s=yv.attributes={};return s[o]={valType:"subplotid",dflt:"ternary",editType:"calc",description:["Sets a reference between this trace's data coordinates and","a ternary subplot.","If *ternary* (the default value), the data refer to `layout.ternary`.","If *ternary2*, the data refer to `layout.ternary2`, and so on."].join(" ")},yv.layoutAttributes=LSe(),yv.supplyLayoutDefaults=aBe(),yv.plot=function(f){for(var i=f._fullLayout,l=f.calcdata,u=i._subplots[n],c=0;c0){var S=a.xa,A=a.ya,M,w,C,x,_;d.orientation==="h"?(_=f,M="y",C=A,w="x",x=S):(_=i,M="x",C=S,w="y",x=A);var k=h[a.index];if(_>=k.span[0]&&_<=k.span[1]){var E=t.extendFlat({},a),I=x.c2p(_,!0),F=o.getKdeValue(k,d,_),D=o.getPositionOnKdePath(k,d,I),z=C._offset,N=C._length;E[M+"0"]=D[0],E[M+"1"]=D[1],E[w+"0"]=E[w+"1"]=I,E[w+"Label"]=w+": "+r.hoverLabelText(x,_,d[w+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var q=0,P=0;P path").each(function(p){if(!p.isBlank){var m=v.marker;e.select(this).call(r.fill,p.mc||m.color).call(r.stroke,p.mlc||m.line.color).call(t.dashLine,m.line.dash,p.mlw||m.line.width).style("opacity",v.selectedpoints&&!p.selected?n:1)}}),a(d,v,i),d.selectAll(".regions").each(function(){e.select(this).selectAll("path").style("stroke-width",0).call(r.fill,v.connector.fillcolor)}),d.selectAll(".lines").each(function(){var p=v.connector.line;t.lineGroupStyle(e.select(this).selectAll("path"),p.width,p.color,p.dash)})})}return O6={style:f},O6}var z6,kse;function ABe(){if(kse)return z6;kse=1;var e=va().opacity,t=q2().hoverOnBars,r=rr().formatPercent;z6=function(s,a,f,i,l){var u=t(s,a,f,i,l);if(u){var c=u.cd,h=c[0].trace,d=h.orientation==="h",v=u.index,p=c[v],m=d?"x":"y";u[m+"LabelVal"]=p.s,u.percentInitial=p.begR,u.percentInitialLabel=r(p.begR,1),u.percentPrevious=p.difR,u.percentPreviousLabel=r(p.difR,1),u.percentTotal=p.sumR,u.percentTotalLabel=r(p.sumR,1);var y=p.hi||h.hoverinfo,b=[];if(y&&y!=="none"&&y!=="skip"){var g=y==="all",T=y.split("+"),S=function(A){return g||T.indexOf(A)!==-1};S("percent initial")&&b.push(u.percentInitialLabel+" of initial"),S("percent previous")&&b.push(u.percentPreviousLabel+" of previous"),S("percent total")&&b.push(u.percentTotalLabel+" of total")}return u.extraText=b.join("
"),u.color=n(h,p),[u]}};function n(o,s){var a=o.marker,f=s.mc||a.color,i=s.mlc||a.line.color,l=s.mlw||a.line.width;if(e(f))return f;if(e(i)&&l)return i}return z6}var F6,Cse;function SBe(){return Cse||(Cse=1,F6=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}),F6}var N6,Rse;function MBe(){return Rse||(Rse=1,N6={attributes:ISe(),layoutAttributes:OSe(),supplyDefaults:_se().supplyDefaults,crossTraceDefaults:_se().crossTraceDefaults,supplyLayoutDefaults:mBe(),calc:bBe(),crossTraceCalc:_Be(),plot:wBe(),style:TBe().style,hoverPoints:ABe(),eventData:SBe(),selectPoints:j2(),moduleType:"trace",name:"funnel",basePlotModule:$l(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Visualize stages in a process using length-encoded bars. This trace can be used","to show data in either a part-to-whole representation wherein each item appears",'in a single stage, or in a "drop-off" representation wherein each item appears in','each stage it traversed. See also the "funnelarea" trace type for a different',"approach to visualizing funnel data."].join(" ")}}),N6}var B6,Lse;function EBe(){return Lse||(Lse=1,B6=MBe()),B6}var q6,Pse;function kBe(){return Pse||(Pse=1,q6={eventDataKeys:["initial","delta","final"]}),q6}var j6,Dse;function zSe(){if(Dse)return j6;Dse=1;var e=ug(),t=Yl().line,r=qo(),n=ll().axisHoverFormat,o=bi().hovertemplateAttrs,s=bi().texttemplateAttrs,a=kBe(),f=ja().extendFlat,i=va();function l(u){return{marker:{color:f({},e.marker.color,{arrayOk:!1,editType:"style",description:"Sets the marker color of all "+u+" values."}),line:{color:f({},e.marker.line.color,{arrayOk:!1,editType:"style",description:"Sets the line color of all "+u+" values."}),width:f({},e.marker.line.width,{arrayOk:!1,editType:"style",description:"Sets the line width of all "+u+" values."}),editType:"style"},editType:"style"},editType:"style"}}return j6={measure:{valType:"data_array",dflt:[],editType:"calc",description:["An array containing types of values.","By default the values are considered as 'relative'.","However; it is possible to use 'total' to compute the sums.","Also 'absolute' could be applied to reset the computed total","or to declare an initial value where needed."].join(" ")},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc",description:["Sets where the bar base is drawn (in position axis units)."].join(" ")},x:e.x,x0:e.x0,dx:e.dx,y:e.y,y0:e.y0,dy:e.dy,xperiod:e.xperiod,yperiod:e.yperiod,xperiod0:e.xperiod0,yperiod0:e.yperiod0,xperiodalignment:e.xperiodalignment,yperiodalignment:e.yperiodalignment,xhoverformat:n("x"),yhoverformat:n("y"),hovertext:e.hovertext,hovertemplate:o({},{keys:a.eventDataKeys}),hoverinfo:f({},r.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1,description:["Determines which trace information appear on the graph.","In the case of having multiple waterfalls, totals","are computed separately (per trace)."].join(" ")},texttemplate:s({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),text:e.text,textposition:e.textposition,insidetextanchor:e.insidetextanchor,textangle:e.textangle,textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:e.outsidetextfont,constraintext:e.constraintext,cliponaxis:e.cliponaxis,orientation:e.orientation,offset:e.offset,width:e.width,increasing:l("increasing"),decreasing:l("decreasing"),totals:l("intermediate sums and total"),connector:{line:{color:f({},t.color,{dflt:i.defaultLine}),width:f({},t.width,{editType:"plot"}),dash:t.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot",description:["Sets the shape of connector lines."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if connector lines are drawn. "].join(" ")},editType:"plot"},offsetgroup:e.offsetgroup,alignmentgroup:e.alignmentgroup},j6}var U6,Ise;function FSe(){return Ise||(Ise=1,U6={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},waterfallgap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}),U6}var H6,Ose;function U2(){return Ose||(Ose=1,H6={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}),H6}var G6,zse;function Fse(){if(zse)return G6;zse=1;var e=rr(),t=Vx(),r=Ev().handleText,n=I2(),o=g0(),s=zSe(),a=va(),f=U2(),i=f.INCREASING.COLOR,l=f.DECREASING.COLOR,u="#4499FF";function c(v,p,m){v(p+".marker.color",m),v(p+".marker.line.color",a.defaultLine),v(p+".marker.line.width")}function h(v,p,m,y){function b(M,w){return e.coerce(v,p,s,M,w)}var g=n(v,p,y,b);if(!g){p.visible=!1;return}o(v,p,y,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",p.x&&!p.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate");var T=b("textposition");r(v,p,y,b,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(b("texttemplate"),p.texttemplate||b("textinfo")),c(b,"increasing",i),c(b,"decreasing",l),c(b,"totals",u);var S=b("connector.visible");if(S){b("connector.mode");var A=b("connector.line.width");A&&(b("connector.line.color"),b("connector.line.dash"))}}function d(v,p){var m,y;function b(T){return e.coerce(y._input,y,s,T)}if(p.waterfallmode==="group")for(var g=0;g0&&(b?_+="M"+C[0]+","+x[1]+"V"+x[0]:_+="M"+C[1]+","+x[0]+"H"+C[0]),g!=="between"&&(A.isSum||M path").each(function(p){if(!p.isBlank){var m=v[p.dir].marker;e.select(this).call(r.fill,m.color).call(r.stroke,m.line.color).call(t.dashLine,m.line.dash,m.line.width).style("opacity",v.selectedpoints&&!p.selected?n:1)}}),a(d,v,i),d.selectAll(".lines").each(function(){var p=v.connector.line;t.lineGroupStyle(e.select(this).selectAll("path"),p.width,p.color,p.dash)})})}return X6={style:f},X6}var Z6,Hse;function IBe(){if(Hse)return Z6;Hse=1;var e=Ia().hoverLabelText,t=va().opacity,r=q2().hoverOnBars,n=U2(),o={increasing:n.INCREASING.SYMBOL,decreasing:n.DECREASING.SYMBOL};Z6=function(f,i,l,u,c){var h=r(f,i,l,u,c);if(!h)return;var d=h.cd,v=d[0].trace,p=v.orientation==="h",m=p?"x":"y",y=p?f.xa:f.ya;function b(k){return e(y,k,v[m+"hoverformat"])}var g=h.index,T=d[g],S=T.isSum?T.b+T.s:T.rawS;h.initial=T.b+T.s-S,h.delta=S,h.final=h.initial+h.delta;var A=b(Math.abs(h.delta));h.deltaLabel=S<0?"("+A+")":A,h.finalLabel=b(h.final),h.initialLabel=b(h.initial);var M=T.hi||v.hoverinfo,w=[];if(M&&M!=="none"&&M!=="skip"){var C=M==="all",x=M.split("+"),_=function(k){return C||x.indexOf(k)!==-1};T.isSum||(_("final")&&(p?!_("x"):!_("y"))&&w.push(h.finalLabel),_("delta")&&(S<0?w.push(h.deltaLabel+" "+o.decreasing):w.push(h.deltaLabel+" "+o.increasing)),_("initial")&&w.push("Initial: "+h.initialLabel))}return w.length&&(h.extraText=w.join("
")),h.color=s(v,T),[h]};function s(a,f){var i=a[f.dir].marker,l=i.color,u=i.line.color,c=i.line.width;if(t(l))return l;if(t(u)&&c)return u}return Z6}var K6,Gse;function OBe(){return Gse||(Gse=1,K6=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}),K6}var J6,Vse;function zBe(){return Vse||(Vse=1,J6={attributes:zSe(),layoutAttributes:FSe(),supplyDefaults:Fse().supplyDefaults,crossTraceDefaults:Fse().crossTraceDefaults,supplyLayoutDefaults:CBe(),calc:RBe(),crossTraceCalc:LBe(),plot:PBe(),style:DBe().style,hoverPoints:IBe(),eventData:OBe(),selectPoints:j2(),moduleType:"trace",name:"waterfall",basePlotModule:$l(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Draws waterfall trace which is useful graph to displays the","contribution of various elements (either positive or negative)","in a bar chart. The data visualized by the span of the bars is","set in `y` if `orientation` is set to *v* (the default) and the","labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}),J6}var Q6,Yse;function FBe(){return Yse||(Yse=1,Q6=zBe()),Q6}var eI,$se;function H2(){return $se||($se=1,eI={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%",""]}}}),eI}var tI,Wse;function NSe(){if(Wse)return tI;Wse=1;for(var e=qo(),t=bi().hovertemplateAttrs,r=ja().extendFlat,n=H2().colormodel,o=["rgb","rgba","rgba256","hsl","hsla"],s=[],a=[],f=0;f][;base64],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:o,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",s.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",a.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:r({},e.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:t({},{keys:["z","color","colormodel"]}),transforms:void 0}),tI}var rI,Xse;function NBe(){if(Xse)return rI;Xse=1;var e=rr(),t=NSe(),r=H2(),n=fy().IMAGE_URL_PREFIX;return rI=function(s,a){function f(u,c){return e.coerce(s,a,t,u,c)}f("source"),a.source&&!a.source.match(n)&&delete a.source,a._hasSource=!!a.source;var i=f("z");if(a._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!a._hasZ&&!a._hasSource){a.visible=!1;return}f("x0"),f("y0"),f("dx"),f("dy");var l;a._hasZ?(f("colormodel","rgb"),l=r.colormodel[a.colormodel],f("zmin",l.zminDflt||l.min),f("zmax",l.zmaxDflt||l.max)):a._hasSource&&(a.colormodel="rgba256",l=r.colormodel[a.colormodel],a.zmin=l.zminDflt,a.zmax=l.zmaxDflt),f("zsmooth"),f("text"),f("hovertext"),f("hovertemplate"),a._length=null},rI}var nI={},ST={exports:{}},Vp={},MT={exports:{}},Zse;function Um(){return Zse||(Zse=1,typeof Object.create=="function"?MT.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:MT.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}),MT.exports}var aI,Kse;function BSe(){return Kse||(Kse=1,aI=jx().EventEmitter),aI}var iI={},Jse;function Jx(){return Jse||(Jse=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},r={};r.byteLength=u,r.toByteArray=h,r.fromByteArray=p;for(var n=[],o=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=a.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var T=b.indexOf("=");T===-1&&(T=g);var S=T===g?0:4-T%4;return[T,S]}function u(b){var g=l(b),T=g[0],S=g[1];return(T+S)*3/4-S}function c(b,g,T){return(g+T)*3/4-T}function h(b){var g,T=l(b),S=T[0],A=T[1],M=new s(c(b,S,A)),w=0,C=A>0?S-4:S,x;for(x=0;x>16&255,M[w++]=g>>8&255,M[w++]=g&255;return A===2&&(g=o[b.charCodeAt(x)]<<2|o[b.charCodeAt(x+1)]>>4,M[w++]=g&255),A===1&&(g=o[b.charCodeAt(x)]<<10|o[b.charCodeAt(x+1)]<<4|o[b.charCodeAt(x+2)]>>2,M[w++]=g>>8&255,M[w++]=g&255),M}function d(b){return n[b>>18&63]+n[b>>12&63]+n[b>>6&63]+n[b&63]}function v(b,g,T){for(var S,A=[],M=g;MC?C:w+M));return S===1?(g=b[T-1],A.push(n[g>>2]+n[g<<4&63]+"==")):S===2&&(g=(b[T-2]<<8)+b[T-1],A.push(n[g>>10]+n[g>>4&63]+n[g<<2&63]+"=")),A.join("")}var m={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */m.read=function(b,g,T,S,A){var M,w,C=A*8-S-1,x=(1<>1,k=-7,E=T?A-1:0,I=T?-1:1,F=b[g+E];for(E+=I,M=F&(1<<-k)-1,F>>=-k,k+=C;k>0;M=M*256+b[g+E],E+=I,k-=8);for(w=M&(1<<-k)-1,M>>=-k,k+=S;k>0;w=w*256+b[g+E],E+=I,k-=8);if(M===0)M=1-_;else{if(M===x)return w?NaN:(F?-1:1)*(1/0);w=w+Math.pow(2,S),M=M-_}return(F?-1:1)*w*Math.pow(2,M-S)},m.write=function(b,g,T,S,A,M){var w,C,x,_=M*8-A-1,k=(1<<_)-1,E=k>>1,I=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=S?0:M-1,D=S?1:-1,z=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(C=isNaN(g)?1:0,w=k):(w=Math.floor(Math.log(g)/Math.LN2),g*(x=Math.pow(2,-w))<1&&(w--,x*=2),w+E>=1?g+=I/x:g+=I*Math.pow(2,1-E),g*x>=2&&(w++,x/=2),w+E>=k?(C=0,w=k):w+E>=1?(C=(g*x-1)*Math.pow(2,A),w=w+E):(C=g*Math.pow(2,E-1)*Math.pow(2,A),w=0));A>=8;b[T+F]=C&255,F+=D,C/=256,A-=8);for(w=w<0;b[T+F]=w&255,F+=D,w/=256,_-=8);b[T+F-D]|=z*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(b){const g=r,T=m,S=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;b.Buffer=k,b.SlowBuffer=Q,b.INSPECT_MAX_BYTES=50;const A=2147483647;b.kMaxLength=A;const{Uint8Array:M,ArrayBuffer:w,SharedArrayBuffer:C}=globalThis;k.TYPED_ARRAY_SUPPORT=x(),!k.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function x(){try{const pe=new M(1),ye={foo:function(){return 42}};return Object.setPrototypeOf(ye,M.prototype),Object.setPrototypeOf(pe,ye),pe.foo()===42}catch{return!1}}Object.defineProperty(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}});function _(pe){if(pe>A)throw new RangeError('The value "'+pe+'" is invalid for option "size"');const ye=new M(pe);return Object.setPrototypeOf(ye,k.prototype),ye}function k(pe,ye,Se){if(typeof pe=="number"){if(typeof ye=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return D(pe)}return E(pe,ye,Se)}k.poolSize=8192;function E(pe,ye,Se){if(typeof pe=="string")return z(pe,ye);if(w.isView(pe))return q(pe);if(pe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pe);if(gt(pe,w)||pe&>(pe.buffer,w)||typeof C<"u"&&(gt(pe,C)||pe&>(pe.buffer,C)))return P(pe,ye,Se);if(typeof pe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Pe=pe.valueOf&&pe.valueOf();if(Pe!=null&&Pe!==pe)return k.from(Pe,ye,Se);const it=B(pe);if(it)return it;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof pe[Symbol.toPrimitive]=="function")return k.from(pe[Symbol.toPrimitive]("string"),ye,Se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pe)}k.from=function(pe,ye,Se){return E(pe,ye,Se)},Object.setPrototypeOf(k.prototype,M.prototype),Object.setPrototypeOf(k,M);function I(pe){if(typeof pe!="number")throw new TypeError('"size" argument must be of type number');if(pe<0)throw new RangeError('The value "'+pe+'" is invalid for option "size"')}function F(pe,ye,Se){return I(pe),pe<=0?_(pe):ye!==void 0?typeof Se=="string"?_(pe).fill(ye,Se):_(pe).fill(ye):_(pe)}k.alloc=function(pe,ye,Se){return F(pe,ye,Se)};function D(pe){return I(pe),_(pe<0?0:$(pe)|0)}k.allocUnsafe=function(pe){return D(pe)},k.allocUnsafeSlow=function(pe){return D(pe)};function z(pe,ye){if((typeof ye!="string"||ye==="")&&(ye="utf8"),!k.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);const Se=J(pe,ye)|0;let Pe=_(Se);const it=Pe.write(pe,ye);return it!==Se&&(Pe=Pe.slice(0,it)),Pe}function N(pe){const ye=pe.length<0?0:$(pe.length)|0,Se=_(ye);for(let Pe=0;Pe=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return pe|0}function Q(pe){return+pe!=pe&&(pe=0),k.alloc(+pe)}k.isBuffer=function(ye){return ye!=null&&ye._isBuffer===!0&&ye!==k.prototype},k.compare=function(ye,Se){if(gt(ye,M)&&(ye=k.from(ye,ye.offset,ye.byteLength)),gt(Se,M)&&(Se=k.from(Se,Se.offset,Se.byteLength)),!k.isBuffer(ye)||!k.isBuffer(Se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ye===Se)return 0;let Pe=ye.length,it=Se.length;for(let vt=0,Pt=Math.min(Pe,it);vtit.length?(k.isBuffer(Pt)||(Pt=k.from(Pt)),Pt.copy(it,vt)):M.prototype.set.call(it,Pt,vt);else if(k.isBuffer(Pt))Pt.copy(it,vt);else throw new TypeError('"list" argument must be an Array of Buffers');vt+=Pt.length}return it};function J(pe,ye){if(k.isBuffer(pe))return pe.length;if(w.isView(pe)||gt(pe,w))return pe.byteLength;if(typeof pe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof pe);const Se=pe.length,Pe=arguments.length>2&&arguments[2]===!0;if(!Pe&&Se===0)return 0;let it=!1;for(;;)switch(ye){case"ascii":case"latin1":case"binary":return Se;case"utf8":case"utf-8":return Ht(pe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se*2;case"hex":return Se>>>1;case"base64":return Tt(pe).length;default:if(it)return Pe?-1:Ht(pe).length;ye=(""+ye).toLowerCase(),it=!0}}k.byteLength=J;function ne(pe,ye,Se){let Pe=!1;if((ye===void 0||ye<0)&&(ye=0),ye>this.length||((Se===void 0||Se>this.length)&&(Se=this.length),Se<=0)||(Se>>>=0,ye>>>=0,Se<=ye))return"";for(pe||(pe="utf8");;)switch(pe){case"hex":return Oe(this,ye,Se);case"utf8":case"utf-8":return oe(this,ye,Se);case"ascii":return _e(this,ye,Se);case"latin1":case"binary":return we(this,ye,Se);case"base64":return le(this,ye,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,ye,Se);default:if(Pe)throw new TypeError("Unknown encoding: "+pe);pe=(pe+"").toLowerCase(),Pe=!0}}k.prototype._isBuffer=!0;function te(pe,ye,Se){const Pe=pe[ye];pe[ye]=pe[Se],pe[Se]=Pe}k.prototype.swap16=function(){const ye=this.length;if(ye%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Se=0;SeSe&&(ye+=" ... "),""},S&&(k.prototype[S]=k.prototype.inspect),k.prototype.compare=function(ye,Se,Pe,it,vt){if(gt(ye,M)&&(ye=k.from(ye,ye.offset,ye.byteLength)),!k.isBuffer(ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ye);if(Se===void 0&&(Se=0),Pe===void 0&&(Pe=ye?ye.length:0),it===void 0&&(it=0),vt===void 0&&(vt=this.length),Se<0||Pe>ye.length||it<0||vt>this.length)throw new RangeError("out of range index");if(it>=vt&&Se>=Pe)return 0;if(it>=vt)return-1;if(Se>=Pe)return 1;if(Se>>>=0,Pe>>>=0,it>>>=0,vt>>>=0,this===ye)return 0;let Pt=vt-it,Bt=Pe-Se;const It=Math.min(Pt,Bt),qt=this.slice(it,vt),pr=ye.slice(Se,Pe);for(let _r=0;_r2147483647?Se=2147483647:Se<-2147483648&&(Se=-2147483648),Se=+Se,mt(Se)&&(Se=it?0:pe.length-1),Se<0&&(Se=pe.length+Se),Se>=pe.length){if(it)return-1;Se=pe.length-1}else if(Se<0)if(it)Se=0;else return-1;if(typeof ye=="string"&&(ye=k.from(ye,Pe)),k.isBuffer(ye))return ye.length===0?-1:G(pe,ye,Se,Pe,it);if(typeof ye=="number")return ye=ye&255,typeof M.prototype.indexOf=="function"?it?M.prototype.indexOf.call(pe,ye,Se):M.prototype.lastIndexOf.call(pe,ye,Se):G(pe,[ye],Se,Pe,it);throw new TypeError("val must be string, number or Buffer")}function G(pe,ye,Se,Pe,it){let vt=1,Pt=pe.length,Bt=ye.length;if(Pe!==void 0&&(Pe=String(Pe).toLowerCase(),Pe==="ucs2"||Pe==="ucs-2"||Pe==="utf16le"||Pe==="utf-16le")){if(pe.length<2||ye.length<2)return-1;vt=2,Pt/=2,Bt/=2,Se/=2}function It(pr,_r){return vt===1?pr[_r]:pr.readUInt16BE(_r*vt)}let qt;if(it){let pr=-1;for(qt=Se;qtPt&&(Se=Pt-Bt),qt=Se;qt>=0;qt--){let pr=!0;for(let _r=0;_rit&&(Pe=it)):Pe=it;const vt=ye.length;Pe>vt/2&&(Pe=vt/2);let Pt;for(Pt=0;Pt>>0,isFinite(Pe)?(Pe=Pe>>>0,it===void 0&&(it="utf8")):(it=Pe,Pe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const vt=this.length-Se;if((Pe===void 0||Pe>vt)&&(Pe=vt),ye.length>0&&(Pe<0||Se<0)||Se>this.length)throw new RangeError("Attempt to write outside buffer bounds");it||(it="utf8");let Pt=!1;for(;;)switch(it){case"hex":return j(this,ye,Se,Pe);case"utf8":case"utf-8":return Y(this,ye,Se,Pe);case"ascii":case"latin1":case"binary":return K(this,ye,Se,Pe);case"base64":return X(this,ye,Se,Pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,ye,Se,Pe);default:if(Pt)throw new TypeError("Unknown encoding: "+it);it=(""+it).toLowerCase(),Pt=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function le(pe,ye,Se){return ye===0&&Se===pe.length?g.fromByteArray(pe):g.fromByteArray(pe.slice(ye,Se))}function oe(pe,ye,Se){Se=Math.min(pe.length,Se);const Pe=[];let it=ye;for(;it239?4:vt>223?3:vt>191?2:1;if(it+Bt<=Se){let It,qt,pr,_r;switch(Bt){case 1:vt<128&&(Pt=vt);break;case 2:It=pe[it+1],(It&192)===128&&(_r=(vt&31)<<6|It&63,_r>127&&(Pt=_r));break;case 3:It=pe[it+1],qt=pe[it+2],(It&192)===128&&(qt&192)===128&&(_r=(vt&15)<<12|(It&63)<<6|qt&63,_r>2047&&(_r<55296||_r>57343)&&(Pt=_r));break;case 4:It=pe[it+1],qt=pe[it+2],pr=pe[it+3],(It&192)===128&&(qt&192)===128&&(pr&192)===128&&(_r=(vt&15)<<18|(It&63)<<12|(qt&63)<<6|pr&63,_r>65535&&_r<1114112&&(Pt=_r))}}Pt===null?(Pt=65533,Bt=1):Pt>65535&&(Pt-=65536,Pe.push(Pt>>>10&1023|55296),Pt=56320|Pt&1023),Pe.push(Pt),it+=Bt}return de(Pe)}const fe=4096;function de(pe){const ye=pe.length;if(ye<=fe)return String.fromCharCode.apply(String,pe);let Se="",Pe=0;for(;PePe)&&(Se=Pe);let it="";for(let vt=ye;vtPe&&(ye=Pe),Se<0?(Se+=Pe,Se<0&&(Se=0)):Se>Pe&&(Se=Pe),SeSe)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(ye,Se,Pe){ye=ye>>>0,Se=Se>>>0,Pe||Te(ye,Se,this.length);let it=this[ye],vt=1,Pt=0;for(;++Pt>>0,Se=Se>>>0,Pe||Te(ye,Se,this.length);let it=this[ye+--Se],vt=1;for(;Se>0&&(vt*=256);)it+=this[ye+--Se]*vt;return it},k.prototype.readUint8=k.prototype.readUInt8=function(ye,Se){return ye=ye>>>0,Se||Te(ye,1,this.length),this[ye]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,2,this.length),this[ye]|this[ye+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,2,this.length),this[ye]<<8|this[ye+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,4,this.length),(this[ye]|this[ye+1]<<8|this[ye+2]<<16)+this[ye+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,4,this.length),this[ye]*16777216+(this[ye+1]<<16|this[ye+2]<<8|this[ye+3])},k.prototype.readBigUInt64LE=Ie(function(ye){ye=ye>>>0,st(ye,"offset");const Se=this[ye],Pe=this[ye+7];(Se===void 0||Pe===void 0)&&ot(ye,this.length-8);const it=Se+this[++ye]*2**8+this[++ye]*2**16+this[++ye]*2**24,vt=this[++ye]+this[++ye]*2**8+this[++ye]*2**16+Pe*2**24;return BigInt(it)+(BigInt(vt)<>>0,st(ye,"offset");const Se=this[ye],Pe=this[ye+7];(Se===void 0||Pe===void 0)&&ot(ye,this.length-8);const it=Se*2**24+this[++ye]*2**16+this[++ye]*2**8+this[++ye],vt=this[++ye]*2**24+this[++ye]*2**16+this[++ye]*2**8+Pe;return(BigInt(it)<>>0,Se=Se>>>0,Pe||Te(ye,Se,this.length);let it=this[ye],vt=1,Pt=0;for(;++Pt=vt&&(it-=Math.pow(2,8*Se)),it},k.prototype.readIntBE=function(ye,Se,Pe){ye=ye>>>0,Se=Se>>>0,Pe||Te(ye,Se,this.length);let it=Se,vt=1,Pt=this[ye+--it];for(;it>0&&(vt*=256);)Pt+=this[ye+--it]*vt;return vt*=128,Pt>=vt&&(Pt-=Math.pow(2,8*Se)),Pt},k.prototype.readInt8=function(ye,Se){return ye=ye>>>0,Se||Te(ye,1,this.length),this[ye]&128?(255-this[ye]+1)*-1:this[ye]},k.prototype.readInt16LE=function(ye,Se){ye=ye>>>0,Se||Te(ye,2,this.length);const Pe=this[ye]|this[ye+1]<<8;return Pe&32768?Pe|4294901760:Pe},k.prototype.readInt16BE=function(ye,Se){ye=ye>>>0,Se||Te(ye,2,this.length);const Pe=this[ye+1]|this[ye]<<8;return Pe&32768?Pe|4294901760:Pe},k.prototype.readInt32LE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,4,this.length),this[ye]|this[ye+1]<<8|this[ye+2]<<16|this[ye+3]<<24},k.prototype.readInt32BE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,4,this.length),this[ye]<<24|this[ye+1]<<16|this[ye+2]<<8|this[ye+3]},k.prototype.readBigInt64LE=Ie(function(ye){ye=ye>>>0,st(ye,"offset");const Se=this[ye],Pe=this[ye+7];(Se===void 0||Pe===void 0)&&ot(ye,this.length-8);const it=this[ye+4]+this[ye+5]*2**8+this[ye+6]*2**16+(Pe<<24);return(BigInt(it)<>>0,st(ye,"offset");const Se=this[ye],Pe=this[ye+7];(Se===void 0||Pe===void 0)&&ot(ye,this.length-8);const it=(Se<<24)+this[++ye]*2**16+this[++ye]*2**8+this[++ye];return(BigInt(it)<>>0,Se||Te(ye,4,this.length),T.read(this,ye,!0,23,4)},k.prototype.readFloatBE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,4,this.length),T.read(this,ye,!1,23,4)},k.prototype.readDoubleLE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,8,this.length),T.read(this,ye,!0,52,8)},k.prototype.readDoubleBE=function(ye,Se){return ye=ye>>>0,Se||Te(ye,8,this.length),T.read(this,ye,!1,52,8)};function ke(pe,ye,Se,Pe,it,vt){if(!k.isBuffer(pe))throw new TypeError('"buffer" argument must be a Buffer instance');if(ye>it||yepe.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(ye,Se,Pe,it){if(ye=+ye,Se=Se>>>0,Pe=Pe>>>0,!it){const Bt=Math.pow(2,8*Pe)-1;ke(this,ye,Se,Pe,Bt,0)}let vt=1,Pt=0;for(this[Se]=ye&255;++Pt>>0,Pe=Pe>>>0,!it){const Bt=Math.pow(2,8*Pe)-1;ke(this,ye,Se,Pe,Bt,0)}let vt=Pe-1,Pt=1;for(this[Se+vt]=ye&255;--vt>=0&&(Pt*=256);)this[Se+vt]=ye/Pt&255;return Se+Pe},k.prototype.writeUint8=k.prototype.writeUInt8=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,1,255,0),this[Se]=ye&255,Se+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,2,65535,0),this[Se]=ye&255,this[Se+1]=ye>>>8,Se+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,2,65535,0),this[Se]=ye>>>8,this[Se+1]=ye&255,Se+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,4,4294967295,0),this[Se+3]=ye>>>24,this[Se+2]=ye>>>16,this[Se+1]=ye>>>8,this[Se]=ye&255,Se+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,4,4294967295,0),this[Se]=ye>>>24,this[Se+1]=ye>>>16,this[Se+2]=ye>>>8,this[Se+3]=ye&255,Se+4};function Ee(pe,ye,Se,Pe,it){et(ye,Pe,it,pe,Se,7);let vt=Number(ye&BigInt(4294967295));pe[Se++]=vt,vt=vt>>8,pe[Se++]=vt,vt=vt>>8,pe[Se++]=vt,vt=vt>>8,pe[Se++]=vt;let Pt=Number(ye>>BigInt(32)&BigInt(4294967295));return pe[Se++]=Pt,Pt=Pt>>8,pe[Se++]=Pt,Pt=Pt>>8,pe[Se++]=Pt,Pt=Pt>>8,pe[Se++]=Pt,Se}function Le(pe,ye,Se,Pe,it){et(ye,Pe,it,pe,Se,7);let vt=Number(ye&BigInt(4294967295));pe[Se+7]=vt,vt=vt>>8,pe[Se+6]=vt,vt=vt>>8,pe[Se+5]=vt,vt=vt>>8,pe[Se+4]=vt;let Pt=Number(ye>>BigInt(32)&BigInt(4294967295));return pe[Se+3]=Pt,Pt=Pt>>8,pe[Se+2]=Pt,Pt=Pt>>8,pe[Se+1]=Pt,Pt=Pt>>8,pe[Se]=Pt,Se+8}k.prototype.writeBigUInt64LE=Ie(function(ye,Se=0){return Ee(this,ye,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=Ie(function(ye,Se=0){return Le(this,ye,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(ye,Se,Pe,it){if(ye=+ye,Se=Se>>>0,!it){const It=Math.pow(2,8*Pe-1);ke(this,ye,Se,Pe,It-1,-It)}let vt=0,Pt=1,Bt=0;for(this[Se]=ye&255;++vt>0)-Bt&255;return Se+Pe},k.prototype.writeIntBE=function(ye,Se,Pe,it){if(ye=+ye,Se=Se>>>0,!it){const It=Math.pow(2,8*Pe-1);ke(this,ye,Se,Pe,It-1,-It)}let vt=Pe-1,Pt=1,Bt=0;for(this[Se+vt]=ye&255;--vt>=0&&(Pt*=256);)ye<0&&Bt===0&&this[Se+vt+1]!==0&&(Bt=1),this[Se+vt]=(ye/Pt>>0)-Bt&255;return Se+Pe},k.prototype.writeInt8=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,1,127,-128),ye<0&&(ye=255+ye+1),this[Se]=ye&255,Se+1},k.prototype.writeInt16LE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,2,32767,-32768),this[Se]=ye&255,this[Se+1]=ye>>>8,Se+2},k.prototype.writeInt16BE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,2,32767,-32768),this[Se]=ye>>>8,this[Se+1]=ye&255,Se+2},k.prototype.writeInt32LE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,4,2147483647,-2147483648),this[Se]=ye&255,this[Se+1]=ye>>>8,this[Se+2]=ye>>>16,this[Se+3]=ye>>>24,Se+4},k.prototype.writeInt32BE=function(ye,Se,Pe){return ye=+ye,Se=Se>>>0,Pe||ke(this,ye,Se,4,2147483647,-2147483648),ye<0&&(ye=4294967295+ye+1),this[Se]=ye>>>24,this[Se+1]=ye>>>16,this[Se+2]=ye>>>8,this[Se+3]=ye&255,Se+4},k.prototype.writeBigInt64LE=Ie(function(ye,Se=0){return Ee(this,ye,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=Ie(function(ye,Se=0){return Le(this,ye,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Fe(pe,ye,Se,Pe,it,vt){if(Se+Pe>pe.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("Index out of range")}function qe(pe,ye,Se,Pe,it){return ye=+ye,Se=Se>>>0,it||Fe(pe,ye,Se,4),T.write(pe,ye,Se,Pe,23,4),Se+4}k.prototype.writeFloatLE=function(ye,Se,Pe){return qe(this,ye,Se,!0,Pe)},k.prototype.writeFloatBE=function(ye,Se,Pe){return qe(this,ye,Se,!1,Pe)};function We(pe,ye,Se,Pe,it){return ye=+ye,Se=Se>>>0,it||Fe(pe,ye,Se,8),T.write(pe,ye,Se,Pe,52,8),Se+8}k.prototype.writeDoubleLE=function(ye,Se,Pe){return We(this,ye,Se,!0,Pe)},k.prototype.writeDoubleBE=function(ye,Se,Pe){return We(this,ye,Se,!1,Pe)},k.prototype.copy=function(ye,Se,Pe,it){if(!k.isBuffer(ye))throw new TypeError("argument should be a Buffer");if(Pe||(Pe=0),!it&&it!==0&&(it=this.length),Se>=ye.length&&(Se=ye.length),Se||(Se=0),it>0&&it=this.length)throw new RangeError("Index out of range");if(it<0)throw new RangeError("sourceEnd out of bounds");it>this.length&&(it=this.length),ye.length-Se>>0,Pe=Pe===void 0?this.length:Pe>>>0,ye||(ye=0);let vt;if(typeof ye=="number")for(vt=Se;vt2**32?it=me(String(Se)):typeof Se=="bigint"&&(it=String(Se),(Se>BigInt(2)**BigInt(32)||Se<-(BigInt(2)**BigInt(32)))&&(it=me(it)),it+="n"),Pe+=` It must be ${ye}. Received ${it}`,Pe},RangeError);function me(pe){let ye="",Se=pe.length;const Pe=pe[0]==="-"?1:0;for(;Se>=Pe+4;Se-=3)ye=`_${pe.slice(Se-3,Se)}${ye}`;return`${pe.slice(0,Se)}${ye}`}function Ce(pe,ye,Se){st(ye,"offset"),(pe[ye]===void 0||pe[ye+Se]===void 0)&&ot(ye,pe.length-(Se+1))}function et(pe,ye,Se,Pe,it,vt){if(pe>Se||pe= 0${Pt} and < 2${Pt} ** ${(vt+1)*8}${Pt}`:Bt=`>= -(2${Pt} ** ${(vt+1)*8-1}${Pt}) and < 2 ** ${(vt+1)*8-1}${Pt}`,new Qe.ERR_OUT_OF_RANGE("value",Bt,pe)}Ce(Pe,it,vt)}function st(pe,ye){if(typeof pe!="number")throw new Qe.ERR_INVALID_ARG_TYPE(ye,"number",pe)}function ot(pe,ye,Se){throw Math.floor(pe)!==pe?(st(pe,Se),new Qe.ERR_OUT_OF_RANGE("offset","an integer",pe)):ye<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ye}`,pe)}const ut=/[^+/0-9A-Za-z-_]/g;function ht(pe){if(pe=pe.split("=")[0],pe=pe.trim().replace(ut,""),pe.length<2)return"";for(;pe.length%4!==0;)pe=pe+"=";return pe}function Ht(pe,ye){ye=ye||1/0;let Se;const Pe=pe.length;let it=null;const vt=[];for(let Pt=0;Pt55295&&Se<57344){if(!it){if(Se>56319){(ye-=3)>-1&&vt.push(239,191,189);continue}else if(Pt+1===Pe){(ye-=3)>-1&&vt.push(239,191,189);continue}it=Se;continue}if(Se<56320){(ye-=3)>-1&&vt.push(239,191,189),it=Se;continue}Se=(it-55296<<10|Se-56320)+65536}else it&&(ye-=3)>-1&&vt.push(239,191,189);if(it=null,Se<128){if((ye-=1)<0)break;vt.push(Se)}else if(Se<2048){if((ye-=2)<0)break;vt.push(Se>>6|192,Se&63|128)}else if(Se<65536){if((ye-=3)<0)break;vt.push(Se>>12|224,Se>>6&63|128,Se&63|128)}else if(Se<1114112){if((ye-=4)<0)break;vt.push(Se>>18|240,Se>>12&63|128,Se>>6&63|128,Se&63|128)}else throw new Error("Invalid code point")}return vt}function Et(pe){const ye=[];for(let Se=0;Se>8,it=Se%256,vt.push(it),vt.push(Pe);return vt}function Tt(pe){return g.toByteArray(ht(pe))}function rt(pe,ye,Se,Pe){let it;for(it=0;it=ye.length||it>=pe.length);++it)ye[it+Se]=pe[it];return it}function gt(pe,ye){return pe instanceof ye||pe!=null&&pe.constructor!=null&&pe.constructor.name!=null&&pe.constructor.name===ye.name}function mt(pe){return pe!==pe}const He=(function(){const pe="0123456789abcdef",ye=new Array(256);for(let Se=0;Se<16;++Se){const Pe=Se*16;for(let it=0;it<16;++it)ye[Pe+it]=pe[Se]+pe[it]}return ye})();function Ie(pe){return typeof BigInt>"u"?je:pe}function je(){throw new Error("BigInt not supported")}})(t);const y=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=y,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(iI)),iI}var oI={},sI={},lI,Qse;function Y$(){return Qse||(Qse=1,lI=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(t,r);if(f.value!==o||f.enumerable!==!0)return!1}return!0}),lI}var uI,ele;function nM(){if(ele)return uI;ele=1;var e=Y$();return uI=function(){return e()&&!!Symbol.toStringTag},uI}var fI,tle;function $$(){return tle||(tle=1,fI=Object),fI}var cI,rle;function BBe(){return rle||(rle=1,cI=Error),cI}var hI,nle;function qBe(){return nle||(nle=1,hI=EvalError),hI}var dI,ale;function jBe(){return ale||(ale=1,dI=RangeError),dI}var vI,ile;function UBe(){return ile||(ile=1,vI=ReferenceError),vI}var pI,ole;function qSe(){return ole||(ole=1,pI=SyntaxError),pI}var gI,sle;function G2(){return sle||(sle=1,gI=TypeError),gI}var yI,lle;function HBe(){return lle||(lle=1,yI=URIError),yI}var mI,ule;function GBe(){return ule||(ule=1,mI=Math.abs),mI}var xI,fle;function VBe(){return fle||(fle=1,xI=Math.floor),xI}var bI,cle;function YBe(){return cle||(cle=1,bI=Math.max),bI}var _I,hle;function $Be(){return hle||(hle=1,_I=Math.min),_I}var wI,dle;function WBe(){return dle||(dle=1,wI=Math.pow),wI}var TI,vle;function XBe(){return vle||(vle=1,TI=Math.round),TI}var AI,ple;function ZBe(){return ple||(ple=1,AI=Number.isNaN||function(t){return t!==t}),AI}var SI,gle;function KBe(){if(gle)return SI;gle=1;var e=ZBe();return SI=function(r){return e(r)||r===0?r:r<0?-1:1},SI}var MI,yle;function JBe(){return yle||(yle=1,MI=Object.getOwnPropertyDescriptor),MI}var EI,mle;function Qx(){if(mle)return EI;mle=1;var e=JBe();if(e)try{e([],"length")}catch{e=null}return EI=e,EI}var kI,xle;function aM(){if(xle)return kI;xle=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return kI=e,kI}var CI,ble;function QBe(){if(ble)return CI;ble=1;var e=typeof Symbol<"u"&&Symbol,t=Y$();return CI=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},CI}var RI,_le;function jSe(){return _le||(_le=1,RI=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),RI}var LI,wle;function USe(){if(wle)return LI;wle=1;var e=$$();return LI=e.getPrototypeOf||null,LI}var PI,Tle;function e7e(){if(Tle)return PI;Tle=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",o=function(i,l){for(var u=[],c=0;c"u"||!M?e:M(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":A&&M?M([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&M?M(M([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!M?e:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!M?e:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&M?M(""[Symbol.iterator]()):e,"%Symbol%":A?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":S,"%TypedArray%":E,"%TypeError%":f,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":i,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":x,"%Object.defineProperty%":g,"%Object.getPrototypeOf%":w,"%Math.abs%":l,"%Math.floor%":u,"%Math.max%":c,"%Math.min%":h,"%Math.pow%":d,"%Math.round%":v,"%Math.sign%":p,"%Reflect.getPrototypeOf%":C};if(M)try{null.error}catch(j){var F=M(M(j));I["%Error.prototype%"]=F}var D=function j(Y){var K;if(Y==="%AsyncFunction%")K=y("async function () {}");else if(Y==="%GeneratorFunction%")K=y("function* () {}");else if(Y==="%AsyncGeneratorFunction%")K=y("async function* () {}");else if(Y==="%AsyncGenerator%"){var X=j("%AsyncGeneratorFunction%");X&&(K=X.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=j("%AsyncGenerator%");ee&&M&&(K=M(ee.prototype))}return I[Y]=K,K},z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=V2(),q=GSe(),P=N.call(_,Array.prototype.concat),B=N.call(x,Array.prototype.splice),$=N.call(_,String.prototype.replace),Q=N.call(_,String.prototype.slice),J=N.call(_,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,Z=function(Y){var K=Q(Y,0,1),X=Q(Y,-1);if(K==="%"&&X!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(X==="%"&&K!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ee=[];return $(Y,ne,function(le,oe,fe,de){ee[ee.length]=fe?$(de,te,"$1"):oe||le}),ee},G=function(Y,K){var X=Y,ee;if(q(z,X)&&(ee=z[X],X="%"+ee[0]+"%"),q(I,X)){var le=I[X];if(le===k&&(le=D(X)),typeof le>"u"&&!K)throw new f("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:X,value:le}}throw new a("intrinsic "+Y+" does not exist!")};return UI=function(Y,K){if(typeof Y!="string"||Y.length===0)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K!="boolean")throw new f('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=Z(Y),ee=X.length>0?X[0]:"",le=G("%"+ee+"%",K),oe=le.name,fe=le.value,de=!1,_e=le.alias;_e&&(ee=_e[0],B(X,P([0,1],_e)));for(var we=1,Oe=!0;we=X.length){var Ee=b(fe,be);Oe=!!Ee,Oe&&"get"in Ee&&!("originalValue"in Ee.get)?fe=Ee.get:fe=fe[be]}else Oe=q(fe,be),fe=fe[be];Oe&&!de&&(I[oe]=fe)}}return fe},UI}var HI,Ile;function eb(){if(Ile)return HI;Ile=1;var e=J$(),t=Z$(),r=t([e("%String.prototype.indexOf%")]);return HI=function(o,s){var a=e(o,!!s);return typeof a=="function"&&r(o,".prototype.")>-1?t([a]):a},HI}var GI,Ole;function n7e(){if(Ole)return GI;Ole=1;var e=nM()(),t=eb(),r=t("Object.prototype.toString"),n=function(f){return e&&f&&typeof f=="object"&&Symbol.toStringTag in f?!1:r(f)==="[object Arguments]"},o=function(f){return n(f)?!0:f!==null&&typeof f=="object"&&"length"in f&&typeof f.length=="number"&&f.length>=0&&r(f)!=="[object Array]"&&"callee"in f&&r(f.callee)==="[object Function]"},s=(function(){return n(arguments)})();return n.isLegacyArguments=o,GI=s?n:o,GI}var VI,zle;function a7e(){if(zle)return VI;zle=1;var e=eb(),t=nM()(),r=GSe(),n=Qx(),o;if(t){var s=e("RegExp.prototype.exec"),a={},f=function(){throw a},i={toString:f,valueOf:f};typeof Symbol.toPrimitive=="symbol"&&(i[Symbol.toPrimitive]=f),o=function(h){if(!h||typeof h!="object")return!1;var d=n(h,"lastIndex"),v=d&&r(d,"value");if(!v)return!1;try{s(h,i)}catch(p){return p===a}}}else{var l=e("Object.prototype.toString"),u="[object RegExp]";o=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:l(h)===u}}return VI=o,VI}var YI,Fle;function i7e(){if(Fle)return YI;Fle=1;var e=eb(),t=a7e(),r=e("RegExp.prototype.exec"),n=G2();return YI=function(s){if(!t(s))throw new n("`regex` must be a RegExp");return function(f){return r(s,f)!==null}},YI}var $I,Nle;function o7e(){if(Nle)return $I;Nle=1;const e=(function*(){}).constructor;return $I=()=>e,$I}var WI,Ble;function s7e(){if(Ble)return WI;Ble=1;var e=eb(),t=i7e(),r=t(/^\s*(?:function)?\*/),n=nM()(),o=K$(),s=e("Object.prototype.toString"),a=e("Function.prototype.toString"),f=o7e();return WI=function(l){if(typeof l!="function")return!1;if(r(a(l)))return!0;if(!n){var u=s(l);return u==="[object GeneratorFunction]"}if(!o)return!1;var c=f();return c&&o(l)===c.prototype},WI}var XI,qle;function l7e(){if(qle)return XI;qle=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(b){b!==n&&(t=null)}else t=null;var o=/^\s*class\b/,s=function(g){try{var T=e.call(g);return o.test(T)}catch{return!1}},a=function(g){try{return s(g)?!1:(e.call(g),!0)}catch{return!1}},f=Object.prototype.toString,i="[object Object]",l="[object Function]",u="[object GeneratorFunction]",c="[object HTMLAllCollection]",h="[object HTML document.all class]",d="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var y=document.all;f.call(y)===f.call(document.all)&&(m=function(g){if((p||!g)&&(typeof g>"u"||typeof g=="object"))try{var T=f.call(g);return(T===c||T===h||T===d||T===i)&&g("")==null}catch{}return!1})}return XI=t?function(g){if(m(g))return!0;if(!g||typeof g!="function"&&typeof g!="object")return!1;try{t(g,null,r)}catch(T){if(T!==n)return!1}return!s(g)&&a(g)}:function(g){if(m(g))return!0;if(!g||typeof g!="function"&&typeof g!="object")return!1;if(v)return a(g);if(s(g))return!1;var T=f.call(g);return T!==l&&T!==u&&!/^\[object HTML/.test(T)?!1:a(g)},XI}var ZI,jle;function u7e(){if(jle)return ZI;jle=1;var e=l7e(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(i,l,u){for(var c=0,h=i.length;c=3&&(c=u),a(i)?n(i,l,c):typeof i=="string"?o(i,l,c):s(i,l,c)},ZI}var KI,Ule;function f7e(){return Ule||(Ule=1,KI=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),KI}var JI,Hle;function c7e(){if(Hle)return JI;Hle=1;var e=f7e(),t=typeof globalThis>"u"?Mu:globalThis;return JI=function(){for(var n=[],o=0;o3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,h=!!n&&n(s,a);if(e)e(s,a,{configurable:u===null&&h?h.configurable:!u,enumerable:i===null&&h?h.enumerable:!i,value:f,writable:l===null&&h?h.writable:!l});else if(c||!i&&!l&&!u)s[a]=f;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},eO}var tO,Vle;function YSe(){if(Vle)return tO;Vle=1;var e=aM(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},tO=t,tO}var rO,Yle;function h7e(){if(Yle)return rO;Yle=1;var e=J$(),t=VSe(),r=YSe()(),n=Qx(),o=G2(),s=e("%Math.floor%");return rO=function(f,i){if(typeof f!="function")throw new o("`fn` is not a function");if(typeof i!="number"||i<0||i>4294967295||s(i)!==i)throw new o("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],u=!0,c=!0;if("length"in f&&n){var h=n(f,"length");h&&!h.configurable&&(u=!1),h&&!h.writable&&(c=!1)}return(u||c||!l)&&(r?t(f,"length",i,!0,!0):t(f,"length",i)),f},rO}var nO,$le;function d7e(){if($le)return nO;$le=1;var e=V2(),t=X$(),r=HSe();return nO=function(){return r(e,t,arguments)},nO}var Wle;function iM(){return Wle||(Wle=1,(function(e){var t=h7e(),r=aM(),n=Z$(),o=d7e();e.exports=function(a){var f=n(arguments),i=a.length-(arguments.length-1);return t(f,1+(i>0?i:0),!0)},r?r(e.exports,"apply",{value:o}):e.exports.apply=o})(QI)),QI.exports}var aO,Xle;function $Se(){if(Xle)return aO;Xle=1;var e=u7e(),t=c7e(),r=iM(),n=eb(),o=Qx(),s=K$(),a=n("Object.prototype.toString"),f=nM()(),i=typeof globalThis>"u"?Mu:globalThis,l=t(),u=n("String.prototype.slice"),c=n("Array.prototype.indexOf",!0)||function(m,y){for(var b=0;b-1?y:y!=="Object"?!1:v(m)}return o?d(m):null},aO}var iO,Zle;function v7e(){if(Zle)return iO;Zle=1;var e=$Se();return iO=function(r){return!!e(r)},iO}var Kle;function p7e(){return Kle||(Kle=1,(function(e){var t=n7e(),r=s7e(),n=$Se(),o=v7e();function s(we){return we.call.bind(we)}var a=typeof BigInt<"u",f=typeof Symbol<"u",i=s(Object.prototype.toString),l=s(Number.prototype.valueOf),u=s(String.prototype.valueOf),c=s(Boolean.prototype.valueOf);if(a)var h=s(BigInt.prototype.valueOf);if(f)var d=s(Symbol.prototype.valueOf);function v(we,Oe){if(typeof we!="object")return!1;try{return Oe(we),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function p(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}e.isPromise=p;function m(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):o(we)||Q(we)}e.isArrayBufferView=m;function y(we){return n(we)==="Uint8Array"}e.isUint8Array=y;function b(we){return n(we)==="Uint8ClampedArray"}e.isUint8ClampedArray=b;function g(we){return n(we)==="Uint16Array"}e.isUint16Array=g;function T(we){return n(we)==="Uint32Array"}e.isUint32Array=T;function S(we){return n(we)==="Int8Array"}e.isInt8Array=S;function A(we){return n(we)==="Int16Array"}e.isInt16Array=A;function M(we){return n(we)==="Int32Array"}e.isInt32Array=M;function w(we){return n(we)==="Float32Array"}e.isFloat32Array=w;function C(we){return n(we)==="Float64Array"}e.isFloat64Array=C;function x(we){return n(we)==="BigInt64Array"}e.isBigInt64Array=x;function _(we){return n(we)==="BigUint64Array"}e.isBigUint64Array=_;function k(we){return i(we)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function E(we){return typeof Map>"u"?!1:k.working?k(we):we instanceof Map}e.isMap=E;function I(we){return i(we)==="[object Set]"}I.working=typeof Set<"u"&&I(new Set);function F(we){return typeof Set>"u"?!1:I.working?I(we):we instanceof Set}e.isSet=F;function D(we){return i(we)==="[object WeakMap]"}D.working=typeof WeakMap<"u"&&D(new WeakMap);function z(we){return typeof WeakMap>"u"?!1:D.working?D(we):we instanceof WeakMap}e.isWeakMap=z;function N(we){return i(we)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function q(we){return N(we)}e.isWeakSet=q;function P(we){return i(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function B(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}e.isArrayBuffer=B;function $(we){return i(we)==="[object DataView]"}$.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&$(new DataView(new ArrayBuffer(1),0,1));function Q(we){return typeof DataView>"u"?!1:$.working?$(we):we instanceof DataView}e.isDataView=Q;var J=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ne(we){return i(we)==="[object SharedArrayBuffer]"}function te(we){return typeof J>"u"?!1:(typeof ne.working>"u"&&(ne.working=ne(new J)),ne.working?ne(we):we instanceof J)}e.isSharedArrayBuffer=te;function Z(we){return i(we)==="[object AsyncFunction]"}e.isAsyncFunction=Z;function G(we){return i(we)==="[object Map Iterator]"}e.isMapIterator=G;function j(we){return i(we)==="[object Set Iterator]"}e.isSetIterator=j;function Y(we){return i(we)==="[object Generator]"}e.isGeneratorObject=Y;function K(we){return i(we)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=K;function X(we){return v(we,l)}e.isNumberObject=X;function ee(we){return v(we,u)}e.isStringObject=ee;function le(we){return v(we,c)}e.isBooleanObject=le;function oe(we){return a&&v(we,h)}e.isBigIntObject=oe;function fe(we){return f&&v(we,d)}e.isSymbolObject=fe;function de(we){return X(we)||ee(we)||le(we)||oe(we)||fe(we)}e.isBoxedPrimitive=de;function _e(we){return typeof Uint8Array<"u"&&(B(we)||te(we))}e.isAnyArrayBuffer=_e,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(e,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})})(sI)),sI}var oO,Jle;function g7e(){return Jle||(Jle=1,oO=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),oO}var Qle;function mm(){return Qle||(Qle=1,(function(e){var t={},r=Object.getOwnPropertyDescriptors||function(J){for(var ne=Object.keys(J),te={},Z=0;Z=Z)return Y;switch(Y){case"%s":return String(te[ne++]);case"%d":return Number(te[ne++]);case"%j":try{return JSON.stringify(te[ne++])}catch{return"[Circular]"}default:return Y}}),j=te[ne];ne"u")return function(){return e.deprecate(Q,J).apply(this,arguments)};var ne=!1;function te(){if(!ne){if(Ya.throwDeprecation)throw new Error(J);Ya.traceDeprecation?console.trace(J):console.error(J),ne=!0}return Q.apply(this,arguments)}return te};var o={},s=/^$/;if(t.NODE_DEBUG){var a=t.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i")}e.debuglog=function(Q){if(Q=Q.toUpperCase(),!o[Q])if(s.test(Q)){var J=Ya.pid;o[Q]=function(){var ne=e.format.apply(e,arguments);console.error("%s %d: %s",Q,J,ne)}}else o[Q]=function(){};return o[Q]};function f(Q,J){var ne={seen:[],stylize:l};return arguments.length>=3&&(ne.depth=arguments[2]),arguments.length>=4&&(ne.colors=arguments[3]),b(J)?ne.showHidden=J:J&&e._extend(ne,J),w(ne.showHidden)&&(ne.showHidden=!1),w(ne.depth)&&(ne.depth=2),w(ne.colors)&&(ne.colors=!1),w(ne.customInspect)&&(ne.customInspect=!0),ne.colors&&(ne.stylize=i),c(ne,Q,ne.depth)}e.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function i(Q,J){var ne=f.styles[J];return ne?"\x1B["+f.colors[ne][0]+"m"+Q+"\x1B["+f.colors[ne][1]+"m":Q}function l(Q,J){return Q}function u(Q){var J={};return Q.forEach(function(ne,te){J[ne]=!0}),J}function c(Q,J,ne){if(Q.customInspect&&J&&E(J.inspect)&&J.inspect!==e.inspect&&!(J.constructor&&J.constructor.prototype===J)){var te=J.inspect(ne,Q);return A(te)||(te=c(Q,te,ne)),te}var Z=h(Q,J);if(Z)return Z;var G=Object.keys(J),j=u(G);if(Q.showHidden&&(G=Object.getOwnPropertyNames(J)),k(J)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return d(J);if(G.length===0){if(E(J)){var Y=J.name?": "+J.name:"";return Q.stylize("[Function"+Y+"]","special")}if(C(J))return Q.stylize(RegExp.prototype.toString.call(J),"regexp");if(_(J))return Q.stylize(Date.prototype.toString.call(J),"date");if(k(J))return d(J)}var K="",X=!1,ee=["{","}"];if(y(J)&&(X=!0,ee=["[","]"]),E(J)){var le=J.name?": "+J.name:"";K=" [Function"+le+"]"}if(C(J)&&(K=" "+RegExp.prototype.toString.call(J)),_(J)&&(K=" "+Date.prototype.toUTCString.call(J)),k(J)&&(K=" "+d(J)),G.length===0&&(!X||J.length==0))return ee[0]+K+ee[1];if(ne<0)return C(J)?Q.stylize(RegExp.prototype.toString.call(J),"regexp"):Q.stylize("[Object]","special");Q.seen.push(J);var oe;return X?oe=v(Q,J,ne,j,G):oe=G.map(function(fe){return p(Q,J,ne,j,fe,X)}),Q.seen.pop(),m(oe,K,ee)}function h(Q,J){if(w(J))return Q.stylize("undefined","undefined");if(A(J)){var ne="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Q.stylize(ne,"string")}if(S(J))return Q.stylize(""+J,"number");if(b(J))return Q.stylize(""+J,"boolean");if(g(J))return Q.stylize("null","null")}function d(Q){return"["+Error.prototype.toString.call(Q)+"]"}function v(Q,J,ne,te,Z){for(var G=[],j=0,Y=J.length;j-1&&(G?Y=Y.split(` +`).map(function(X){return" "+X}).join(` +`).slice(2):Y=` +`+Y.split(` +`).map(function(X){return" "+X}).join(` +`))):Y=Q.stylize("[Circular]","special")),w(j)){if(G&&Z.match(/^\d+$/))return Y;j=JSON.stringify(""+Z),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=Q.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=Q.stylize(j,"string"))}return j+": "+Y}function m(Q,J,ne){var te=Q.reduce(function(Z,G){return G.indexOf(` +`)>=0,Z+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?ne[0]+(J===""?"":J+` + `)+" "+Q.join(`, + `)+" "+ne[1]:ne[0]+J+" "+Q.join(", ")+" "+ne[1]}e.types=p7e();function y(Q){return Array.isArray(Q)}e.isArray=y;function b(Q){return typeof Q=="boolean"}e.isBoolean=b;function g(Q){return Q===null}e.isNull=g;function T(Q){return Q==null}e.isNullOrUndefined=T;function S(Q){return typeof Q=="number"}e.isNumber=S;function A(Q){return typeof Q=="string"}e.isString=A;function M(Q){return typeof Q=="symbol"}e.isSymbol=M;function w(Q){return Q===void 0}e.isUndefined=w;function C(Q){return x(Q)&&F(Q)==="[object RegExp]"}e.isRegExp=C,e.types.isRegExp=C;function x(Q){return typeof Q=="object"&&Q!==null}e.isObject=x;function _(Q){return x(Q)&&F(Q)==="[object Date]"}e.isDate=_,e.types.isDate=_;function k(Q){return x(Q)&&(F(Q)==="[object Error]"||Q instanceof Error)}e.isError=k,e.types.isNativeError=k;function E(Q){return typeof Q=="function"}e.isFunction=E;function I(Q){return Q===null||typeof Q=="boolean"||typeof Q=="number"||typeof Q=="string"||typeof Q=="symbol"||typeof Q>"u"}e.isPrimitive=I,e.isBuffer=g7e();function F(Q){return Object.prototype.toString.call(Q)}function D(Q){return Q<10?"0"+Q.toString(10):Q.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var Q=new Date,J=[D(Q.getHours()),D(Q.getMinutes()),D(Q.getSeconds())].join(":");return[Q.getDate(),z[Q.getMonth()],J].join(" ")}e.log=function(){console.log("%s - %s",N(),e.format.apply(e,arguments))},e.inherits=Um(),e._extend=function(Q,J){if(!J||!x(J))return Q;for(var ne=Object.keys(J),te=ne.length;te--;)Q[ne[te]]=J[ne[te]];return Q};function q(Q,J){return Object.prototype.hasOwnProperty.call(Q,J)}var P=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(P&&J[P]){var ne=J[P];if(typeof ne!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ne,P,{value:ne,enumerable:!1,writable:!1,configurable:!0}),ne}function ne(){for(var te,Z,G=new Promise(function(K,X){te=K,Z=X}),j=[],Y=0;Y0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(m){var y={data:m,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var y=this.head,b=""+y.data;y=y.next;)b+=m+y.data;return b}},{key:"concat",value:function(m){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(m>>>0),b=this.head,g=0;b;)d(b.data,y,g),g+=b.data.length,b=b.next;return y}},{key:"consume",value:function(m,y){var b;return mT.length?T.length:m;if(S===T.length?g+=T:g+=T.slice(0,m),m-=S,m===0){S===T.length?(++b,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=T.slice(S));break}++b}return this.length-=b,g}},{key:"_getBuffer",value:function(m){var y=l.allocUnsafe(m),b=this.head,g=1;for(b.data.copy(y),m-=b.data.length;b=b.next;){var T=b.data,S=m>T.length?T.length:m;if(T.copy(y,y.length-m,0,S),m-=S,m===0){S===T.length?(++g,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=T.slice(S));break}++g}return this.length-=g,y}},{key:h,value:function(m,y){return c(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),v})(),sO}var lO,tue;function WSe(){if(tue)return lO;tue=1;function e(a,f){var i=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(f?f(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ya.nextTick(o,this,a)):Ya.nextTick(o,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(c){!f&&c?i._writableState?i._writableState.errorEmitted?Ya.nextTick(r,i):(i._writableState.errorEmitted=!0,Ya.nextTick(t,i,c)):Ya.nextTick(t,i,c):f?(Ya.nextTick(r,i),f(c)):Ya.nextTick(r,i)}),this)}function t(a,f){o(a,f),r(a)}function r(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(a,f){a.emit("error",f)}function s(a,f){var i=a._readableState,l=a._writableState;i&&i.autoDestroy||l&&l.autoDestroy?a.destroy(f):a.emit("error",f)}return lO={destroy:e,undestroy:n,errorOrDestroy:s},lO}var uO={},rue;function tb(){if(rue)return uO;rue=1;function e(f,i){f.prototype=Object.create(i.prototype),f.prototype.constructor=f,f.__proto__=i}var t={};function r(f,i,l){l||(l=Error);function u(h,d,v){return typeof i=="string"?i:i(h,d,v)}var c=(function(h){e(d,h);function d(v,p,m){return h.call(this,u(v,p,m))||this}return d})(l);c.prototype.name=l.name,c.prototype.code=f,t[f]=c}function n(f,i){if(Array.isArray(f)){var l=f.length;return f=f.map(function(u){return String(u)}),l>2?"one of ".concat(i," ").concat(f.slice(0,l-1).join(", "),", or ")+f[l-1]:l===2?"one of ".concat(i," ").concat(f[0]," or ").concat(f[1]):"of ".concat(i," ").concat(f[0])}else return"of ".concat(i," ").concat(String(f))}function o(f,i,l){return f.substr(0,i.length)===i}function s(f,i,l){return(l===void 0||l>f.length)&&(l=f.length),f.substring(l-i.length,l)===i}function a(f,i,l){return typeof l!="number"&&(l=0),l+i.length>f.length?!1:f.indexOf(i,l)!==-1}return r("ERR_INVALID_OPT_VALUE",function(f,i){return'The value "'+i+'" is invalid for option "'+f+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(f,i,l){var u;typeof i=="string"&&o(i,"not ")?(u="must not be",i=i.replace(/^not /,"")):u="must be";var c;if(s(f," argument"))c="The ".concat(f," ").concat(u," ").concat(n(i,"type"));else{var h=a(f,".")?"property":"argument";c='The "'.concat(f,'" ').concat(h," ").concat(u," ").concat(n(i,"type"))}return c+=". Received type ".concat(typeof l),c},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(f){return"The "+f+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(f){return"Cannot call "+f+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(f){return"Unknown encoding: "+f},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),uO.codes=t,uO}var fO,nue;function XSe(){if(nue)return fO;nue=1;var e=tb().codes.ERR_INVALID_OPT_VALUE;function t(n,o,s){return n.highWaterMark!=null?n.highWaterMark:o?n[s]:null}function r(n,o,s,a){var f=t(o,a,s);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var i=a?s:"highWaterMark";throw new e(i,f)}return Math.floor(f)}return n.objectMode?16:16*1024}return fO={getHighWaterMark:r},fO}var cO,aue;function m7e(){if(aue)return cO;aue=1,cO=e;function e(r,n){if(t("noDeprecation"))return r;var o=!1;function s(){if(!o){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation")?console.trace(n):console.warn(n),o=!0}return r.apply(this,arguments)}return s}function t(r){try{if(!Mu.localStorage)return!1}catch{return!1}var n=Mu.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return cO}var hO,iue;function ZSe(){if(iue)return hO;iue=1,hO=w;function e(te){var Z=this;this.next=null,this.entry=null,this.finish=function(){ne(Z,te)}}var t;w.WritableState=A;var r={deprecate:m7e()},n=BSe(),o=Jx().Buffer,s=(typeof Mu<"u"?Mu:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(te){return o.from(te)}function f(te){return o.isBuffer(te)||te instanceof s}var i=WSe(),l=XSe(),u=l.getHighWaterMark,c=tb().codes,h=c.ERR_INVALID_ARG_TYPE,d=c.ERR_METHOD_NOT_IMPLEMENTED,v=c.ERR_MULTIPLE_CALLBACK,p=c.ERR_STREAM_CANNOT_PIPE,m=c.ERR_STREAM_DESTROYED,y=c.ERR_STREAM_NULL_VALUES,b=c.ERR_STREAM_WRITE_AFTER_END,g=c.ERR_UNKNOWN_ENCODING,T=i.errorOrDestroy;Um()(w,n);function S(){}function A(te,Z,G){t=t||yx(),te=te||{},typeof G!="boolean"&&(G=Z instanceof t),this.objectMode=!!te.objectMode,G&&(this.objectMode=this.objectMode||!!te.writableObjectMode),this.highWaterMark=u(this,te,"writableHighWaterMark",G),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=te.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=te.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){D(Z,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=te.emitClose!==!1,this.autoDestroy=!!te.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}A.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,G=[];Z;)G.push(Z),Z=Z.next;return G},(function(){try{Object.defineProperty(A.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(Z){return M.call(this,Z)?!0:this!==w?!1:Z&&Z._writableState instanceof A}})):M=function(Z){return Z instanceof this};function w(te){t=t||yx();var Z=this instanceof t;if(!Z&&!M.call(w,this))return new w(te);this._writableState=new A(te,this,Z),this.writable=!0,te&&(typeof te.write=="function"&&(this._write=te.write),typeof te.writev=="function"&&(this._writev=te.writev),typeof te.destroy=="function"&&(this._destroy=te.destroy),typeof te.final=="function"&&(this._final=te.final)),n.call(this)}w.prototype.pipe=function(){T(this,new p)};function C(te,Z){var G=new b;T(te,G),Ya.nextTick(Z,G)}function x(te,Z,G,j){var Y;return G===null?Y=new y:typeof G!="string"&&!Z.objectMode&&(Y=new h("chunk",["string","Buffer"],G)),Y?(T(te,Y),Ya.nextTick(j,Y),!1):!0}w.prototype.write=function(te,Z,G){var j=this._writableState,Y=!1,K=!j.objectMode&&f(te);return K&&!o.isBuffer(te)&&(te=a(te)),typeof Z=="function"&&(G=Z,Z=null),K?Z="buffer":Z||(Z=j.defaultEncoding),typeof G!="function"&&(G=S),j.ending?C(this,G):(K||x(this,j,te,G))&&(j.pendingcb++,Y=k(this,j,K,te,Z,G)),Y},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var te=this._writableState;te.corked&&(te.corked--,!te.writing&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&q(this,te))},w.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new g(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function _(te,Z,G){return!te.objectMode&&te.decodeStrings!==!1&&typeof Z=="string"&&(Z=o.from(Z,G)),Z}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(te,Z,G,j,Y,K){if(!G){var X=_(Z,j,Y);j!==X&&(G=!0,Y="buffer",j=X)}var ee=Z.objectMode?1:j.length;Z.length+=ee;var le=Z.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function a(y,b,g){var T=b.length-1;if(T=0?(S>0&&(y.lastNeed=S-1),S):--T=0?(S>0&&(y.lastNeed=S-2),S):--T=0?(S>0&&(S===2?S=0:y.lastNeed=S-3),S):0))}function f(y,b,g){if((b[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return y.lastNeed=2,"�"}}function i(y){var b=this.lastTotal-this.lastNeed,g=f(this,y);if(g!==void 0)return g;if(this.lastNeed<=y.length)return y.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,b,0,y.length),this.lastNeed-=y.length}function l(y,b){var g=a(this,y,b);if(!this.lastNeed)return y.toString("utf8",b);this.lastTotal=g;var T=y.length-(g-this.lastNeed);return y.copy(this.lastChar,0,T),y.toString("utf8",b,T)}function u(y){var b=y&&y.length?this.write(y):"";return this.lastNeed?b+"�":b}function c(y,b){if((y.length-b)%2===0){var g=y.toString("utf16le",b);if(g){var T=g.charCodeAt(g.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",b,y.length-1)}function h(y){var b=y&&y.length?this.write(y):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,g)}return b}function d(y,b){var g=(y.length-b)%3;return g===0?y.toString("base64",b):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",b,y.length-g))}function v(y){var b=y&&y.length?this.write(y):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function p(y){return y.toString(this.encoding)}function m(y){return y&&y.length?this.write(y):""}return vO}var pO,fue;function Q$(){if(fue)return pO;fue=1;var e=tb().codes.ERR_STREAM_PREMATURE_CLOSE;function t(s){var a=!1;return function(){if(!a){a=!0;for(var f=arguments.length,i=new Array(f),l=0;l0)if(typeof X!="string"&&!fe.objectMode&&Object.getPrototypeOf(X)!==n.prototype&&(X=s(X)),le)fe.endEmitted?S(K,new y):_(K,fe,X,!0);else if(fe.ended)S(K,new p);else{if(fe.destroyed)return!1;fe.reading=!1,fe.decoder&&!ee?(X=fe.decoder.write(X),fe.objectMode||X.length!==0?_(K,fe,X,!1):q(K,fe)):_(K,fe,X,!1)}else le||(fe.reading=!1,q(K,fe))}return!fe.ended&&(fe.length=E?K=E:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K}function F(K,X){return K<=0||X.length===0&&X.ended?0:X.objectMode?1:K!==K?X.flowing&&X.length?X.buffer.head.data.length:X.length:(K>X.highWaterMark&&(X.highWaterMark=I(K)),K<=X.length?K:X.ended?X.length:(X.needReadable=!0,0))}C.prototype.read=function(K){i("read",K),K=parseInt(K,10);var X=this._readableState,ee=K;if(K!==0&&(X.emittedReadable=!1),K===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended))return i("read: emitReadable",X.length,X.ended),X.length===0&&X.ended?G(this):z(this),null;if(K=F(K,X),K===0&&X.ended)return X.length===0&&G(this),null;var le=X.needReadable;i("need readable",le),(X.length===0||X.length-K0?oe=Z(K,X):oe=null,oe===null?(X.needReadable=X.length<=X.highWaterMark,K=0):(X.length-=K,X.awaitDrain=0),X.length===0&&(X.ended||(X.needReadable=!0),ee!==K&&X.ended&&G(this)),oe!==null&&this.emit("data",oe),oe};function D(K,X){if(i("onEofChunk"),!X.ended){if(X.decoder){var ee=X.decoder.end();ee&&ee.length&&(X.buffer.push(ee),X.length+=X.objectMode?1:ee.length)}X.ended=!0,X.sync?z(K):(X.needReadable=!1,X.emittedReadable||(X.emittedReadable=!0,N(K)))}}function z(K){var X=K._readableState;i("emitReadable",X.needReadable,X.emittedReadable),X.needReadable=!1,X.emittedReadable||(i("emitReadable",X.flowing),X.emittedReadable=!0,Ya.nextTick(N,K))}function N(K){var X=K._readableState;i("emitReadable_",X.destroyed,X.length,X.ended),!X.destroyed&&(X.length||X.ended)&&(K.emit("readable"),X.emittedReadable=!1),X.needReadable=!X.flowing&&!X.ended&&X.length<=X.highWaterMark,te(K)}function q(K,X){X.readingMore||(X.readingMore=!0,Ya.nextTick(P,K,X))}function P(K,X){for(;!X.reading&&!X.ended&&(X.length1&&Y(le.pipes,K)!==-1)&&!Oe&&(i("false write response, pause",le.awaitDrain),le.awaitDrain++),ee.pause())}function ke(qe){i("onerror",qe),Fe(),K.removeListener("error",ke),t(K,"error")===0&&S(K,qe)}M(K,"error",ke);function Ee(){K.removeListener("finish",Le),Fe()}K.once("close",Ee);function Le(){i("onfinish"),K.removeListener("close",Ee),Fe()}K.once("finish",Le);function Fe(){i("unpipe"),ee.unpipe(K)}return K.emit("pipe",ee),le.flowing||(i("pipe resume"),ee.resume()),K};function B(K){return function(){var ee=K._readableState;i("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&t(K,"data")&&(ee.flowing=!0,te(K))}}C.prototype.unpipe=function(K){var X=this._readableState,ee={hasUnpiped:!1};if(X.pipesCount===0)return this;if(X.pipesCount===1)return K&&K!==X.pipes?this:(K||(K=X.pipes),X.pipes=null,X.pipesCount=0,X.flowing=!1,K&&K.emit("unpipe",this,ee),this);if(!K){var le=X.pipes,oe=X.pipesCount;X.pipes=null,X.pipesCount=0,X.flowing=!1;for(var fe=0;fe0,le.flowing!==!1&&this.resume()):K==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,i("on readable",le.length,le.reading),le.length?z(this):le.reading||Ya.nextTick(Q,this)),ee},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(K,X){var ee=r.prototype.removeListener.call(this,K,X);return K==="readable"&&Ya.nextTick($,this),ee},C.prototype.removeAllListeners=function(K){var X=r.prototype.removeAllListeners.apply(this,arguments);return(K==="readable"||K===void 0)&&Ya.nextTick($,this),X};function $(K){var X=K._readableState;X.readableListening=K.listenerCount("readable")>0,X.resumeScheduled&&!X.paused?X.flowing=!0:K.listenerCount("data")>0&&K.resume()}function Q(K){i("readable nexttick read 0"),K.read(0)}C.prototype.resume=function(){var K=this._readableState;return K.flowing||(i("resume"),K.flowing=!K.readableListening,J(this,K)),K.paused=!1,this};function J(K,X){X.resumeScheduled||(X.resumeScheduled=!0,Ya.nextTick(ne,K,X))}function ne(K,X){i("resume",X.reading),X.reading||K.read(0),X.resumeScheduled=!1,K.emit("resume"),te(K),X.flowing&&!X.reading&&K.read(0)}C.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function te(K){var X=K._readableState;for(i("flow",X.flowing);X.flowing&&K.read()!==null;);}C.prototype.wrap=function(K){var X=this,ee=this._readableState,le=!1;K.on("end",function(){if(i("wrapped end"),ee.decoder&&!ee.ended){var de=ee.decoder.end();de&&de.length&&X.push(de)}X.push(null)}),K.on("data",function(de){if(i("wrapped data"),ee.decoder&&(de=ee.decoder.write(de)),!(ee.objectMode&&de==null)&&!(!ee.objectMode&&(!de||!de.length))){var _e=X.push(de);_e||(le=!0,K.pause())}});for(var oe in K)this[oe]===void 0&&typeof K[oe]=="function"&&(this[oe]=(function(_e){return function(){return K[_e].apply(K,arguments)}})(oe));for(var fe=0;fe=X.length?(X.decoder?ee=X.buffer.join(""):X.buffer.length===1?ee=X.buffer.first():ee=X.buffer.concat(X.length),X.buffer.clear()):ee=X.buffer.consume(K,X.decoder),ee}function G(K){var X=K._readableState;i("endReadable",X.endEmitted),X.endEmitted||(X.ended=!0,Ya.nextTick(j,X,K))}function j(K,X){if(i("endReadableNT",K.endEmitted,K.length),!K.endEmitted&&K.length===0&&(K.endEmitted=!0,X.readable=!1,X.emit("end"),K.autoDestroy)){var ee=X._writableState;(!ee||ee.autoDestroy&&ee.finished)&&X.destroy()}}typeof Symbol=="function"&&(C.from=function(K,X){return T===void 0&&(T=_7e()),T(C,K,X)});function Y(K,X){for(var ee=0,le=K.length;ee0;return f(b,T,S,function(A){m||(m=A),A&&y.forEach(i),!T&&(y.forEach(i),p(m))})});return d.reduce(l)}return _O=c,_O}var wO,yue;function A7e(){if(yue)return wO;yue=1,wO=r;var e=jx().EventEmitter,t=Um();t(r,e),r.Readable=KSe(),r.Writable=ZSe(),r.Duplex=yx(),r.Transform=JSe(),r.PassThrough=w7e(),r.finished=Q$(),r.pipeline=T7e(),r.Stream=r;function r(){e.call(this)}return r.prototype.pipe=function(n,o){var s=this;function a(d){n.writable&&n.write(d)===!1&&s.pause&&s.pause()}s.on("data",a);function f(){s.readable&&s.resume&&s.resume()}n.on("drain",f),!n._isStdio&&(!o||o.end!==!1)&&(s.on("end",l),s.on("close",u));var i=!1;function l(){i||(i=!0,n.end())}function u(){i||(i=!0,typeof n.destroy=="function"&&n.destroy())}function c(d){if(h(),e.listenerCount(this,"error")===0)throw d}s.on("error",c),n.on("error",c);function h(){s.removeListener("data",a),n.removeListener("drain",f),s.removeListener("end",l),s.removeListener("close",u),s.removeListener("error",c),n.removeListener("error",c),s.removeListener("end",h),s.removeListener("close",h),n.removeListener("close",h)}return s.on("end",h),s.on("close",h),n.on("close",h),n.emit("pipe",s),n},wO}var QSe={},oM={};oM.byteLength=E7e;oM.toByteArray=C7e;oM.fromByteArray=P7e;var e0=[],wv=[],S7e=typeof Uint8Array<"u"?Uint8Array:Array,TO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var W1=0,M7e=TO.length;W10)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function E7e(e){var t=eMe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function k7e(e,t,r){return(t+r)*3/4-r}function C7e(e){var t,r=eMe(e),n=r[0],o=r[1],s=new S7e(k7e(e,n,o)),a=0,f=o>0?n-4:n,i;for(i=0;i>16&255,s[a++]=t>>8&255,s[a++]=t&255;return o===2&&(t=wv[e.charCodeAt(i)]<<2|wv[e.charCodeAt(i+1)]>>4,s[a++]=t&255),o===1&&(t=wv[e.charCodeAt(i)]<<10|wv[e.charCodeAt(i+1)]<<4|wv[e.charCodeAt(i+2)]>>2,s[a++]=t>>8&255,s[a++]=t&255),s}function R7e(e){return e0[e>>18&63]+e0[e>>12&63]+e0[e>>6&63]+e0[e&63]}function L7e(e,t,r){for(var n,o=[],s=t;sf?f:a+s));return n===1?(t=e[r-1],o.push(e0[t>>2]+e0[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(e0[t>>10]+e0[t>>4&63]+e0[t<<2&63]+"=")),o.join("")}var eW={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */eW.read=function(e,t,r,n,o){var s,a,f=o*8-n-1,i=(1<>1,u=-7,c=r?o-1:0,h=r?-1:1,d=e[t+c];for(c+=h,s=d&(1<<-u)-1,d>>=-u,u+=f;u>0;s=s*256+e[t+c],c+=h,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=a*256+e[t+c],c+=h,u-=8);if(s===0)s=1-l;else{if(s===i)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-l}return(d?-1:1)*a*Math.pow(2,s-n)};eW.write=function(e,t,r,n,o,s){var a,f,i,l=s*8-o-1,u=(1<>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,v=n?1:-1,p=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-a))<1&&(a--,i*=2),a+c>=1?t+=h/i:t+=h*Math.pow(2,1-c),t*i>=2&&(a++,i/=2),a+c>=u?(f=0,a=u):a+c>=1?(f=(t*i-1)*Math.pow(2,o),a=a+c):(f=t*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=f&255,d+=v,f/=256,o-=8);for(a=a<0;e[r+d]=a&255,d+=v,a/=256,l-=8);e[r+d-v]|=p*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=oM,r=eW,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=S,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:f}=globalThis;u.TYPED_ARRAY_SUPPORT=i(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const De=new s(1),me={foo:function(){return 42}};return Object.setPrototypeOf(me,s.prototype),Object.setPrototypeOf(De,me),De.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(De){if(De>o)throw new RangeError('The value "'+De+'" is invalid for option "size"');const me=new s(De);return Object.setPrototypeOf(me,u.prototype),me}function u(De,me,Ce){if(typeof De=="number"){if(typeof me=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(De)}return c(De,me,Ce)}u.poolSize=8192;function c(De,me,Ce){if(typeof De=="string")return p(De,me);if(a.isView(De))return y(De);if(De==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De);if(Le(De,a)||De&&Le(De.buffer,a)||typeof f<"u"&&(Le(De,f)||De&&Le(De.buffer,f)))return b(De,me,Ce);if(typeof De=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const et=De.valueOf&&De.valueOf();if(et!=null&&et!==De)return u.from(et,me,Ce);const st=g(De);if(st)return st;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof De[Symbol.toPrimitive]=="function")return u.from(De[Symbol.toPrimitive]("string"),me,Ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De)}u.from=function(De,me,Ce){return c(De,me,Ce)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function h(De){if(typeof De!="number")throw new TypeError('"size" argument must be of type number');if(De<0)throw new RangeError('The value "'+De+'" is invalid for option "size"')}function d(De,me,Ce){return h(De),De<=0?l(De):me!==void 0?typeof Ce=="string"?l(De).fill(me,Ce):l(De).fill(me):l(De)}u.alloc=function(De,me,Ce){return d(De,me,Ce)};function v(De){return h(De),l(De<0?0:T(De)|0)}u.allocUnsafe=function(De){return v(De)},u.allocUnsafeSlow=function(De){return v(De)};function p(De,me){if((typeof me!="string"||me==="")&&(me="utf8"),!u.isEncoding(me))throw new TypeError("Unknown encoding: "+me);const Ce=A(De,me)|0;let et=l(Ce);const st=et.write(De,me);return st!==Ce&&(et=et.slice(0,st)),et}function m(De){const me=De.length<0?0:T(De.length)|0,Ce=l(me);for(let et=0;et=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return De|0}function S(De){return+De!=De&&(De=0),u.alloc(+De)}u.isBuffer=function(me){return me!=null&&me._isBuffer===!0&&me!==u.prototype},u.compare=function(me,Ce){if(Le(me,s)&&(me=u.from(me,me.offset,me.byteLength)),Le(Ce,s)&&(Ce=u.from(Ce,Ce.offset,Ce.byteLength)),!u.isBuffer(me)||!u.isBuffer(Ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(me===Ce)return 0;let et=me.length,st=Ce.length;for(let ot=0,ut=Math.min(et,st);otst.length?(u.isBuffer(ut)||(ut=u.from(ut)),ut.copy(st,ot)):s.prototype.set.call(st,ut,ot);else if(u.isBuffer(ut))ut.copy(st,ot);else throw new TypeError('"list" argument must be an Array of Buffers');ot+=ut.length}return st};function A(De,me){if(u.isBuffer(De))return De.length;if(a.isView(De)||Le(De,a))return De.byteLength;if(typeof De!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof De);const Ce=De.length,et=arguments.length>2&&arguments[2]===!0;if(!et&&Ce===0)return 0;let st=!1;for(;;)switch(me){case"ascii":case"latin1":case"binary":return Ce;case"utf8":case"utf-8":return Oe(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce*2;case"hex":return Ce>>>1;case"base64":return ke(De).length;default:if(st)return et?-1:Oe(De).length;me=(""+me).toLowerCase(),st=!0}}u.byteLength=A;function M(De,me,Ce){let et=!1;if((me===void 0||me<0)&&(me=0),me>this.length||((Ce===void 0||Ce>this.length)&&(Ce=this.length),Ce<=0)||(Ce>>>=0,me>>>=0,Ce<=me))return"";for(De||(De="utf8");;)switch(De){case"hex":return $(this,me,Ce);case"utf8":case"utf-8":return z(this,me,Ce);case"ascii":return P(this,me,Ce);case"latin1":case"binary":return B(this,me,Ce);case"base64":return D(this,me,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,me,Ce);default:if(et)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),et=!0}}u.prototype._isBuffer=!0;function w(De,me,Ce){const et=De[me];De[me]=De[Ce],De[Ce]=et}u.prototype.swap16=function(){const me=this.length;if(me%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Ce=0;CeCe&&(me+=" ... "),""},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(me,Ce,et,st,ot){if(Le(me,s)&&(me=u.from(me,me.offset,me.byteLength)),!u.isBuffer(me))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof me);if(Ce===void 0&&(Ce=0),et===void 0&&(et=me?me.length:0),st===void 0&&(st=0),ot===void 0&&(ot=this.length),Ce<0||et>me.length||st<0||ot>this.length)throw new RangeError("out of range index");if(st>=ot&&Ce>=et)return 0;if(st>=ot)return-1;if(Ce>=et)return 1;if(Ce>>>=0,et>>>=0,st>>>=0,ot>>>=0,this===me)return 0;let ut=ot-st,ht=et-Ce;const Ht=Math.min(ut,ht),Et=this.slice(st,ot),Jt=me.slice(Ce,et);for(let Tt=0;Tt2147483647?Ce=2147483647:Ce<-2147483648&&(Ce=-2147483648),Ce=+Ce,Fe(Ce)&&(Ce=st?0:De.length-1),Ce<0&&(Ce=De.length+Ce),Ce>=De.length){if(st)return-1;Ce=De.length-1}else if(Ce<0)if(st)Ce=0;else return-1;if(typeof me=="string"&&(me=u.from(me,et)),u.isBuffer(me))return me.length===0?-1:x(De,me,Ce,et,st);if(typeof me=="number")return me=me&255,typeof s.prototype.indexOf=="function"?st?s.prototype.indexOf.call(De,me,Ce):s.prototype.lastIndexOf.call(De,me,Ce):x(De,[me],Ce,et,st);throw new TypeError("val must be string, number or Buffer")}function x(De,me,Ce,et,st){let ot=1,ut=De.length,ht=me.length;if(et!==void 0&&(et=String(et).toLowerCase(),et==="ucs2"||et==="ucs-2"||et==="utf16le"||et==="utf-16le")){if(De.length<2||me.length<2)return-1;ot=2,ut/=2,ht/=2,Ce/=2}function Ht(Jt,Tt){return ot===1?Jt[Tt]:Jt.readUInt16BE(Tt*ot)}let Et;if(st){let Jt=-1;for(Et=Ce;Etut&&(Ce=ut-ht),Et=Ce;Et>=0;Et--){let Jt=!0;for(let Tt=0;Ttst&&(et=st)):et=st;const ot=me.length;et>ot/2&&(et=ot/2);let ut;for(ut=0;ut>>0,isFinite(et)?(et=et>>>0,st===void 0&&(st="utf8")):(st=et,et=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ot=this.length-Ce;if((et===void 0||et>ot)&&(et=ot),me.length>0&&(et<0||Ce<0)||Ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");st||(st="utf8");let ut=!1;for(;;)switch(st){case"hex":return _(this,me,Ce,et);case"utf8":case"utf-8":return k(this,me,Ce,et);case"ascii":case"latin1":case"binary":return E(this,me,Ce,et);case"base64":return I(this,me,Ce,et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,me,Ce,et);default:if(ut)throw new TypeError("Unknown encoding: "+st);st=(""+st).toLowerCase(),ut=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function D(De,me,Ce){return me===0&&Ce===De.length?t.fromByteArray(De):t.fromByteArray(De.slice(me,Ce))}function z(De,me,Ce){Ce=Math.min(De.length,Ce);const et=[];let st=me;for(;st239?4:ot>223?3:ot>191?2:1;if(st+ht<=Ce){let Ht,Et,Jt,Tt;switch(ht){case 1:ot<128&&(ut=ot);break;case 2:Ht=De[st+1],(Ht&192)===128&&(Tt=(ot&31)<<6|Ht&63,Tt>127&&(ut=Tt));break;case 3:Ht=De[st+1],Et=De[st+2],(Ht&192)===128&&(Et&192)===128&&(Tt=(ot&15)<<12|(Ht&63)<<6|Et&63,Tt>2047&&(Tt<55296||Tt>57343)&&(ut=Tt));break;case 4:Ht=De[st+1],Et=De[st+2],Jt=De[st+3],(Ht&192)===128&&(Et&192)===128&&(Jt&192)===128&&(Tt=(ot&15)<<18|(Ht&63)<<12|(Et&63)<<6|Jt&63,Tt>65535&&Tt<1114112&&(ut=Tt))}}ut===null?(ut=65533,ht=1):ut>65535&&(ut-=65536,et.push(ut>>>10&1023|55296),ut=56320|ut&1023),et.push(ut),st+=ht}return q(et)}const N=4096;function q(De){const me=De.length;if(me<=N)return String.fromCharCode.apply(String,De);let Ce="",et=0;for(;etet)&&(Ce=et);let st="";for(let ot=me;otet&&(me=et),Ce<0?(Ce+=et,Ce<0&&(Ce=0)):Ce>et&&(Ce=et),CeCe)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(me,Ce,et){me=me>>>0,Ce=Ce>>>0,et||J(me,Ce,this.length);let st=this[me],ot=1,ut=0;for(;++ut>>0,Ce=Ce>>>0,et||J(me,Ce,this.length);let st=this[me+--Ce],ot=1;for(;Ce>0&&(ot*=256);)st+=this[me+--Ce]*ot;return st},u.prototype.readUint8=u.prototype.readUInt8=function(me,Ce){return me=me>>>0,Ce||J(me,1,this.length),this[me]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(me,Ce){return me=me>>>0,Ce||J(me,2,this.length),this[me]|this[me+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(me,Ce){return me=me>>>0,Ce||J(me,2,this.length),this[me]<<8|this[me+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(me,Ce){return me=me>>>0,Ce||J(me,4,this.length),(this[me]|this[me+1]<<8|this[me+2]<<16)+this[me+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(me,Ce){return me=me>>>0,Ce||J(me,4,this.length),this[me]*16777216+(this[me+1]<<16|this[me+2]<<8|this[me+3])},u.prototype.readBigUInt64LE=We(function(me){me=me>>>0,fe(me,"offset");const Ce=this[me],et=this[me+7];(Ce===void 0||et===void 0)&&de(me,this.length-8);const st=Ce+this[++me]*2**8+this[++me]*2**16+this[++me]*2**24,ot=this[++me]+this[++me]*2**8+this[++me]*2**16+et*2**24;return BigInt(st)+(BigInt(ot)<>>0,fe(me,"offset");const Ce=this[me],et=this[me+7];(Ce===void 0||et===void 0)&&de(me,this.length-8);const st=Ce*2**24+this[++me]*2**16+this[++me]*2**8+this[++me],ot=this[++me]*2**24+this[++me]*2**16+this[++me]*2**8+et;return(BigInt(st)<>>0,Ce=Ce>>>0,et||J(me,Ce,this.length);let st=this[me],ot=1,ut=0;for(;++ut=ot&&(st-=Math.pow(2,8*Ce)),st},u.prototype.readIntBE=function(me,Ce,et){me=me>>>0,Ce=Ce>>>0,et||J(me,Ce,this.length);let st=Ce,ot=1,ut=this[me+--st];for(;st>0&&(ot*=256);)ut+=this[me+--st]*ot;return ot*=128,ut>=ot&&(ut-=Math.pow(2,8*Ce)),ut},u.prototype.readInt8=function(me,Ce){return me=me>>>0,Ce||J(me,1,this.length),this[me]&128?(255-this[me]+1)*-1:this[me]},u.prototype.readInt16LE=function(me,Ce){me=me>>>0,Ce||J(me,2,this.length);const et=this[me]|this[me+1]<<8;return et&32768?et|4294901760:et},u.prototype.readInt16BE=function(me,Ce){me=me>>>0,Ce||J(me,2,this.length);const et=this[me+1]|this[me]<<8;return et&32768?et|4294901760:et},u.prototype.readInt32LE=function(me,Ce){return me=me>>>0,Ce||J(me,4,this.length),this[me]|this[me+1]<<8|this[me+2]<<16|this[me+3]<<24},u.prototype.readInt32BE=function(me,Ce){return me=me>>>0,Ce||J(me,4,this.length),this[me]<<24|this[me+1]<<16|this[me+2]<<8|this[me+3]},u.prototype.readBigInt64LE=We(function(me){me=me>>>0,fe(me,"offset");const Ce=this[me],et=this[me+7];(Ce===void 0||et===void 0)&&de(me,this.length-8);const st=this[me+4]+this[me+5]*2**8+this[me+6]*2**16+(et<<24);return(BigInt(st)<>>0,fe(me,"offset");const Ce=this[me],et=this[me+7];(Ce===void 0||et===void 0)&&de(me,this.length-8);const st=(Ce<<24)+this[++me]*2**16+this[++me]*2**8+this[++me];return(BigInt(st)<>>0,Ce||J(me,4,this.length),r.read(this,me,!0,23,4)},u.prototype.readFloatBE=function(me,Ce){return me=me>>>0,Ce||J(me,4,this.length),r.read(this,me,!1,23,4)},u.prototype.readDoubleLE=function(me,Ce){return me=me>>>0,Ce||J(me,8,this.length),r.read(this,me,!0,52,8)},u.prototype.readDoubleBE=function(me,Ce){return me=me>>>0,Ce||J(me,8,this.length),r.read(this,me,!1,52,8)};function ne(De,me,Ce,et,st,ot){if(!u.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(me>st||meDe.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(me,Ce,et,st){if(me=+me,Ce=Ce>>>0,et=et>>>0,!st){const ht=Math.pow(2,8*et)-1;ne(this,me,Ce,et,ht,0)}let ot=1,ut=0;for(this[Ce]=me&255;++ut>>0,et=et>>>0,!st){const ht=Math.pow(2,8*et)-1;ne(this,me,Ce,et,ht,0)}let ot=et-1,ut=1;for(this[Ce+ot]=me&255;--ot>=0&&(ut*=256);)this[Ce+ot]=me/ut&255;return Ce+et},u.prototype.writeUint8=u.prototype.writeUInt8=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,1,255,0),this[Ce]=me&255,Ce+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,2,65535,0),this[Ce]=me&255,this[Ce+1]=me>>>8,Ce+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,2,65535,0),this[Ce]=me>>>8,this[Ce+1]=me&255,Ce+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,4,4294967295,0),this[Ce+3]=me>>>24,this[Ce+2]=me>>>16,this[Ce+1]=me>>>8,this[Ce]=me&255,Ce+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,4,4294967295,0),this[Ce]=me>>>24,this[Ce+1]=me>>>16,this[Ce+2]=me>>>8,this[Ce+3]=me&255,Ce+4};function te(De,me,Ce,et,st){oe(me,et,st,De,Ce,7);let ot=Number(me&BigInt(4294967295));De[Ce++]=ot,ot=ot>>8,De[Ce++]=ot,ot=ot>>8,De[Ce++]=ot,ot=ot>>8,De[Ce++]=ot;let ut=Number(me>>BigInt(32)&BigInt(4294967295));return De[Ce++]=ut,ut=ut>>8,De[Ce++]=ut,ut=ut>>8,De[Ce++]=ut,ut=ut>>8,De[Ce++]=ut,Ce}function Z(De,me,Ce,et,st){oe(me,et,st,De,Ce,7);let ot=Number(me&BigInt(4294967295));De[Ce+7]=ot,ot=ot>>8,De[Ce+6]=ot,ot=ot>>8,De[Ce+5]=ot,ot=ot>>8,De[Ce+4]=ot;let ut=Number(me>>BigInt(32)&BigInt(4294967295));return De[Ce+3]=ut,ut=ut>>8,De[Ce+2]=ut,ut=ut>>8,De[Ce+1]=ut,ut=ut>>8,De[Ce]=ut,Ce+8}u.prototype.writeBigUInt64LE=We(function(me,Ce=0){return te(this,me,Ce,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=We(function(me,Ce=0){return Z(this,me,Ce,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(me,Ce,et,st){if(me=+me,Ce=Ce>>>0,!st){const Ht=Math.pow(2,8*et-1);ne(this,me,Ce,et,Ht-1,-Ht)}let ot=0,ut=1,ht=0;for(this[Ce]=me&255;++ot>0)-ht&255;return Ce+et},u.prototype.writeIntBE=function(me,Ce,et,st){if(me=+me,Ce=Ce>>>0,!st){const Ht=Math.pow(2,8*et-1);ne(this,me,Ce,et,Ht-1,-Ht)}let ot=et-1,ut=1,ht=0;for(this[Ce+ot]=me&255;--ot>=0&&(ut*=256);)me<0&&ht===0&&this[Ce+ot+1]!==0&&(ht=1),this[Ce+ot]=(me/ut>>0)-ht&255;return Ce+et},u.prototype.writeInt8=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,1,127,-128),me<0&&(me=255+me+1),this[Ce]=me&255,Ce+1},u.prototype.writeInt16LE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,2,32767,-32768),this[Ce]=me&255,this[Ce+1]=me>>>8,Ce+2},u.prototype.writeInt16BE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,2,32767,-32768),this[Ce]=me>>>8,this[Ce+1]=me&255,Ce+2},u.prototype.writeInt32LE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,4,2147483647,-2147483648),this[Ce]=me&255,this[Ce+1]=me>>>8,this[Ce+2]=me>>>16,this[Ce+3]=me>>>24,Ce+4},u.prototype.writeInt32BE=function(me,Ce,et){return me=+me,Ce=Ce>>>0,et||ne(this,me,Ce,4,2147483647,-2147483648),me<0&&(me=4294967295+me+1),this[Ce]=me>>>24,this[Ce+1]=me>>>16,this[Ce+2]=me>>>8,this[Ce+3]=me&255,Ce+4},u.prototype.writeBigInt64LE=We(function(me,Ce=0){return te(this,me,Ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=We(function(me,Ce=0){return Z(this,me,Ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(De,me,Ce,et,st,ot){if(Ce+et>De.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("Index out of range")}function j(De,me,Ce,et,st){return me=+me,Ce=Ce>>>0,st||G(De,me,Ce,4),r.write(De,me,Ce,et,23,4),Ce+4}u.prototype.writeFloatLE=function(me,Ce,et){return j(this,me,Ce,!0,et)},u.prototype.writeFloatBE=function(me,Ce,et){return j(this,me,Ce,!1,et)};function Y(De,me,Ce,et,st){return me=+me,Ce=Ce>>>0,st||G(De,me,Ce,8),r.write(De,me,Ce,et,52,8),Ce+8}u.prototype.writeDoubleLE=function(me,Ce,et){return Y(this,me,Ce,!0,et)},u.prototype.writeDoubleBE=function(me,Ce,et){return Y(this,me,Ce,!1,et)},u.prototype.copy=function(me,Ce,et,st){if(!u.isBuffer(me))throw new TypeError("argument should be a Buffer");if(et||(et=0),!st&&st!==0&&(st=this.length),Ce>=me.length&&(Ce=me.length),Ce||(Ce=0),st>0&&st=this.length)throw new RangeError("Index out of range");if(st<0)throw new RangeError("sourceEnd out of bounds");st>this.length&&(st=this.length),me.length-Ce>>0,et=et===void 0?this.length:et>>>0,me||(me=0);let ot;if(typeof me=="number")for(ot=Ce;ot2**32?st=ee(String(Ce)):typeof Ce=="bigint"&&(st=String(Ce),(Ce>BigInt(2)**BigInt(32)||Ce<-(BigInt(2)**BigInt(32)))&&(st=ee(st)),st+="n"),et+=` It must be ${me}. Received ${st}`,et},RangeError);function ee(De){let me="",Ce=De.length;const et=De[0]==="-"?1:0;for(;Ce>=et+4;Ce-=3)me=`_${De.slice(Ce-3,Ce)}${me}`;return`${De.slice(0,Ce)}${me}`}function le(De,me,Ce){fe(me,"offset"),(De[me]===void 0||De[me+Ce]===void 0)&&de(me,De.length-(Ce+1))}function oe(De,me,Ce,et,st,ot){if(De>Ce||De= 0${ut} and < 2${ut} ** ${(ot+1)*8}${ut}`:ht=`>= -(2${ut} ** ${(ot+1)*8-1}${ut}) and < 2 ** ${(ot+1)*8-1}${ut}`,new K.ERR_OUT_OF_RANGE("value",ht,De)}le(et,st,ot)}function fe(De,me){if(typeof De!="number")throw new K.ERR_INVALID_ARG_TYPE(me,"number",De)}function de(De,me,Ce){throw Math.floor(De)!==De?(fe(De,Ce),new K.ERR_OUT_OF_RANGE("offset","an integer",De)):me<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${me}`,De)}const _e=/[^+/0-9A-Za-z-_]/g;function we(De){if(De=De.split("=")[0],De=De.trim().replace(_e,""),De.length<2)return"";for(;De.length%4!==0;)De=De+"=";return De}function Oe(De,me){me=me||1/0;let Ce;const et=De.length;let st=null;const ot=[];for(let ut=0;ut55295&&Ce<57344){if(!st){if(Ce>56319){(me-=3)>-1&&ot.push(239,191,189);continue}else if(ut+1===et){(me-=3)>-1&&ot.push(239,191,189);continue}st=Ce;continue}if(Ce<56320){(me-=3)>-1&&ot.push(239,191,189),st=Ce;continue}Ce=(st-55296<<10|Ce-56320)+65536}else st&&(me-=3)>-1&&ot.push(239,191,189);if(st=null,Ce<128){if((me-=1)<0)break;ot.push(Ce)}else if(Ce<2048){if((me-=2)<0)break;ot.push(Ce>>6|192,Ce&63|128)}else if(Ce<65536){if((me-=3)<0)break;ot.push(Ce>>12|224,Ce>>6&63|128,Ce&63|128)}else if(Ce<1114112){if((me-=4)<0)break;ot.push(Ce>>18|240,Ce>>12&63|128,Ce>>6&63|128,Ce&63|128)}else throw new Error("Invalid code point")}return ot}function be(De){const me=[];for(let Ce=0;Ce>8,st=Ce%256,ot.push(st),ot.push(et);return ot}function ke(De){return t.toByteArray(we(De))}function Ee(De,me,Ce,et){let st;for(st=0;st=me.length||st>=De.length);++st)me[st+Ce]=De[st];return st}function Le(De,me){return De instanceof me||De!=null&&De.constructor!=null&&De.constructor.name!=null&&De.constructor.name===me.name}function Fe(De){return De!==De}const qe=(function(){const De="0123456789abcdef",me=new Array(256);for(let Ce=0;Ce<16;++Ce){const et=Ce*16;for(let st=0;st<16;++st)me[et+st]=De[Ce]+De[st]}return me})();function We(De){return typeof BigInt>"u"?Qe:De}function Qe(){throw new Error("BigInt not supported")}})(QSe);const V3=QSe.Buffer;var AO={exports:{}},SO={},mue;function tMe(){if(mue)return SO;mue=1;function e(b){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},e(b)}function t(b,g,T){return Object.defineProperty(b,"prototype",{writable:!1}),b}function r(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function n(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),g&&o(b,g)}function o(b,g){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,A){return S.__proto__=A,S},o(b,g)}function s(b){var g=i();return function(){var S=l(b),A;if(g){var M=l(this).constructor;A=Reflect.construct(S,arguments,M)}else A=S.apply(this,arguments);return a(this,A)}}function a(b,g){if(g&&(e(g)==="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(b)}function f(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function l(b){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},l(b)}var u={},c,h;function d(b,g,T){T||(T=Error);function S(M,w,C){return typeof g=="string"?g:g(M,w,C)}var A=(function(M){n(C,M);var w=s(C);function C(x,_,k){var E;return r(this,C),E=w.call(this,S(x,_,k)),E.code=b,E}return t(C)})(T);u[b]=A}function v(b,g){if(Array.isArray(b)){var T=b.length;return b=b.map(function(S){return String(S)}),T>2?"one of ".concat(g," ").concat(b.slice(0,T-1).join(", "),", or ")+b[T-1]:T===2?"one of ".concat(g," ").concat(b[0]," or ").concat(b[1]):"of ".concat(g," ").concat(b[0])}else return"of ".concat(g," ").concat(String(b))}function p(b,g,T){return b.substr(0,g.length)===g}function m(b,g,T){return(T===void 0||T>b.length)&&(T=b.length),b.substring(T-g.length,T)===g}function y(b,g,T){return typeof T!="number"&&(T=0),T+g.length>b.length?!1:b.indexOf(g,T)!==-1}return d("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),d("ERR_INVALID_ARG_TYPE",function(b,g,T){c===void 0&&(c=rV()),c(typeof b=="string","'name' must be a string");var S;typeof g=="string"&&p(g,"not ")?(S="must not be",g=g.replace(/^not /,"")):S="must be";var A;if(m(b," argument"))A="The ".concat(b," ").concat(S," ").concat(v(g,"type"));else{var M=y(b,".")?"property":"argument";A='The "'.concat(b,'" ').concat(M," ").concat(S," ").concat(v(g,"type"))}return A+=". Received type ".concat(e(T)),A},TypeError),d("ERR_INVALID_ARG_VALUE",function(b,g){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";h===void 0&&(h=mm());var S=h.inspect(g);return S.length>128&&(S="".concat(S.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(T,". Received ").concat(S)},TypeError),d("ERR_INVALID_RETURN_VALUE",function(b,g,T){var S;return T&&T.constructor&&T.constructor.name?S="instance of ".concat(T.constructor.name):S="type ".concat(e(T)),"Expected ".concat(b,' to be returned from the "').concat(g,'"')+" function but got ".concat(S,".")},TypeError),d("ERR_MISSING_ARGS",function(){for(var b=arguments.length,g=new Array(b),T=0;T0,"At least one arg needs to be specified");var S="The ",A=g.length;switch(g=g.map(function(M){return'"'.concat(M,'"')}),A){case 1:S+="".concat(g[0]," argument");break;case 2:S+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:S+=g.slice(0,A-1).join(", "),S+=", and ".concat(g[A-1]," arguments");break}return"".concat(S," must be specified")},TypeError),SO.codes=u,SO}var MO,xue;function D7e(){if(xue)return MO;xue=1;function e(q,P){var B=Object.keys(q);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(q);P&&($=$.filter(function(Q){return Object.getOwnPropertyDescriptor(q,Q).enumerable})),B.push.apply(B,$)}return B}function t(q){for(var P=1;P"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(q){return Function.toString.call(q).indexOf("[native code]")!==-1}function m(q,P){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,Q){return $.__proto__=Q,$},m(q,P)}function y(q){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)},y(q)}function b(q){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},b(q)}var g=mm(),T=g.inspect,S=tMe(),A=S.codes.ERR_INVALID_ARG_TYPE;function M(q,P,B){return(B===void 0||B>q.length)&&(B=q.length),q.substring(B-P.length,B)===P}function w(q,P){if(P=Math.floor(P),q.length==0||P==0)return"";var B=q.length*P;for(P=Math.floor(Math.log(P)/Math.log(2));P;)q+=q,P--;return q+=q.substring(0,B-q.length),q}var C="",x="",_="",k="",E={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},I=10;function F(q){var P=Object.keys(q),B=Object.create(Object.getPrototypeOf(q));return P.forEach(function($){B[$]=q[$]}),Object.defineProperty(B,"message",{value:q.message}),B}function D(q){return T(q,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function z(q,P,B){var $="",Q="",J=0,ne="",te=!1,Z=D(q),G=Z.split(` +`),j=D(P).split(` +`),Y=0,K="";if(B==="strictEqual"&&b(q)==="object"&&b(P)==="object"&&q!==null&&P!==null&&(B="strictEqualObject"),G.length===1&&j.length===1&&G[0]!==j[0]){var X=G[0].length+j[0].length;if(X<=I){if((b(q)!=="object"||q===null)&&(b(P)!=="object"||P===null)&&(q!==0||P!==0))return"".concat(E[B],` + +`)+"".concat(G[0]," !== ").concat(j[0],` +`)}else if(B!=="strictEqualObject"){var ee=Ya.stderr&&Ya.stderr.isTTY?Ya.stderr.columns:80;if(X2&&(K=` + `.concat(w(" ",Y),"^"),Y=0)}}}for(var le=G[G.length-1],oe=j[j.length-1];le===oe&&(Y++<2?ne=` + `.concat(le).concat(ne):$=le,G.pop(),j.pop(),!(G.length===0||j.length===0));)le=G[G.length-1],oe=j[j.length-1];var fe=Math.max(G.length,j.length);if(fe===0){var de=Z.split(` +`);if(de.length>30)for(de[26]="".concat(C,"...").concat(k);de.length>27;)de.pop();return"".concat(E.notIdentical,` + +`).concat(de.join(` +`),` +`)}Y>3&&(ne=` +`.concat(C,"...").concat(k).concat(ne),te=!0),$!==""&&(ne=` + `.concat($).concat(ne),$="");var _e=0,we=E[B]+` +`.concat(x,"+ actual").concat(k," ").concat(_,"- expected").concat(k),Oe=" ".concat(C,"...").concat(k," Lines skipped");for(Y=0;Y1&&Y>2&&(be>4?(Q+=` +`.concat(C,"...").concat(k),te=!0):be>3&&(Q+=` + `.concat(j[Y-2]),_e++),Q+=` + `.concat(j[Y-1]),_e++),J=Y,$+=` +`.concat(_,"-").concat(k," ").concat(j[Y]),_e++;else if(j.length1&&Y>2&&(be>4?(Q+=` +`.concat(C,"...").concat(k),te=!0):be>3&&(Q+=` + `.concat(G[Y-2]),_e++),Q+=` + `.concat(G[Y-1]),_e++),J=Y,Q+=` +`.concat(x,"+").concat(k," ").concat(G[Y]),_e++;else{var Te=j[Y],ke=G[Y],Ee=ke!==Te&&(!M(ke,",")||ke.slice(0,-1)!==Te);Ee&&M(Te,",")&&Te.slice(0,-1)===ke&&(Ee=!1,ke+=","),Ee?(be>1&&Y>2&&(be>4?(Q+=` +`.concat(C,"...").concat(k),te=!0):be>3&&(Q+=` + `.concat(G[Y-2]),_e++),Q+=` + `.concat(G[Y-1]),_e++),J=Y,Q+=` +`.concat(x,"+").concat(k," ").concat(ke),$+=` +`.concat(_,"-").concat(k," ").concat(Te),_e+=2):(Q+=$,$="",(be===1||Y===0)&&(Q+=` + `.concat(ke),_e++))}if(_e>20&&Y30)for(X[26]="".concat(C,"...").concat(k);X.length>27;)X.pop();X.length===1?J=B.call(this,"".concat(K," ").concat(X[0])):J=B.call(this,"".concat(K,` + +`).concat(X.join(` +`),` +`))}else{var ee=D(G),le="",oe=E[te];te==="notDeepEqual"||te==="notEqual"?(ee="".concat(E[te],` + +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(le="".concat(D(j)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),le.length>512&&(le="".concat(le.slice(0,509),"...")),te==="deepEqual"||te==="equal"?ee="".concat(oe,` + +`).concat(ee,` + +should equal + +`):le=" ".concat(te," ").concat(le)),J=B.call(this,"".concat(ee).concat(le))}return Error.stackTraceLimit=Y,J.generatedMessage=!ne,Object.defineProperty(c(J),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),J.code="ERR_ASSERTION",J.actual=G,J.expected=j,J.operator=te,Error.captureStackTrace&&Error.captureStackTrace(c(J),Z),J.stack,J.name="AssertionError",u(J)}return s($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:P,value:function(J,ne){return T(this,t(t({},ne),{},{customInspect:!1,depth:0}))}}]),$})(h(Error),T.custom);return MO=N,MO}var EO,bue;function rMe(){if(bue)return EO;bue=1;var e=Object.prototype.toString;return EO=function(r){var n=e.call(r),o=n==="[object Arguments]";return o||(o=n!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&e.call(r.callee)==="[object Function]"),o},EO}var kO,_ue;function I7e(){if(_ue)return kO;_ue=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=rMe(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},"toString"),a=o.call(function(){},"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=function(h){var d=h.constructor;return d&&d.prototype===h},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=(function(){if(typeof window>"u")return!1;for(var h in window)try{if(!l["$"+h]&&t.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{i(window[h])}catch{return!0}}catch{return!0}return!1})(),c=function(h){if(typeof window>"u"||!u)return i(h);try{return i(h)}catch{return!1}};e=function(d){var v=d!==null&&typeof d=="object",p=r.call(d)==="[object Function]",m=n(d),y=v&&r.call(d)==="[object String]",b=[];if(!v&&!p&&!m)throw new TypeError("Object.keys called on a non-object");var g=a&&p;if(y&&d.length>0&&!t.call(d,0))for(var T=0;T0)for(var S=0;S-1?t(a):a},IO}var OO,kue;function sM(){if(kue)return OO;kue=1;var e=nMe(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,o=VSe(),s=function(l){return typeof l=="function"&&r.call(l)==="[object Function]"},a=YSe()(),f=function(l,u,c,h){if(u in l){if(h===!0){if(l[u]===c)return}else if(!s(h)||!h())return}a?o(l,u,c,!0):o(l,u,c)},i=function(l,u){var c=arguments.length>2?arguments[2]:{},h=e(u);t&&(h=n.call(h,Object.getOwnPropertySymbols(u)));for(var d=0;dEe.length)&&(Le=Ee.length);for(var Fe=0,qe=new Array(Le);Fe10)return!0;for(var Le=0;Le57)return!0}return Ee.length===10&&Ee>=Math.pow(2,32)}function N(Ee){return Object.keys(Ee).filter(z).concat(c(Ee).filter(Object.prototype.propertyIsEnumerable.bind(Ee)))}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function q(Ee,Le){if(Ee===Le)return 0;for(var Fe=Ee.length,qe=Le.length,We=0,Qe=Math.min(Fe,qe);We1?te-1:0),G=1;G1?te-1:0),G=1;G1?te-1:0),G=1;G1?te-1:0),G=1;G0)return s(l);if(c==="number"&&isNaN(l)===!1)return u.long?f(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function s(l){if(l=String(l),!(l.length>100)){var u=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]),h=(u[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function a(l){return l>=n?Math.round(l/n)+"d":l>=r?Math.round(l/r)+"h":l>=t?Math.round(l/t)+"m":l>=e?Math.round(l/e)+"s":l+"ms"}function f(l){return i(l,n,"day")||i(l,r,"hour")||i(l,t,"minute")||i(l,e,"second")||l+" ms"}function i(l,u,c){if(!(l=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(l){try{return JSON.stringify(l)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}};function o(l){var u=this.useColors;if(l[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+l[0]+(u?"%c ":" ")+"+"+t.humanize(this.diff),!!u){var c="color: "+this.color;l.splice(1,0,c,"color: inherit");var h=0,d=0;l[0].replace(/%[a-zA-Z%]/g,function(v){v!=="%%"&&(h++,v==="%c"&&(d=h))}),l.splice(d,0,c)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(l){try{l==null?t.storage.removeItem("debug"):t.storage.debug=l}catch{}}function f(){var l;try{l=t.storage.debug}catch{}return!l&&typeof Ya<"u"&&"env"in Ya&&(l=r.DEBUG),l}t.enable(f());function i(){try{return window.localStorage}catch{}}})(kT,kT.exports)),kT.exports}var GO,que;function Y7e(){if(que)return GO;que=1;var e=rV(),t=V7e()("stream-parser");GO=a;var r=-1,n=0,o=1,s=2;function a(y){var b=y&&typeof y._transform=="function",g=y&&typeof y._write=="function";if(!b&&!g)throw new Error("must pass a Writable or Transform stream in");t("extending Parser into stream"),y._bytes=i,y._skipBytes=l,b&&(y._passthrough=u),b?y._transform=h:y._write=c}function f(y){t("initializing parser stream"),y._parserBytesLeft=0,y._parserBuffers=[],y._parserBuffered=0,y._parserState=r,y._parserCallback=null,typeof y.push=="function"&&(y._parserOutput=y.push.bind(y)),y._parserInit=!0}function i(y,b){e(!this._parserCallback,'there is already a "callback" set!'),e(isFinite(y)&&y>0,'can only buffer a finite number of bytes > 0, got "'+y+'"'),this._parserInit||f(this),t("buffering %o bytes",y),this._parserBytesLeft=y,this._parserCallback=b,this._parserState=n}function l(y,b){e(!this._parserCallback,'there is already a "callback" set!'),e(y>0,'can only skip > 0 bytes, got "'+y+'"'),this._parserInit||f(this),t("skipping %o bytes",y),this._parserBytesLeft=y,this._parserCallback=b,this._parserState=o}function u(y,b){e(!this._parserCallback,'There is already a "callback" set!'),e(y>0,'can only pass through > 0 bytes, got "'+y+'"'),this._parserInit||f(this),t("passing through %o bytes",y),this._parserBytesLeft=y,this._parserCallback=b,this._parserState=s}function c(y,b,g){this._parserInit||f(this),t("write(%o bytes)",y.length),typeof b=="function"&&(g=b),p(this,y,null,g)}function h(y,b,g){this._parserInit||f(this),t("transform(%o bytes)",y.length),typeof b!="function"&&(b=this._parserOutput),p(this,y,b,g)}function d(y,b,g,T){return y._parserBytesLeft<=0?T(new Error("got data but not currently parsing anything")):b.length<=y._parserBytesLeft?function(){return v(y,b,g,T)}:function(){var S=b.slice(0,y._parserBytesLeft);return v(y,S,g,function(A){if(A)return T(A);if(b.length>S.length)return function(){return d(y,b.slice(S.length),g,T)}})}}function v(y,b,g,T){if(y._parserBytesLeft-=b.length,t("%o bytes left for stream piece",y._parserBytesLeft),y._parserState===n?(y._parserBuffers.push(b),y._parserBuffered+=b.length):y._parserState===s&&g(b),y._parserBytesLeft===0){var S=y._parserCallback;if(S&&y._parserState===n&&y._parserBuffers.length>1&&(b=V3.concat(y._parserBuffers,y._parserBuffered)),y._parserState!==n&&(b=null),y._parserCallback=null,y._parserBuffered=0,y._parserState=r,y._parserBuffers.splice(0),S){var A=[];b&&A.push(b),g&&A.push(g);var M=S.length>A.length;M&&A.push(m(T));var w=S.apply(y,A);if(!M||T===w)return T}}else return T}var p=m(d);function m(y){return function(){for(var b=y.apply(this,arguments);typeof b=="function";)b=b();return b}}return GO}var jue;function vs(){if(jue)return Vp;jue=1;var e=A7e().Transform,t=Y7e();function r(){e.call(this,{readableObjectMode:!0})}r.prototype=Object.create(e.prototype),r.prototype.constructor=r,t(r.prototype),Vp.ParserStream=r,Vp.sliceEq=function(o,s,a){for(var f=s,i=0;i>4&15,d=u[4]&15,v=u[5]>>4&15,p=e(u,6),m=8,y=0;yp.width||v.width===p.width&&v.height>p.height?v:p}),h=u.reduce(function(v,p){return v.height>p.height||v.height===p.height&&v.width>p.width?v:p}),d;return c.width>h.height||c.width===h.height&&c.height>h.width?d=c:d=h,d}return p_.readSizeFromMeta=function(u){var c={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(i(u,c),!!c.sizes.length){var h=l(c.sizes),d=1;c.transforms.forEach(function(p){var m={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},y={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?d=y[d]:(d=y[d],d=m[d],d=m[d])),p.type==="irot")for(var b=0;b0&&!this.aborted;){var s=this.ifds_to_read.shift();s.offset&&this.scan_ifd(s.id,s.offset,n)}},r.prototype.read_uint16=function(n){var o=this.input;if(n+2>o.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?o[n]*256+o[n+1]:o[n]+o[n+1]*256},r.prototype.read_uint32=function(n){var o=this.input;if(n+4>o.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?o[n]*16777216+o[n+1]*65536+o[n+2]*256+o[n+3]:o[n]+o[n+1]*256+o[n+2]*65536+o[n+3]*16777216},r.prototype.is_subifd_link=function(n,o){return n===0&&o===34665||n===0&&o===34853||n===34665&&o===40965},r.prototype.exif_format_length=function(n){switch(n){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},r.prototype.exif_format_read=function(n,o){var s;switch(n){case 1:case 2:return s=this.input[o],s;case 6:return s=this.input[o],s|(s&128)*33554430;case 3:return s=this.read_uint16(o),s;case 8:return s=this.read_uint16(o),s|(s&32768)*131070;case 4:return s=this.read_uint32(o),s;case 9:return s=this.read_uint32(o),s|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},r.prototype.scan_ifd=function(n,o,s){var a=this.read_uint16(o);o+=2;for(var f=0;fthis.input.length)throw e("unexpected EOF","EBADDATA");for(var p=[],m=d,y=0;y0&&(this.ifds_to_read.push({id:i,offset:p[0]}),v=!0);var g={is_big_endian:this.big_endian,ifd:n,tag:i,format:l,count:u,entry_offset:o+this.start,data_length:h,data_offset:d+this.start,value:p,is_subifd_link:v};if(s(g)===!1){this.aborted=!0;return}o+=12}n===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(o)})},RT.ExifParser=r,RT.get_orientation=function(n){var o=0;try{return new r(n,0,n.length).each(function(s){if(s.ifd===0&&s.tag===274&&Array.isArray(s.value))return o=s.value[0],!1}),o}catch{return-1}},RT}var VO,Gue;function W7e(){if(Gue)return VO;Gue=1;var e=vs().str2arr,t=vs().sliceEq,r=vs().readUInt32BE,n=$7e(),o=rW(),s=e("ftyp");return VO=function(a){if(t(a,4,s)){var f=n.unbox(a,0);if(f){var i=n.getMimeType(f.data);if(i){for(var l,u=f.end;;){var c=n.unbox(a,u);if(!c)break;if(u=c.end,c.boxtype==="mdat")return;if(c.boxtype==="meta"){l=c.data;break}}if(l){var h=n.readSizeFromMeta(l);if(h){var d={width:h.width,height:h.height,type:i.type,mime:i.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(d.variants=h.variants),h.orientation&&(d.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=a.length){var v=r(a,h.exif_location.offset),p=a.slice(h.exif_location.offset+v+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(p);m>0&&(d.orientation=m)}return d}}}}}},VO}var YO,Vue;function X7e(){if(Vue)return YO;Vue=1;var e=vs().str2arr,t=vs().sliceEq,r=vs().readUInt16LE,n=e("BM");return YO=function(o){if(!(o.length<26)&&t(o,0,n))return{width:r(o,18),height:r(o,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}},YO}var $O,Yue;function Z7e(){if(Yue)return $O;Yue=1;var e=vs().str2arr,t=vs().sliceEq,r=vs().readUInt16LE,n=e("GIF87a"),o=e("GIF89a");return $O=function(s){if(!(s.length<10)&&!(!t(s,0,n)&&!t(s,0,o)))return{width:r(s,6),height:r(s,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}},$O}var WO,$ue;function K7e(){if($ue)return WO;$ue=1;var e=vs().readUInt16LE,t=0,r=1,n=16;return WO=function(o){var s=e(o,0),a=e(o,2),f=e(o,4);if(!(s!==t||a!==r||!f)){for(var i=[],l={width:0,height:0},u=0;ul.width||h>l.height)&&(l=d)}return{width:l.width,height:l.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}},WO}var XO,Wue;function J7e(){if(Wue)return XO;Wue=1;var e=vs().readUInt16BE,t=vs().str2arr,r=vs().sliceEq,n=rW(),o=t("Exif\0\0");return XO=function(s){if(!(s.length<2)&&!(s[0]!==255||s[1]!==216||s[2]!==255))for(var a=2;;){for(;;){if(s.length-a<2)return;if(s[a++]===255)break}for(var f=s[a++],i;f===255;)f=s[a++];if(208<=f&&f<=217||f===1)i=0;else if(192<=f&&f<=254){if(s.length-a<2)return;i=e(s,a)-2,a+=2}else return;if(f===217||f===218)return;var l;if(f===225&&i>=10&&r(s,a,o)&&(l=n.get_orientation(s.slice(a+6,a+i))),i>=5&&192<=f&&f<=207&&f!==196&&f!==200&&f!==204){if(s.length-a0&&(u.orientation=l),u}a+=i}},XO}var ZO,Xue;function Q7e(){if(Xue)return ZO;Xue=1;var e=vs().str2arr,t=vs().sliceEq,r=vs().readUInt32BE,n=e(`‰PNG\r + +`),o=e("IHDR");return ZO=function(s){if(!(s.length<24)&&t(s,0,n)&&t(s,12,o))return{width:r(s,16),height:r(s,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}},ZO}var KO,Zue;function e9e(){if(Zue)return KO;Zue=1;var e=vs().str2arr,t=vs().sliceEq,r=vs().readUInt32BE,n=e("8BPS\0");return KO=function(o){if(!(o.length<22)&&t(o,0,n))return{width:r(o,18),height:r(o,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}},KO}var JO,Kue;function t9e(){if(Kue)return JO;Kue=1;function e(c){return c===32||c===9||c===13||c===10}function t(c){return typeof c=="number"&&isFinite(c)&&c>0}function r(c){var h=0,d=c.length;for(c[0]===239&&c[1]===187&&c[2]===191&&(h=3);h]*>/,o=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,s=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,f=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,i=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(c){var h=c.match(s),d=c.match(a),v=c.match(f);return{width:h&&(h[1]||h[2]),height:d&&(d[1]||d[2]),viewbox:v&&(v[1]||v[2])}}function u(c){return i.test(c)?c.match(i)[0]:"px"}return JO=function(c){if(r(c)){for(var h="",d=0;d>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function l(u,c){return{width:(u[c+6]<<16|u[c+5]<<8|u[c+4])+1,height:(u[c+9]<u.length)){for(;c+8=10?h=h||f(u,c+8):p==="VP8L"&&m>=9?h=h||i(u,c+8):p==="VP8X"&&m>=10?h=h||l(u,c+8):p==="EXIF"&&(d=o.get_orientation(u.slice(c+8,c+8+m)),c=1/0),c+=8+m}if(h)return d>0&&(h.orientation=d),h}}},e8}var t8,efe;function a9e(){return efe||(efe=1,t8={avif:W7e(),bmp:X7e(),gif:Z7e(),ico:K7e(),jpeg:J7e(),png:Q7e(),psd:e9e(),svg:t9e(),tiff:r9e(),webp:n9e()}),t8}var tfe;function i9e(){if(tfe)return ST.exports;tfe=1;var e=a9e();function t(r){for(var n=Object.keys(e),o=0;o0;)k=h.c2p(S+D*C),D--;for(D=0;I===void 0&&D0;)F=d.c2p(A+D*x),D--;if(k<_&&(E=k,k=_,_=E),Fte[0];if(Z||G){var j=_+N/2,Y=I+q/2;J+="transform:"+r(j+"px",Y+"px")+"scale("+(Z?-1:1)+","+(G?-1:1)+")"+r(-j+"px",-Y+"px")+";"}}Q.attr("style",J);var K=new Promise(function(X){if(b._hasZ)X();else if(b._hasSource)if(b._canvas&&b._canvas.el.width===M&&b._canvas.el.height===w&&b._canvas.source===b.source)X();else{var ee=document.createElement("canvas");ee.width=M,ee.height=w;var le=ee.getContext("2d",{willReadFrequently:!0});b._image=b._image||new Image;var oe=b._image;oe.onload=function(){le.drawImage(oe,0,0),b._canvas={el:ee,source:b.source},X()},oe.setAttribute("src",b.source)}}).then(function(){var X,ee;if(b._hasZ)ee=$(function(fe,de){var _e=T[de][fe];return t.isTypedArray(_e)&&(_e=Array.from(_e)),_e}),X=ee.toDataURL("image/png");else if(b._hasSource)if(g)X=b.source;else{var le=b._canvas.el.getContext("2d",{willReadFrequently:!0}),oe=le.getImageData(0,0,M,w).data;ee=$(function(fe,de){var _e=4*(de*M+fe);return[oe[_e],oe[_e+1],oe[_e+2],oe[_e+3]]}),X=ee.toDataURL("image/png")}Q.attr({"xlink:href":X,height:q,width:N,x:_,y:I})});i._promises.push(K)})},n8}var a8,ife;function u9e(){if(ife)return a8;ife=1;var e=ya();return a8=function(r){e.select(r).selectAll(".im image").style("opacity",function(n){return n[0].trace.opacity})},a8}var i8,ofe;function f9e(){if(ofe)return i8;ofe=1;var e=yl(),t=rr(),r=t.isArrayOrTypedArray,n=H2();return i8=function(s,a,f){var i=s.cd[0],l=i.trace,u=s.xa,c=s.ya;if(!(e.inbox(a-i.x0,a-(i.x0+i.w*l.dx),0)>0||e.inbox(f-i.y0,f-(i.y0+i.h*l.dy),0)>0)){var h=Math.floor((a-i.x0)/l.dx),d=Math.floor(Math.abs(f-i.y0)/l.dy),v;if(l._hasZ?v=i.z[d][h]:l._hasSource&&(v=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(h,d,1,1).data),!!v){var p=i.hi||l.hoverinfo,m;if(p){var y=p.split("+");y.indexOf("all")!==-1&&(y=["color"]),y.indexOf("color")!==-1&&(m=!0)}var b=n.colormodel[l.colormodel],g=b.colormodel||l.colormodel,T=g.length,S=l._scaler(v),A=b.suffix,M=[];(l.hovertemplate||m)&&(M.push("["+[S[0]+A[0],S[1]+A[1],S[2]+A[2]].join(", ")),T===4&&M.push(", "+S[3]+A[3]),M.push("]"),M=M.join(""),s.extraText=g.toUpperCase()+": "+M);var w;r(l.hovertext)&&r(l.hovertext[d])?w=l.hovertext[d][h]:r(l.text)&&r(l.text[d])&&(w=l.text[d][h]);var C=c.c2p(i.y0+(d+.5)*l.dy),x=i.x0+(h+.5)*l.dx,_=i.y0+(d+.5)*l.dy,k="["+v.slice(0,l.colormodel.length).join(", ")+"]";return[t.extendFlat(s,{index:[d,h],x0:u.c2p(i.x0+h*l.dx),x1:u.c2p(i.x0+(h+1)*l.dx),y0:C,y1:C,color:S,xVal:x,xLabelVal:x,yVal:_,yLabelVal:_,zLabelVal:k,text:w,hovertemplateLabels:{zLabel:k,colorLabel:M,"color[0]Label":S[0]+A[0],"color[1]Label":S[1]+A[1],"color[2]Label":S[2]+A[2],"color[3]Label":S[3]+A[3]}})]}}},i8}var o8,sfe;function c9e(){return sfe||(sfe=1,o8=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}),o8}var s8,lfe;function h9e(){return lfe||(lfe=1,s8={attributes:NSe(),supplyDefaults:NBe(),calc:s9e(),plot:l9e(),style:u9e(),hoverPoints:f9e(),eventData:c9e(),moduleType:"trace",name:"image",basePlotModule:$l(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{description:["Display an image, i.e. data on a 2D regular raster.","By default, when an image is displayed in a subplot,","its y axis will be reversed (ie. `autorange: 'reversed'`),","constrained to the domain (ie. `constrain: 'domain'`)","and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`)","in order for pixels to be rendered as squares."].join(" ")}}),s8}var l8,ufe;function d9e(){return ufe||(ufe=1,l8=h9e()),l8}var u8,ffe;function rb(){if(ffe)return u8;ffe=1;var e=qo(),t=Vs().attributes,r=Gs(),n=Cu(),o=bi().hovertemplateAttrs,s=bi().texttemplateAttrs,a=ja().extendFlat,f=lc().pattern,i=r({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."});return u8={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:n.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},pattern:f,editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:a({},e.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:a({},i,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:a({},i,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:a({},i,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:a({},i,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:t({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:a({},i,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},u8}var f8,cfe;function mx(){if(cfe)return f8;cfe=1;var e=Ua(),t=rr(),r=rb(),n=Vs().defaults,o=Ev().handleText,s=rr().coercePattern;function a(l,u){var c=t.isArrayOrTypedArray(l),h=t.isArrayOrTypedArray(u),d=Math.min(c?l.length:1/0,h?u.length:1/0);if(isFinite(d)||(d=0),d&&h){for(var v,p=0;p0){v=!0;break}}v||(d=0)}return{hasLabels:c,hasValues:h,len:d}}function f(l,u,c,h,d){var v=h("marker.line.width");v&&h("marker.line.color",d?void 0:c.paper_bgcolor);var p=h("marker.colors");s(h,"marker.pattern",p),l.marker&&!u.marker.pattern.fgcolor&&(u.marker.pattern.fgcolor=l.marker.colors),u.marker.pattern.bgcolor||(u.marker.pattern.bgcolor=c.paper_bgcolor)}function i(l,u,c,h){function d(_,k){return t.coerce(l,u,r,_,k)}var v=d("labels"),p=d("values"),m=a(v,p),y=m.len;if(u._hasLabels=m.hasLabels,u._hasValues=m.hasValues,!u._hasLabels&&u._hasValues&&(d("label0"),d("dlabel")),!y){u.visible=!1;return}u._length=y,f(l,u,h,d,!0),d("scalegroup");var b=d("text"),g=d("texttemplate"),T;if(g||(T=d("textinfo",t.isArrayOrTypedArray(b)?"text+percent":"percent")),d("hovertext"),d("hovertemplate"),g||T&&T!=="none"){var S=d("textposition");o(l,u,h,d,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var A=Array.isArray(S)||S==="auto",M=A||S==="outside";M&&d("automargin"),(S==="inside"||S==="auto"||Array.isArray(S))&&d("insidetextorientation")}else T==="none"&&d("textposition","none");n(u,h,d);var w=d("hole"),C=d("title.text");if(C){var x=d("title.position",w?"middle center":"top center");!w&&x==="middle center"&&(u.title.position="top center"),t.coerceFont(d,"title.font",h.font)}d("sort"),d("direction"),d("rotation"),d("pull")}return f8={handleLabelsAndValues:a,handleMarkerDefaults:f,supplyDefaults:i},f8}var c8,hfe;function nW(){return hfe||(hfe=1,c8={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}),c8}var h8,dfe;function v9e(){if(dfe)return h8;dfe=1;var e=rr(),t=nW();return h8=function(n,o){function s(a,f){return e.coerce(n,o,t,a,f)}s("hiddenlabels"),s("piecolorway",o.colorway),s("extendpiecolors")},h8}var d8,vfe;function a2(){if(vfe)return d8;vfe=1;var e=Ua(),t=wf(),r=va(),n={};function o(i,l){var u=[],c=i._fullLayout,h=c.hiddenlabels||[],d=l.labels,v=l.marker.colors||[],p=l.values,m=l._length,y=l._hasValues&&m,b,g;if(l.dlabel)for(d=new Array(m),b=0;b=0});var k=l.type==="funnelarea"?M:l.sort;return k&&u.sort(function(E,I){return I.v-E.v}),u[0]&&(u[0].vTotal=A),u}function s(i){return function(u,c){return!u||(u=t(u),!u.isValid())?!1:(u=r.addOpacity(u,u.getAlpha()),i[c]||(i[c]=u),u)}}function a(i,l){var u=(l||{}).type;u||(u="pie");var c=i._fullLayout,h=i.calcdata,d=c[u+"colorway"],v=c["_"+u+"colormap"];c["extend"+u+"colors"]&&(d=f(d,n));for(var p=0,m=0;m0&&(Qe+=et*qe.pxmid[0],De+=et*qe.pxmid[1])}qe.cxFinal=Qe,qe.cyFinal=De;function st(Tt,rt,gt,mt){var He=mt*(rt[0]-Tt[0]),Ie=mt*(rt[1]-Tt[1]);return"a"+mt*oe.r+","+mt*oe.r+" 0 "+qe.largeArc+(gt?" 1 ":" 0 ")+He+","+Ie}var ot=fe.hole;if(qe.v===oe.vTotal){var ut="M"+(Qe+qe.px0[0])+","+(De+qe.px0[1])+st(qe.px0,qe.pxmid,!0,1)+st(qe.pxmid,qe.px0,!0,1)+"Z";ot?Ce.attr("d","M"+(Qe+ot*qe.px0[0])+","+(De+ot*qe.px0[1])+st(qe.px0,qe.pxmid,!1,ot)+st(qe.pxmid,qe.px0,!1,ot)+"Z"+ut):Ce.attr("d",ut)}else{var ht=st(qe.px0,qe.px1,!0,1);if(ot){var Ht=1-ot;Ce.attr("d","M"+(Qe+ot*qe.px1[0])+","+(De+ot*qe.px1[1])+st(qe.px1,qe.px0,!1,ot)+"l"+Ht*qe.px0[0]+","+Ht*qe.px0[1]+ht+"Z")}else Ce.attr("d","M"+Qe+","+De+"l"+qe.px0[0]+","+qe.px0[1]+ht+"Z")}ne(Z,qe,oe);var Et=d.castOption(fe.textposition,qe.pts),Jt=me.selectAll("g.slicetext").data(qe.text&&Et!=="none"?[0]:[]);Jt.enter().append("g").classed("slicetext",!0),Jt.exit().remove(),Jt.each(function(){var Tt=s.ensureSingle(e.select(this),"text","",function(ye){ye.attr("data-notex",1)}),rt=s.ensureUniformFontSize(Z,Et==="outside"?g(fe,qe,Y.font):T(fe,qe,Y.font));Tt.text(qe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,rt).call(i.convertToTspans,Z);var gt=o.bBox(Tt.node()),mt;if(Et==="outside")mt=I(gt,qe);else if(mt=A(gt,qe,oe),Et==="auto"&&mt.scale<1){var He=s.ensureUniformFontSize(Z,fe.outsidetextfont);Tt.call(o.font,He),gt=o.bBox(Tt.node()),mt=I(gt,qe)}var Ie=mt.textPosAngle,je=Ie===void 0?qe.pxmid:J(oe.r,Ie);if(mt.targetX=Qe+je[0]*mt.rCenter+(mt.x||0),mt.targetY=De+je[1]*mt.rCenter+(mt.y||0),te(mt,gt),mt.outside){var pe=mt.targetY;qe.yLabelMin=pe-gt.height/2,qe.yLabelMid=pe,qe.yLabelMax=pe+gt.height/2,qe.labelExtraX=0,qe.labelExtraY=0,we=!0}mt.fontSize=rt.size,u(fe.type,mt,Y),ee[We].transform=mt,s.setTransormAndDisplay(Tt,mt)})});var Oe=e.select(this).selectAll("g.titletext").data(fe.title.text?[0]:[]);if(Oe.enter().append("g").classed("titletext",!0),Oe.exit().remove(),Oe.each(function(){var qe=s.ensureSingle(e.select(this),"text","",function(De){De.attr("data-notex",1)}),We=fe.title.text;fe._meta&&(We=s.templateString(We,fe._meta)),qe.text(We).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,fe.title.font).call(i.convertToTspans,Z);var Qe;fe.title.position==="middle center"?Qe=F(oe):Qe=D(oe,K),qe.attr("transform",f(Qe.x,Qe.y)+a(Math.min(1,Qe.scale))+f(Qe.tx,Qe.ty))}),we&&P(_e,fe),y(de,fe),we&&fe.automargin){var be=o.bBox(le.node()),Te=fe.domain,ke=K.w*(Te.x[1]-Te.x[0]),Ee=K.h*(Te.y[1]-Te.y[0]),Le=(.5*ke-oe.r)/K.w,Fe=(.5*Ee-oe.r)/K.h;t.autoMargin(Z,"pie."+fe.uid+".automargin",{xl:Te.x[0]-Le,xr:Te.x[1]+Le,yb:Te.y[0]-Fe,yt:Te.y[1]+Fe,l:Math.max(oe.cx-oe.r-be.left,0),r:Math.max(be.right-(oe.cx+oe.r),0),b:Math.max(be.bottom-(oe.cy+oe.r),0),t:Math.max(oe.cy-oe.r-be.top,0),pad:5})}})});setTimeout(function(){X.selectAll("tspan").each(function(){var ee=e.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function y(Z,G){Z.each(function(j){var Y=e.select(this);if(!j.labelExtraX&&!j.labelExtraY){Y.select("path.textline").remove();return}var K=Y.select("g.slicetext text");j.transform.targetX+=j.labelExtraX,j.transform.targetY+=j.labelExtraY,s.setTransormAndDisplay(K,j.transform);var X=j.cxFinal+j.pxmid[0],ee=j.cyFinal+j.pxmid[1],le="M"+X+","+ee,oe=(j.yLabelMax-j.yLabelMin)*(j.pxmid[0]<0?-1:1)/4;if(j.labelExtraX){var fe=j.labelExtraX*j.pxmid[1]/j.pxmid[0],de=j.yLabelMid+j.labelExtraY-(j.cyFinal+j.pxmid[1]);Math.abs(fe)>Math.abs(de)?le+="l"+de*j.pxmid[0]/j.pxmid[1]+","+de+"H"+(X+j.labelExtraX+oe):le+="l"+j.labelExtraX+","+fe+"v"+(de-fe)+"h"+oe}else le+="V"+(j.yLabelMid+j.labelExtraY)+"h"+oe;s.ensureSingle(Y,"path","textline").call(n.stroke,G.outsidetextfont.color).attr({"stroke-width":Math.min(2,G.outsidetextfont.size/8),d:le,fill:"none"})})}function b(Z,G,j){var Y=j[0],K=Y.cx,X=Y.cy,ee=Y.trace,le=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),Z.on("mouseover",function(oe){var fe=G._fullLayout,de=G._fullData[ee.index];if(!(G._dragging||fe.hovermode===!1)){var _e=de.hoverinfo;if(Array.isArray(_e)&&(_e=r.castHoverinfo({hoverinfo:[d.castOption(_e,oe.pts)],_module:ee._module},fe,0)),_e==="all"&&(_e="label+text+value+percent+name"),de.hovertemplate||_e!=="none"&&_e!=="skip"&&_e){var we=oe.rInscribed||0,Oe=K+oe.pxmid[0]*(1-we),be=X+oe.pxmid[1]*(1-we),Te=fe.separators,ke=[];if(_e&&_e.indexOf("label")!==-1&&ke.push(oe.label),oe.text=d.castOption(de.hovertext||de.text,oe.pts),_e&&_e.indexOf("text")!==-1){var Ee=oe.text;s.isValidTextValue(Ee)&&ke.push(Ee)}oe.value=oe.v,oe.valueLabel=d.formatPieValue(oe.v,Te),_e&&_e.indexOf("value")!==-1&&ke.push(oe.valueLabel),oe.percent=oe.v/Y.vTotal,oe.percentLabel=d.formatPiePercent(oe.percent,Te),_e&&_e.indexOf("percent")!==-1&&ke.push(oe.percentLabel);var Le=de.hoverlabel,Fe=Le.font,qe=[];r.loneHover({trace:ee,x0:Oe-we*Y.r,x1:Oe+we*Y.r,y:be,_x0:le?K+oe.TL[0]:Oe-we*Y.r,_x1:le?K+oe.TR[0]:Oe+we*Y.r,_y0:le?X+oe.TL[1]:be-we*Y.r,_y1:le?X+oe.BL[1]:be+we*Y.r,text:ke.join("
"),name:de.hovertemplate||_e.indexOf("name")!==-1?de.name:void 0,idealAlign:oe.pxmid[0]<0?"left":"right",color:d.castOption(Le.bgcolor,oe.pts)||oe.color,borderColor:d.castOption(Le.bordercolor,oe.pts),fontFamily:d.castOption(Fe.family,oe.pts),fontSize:d.castOption(Fe.size,oe.pts),fontColor:d.castOption(Fe.color,oe.pts),nameLength:d.castOption(Le.namelength,oe.pts),textAlign:d.castOption(Le.align,oe.pts),hovertemplate:d.castOption(de.hovertemplate,oe.pts),hovertemplateLabels:oe,eventData:[v(oe,de)]},{container:fe._hoverlayer.node(),outerContainer:fe._paper.node(),gd:G,inOut_bbox:qe}),oe.bbox=qe[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,G.emit("plotly_hover",{points:[v(oe,de)],event:e.event})}}),Z.on("mouseout",function(oe){var fe=G._fullLayout,de=G._fullData[ee.index],_e=e.select(this).datum();ee._hasHoverEvent&&(oe.originalEvent=e.event,G.emit("plotly_unhover",{points:[v(_e,de)],event:e.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(r.loneUnhover(fe._hoverlayer.node()),ee._hasHoverLabel=!1)}),Z.on("click",function(oe){var fe=G._fullLayout,de=G._fullData[ee.index];G._dragging||fe.hovermode===!1||(G._hoverdata=[v(oe,de)],r.click(G,e.event))})}function g(Z,G,j){var Y=d.castOption(Z.outsidetextfont.color,G.pts)||d.castOption(Z.textfont.color,G.pts)||j.color,K=d.castOption(Z.outsidetextfont.family,G.pts)||d.castOption(Z.textfont.family,G.pts)||j.family,X=d.castOption(Z.outsidetextfont.size,G.pts)||d.castOption(Z.textfont.size,G.pts)||j.size;return{color:Y,family:K,size:X}}function T(Z,G,j){var Y=d.castOption(Z.insidetextfont.color,G.pts);!Y&&Z._input.textfont&&(Y=d.castOption(Z._input.textfont.color,G.pts));var K=d.castOption(Z.insidetextfont.family,G.pts)||d.castOption(Z.textfont.family,G.pts)||j.family,X=d.castOption(Z.insidetextfont.size,G.pts)||d.castOption(Z.textfont.size,G.pts)||j.size;return{color:Y||n.contrast(G.color),family:K,size:X}}function S(Z,G){for(var j,Y,K=0;K=-4;Le-=2)Ee(Math.PI*Le,"tan");for(Le=4;Le>=-4;Le-=2)Ee(Math.PI*(Le+1),"tan")}if(_e||Oe){for(Le=4;Le>=-4;Le-=2)Ee(Math.PI*(Le+1.5),"rad");for(Le=4;Le>=-4;Le-=2)Ee(Math.PI*(Le+.5),"rad")}}if(le||be||_e){var Fe=Math.sqrt(Z.width*Z.width+Z.height*Z.height);if(ke={scale:K*Y*2/Fe,rCenter:1-K,rotate:0},ke.textPosAngle=(G.startangle+G.stopangle)/2,ke.scale>=1)return ke;Te.push(ke)}(be||Oe)&&(ke=w(Z,Y,ee,oe,fe),ke.textPosAngle=(G.startangle+G.stopangle)/2,Te.push(ke)),(be||we)&&(ke=C(Z,Y,ee,oe,fe),ke.textPosAngle=(G.startangle+G.stopangle)/2,Te.push(ke));for(var qe=0,We=0,Qe=0;Qe=1)break}return Te[qe]}function M(Z,G){var j=Z.startangle,Y=Z.stopangle;return j>G&&G>Y||j0?1:-1)/2,y:X/(1+j*j/(Y*Y)),outside:!0}}function F(Z){var G=Math.sqrt(Z.titleBox.width*Z.titleBox.width+Z.titleBox.height*Z.titleBox.height);return{x:Z.cx,y:Z.cy,scale:Z.trace.hole*Z.r*2/G,tx:0,ty:-Z.titleBox.height/2+Z.trace.title.font.size}}function D(Z,G){var j=1,Y=1,K,X=Z.trace,ee={x:Z.cx,y:Z.cy},le={tx:0,ty:0};le.ty+=X.title.font.size,K=q(X),X.title.position.indexOf("top")!==-1?(ee.y-=(1+K)*Z.r,le.ty-=Z.titleBox.height):X.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+K)*Z.r);var oe=z(Z.r,Z.trace.aspectratio),fe=G.w*(X.domain.x[1]-X.domain.x[0])/2;return X.title.position.indexOf("left")!==-1?(fe=fe+oe,ee.x-=(1+K)*oe,le.tx+=Z.titleBox.width/2):X.title.position.indexOf("center")!==-1?fe*=2:X.title.position.indexOf("right")!==-1&&(fe=fe+oe,ee.x+=(1+K)*oe,le.tx-=Z.titleBox.width/2),j=fe/Z.titleBox.width,Y=N(Z,G)/Z.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(j,Y),tx:le.tx,ty:le.ty}}function z(Z,G){return Z/(G===void 0?1:G)}function N(Z,G){var j=Z.trace,Y=G.h*(j.domain.y[1]-j.domain.y[0]);return Math.min(Z.titleBox.height,Y/2)}function q(Z){var G=Z.pull;if(!G)return 0;var j;if(s.isArrayOrTypedArray(G))for(G=0,j=0;jG&&(G=Z.pull[j]);return G}function P(Z,G){var j,Y,K,X,ee,le,oe,fe,de,_e,we,Oe,be;function Te(Fe,qe){return Fe.pxmid[1]-qe.pxmid[1]}function ke(Fe,qe){return qe.pxmid[1]-Fe.pxmid[1]}function Ee(Fe,qe){qe||(qe={});var We=qe.labelExtraY+(Y?qe.yLabelMax:qe.yLabelMin),Qe=Y?Fe.yLabelMin:Fe.yLabelMax,De=Y?Fe.yLabelMax:Fe.yLabelMin,me=Fe.cyFinal+ee(Fe.px0[1],Fe.px1[1]),Ce=We-Qe,et,st,ot,ut,ht,Ht;if(Ce*oe>0&&(Fe.labelExtraY=Ce),!!s.isArrayOrTypedArray(G.pull))for(st=0;st<_e.length;st++)ot=_e[st],!(ot===Fe||(d.castOption(G.pull,Fe.pts)||0)>=(d.castOption(G.pull,ot.pts)||0))&&((Fe.pxmid[1]-ot.pxmid[1])*oe>0?(ut=ot.cyFinal+ee(ot.px0[1],ot.px1[1]),Ce=ut-Qe-Fe.labelExtraY,Ce*oe>0&&(Fe.labelExtraY+=Ce)):(De+Fe.labelExtraY-me)*oe>0&&(et=3*le*Math.abs(st-_e.indexOf(Fe)),ht=ot.cxFinal+X(ot.px0[0],ot.px1[0]),Ht=ht+et-(Fe.cxFinal+Fe.pxmid[0])-Fe.labelExtraX,Ht*le>0&&(Fe.labelExtraX+=Ht)))}for(Y=0;Y<2;Y++)for(K=Y?Te:ke,ee=Y?Math.max:Math.min,oe=Y?1:-1,j=0;j<2;j++){for(X=j?Math.max:Math.min,le=j?1:-1,fe=Z[Y][j],fe.sort(K),de=Z[1-Y][j],_e=de.concat(fe),Oe=[],we=0;we1?(fe=j.r,de=fe/K.aspectratio):(de=j.r,fe=de*K.aspectratio),fe*=(1+K.baseratio)/2,oe=fe*de}ee=Math.min(ee,oe/j.vTotal)}for(Y=0;YG.vTotal/2?1:0,fe.halfangle=Math.PI*Math.min(fe.v/G.vTotal,.5),fe.ring=1-Y.hole,fe.rInscribed=E(fe,G))}function J(Z,G){return[Z*Math.sin(G),-Z*Math.cos(G)]}function ne(Z,G,j){var Y=Z._fullLayout,K=j.trace,X=K.texttemplate,ee=K.textinfo;if(!X&&ee&&ee!=="none"){var le=ee.split("+"),oe=function(qe){return le.indexOf(qe)!==-1},fe=oe("label"),de=oe("text"),_e=oe("value"),we=oe("percent"),Oe=Y.separators,be;if(be=fe?[G.label]:[],de){var Te=d.getFirstFilled(K.text,G.pts);p(Te)&&be.push(Te)}_e&&be.push(d.formatPieValue(G.v,Oe)),we&&be.push(d.formatPiePercent(G.v/j.vTotal,Oe)),G.text=be.join("
")}function ke(qe){return{label:qe.label,value:qe.v,valueLabel:d.formatPieValue(qe.v,Y.separators),percent:qe.v/j.vTotal,percentLabel:d.formatPiePercent(qe.v/j.vTotal,Y.separators),color:qe.color,text:qe.text,customdata:s.castOption(K,qe.i,"customdata")}}if(X){var Ee=s.castOption(K,G.i,"texttemplate");if(!Ee)G.text="";else{var Le=ke(G),Fe=d.getFirstFilled(K.text,G.pts);(p(Fe)||Fe==="")&&(Le.text=Fe),G.text=s.texttemplateString(Ee,Le,Z._fullLayout._d3locale,Le,K._meta||{})}}}function te(Z,G){var j=Z.rotate*Math.PI/180,Y=Math.cos(j),K=Math.sin(j),X=(G.left+G.right)/2,ee=(G.top+G.bottom)/2;Z.textX=X*Y-ee*K,Z.textY=X*K+ee*Y,Z.noCenter=!0}return p8={plot:m,formatSliceLabel:ne,transformInsideText:A,determineInsideTextFont:T,positionTitleOutside:D,prerenderTitles:S,layoutAreas:B,attachFxHandlers:b,computeTransform:te},p8}var g8,yfe;function g9e(){if(yfe)return g8;yfe=1;var e=ya(),t=D2(),r=ch().resizeText;return g8=function(o){var s=o._fullLayout._pielayer.selectAll(".trace");r(o,s,"pie"),s.each(function(a){var f=a[0],i=f.trace,l=e.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(u){e.select(this).call(t,u,i,o)})})},g8}var y8={},mfe;function y9e(){return mfe||(mfe=1,(function(e){var t=Ts();e.name="pie",e.plot=function(r,n,o,s){t.plotBasePlot(e.name,r,n,o,s)},e.clean=function(r,n,o,s){t.cleanBasePlot(e.name,r,n,o,s)}})(y8)),y8}var m8,xfe;function m9e(){return xfe||(xfe=1,m8={attributes:rb(),supplyDefaults:mx().supplyDefaults,supplyLayoutDefaults:v9e(),layoutAttributes:nW(),calc:a2().calc,crossTraceCalc:a2().crossTraceCalc,plot:aW().plot,style:g9e(),styleOne:D2(),moduleType:"trace",name:"pie",basePlotModule:y9e(),categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}}),m8}var x8,bfe;function x9e(){return bfe||(bfe=1,x8=m9e()),x8}var b8={},_fe;function b9e(){return _fe||(_fe=1,(function(e){var t=Ts();e.name="sunburst",e.plot=function(r,n,o,s){t.plotBasePlot(e.name,r,n,o,s)},e.clean=function(r,n,o,s){t.cleanBasePlot(e.name,r,n,o,s)}})(b8)),b8}var _8,wfe;function sMe(){return wfe||(wfe=1,_8={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}),_8}var w8,Tfe;function lM(){if(Tfe)return w8;Tfe=1;var e=qo(),t=bi().hovertemplateAttrs,r=bi().texttemplateAttrs,n=os(),o=Vs().attributes,s=rb(),a=sMe(),f=ja().extendFlat,i=lc().pattern;return w8={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:f({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:f({},s.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:f({},s.marker.line.width,{dflt:1}),editType:"calc"},pattern:i,editType:"calc"},n("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:s.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:r({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:f({},e.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:t({},{keys:a.eventDataKeys}),textfont:s.textfont,insidetextorientation:s.insidetextorientation,insidetextfont:s.insidetextfont,outsidetextfont:f({},s.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:s.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:o({name:"sunburst",trace:!0,editType:"calc"})},w8}var T8,Afe;function lMe(){return Afe||(Afe=1,T8={sunburstcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default sunburst slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendsunburstcolors`."].join(" ")},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the sunburst slice colors (whether given by `sunburstcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}),T8}var A8,Sfe;function _9e(){if(Sfe)return A8;Sfe=1;var e=rr(),t=lM(),r=Vs().defaults,n=Ev().handleText,o=mx().handleMarkerDefaults,s=Hs(),a=s.hasColorscale,f=s.handleDefaults;return A8=function(l,u,c,h){function d(T,S){return e.coerce(l,u,t,T,S)}var v=d("labels"),p=d("parents");if(!v||!v.length||!p||!p.length){u.visible=!1;return}var m=d("values");m&&m.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),o(l,u,h,d);var y=u._hasColorscale=a(l,"marker","colors")||(l.marker||{}).coloraxis;y&&f(l,u,h,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",y?1:.7);var b=d("text");d("texttemplate"),u.texttemplate||d("textinfo",e.isArrayOrTypedArray(b)?"text+label":"label"),d("hovertext"),d("hovertemplate");var g="auto";n(l,u,h,d,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("insidetextorientation"),d("sort"),d("rotation"),d("root.color"),r(u,h,d),u._length=null},A8}var S8,Mfe;function w9e(){if(Mfe)return S8;Mfe=1;var e=rr(),t=lMe();return S8=function(n,o){function s(a,f){return e.coerce(n,o,t,a,f)}s("sunburstcolorway",o.colorway),s("extendsunburstcolors")},S8}var M8={};function T9e(e,t){return e.parent===t.parent?1:2}function A9e(e){return e.reduce(S9e,0)/e.length}function S9e(e,t){return e+t.x}function M9e(e){return 1+e.reduce(E9e,0)}function E9e(e,t){return Math.max(e,t.y)}function k9e(e){for(var t;t=e.children;)e=t[0];return e}function C9e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function R9e(){var e=T9e,t=1,r=1,n=!1;function o(s){var a,f=0;s.eachAfter(function(h){var d=h.children;d?(h.x=A9e(d),h.y=M9e(d)):(h.x=a?f+=e(h,a):0,h.y=0,a=h)});var i=k9e(s),l=C9e(s),u=i.x-e(i,l)/2,c=l.x+e(l,i)/2;return s.eachAfter(n?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*r}:function(h){h.x=(h.x-u)/(c-u)*t,h.y=(1-(s.y?h.y/s.y:1))*r})}return o.separation=function(s){return arguments.length?(e=s,o):e},o.size=function(s){return arguments.length?(n=!1,t=+s[0],r=+s[1],o):n?null:[t,r]},o.nodeSize=function(s){return arguments.length?(n=!0,t=+s[0],r=+s[1],o):n?[t,r]:null},o}function L9e(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function P9e(){return this.eachAfter(L9e)}function D9e(e){var t=this,r,n=[t],o,s,a;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),o=t.children,o)for(s=0,a=o.length;s=0;--o)r.push(n[o]);return this}function O9e(e){for(var t=this,r=[t],n=[],o,s,a;t=r.pop();)if(n.push(t),o=t.children,o)for(s=0,a=o.length;s=0;)r+=n[o].value;t.value=r})}function F9e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function N9e(e){for(var t=this,r=B9e(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n}function B9e(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}function q9e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function j9e(){var e=[];return this.each(function(t){e.push(t)}),e}function U9e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function H9e(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function iW(e,t){var r=new xx(e),n=+e.value&&(r.value=e.value),o,s=[r],a,f,i,l;for(t==null&&(t=V9e);o=s.pop();)if(n&&(o.value=+o.data.value),(f=t(o.data))&&(l=f.length))for(o.children=new Array(l),i=l-1;i>=0;--i)s.push(a=o.children[i]=new xx(f[i])),a.parent=o,a.depth=o.depth+1;return r.eachBefore(uMe)}function G9e(){return iW(this).eachBefore(Y9e)}function V9e(e){return e.children}function Y9e(e){e.data=e.data.data}function uMe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function xx(e){this.data=e,this.depth=this.height=0,this.parent=null}xx.prototype=iW.prototype={constructor:xx,count:P9e,each:D9e,eachAfter:O9e,eachBefore:I9e,sum:z9e,sort:F9e,path:N9e,ancestors:q9e,descendants:j9e,leaves:U9e,links:H9e,copy:G9e};var $9e=Array.prototype.slice;function W9e(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}function fMe(e){for(var t=0,r=(e=W9e($9e.call(e))).length,n=[],o,s;t0&&r*r>n*n+o*o}function E8(e,t){for(var r=0;ri?(o=(l+i-s)/(2*l),f=Math.sqrt(Math.max(0,i/l-o*o)),r.x=e.x-o*n-f*a,r.y=e.y-o*a+f*n):(o=(l+s-i)/(2*l),f=Math.sqrt(Math.max(0,s/l-o*o)),r.x=t.x+o*n-f*a,r.y=t.y+o*a+f*n)):(r.x=t.x+r.r,r.y=t.y)}function kfe(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,o=t.y-e.y;return r>0&&r*r>n*n+o*o}function Cfe(e){var t=e._,r=e.next._,n=t.r+r.r,o=(t.x*r.r+r.x*t.r)/n,s=(t.y*r.r+r.y*t.r)/n;return o*o+s*s}function PT(e){this._=e,this.next=null,this.previous=null}function dMe(e){if(!(o=e.length))return 0;var t,r,n,o,s,a,f,i,l,u,c;if(t=e[0],t.x=0,t.y=0,!(o>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(o>2))return t.r+r.r;Efe(r,t,n=e[2]),t=new PT(t),r=new PT(r),n=new PT(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(f=3;f0)throw new Error("cycle");return f}return r.id=function(n){return arguments.length?(e=Y3(n),r):e},r.parentId=function(n){return arguments.length?(t=Y3(n),r):t},r}function sqe(e,t){return e.parent===t.parent?1:2}function C8(e){var t=e.children;return t?t[0]:e.t}function R8(e){var t=e.children;return t?t[t.length-1]:e.t}function lqe(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function uqe(e){for(var t=0,r=0,n=e.children,o=n.length,s;--o>=0;)s=n[o],s.z+=t,s.m+=t,t+=s.s+(r+=s.c)}function fqe(e,t,r){return e.a.parent===t.parent?e.a:r}function w3(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}w3.prototype=Object.create(xx.prototype);function cqe(e){for(var t=new w3(e,0),r,n=[t],o,s,a,f;r=n.pop();)if(s=r._.children)for(r.children=new Array(f=s.length),a=f-1;a>=0;--a)n.push(o=r.children[a]=new w3(s[a],a)),o.parent=r;return(t.parent=new w3(null,0)).children=[t],t}function hqe(){var e=sqe,t=1,r=1,n=null;function o(l){var u=cqe(l);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),n)l.eachBefore(i);else{var c=l,h=l,d=l;l.eachBefore(function(b){b.xh.x&&(h=b),b.depth>d.depth&&(d=b)});var v=c===h?1:e(c,h)/2,p=v-c.x,m=t/(h.x+v+p),y=r/(d.depth||1);l.eachBefore(function(b){b.x=(b.x+p)*m,b.y=b.depth*y})}return l}function s(l){var u=l.children,c=l.parent.children,h=l.i?c[l.i-1]:null;if(u){uqe(l);var d=(u[0].z+u[u.length-1].z)/2;h?(l.z=h.z+e(l._,h._),l.m=l.z-d):l.z=d}else h&&(l.z=h.z+e(l._,h._));l.parent.A=f(l,h,l.parent.A||c[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function f(l,u,c){if(u){for(var h=l,d=l,v=u,p=h.parent.children[0],m=h.m,y=d.m,b=v.m,g=p.m,T;v=R8(v),h=C8(h),v&&h;)p=C8(p),d=R8(d),d.a=l,T=v.z+b-h.z-m+e(v._,h._),T>0&&(lqe(fqe(v,l,c),l,T),m+=T,y+=T),b+=v.m,m+=h.m,g+=p.m,y+=d.m;v&&!R8(d)&&(d.t=v,d.m+=b-y),h&&!C8(p)&&(p.t=h,p.m+=m-g,c=l)}return c}function i(l){l.x*=t,l.y=l.depth*r}return o.separation=function(l){return arguments.length?(e=l,o):e},o.size=function(l){return arguments.length?(n=!1,t=+l[0],r=+l[1],o):n?null:[t,r]},o.nodeSize=function(l){return arguments.length?(n=!0,t=+l[0],r=+l[1],o):n?[t,r]:null},o}function uM(e,t,r,n,o){for(var s=e.children,a,f=-1,i=s.length,l=e.value&&(o-r)/e.value;++fb&&(b=l),A=m*m*S,g=Math.max(b/A,A/y),g>T){m-=l;break}T=g}a.push(i={value:m,dice:d1?n:1)},r})(pMe);function dqe(){var e=yMe,t=!1,r=1,n=1,o=[0],s=am,a=am,f=am,i=am,l=am;function u(h){return h.x0=h.y0=0,h.x1=r,h.y1=n,h.eachBefore(c),o=[0],t&&h.eachBefore(vMe),h}function c(h){var d=o[h.depth],v=h.x0+d,p=h.y0+d,m=h.x1-d,y=h.y1-d;m=h-1){var b=s[c];b.x0=v,b.y0=p,b.x1=m,b.y1=y;return}for(var g=l[c],T=d/2+g,S=c+1,A=h-1;S>>1;l[M]y-p){var x=(v*C+m*w)/d;u(c,S,w,v,p,x,y),u(S,h,C,x,p,m,y)}else{var _=(p*C+y*w)/d;u(c,S,w,v,p,m,_),u(S,h,C,v,_,m,y)}}}function pqe(e,t,r,n,o){(e.depth&1?uM:Y2)(e,t,r,n,o)}const gqe=(function e(t){function r(n,o,s,a,f){if((i=n._squarify)&&i.ratio===t)for(var i,l,u,c,h=-1,d,v=i.length,p=n.value;++h1?n:1)},r})(pMe),yqe=Object.freeze(Object.defineProperty({__proto__:null,cluster:R9e,hierarchy:iW,pack:tqe,packEnclose:fMe,packSiblings:J9e,partition:rqe,stratify:oqe,tree:hqe,treemap:dqe,treemapBinary:vqe,treemapDice:Y2,treemapResquarify:gqe,treemapSlice:uM,treemapSliceDice:pqe,treemapSquarify:yMe},Symbol.toStringTag,{value:"Module"})),fM=$d(yqe);var Ife;function $3(){return Ife||(Ife=1,(function(e){var t=fM,r=Ua(),n=rr(),o=Hs().makeColorScaleFuncFromTrace,s=a2().makePullColorFn,a=a2().generateExtendedColors,f=Hs().calc,i=Pi().ALMOST_EQUAL,l={},u={},c={};e.calc=function(d,v){var p=d._fullLayout,m=v.ids,y=n.isArrayOrTypedArray(m),b=v.labels,g=v.parents,T=v.values,S=n.isArrayOrTypedArray(T),A=[],M={},w={},C=function(Y,K){M[Y]?M[Y].push(K):M[Y]=[K],w[K]=1},x=function(Y){return Y||typeof Y=="number"},_=function(Y){return!S||r(T[Y])&&T[Y]>=0},k,E,I;y?(k=Math.min(m.length,g.length),E=function(Y){return x(m[Y])&&_(Y)},I=function(Y){return String(m[Y])}):(k=Math.min(b.length,g.length),E=function(Y){return x(b[Y])&&_(Y)},I=function(Y){return String(b[Y])}),S&&(k=Math.min(k,T.length));for(var F=0;F1){for(var B=n.randstr(),$=0;$>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?DT(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?DT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=xqe.exec(e))?new ic(t[1],t[2],t[3],1):(t=bqe.exec(e))?new ic(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_qe.exec(e))?DT(t[1],t[2],t[3],t[4]):(t=wqe.exec(e))?DT(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tqe.exec(e))?jfe(t[1],t[2]/100,t[3]/100,1):(t=Aqe.exec(e))?jfe(t[1],t[2]/100,t[3]/100,t[4]):Ofe.hasOwnProperty(e)?Nfe(Ofe[e]):e==="transparent"?new ic(NaN,NaN,NaN,0):null}function Nfe(e){return new ic(e>>16&255,e>>8&255,e&255,1)}function DT(e,t,r,n){return n<=0&&(e=t=r=NaN),new ic(e,t,r,n)}function oW(e){return e instanceof cy||(e=o2(e)),e?(e=e.rgb(),new ic(e.r,e.g,e.b,e.opacity)):new ic}function W3(e,t,r,n){return arguments.length===1?oW(e):new ic(e,t,r,n??1)}function ic(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}nb(ic,W3,$2(cy,{brighter(e){return e=e==null?bx:Math.pow(bx,e),new ic(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xm:Math.pow(xm,e),new ic(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ic(um(this.r),um(this.g),um(this.b),X3(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:Bfe,formatHex:Bfe,formatHex8:Eqe,formatRgb:qfe,toString:qfe}));function Bfe(){return`#${om(this.r)}${om(this.g)}${om(this.b)}`}function Eqe(){return`#${om(this.r)}${om(this.g)}${om(this.b)}${om((isNaN(this.opacity)?1:this.opacity)*255)}`}function qfe(){const e=X3(this.opacity);return`${e===1?"rgb(":"rgba("}${um(this.r)}, ${um(this.g)}, ${um(this.b)}${e===1?")":`, ${e})`}`}function X3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function um(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function om(e){return e=um(e),(e<16?"0":"")+e.toString(16)}function jfe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new sp(e,t,r,n)}function mMe(e){if(e instanceof sp)return new sp(e.h,e.s,e.l,e.opacity);if(e instanceof cy||(e=o2(e)),!e)return new sp;if(e instanceof sp)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,f=s-o,i=(s+o)/2;return f?(t===s?a=(r-n)/f+(r0&&i<1?0:a,new sp(a,f,i,e.opacity)}function nV(e,t,r,n){return arguments.length===1?mMe(e):new sp(e,t,r,n??1)}function sp(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}nb(sp,nV,$2(cy,{brighter(e){return e=e==null?bx:Math.pow(bx,e),new sp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xm:Math.pow(xm,e),new sp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new ic(P8(e>=240?e-240:e+120,o,n),P8(e,o,n),P8(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new sp(Ufe(this.h),IT(this.s),IT(this.l),X3(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 e=X3(this.opacity);return`${e===1?"hsl(":"hsla("}${Ufe(this.h)}, ${IT(this.s)*100}%, ${IT(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ufe(e){return e=(e||0)%360,e<0?e+360:e}function IT(e){return Math.max(0,Math.min(1,e||0))}function P8(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const xMe=Math.PI/180,bMe=180/Math.PI,Z3=18,_Me=.96422,wMe=1,TMe=.82521,AMe=4/29,cx=6/29,SMe=3*cx*cx,kqe=cx*cx*cx;function MMe(e){if(e instanceof l0)return new l0(e.l,e.a,e.b,e.opacity);if(e instanceof G0)return EMe(e);e instanceof ic||(e=oW(e));var t=z8(e.r),r=z8(e.g),n=z8(e.b),o=D8((.2225045*t+.7168786*r+.0606169*n)/wMe),s,a;return t===r&&r===n?s=a=o:(s=D8((.4360747*t+.3850649*r+.1430804*n)/_Me),a=D8((.0139322*t+.0971045*r+.7141733*n)/TMe)),new l0(116*o-16,500*(s-o),200*(o-a),e.opacity)}function aV(e,t,r,n){return arguments.length===1?MMe(e):new l0(e,t,r,n??1)}function l0(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}nb(l0,aV,$2(cy,{brighter(e){return new l0(this.l+Z3*(e??1),this.a,this.b,this.opacity)},darker(e){return new l0(this.l-Z3*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=_Me*I8(t),e=wMe*I8(e),r=TMe*I8(r),new ic(O8(3.1338561*t-1.6168667*e-.4906146*r),O8(-.9787684*t+1.9161415*e+.033454*r),O8(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function D8(e){return e>kqe?Math.pow(e,1/3):e/SMe+AMe}function I8(e){return e>cx?e*e*e:SMe*(e-AMe)}function O8(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function z8(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Cqe(e){if(e instanceof G0)return new G0(e.h,e.c,e.l,e.opacity);if(e instanceof l0||(e=MMe(e)),e.a===0&&e.b===0)return new G0(NaN,0=1?(r=1,t-1):Math.floor(r*t),o=e[n],s=e[n+1],a=n>0?e[n-1]:2*o-s,f=n()=>e;function PMe(e,t){return function(r){return e+r*t}}function Lqe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function dM(e,t){var r=t-e;return r?PMe(e,r>180||r<-180?r-360*Math.round(r/360):r):hM(isNaN(e)?t:e)}function Pqe(e){return(e=+e)==1?oc:function(t,r){return r-t?Lqe(t,r,e):hM(isNaN(t)?r:t)}}function oc(e,t){var r=t-e;return r?PMe(e,r):hM(isNaN(e)?t:e)}const sV=(function e(t){var r=Pqe(t);function n(o,s){var a=r((o=W3(o)).r,(s=W3(s)).r),f=r(o.g,s.g),i=r(o.b,s.b),l=oc(o.opacity,s.opacity);return function(u){return o.r=a(u),o.g=f(u),o.b=i(u),o.opacity=l(u),o+""}}return n.gamma=e,n})(1);function DMe(e){return function(t){var r=t.length,n=new Array(r),o=new Array(r),s=new Array(r),a,f;for(a=0;ar&&(s=t.slice(r,s),f[a]?f[a]+=s:f[++a]=s),(n=n[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,i.push({i:a,x:op(n,o)})),r=F8.lastIndex;return r180?u+=360:u-l>180&&(l+=360),h.push({i:c.push(o(c)+"rotate(",null,n)-2,x:op(l,u)})):u&&c.push(o(c)+"rotate("+u+n)}function f(l,u,c,h){l!==u?h.push({i:c.push(o(c)+"skewX(",null,n)-2,x:op(l,u)}):u&&c.push(o(c)+"skewX("+u+n)}function i(l,u,c,h,d,v){if(l!==c||u!==h){var p=d.push(o(d)+"scale(",null,",",null,")");v.push({i:p-4,x:op(l,c)},{i:p-2,x:op(u,h)})}else(c!==1||h!==1)&&d.push(o(d)+"scale("+c+","+h+")")}return function(l,u){var c=[],h=[];return l=e(l),u=e(u),s(l.translateX,l.translateY,u.translateX,u.translateY,c,h),a(l.rotate,u.rotate,c,h),f(l.skewX,u.skewX,c,h),i(l.scaleX,l.scaleY,u.scaleX,u.scaleY,c,h),l=u=null,function(d){for(var v=-1,p=h.length,m;++v=0){o.i=i.i;var c=s.marker;c.pattern?(!c.colors||!c.pattern.shape)&&(c.color=u,o.color=u):(c.color=u,o.color=u),e.pointStyle(n,s,a,o)}else t.fill(n,u)},N8}var B8,Xfe;function VMe(){if(Xfe)return B8;Xfe=1;var e=ya(),t=va(),r=rr(),n=ch().resizeText,o=fW();function s(f){var i=f._fullLayout._sunburstlayer.selectAll(".trace");n(f,i,"sunburst"),i.each(function(l){var u=e.select(this),c=l[0],h=c.trace;u.style("opacity",h.opacity),u.selectAll("path.surface").each(function(d){e.select(this).call(a,d,h,f)})})}function a(f,i,l,u){var c=i.data.data,h=!i.children,d=c.i,v=r.castOption(l,d,"marker.line.color")||t.defaultLine,p=r.castOption(l,d,"marker.line.width")||0;f.call(o,i,l,u).style("stroke-width",p).call(t.stroke,v).style("opacity",h?l.leaf.opacity:null)}return B8={style:s,styleOne:a},B8}var q8={},Zfe;function hy(){return Zfe||(Zfe=1,(function(e){var t=rr(),r=va(),n=v0(),o=Nm();e.findEntryWithLevel=function(i,l){var u;return l&&i.eachAfter(function(c){if(e.getPtId(c)===l)return u=c.copy()}),u||i},e.findEntryWithChild=function(i,l){var u;return i.eachAfter(function(c){for(var h=c.children||[],d=0;d0)},e.getMaxDepth=function(i){return i.maxdepth>=0?i.maxdepth:1/0},e.isHeader=function(i,l){return!(e.isLeaf(i)||i.depth===l._maxDepth-1)};function f(i){return i.data.data.pid}e.getParent=function(i,l){return e.findEntryWithLevel(i,f(l))},e.listPath=function(i,l){var u=i.parent;if(!u)return[];var c=l?[u.data[l]]:[u];return e.listPath(u,l).concat(c)},e.getPath=function(i){return e.listPath(i,"label").join("/")+"/"},e.formatValue=o.formatPieValue,e.formatPercent=function(i,l){var u=t.formatPercent(i,0);return u==="0%"&&(u=o.formatPiePercent(i,l)),u}})(q8)),q8}var j8,Kfe;function pM(){if(Kfe)return j8;Kfe=1;var e=ya(),t=ga(),r=Wd().appendArrayPointValue,n=yl(),o=rr(),s=R2(),a=hy(),f=Nm(),i=f.formatPieValue;j8=function(c,h,d,v,p){var m=v[0],y=m.trace,b=m.hierarchy,g=y.type==="sunburst",T=y.type==="treemap"||y.type==="icicle";"_hasHoverLabel"in y||(y._hasHoverLabel=!1),"_hasHoverEvent"in y||(y._hasHoverEvent=!1);var S=function(w){var C=d._fullLayout;if(!(d._dragging||C.hovermode===!1)){var x=d._fullData[y.index],_=w.data.data,k=_.i,E=a.isHierarchyRoot(w),I=a.getParent(b,w),F=a.getValue(w),D=function(ee){return o.castOption(x,k,ee)},z=D("hovertemplate"),N=n.castHoverinfo(x,C,k),q=C.separators,P;if(z||N&&N!=="none"&&N!=="skip"){var B,$;g&&(B=m.cx+w.pxmid[0]*(1-w.rInscribed),$=m.cy+w.pxmid[1]*(1-w.rInscribed)),T&&(B=w._hoverX,$=w._hoverY);var Q={},J=[],ne=[],te=function(ee){return J.indexOf(ee)!==-1};N&&(J=N==="all"?x._module.attributes.hoverinfo.flags:N.split("+")),Q.label=_.label,te("label")&&Q.label&&ne.push(Q.label),_.hasOwnProperty("v")&&(Q.value=_.v,Q.valueLabel=i(Q.value,q),te("value")&&ne.push(Q.valueLabel)),Q.currentPath=w.currentPath=a.getPath(w.data),te("current path")&&!E&&ne.push(Q.currentPath);var Z,G=[],j=function(){G.indexOf(Z)===-1&&(ne.push(Z),G.push(Z))};Q.percentParent=w.percentParent=F/a.getValue(I),Q.parent=w.parentString=a.getPtLabel(I),te("percent parent")&&(Z=a.formatPercent(Q.percentParent,q)+" of "+Q.parent,j()),Q.percentEntry=w.percentEntry=F/a.getValue(h),Q.entry=w.entry=a.getPtLabel(h),te("percent entry")&&!E&&!w.onPathbar&&(Z=a.formatPercent(Q.percentEntry,q)+" of "+Q.entry,j()),Q.percentRoot=w.percentRoot=F/a.getValue(b),Q.root=w.root=a.getPtLabel(b),te("percent root")&&!E&&(Z=a.formatPercent(Q.percentRoot,q)+" of "+Q.root,j()),Q.text=D("hovertext")||D("text"),te("text")&&(Z=Q.text,o.isValidTextValue(Z)&&ne.push(Z)),P=[l(w,x,p.eventDataKeys)];var Y={trace:x,y:$,_x0:w._x0,_x1:w._x1,_y0:w._y0,_y1:w._y1,text:ne.join("
"),name:z||te("name")?x.name:void 0,color:D("hoverlabel.bgcolor")||_.color,borderColor:D("hoverlabel.bordercolor"),fontFamily:D("hoverlabel.font.family"),fontSize:D("hoverlabel.font.size"),fontColor:D("hoverlabel.font.color"),nameLength:D("hoverlabel.namelength"),textAlign:D("hoverlabel.align"),hovertemplate:z,hovertemplateLabels:Q,eventData:P};g&&(Y.x0=B-w.rInscribed*w.rpx1,Y.x1=B+w.rInscribed*w.rpx1,Y.idealAlign=w.pxmid[0]<0?"left":"right"),T&&(Y.x=B,Y.idealAlign=B<0?"left":"right");var K=[];n.loneHover(Y,{container:C._hoverlayer.node(),outerContainer:C._paper.node(),gd:d,inOut_bbox:K}),P[0].bbox=K[0],y._hasHoverLabel=!0}if(T){var X=c.select("path.surface");p.styleOne(X,w,x,d,{hovered:!0})}y._hasHoverEvent=!0,d.emit("plotly_hover",{points:P||[l(w,x,p.eventDataKeys)],event:e.event})}},A=function(w){var C=d._fullLayout,x=d._fullData[y.index],_=e.select(this).datum();if(y._hasHoverEvent&&(w.originalEvent=e.event,d.emit("plotly_unhover",{points:[l(_,x,p.eventDataKeys)],event:e.event}),y._hasHoverEvent=!1),y._hasHoverLabel&&(n.loneUnhover(C._hoverlayer.node()),y._hasHoverLabel=!1),T){var k=c.select("path.surface");p.styleOne(k,_,x,d,{hovered:!1})}},M=function(w){var C=d._fullLayout,x=d._fullData[y.index],_=g&&(a.isHierarchyRoot(w)||a.isLeaf(w)),k=a.getPtId(w),E=a.isEntry(w)?a.findEntryWithChild(b,k):a.findEntryWithLevel(b,k),I=a.getPtId(E),F={points:[l(w,x,p.eventDataKeys)],event:e.event};_||(F.nextLevel=I);var D=s.triggerHandler(d,"plotly_"+y.type+"click",F);if(D!==!1&&C.hovermode&&(d._hoverdata=[l(w,x,p.eventDataKeys)],n.click(d,e.event)),!_&&D!==!1&&!d._dragging&&!d._transitioning){t.call("_storeDirectGUIEdit",x,C._tracePreGUI[x.uid],{level:x.level});var z={data:[{level:I}],traces:[y.index]},N={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};n.loneUnhover(C._hoverlayer.node()),t.call("animate",d,z,N)}};c.on("mouseover",S),c.on("mouseout",A),c.on("click",M)};function l(u,c,h){for(var d=u.data.data,v={curveNumber:c.index,pointNumber:d.i,data:c._input,fullData:c},p=0;pCe.x1?2*Math.PI:0)+oe;et=Qe.rpx1Te?2*Math.PI:0)+oe;me={x0:et,x1:et}}else me={rpx0:te,rpx1:te},s.extendFlat(me,We(Qe));else me={rpx0:0,rpx1:0};else me={x0:oe,x1:oe};return n(me,Ce)}function qe(Qe){var De=Y[b.getPtId(Qe)],me,Ce=Qe.transform;if(De)me=De;else if(me={rpx1:Qe.rpx1,transform:{textPosAngle:Ce.textPosAngle,scale:0,rotate:Ce.rotate,rCenter:Ce.rCenter,x:Ce.x,y:Ce.y}},j)if(Qe.parent)if(Te){var et=Qe.x1>Te?2*Math.PI:0;me.x0=me.x1=et}else s.extendFlat(me,We(Qe));else me.x0=me.x1=oe;else me.x0=me.x1=oe;var st=n(me.transform.textPosAngle,Qe.transform.textPosAngle),ot=n(me.rpx1,Qe.rpx1),ut=n(me.x0,Qe.x0),ht=n(me.x1,Qe.x1),Ht=n(me.transform.scale,Ce.scale),Et=n(me.transform.rotate,Ce.rotate),Jt=Ce.rCenter===0?3:me.transform.rCenter===0?1/3:1,Tt=n(me.transform.rCenter,Ce.rCenter),rt=function(gt){return Tt(Math.pow(gt,Jt))};return function(gt){var mt=ot(gt);ut(gt),ht(gt);var He=rt(gt),Ie=st(gt),je={rpx1:mt,transform:{textPosAngle:Ie,rCenter:He,x:Ce.x,y:Ce.y}};return i(N.type,Ce,E),{transform:{targetX:Oe(je),targetY:be(je),scale:Ht(gt),rotate:Et(gt),rCenter:He}}}}function We(Qe){var De=Qe.parent,me=Y[b.getPtId(De)],Ce={};if(me){var et=De.children,st=et.indexOf(Qe),ot=et.length,ut=n(me.x0,me.x1);Ce.x0=ut(st/ot),Ce.x1=ut(st/ot)}else Ce.x0=Ce.x1=0;return Ce}}function T(w){return r.partition().size([2*Math.PI,w.height+1])(w)}e.formatSliceLabel=function(w,C,x,_,k){var E=x.texttemplate,I=x.textinfo;if(!E&&(!I||I==="none"))return"";var F=k.separators,D=_[0],z=w.data.data,N=D.hierarchy,q=b.isHierarchyRoot(w),P=b.getParent(N,w),B=b.getValue(w);if(!E){var $=I.split("+"),Q=function(ee){return $.indexOf(ee)!==-1},J=[],ne;if(Q("label")&&z.label&&J.push(z.label),z.hasOwnProperty("v")&&Q("value")&&J.push(b.formatValue(z.v,F)),!q){Q("current path")&&J.push(b.getPath(w.data));var te=0;Q("percent parent")&&te++,Q("percent entry")&&te++,Q("percent root")&&te++;var Z=te>1;if(te){var G,j=function(ee){ne=b.formatPercent(G,F),Z&&(ne+=" of "+ee),J.push(ne)};Q("percent parent")&&!q&&(G=B/b.getValue(P),j("parent")),Q("percent entry")&&(G=B/b.getValue(C),j("entry")),Q("percent root")&&(G=B/b.getValue(N),j("root"))}}return Q("text")&&(ne=s.castOption(x,z.i,"text"),s.isValidTextValue(ne)&&J.push(ne)),J.join("
")}var Y=s.castOption(x,z.i,"texttemplate");if(!Y)return"";var K={};z.label&&(K.label=z.label),z.hasOwnProperty("v")&&(K.value=z.v,K.valueLabel=b.formatValue(z.v,F)),K.currentPath=b.getPath(w.data),q||(K.percentParent=B/b.getValue(P),K.percentParentLabel=b.formatPercent(K.percentParent,F),K.parent=b.getPtLabel(P)),K.percentEntry=B/b.getValue(C),K.percentEntryLabel=b.formatPercent(K.percentEntry,F),K.entry=b.getPtLabel(C),K.percentRoot=B/b.getValue(N),K.percentRootLabel=b.formatPercent(K.percentRoot,F),K.root=b.getPtLabel(N),z.hasOwnProperty("color")&&(K.color=z.color);var X=s.castOption(x,z.i,"text");return(s.isValidTextValue(X)||X==="")&&(K.text=X),K.customdata=s.castOption(x,z.i,"customdata"),s.texttemplateString(Y,K,k._d3locale,K,x._meta||{})};function S(w){return w.rpx0===0&&s.isFullCircle([w.x0,w.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(w.halfangle)),w.ring/2))}function A(w){return M(w.rpx1,w.transform.textPosAngle)}function M(w,C){return[w*Math.sin(C),-w*Math.cos(C)]}})(L8)),L8}var U8,Qfe;function nje(){return Qfe||(Qfe=1,U8={moduleType:"trace",name:"sunburst",basePlotModule:b9e(),categories:[],animatable:!0,attributes:lM(),layoutAttributes:lMe(),supplyDefaults:_9e(),supplyLayoutDefaults:w9e(),calc:$3().calc,crossTraceCalc:$3().crossTraceCalc,plot:cW().plot,style:VMe().style,colorbar:fh(),meta:{description:["Visualize hierarchal data spanning outward radially from root to leaves.","The sunburst sectors are determined by the entries in *labels* or *ids*","and in *parents*."].join(" ")}}),U8}var H8,ece;function aje(){return ece||(ece=1,H8=nje()),H8}var G8={},tce;function ije(){return tce||(tce=1,(function(e){var t=Ts();e.name="treemap",e.plot=function(r,n,o,s){t.plotBasePlot(e.name,r,n,o,s)},e.clean=function(r,n,o,s){t.cleanBasePlot(e.name,r,n,o,s)}})(G8)),G8}var V8,rce;function ab(){return rce||(rce=1,V8={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}),V8}var Y8,nce;function hW(){if(nce)return Y8;nce=1;var e=bi().hovertemplateAttrs,t=bi().texttemplateAttrs,r=os(),n=Vs().attributes,o=rb(),s=lM(),a=ab(),f=ja().extendFlat,i=lc().pattern;return Y8={labels:s.labels,parents:s.parents,values:s.values,branchvalues:s.branchvalues,count:s.count,level:s.level,maxdepth:s.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:f({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:s.marker.colors,pattern:i,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:s.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},r("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:f({},o.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:o.text,textinfo:s.textinfo,texttemplate:t({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),hovertext:o.hovertext,hoverinfo:s.hoverinfo,hovertemplate:e({},{keys:a.eventDataKeys}),textfont:o.textfont,insidetextfont:o.insidetextfont,outsidetextfont:f({},o.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot",description:["Sets the positions of the `text` elements."].join(" ")},sort:o.sort,root:s.root,domain:n({name:"treemap",trace:!0,editType:"calc"})},Y8}var $8,ace;function YMe(){return ace||(ace=1,$8={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}),$8}var W8,ice;function oje(){if(ice)return W8;ice=1;var e=rr(),t=hW(),r=va(),n=Vs().defaults,o=Ev().handleText,s=$x().TEXTPAD,a=mx().handleMarkerDefaults,f=Hs(),i=f.hasColorscale,l=f.handleDefaults;return W8=function(c,h,d,v){function p(x,_){return e.coerce(c,h,t,x,_)}var m=p("labels"),y=p("parents");if(!m||!m.length||!y||!y.length){h.visible=!1;return}var b=p("values");b&&b.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var g=p("tiling.packing");g==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var T=p("text");p("texttemplate"),h.texttemplate||p("textinfo",e.isArrayOrTypedArray(T)?"text+label":"label"),p("hovertext"),p("hovertemplate");var S=p("pathbar.visible"),A="auto";o(c,h,v,p,A,{hasPathbar:S,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var M=h.textposition.indexOf("bottom")!==-1;a(c,h,v,p);var w=h._hasColorscale=i(c,"marker","colors")||(c.marker||{}).coloraxis;w?l(c,h,v,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(h.marker.colors||[]).length);var C=h.textfont.size*2;p("marker.pad.t",M?C/4:C),p("marker.pad.l",C/4),p("marker.pad.r",C/4),p("marker.pad.b",M?C:C/4),p("marker.cornerradius"),h._hovered={marker:{line:{width:2,color:r.contrast(v.paper_bgcolor)}}},S&&(p("pathbar.thickness",h.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),n(h,v,p),h._length=null},W8}var X8,oce;function sje(){if(oce)return X8;oce=1;var e=rr(),t=YMe();return X8=function(n,o){function s(a,f){return e.coerce(n,o,t,a,f)}s("treemapcolorway",o.colorway),s("extendtreemapcolors")},X8}var zT={},sce;function lce(){if(sce)return zT;sce=1;var e=$3();return zT.calc=function(t,r){return e.calc(t,r)},zT.crossTraceCalc=function(t){return e._runCrossTraceCalc("treemap",t)},zT}var Z8,uce;function $Me(){return uce||(uce=1,Z8=function e(t,r,n){var o;n.swapXY&&(o=t.x0,t.x0=t.y0,t.y0=o,o=t.x1,t.x1=t.y1,t.y1=o),n.flipX&&(o=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-o),n.flipY&&(o=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-o);var s=t.children;if(s)for(var a=0;a0)for(var C=0;C").join(" ")||"";var ne=t.ensureSingle(Q,"g","slicetext"),te=t.ensureSingle(ne,"text","",function(G){G.attr("data-notex",1)}),Z=t.ensureUniformFontSize(c,f.determineTextFont(D,$,I.font,{onPathbar:!0}));te.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(r.font,Z).call(n.convertToTspans,c),$.textBB=r.bBox(te.node()),$.transform=A($,{fontSize:Z.size,onPathbar:!0}),$.transform.fontSize=Z.size,w?te.transition().attrTween("transform",function(G){var j=_(G,l,k,[y,b]);return function(Y){return M(j(Y))}}):te.attr("transform",M($))})},Q8}var ez,dce;function uje(){if(dce)return ez;dce=1;var e=ya(),t=_x.interpolate,r=hy(),n=rr(),o=$x().TEXTPAD,s=Wx(),a=s.toMoveInsideBar,f=ch(),i=f.recordMinTextSize,l=ab(),u=lje();function c(h){return r.isHierarchyRoot(h)?"":r.getPtId(h)}return ez=function(d,v,p,m,y){var b=d._fullLayout,g=v[0],T=g.trace,S=T.type,A=S==="icicle",M=g.hierarchy,w=r.findEntryWithLevel(M,T.level),C=e.select(p),x=C.selectAll("g.pathbar"),_=C.selectAll("g.slice");if(!w){x.remove(),_.remove();return}var k=r.isHierarchyRoot(w),E=!b.uniformtext.mode&&r.hasTransition(m),I=r.getMaxDepth(T),F=function(Et){return Et.data.depth-w.data.depth-1?q+$:-(B+$):0,J={x0:P,x1:P,y0:Q,y1:Q+B},ne=function(Et,Jt,Tt){var rt=T.tiling.pad,gt=function(je){return je-rt<=Jt.x0},mt=function(je){return je+rt>=Jt.x1},He=function(je){return je-rt<=Jt.y0},Ie=function(je){return je+rt>=Jt.y1};return Et.x0===Jt.x0&&Et.x1===Jt.x1&&Et.y0===Jt.y0&&Et.y1===Jt.y1?{x0:Et.x0,x1:Et.x1,y0:Et.y0,y1:Et.y1}:{x0:gt(Et.x0-rt)?0:mt(Et.x0-rt)?Tt[0]:Et.x0,x1:gt(Et.x1+rt)?0:mt(Et.x1+rt)?Tt[0]:Et.x1,y0:He(Et.y0-rt)?0:Ie(Et.y0-rt)?Tt[1]:Et.y0,y1:He(Et.y1+rt)?0:Ie(Et.y1+rt)?Tt[1]:Et.y1}},te=null,Z={},G={},j=null,Y=function(Et,Jt){return Jt?Z[c(Et)]:G[c(Et)]},K=function(Et,Jt,Tt,rt){if(Jt)return Z[c(M)]||J;var gt=G[T.level]||Tt;return F(Et)?ne(Et,gt,rt):{}};g.hasMultipleRoots&&k&&I++,T._maxDepth=I,T._backgroundColor=b.paper_bgcolor,T._entryDepth=w.data.depth,T._atRootLevel=k;var X=-N/2+D.l+D.w*(z.x[1]+z.x[0])/2,ee=-q/2+D.t+D.h*(1-(z.y[1]+z.y[0])/2),le=function(Et){return X+Et},oe=function(Et){return ee+Et},fe=oe(0),de=le(0),_e=function(Et){return de+Et},we=function(Et){return fe+Et};function Oe(Et,Jt){return Et+","+Jt}var be=_e(0),Te=function(Et){Et.x=Math.max(be,Et.x)},ke=T.pathbar.edgeshape,Ee=function(Et){var Jt=_e(Math.max(Math.min(Et.x0,Et.x0),0)),Tt=_e(Math.min(Math.max(Et.x1,Et.x1),P)),rt=we(Et.y0),gt=we(Et.y1),mt=B/2,He={},Ie={};He.x=Jt,Ie.x=Tt,He.y=Ie.y=(rt+gt)/2;var je={x:Jt,y:rt},pe={x:Tt,y:rt},ye={x:Tt,y:gt},Se={x:Jt,y:gt};return ke===">"?(je.x-=mt,pe.x-=mt,ye.x-=mt,Se.x-=mt):ke==="/"?(ye.x-=mt,Se.x-=mt,He.x-=mt/2,Ie.x-=mt/2):ke==="\\"?(je.x-=mt,pe.x-=mt,He.x-=mt/2,Ie.x-=mt/2):ke==="<"&&(He.x-=mt,Ie.x-=mt),Te(je),Te(Se),Te(He),Te(pe),Te(ye),Te(Ie),"M"+Oe(je.x,je.y)+"L"+Oe(pe.x,pe.y)+"L"+Oe(Ie.x,Ie.y)+"L"+Oe(ye.x,ye.y)+"L"+Oe(Se.x,Se.y)+"L"+Oe(He.x,He.y)+"Z"},Le=T[A?"tiling":"marker"].pad,Fe=function(Et){return T.textposition.indexOf(Et)!==-1},qe=Fe("top"),We=Fe("left"),Qe=Fe("right"),De=Fe("bottom"),me=function(Et){var Jt=le(Et.x0),Tt=le(Et.x1),rt=oe(Et.y0),gt=oe(Et.y1),mt=Tt-Jt,He=gt-rt;if(!mt||!He)return"";var Ie=T.marker.cornerradius||0,je=Math.min(Ie,mt/2,He/2);je&&Et.data&&Et.data.data&&Et.data.data.label&&(qe&&(je=Math.min(je,Le.t)),We&&(je=Math.min(je,Le.l)),Qe&&(je=Math.min(je,Le.r)),De&&(je=Math.min(je,Le.b)));var pe=function(ye,Se){return je?"a"+Oe(je,je)+" 0 0 1 "+Oe(ye,Se):""};return"M"+Oe(Jt,rt+je)+pe(je,-je)+"L"+Oe(Tt-je,rt)+pe(je,je)+"L"+Oe(Tt,gt-je)+pe(-je,je)+"L"+Oe(Jt+je,gt)+pe(-je,-je)+"Z"},Ce=function(Et,Jt){var Tt=Et.x0,rt=Et.x1,gt=Et.y0,mt=Et.y1,He=Et.textBB,Ie=qe||Jt.isHeader&&!De,je=Ie?"start":De?"end":"middle",pe=Fe("right"),ye=Fe("left")||Jt.onPathbar,Se=ye?-1:pe?1:0;if(Jt.isHeader){if(Tt+=(A?Le:Le.l)-o,rt-=(A?Le:Le.r)-o,Tt>=rt){var Pe=(Tt+rt)/2;Tt=Pe,rt=Pe}var it;De?(it=mt-(A?Le:Le.b),gt-1,flipY:z.tiling.flip.indexOf("y")>-1,pad:{inner:z.tiling.pad,top:z.marker.pad.t,left:z.marker.pad.l,right:z.marker.pad.r,bottom:z.marker.pad.b}}),Q=$.descendants(),J=1/0,ne=-1/0;Q.forEach(function(Y){var K=Y.depth;K>=z._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(J=Math.min(J,K),ne=Math.max(ne,K))}),p=p.data(Q,f.getPtId),z._maxVisibleLayers=isFinite(ne)?ne-J+1:0,p.enter().append("g").classed("slice",!0),C(p,u,E,[y,b],S),p.order();var te=null;if(w&&k){var Z=f.getPtId(k);p.each(function(Y){te===null&&f.getPtId(Y)===Z&&(te={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var G=function(){return te||{x0:0,x1:y,y0:0,y1:b}},j=p;return w&&(j=j.transition().each("end",function(){var Y=e.select(this);f.setSliceCursor(Y,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(Y){var K=f.isHeader(Y,z);Y._x0=g(Y.x0),Y._x1=g(Y.x1),Y._y0=T(Y.y0),Y._y1=T(Y.y1),Y._hoverX=g(Y.x1-z.marker.pad.r),Y._hoverY=T(P?Y.y1-z.marker.pad.b/2:Y.y0+z.marker.pad.t/2);var X=e.select(this),ee=t.ensureSingle(X,"path","surface",function(de){de.style("pointer-events",I?"none":"all")});w?ee.transition().attrTween("d",function(de){var _e=x(de,u,G(),[y,b]);return function(we){return S(_e(we))}}):ee.attr("d",S),X.call(i,v,h,d,{styleOne:s,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,h,{isTransitioning:h._transitioning}),ee.call(s,Y,z,h,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":K?Y._text=B?"":f.getPtLabel(Y)||"":Y._text=l(Y,v,z,d,F)||"";var le=t.ensureSingle(X,"g","slicetext"),oe=t.ensureSingle(le,"text","",function(de){de.attr("data-notex",1)}),fe=t.ensureUniformFontSize(h,f.determineTextFont(z,Y,F.font));oe.text(Y._text||" ").classed("slicetext",!0).attr("text-anchor",q?"end":N||K?"start":"middle").call(r.font,fe).call(n.convertToTspans,h),Y.textBB=r.bBox(oe.node()),Y.transform=A(Y,{fontSize:fe.size,isHeader:K}),Y.transform.fontSize=fe.size,w?oe.transition().attrTween("transform",function(de){var _e=_(de,u,G(),[y,b]);return function(we){return M(_e(we))}}):oe.attr("transform",M(Y))}),te},rz}var nz,gce;function cje(){if(gce)return nz;gce=1;var e=XMe(),t=fje();return nz=function(n,o,s,a){return e(n,o,s,a,{type:"treemap",drawDescendants:t})},nz}var az,yce;function hje(){return yce||(yce=1,az={moduleType:"trace",name:"treemap",basePlotModule:ije(),categories:[],animatable:!0,attributes:hW(),layoutAttributes:YMe(),supplyDefaults:oje(),supplyLayoutDefaults:sje(),calc:lce().calc,crossTraceCalc:lce().crossTraceCalc,plot:cje(),style:dW().style,colorbar:fh(),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}),az}var iz,mce;function dje(){return mce||(mce=1,iz=hje()),iz}var oz={},xce;function vje(){return xce||(xce=1,(function(e){var t=Ts();e.name="icicle",e.plot=function(r,n,o,s){t.plotBasePlot(e.name,r,n,o,s)},e.clean=function(r,n,o,s){t.cleanBasePlot(e.name,r,n,o,s)}})(oz)),oz}var sz,bce;function ZMe(){if(bce)return sz;bce=1;var e=bi().hovertemplateAttrs,t=bi().texttemplateAttrs,r=os(),n=Vs().attributes,o=rb(),s=lM(),a=hW(),f=ab(),i=ja().extendFlat,l=lc().pattern;return sz={labels:s.labels,parents:s.parents,values:s.values,branchvalues:s.branchvalues,count:s.count,level:s.level,maxdepth:s.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot",description:["When set in conjunction with `tiling.flip`, determines on","which side the root nodes are drawn in the chart. If","`tiling.orientation` is *v* and `tiling.flip` is **, the root","nodes appear at the top. If `tiling.orientation` is *v* and","`tiling.flip` is *y*, the root nodes appear at the bottom. If","`tiling.orientation` is *h* and `tiling.flip` is **, the","root nodes appear at the left. If `tiling.orientation` is *h*","and `tiling.flip` is *x*, the root nodes appear at the right."].join(" ")},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:i({colors:s.marker.colors,line:s.marker.line,pattern:l,editType:"calc"},r("marker",{colorAttr:"colors",anim:!1})),leaf:s.leaf,pathbar:a.pathbar,text:o.text,textinfo:s.textinfo,texttemplate:t({editType:"plot"},{keys:f.eventDataKeys.concat(["label","value"])}),hovertext:o.hovertext,hoverinfo:s.hoverinfo,hovertemplate:e({},{keys:f.eventDataKeys}),textfont:o.textfont,insidetextfont:o.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:o.sort,root:s.root,domain:n({name:"icicle",trace:!0,editType:"calc"})},sz}var lz,_ce;function KMe(){return _ce||(_ce=1,lz={iciclecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default icicle slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendiciclecolors`."].join(" ")},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the icicle slice colors (whether given by `iciclecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}),lz}var uz,wce;function pje(){if(wce)return uz;wce=1;var e=rr(),t=ZMe(),r=va(),n=Vs().defaults,o=Ev().handleText,s=$x().TEXTPAD,a=mx().handleMarkerDefaults,f=Hs(),i=f.hasColorscale,l=f.handleDefaults;return uz=function(c,h,d,v){function p(M,w){return e.coerce(c,h,t,M,w)}var m=p("labels"),y=p("parents");if(!m||!m.length||!y||!y.length){h.visible=!1;return}var b=p("values");b&&b.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var g=p("text");p("texttemplate"),h.texttemplate||p("textinfo",e.isArrayOrTypedArray(g)?"text+label":"label"),p("hovertext"),p("hovertemplate");var T=p("pathbar.visible"),S="auto";o(c,h,v,p,S,{hasPathbar:T,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),a(c,h,v,p);var A=h._hasColorscale=i(c,"marker","colors")||(c.marker||{}).coloraxis;A&&l(c,h,v,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",A?1:.7),h._hovered={marker:{line:{width:2,color:r.contrast(v.paper_bgcolor)}}},T&&(p("pathbar.thickness",h.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),n(h,v,p),h._length=null},uz}var fz,Tce;function gje(){if(Tce)return fz;Tce=1;var e=rr(),t=KMe();return fz=function(n,o){function s(a,f){return e.coerce(n,o,t,a,f)}s("iciclecolorway",o.colorway),s("extendiciclecolors")},fz}var FT={},Ace;function Sce(){if(Ace)return FT;Ace=1;var e=$3();return FT.calc=function(t,r){return e.calc(t,r)},FT.crossTraceCalc=function(t){return e._runCrossTraceCalc("icicle",t)},FT}var cz,Mce;function yje(){if(Mce)return cz;Mce=1;var e=fM,t=$Me();return cz=function(n,o,s){var a=s.flipX,f=s.flipY,i=s.orientation==="h",l=s.maxDepth,u=o[0],c=o[1];l&&(u=(n.height+1)*o[0]/Math.min(n.height+1,l),c=(n.height+1)*o[1]/Math.min(n.height+1,l));var h=e.partition().padding(s.pad.inner).size(i?[o[1],u]:[o[0],c])(n);return(i||a||f)&&t(h,o,{swapXY:i,flipX:a,flipY:f}),h},cz}var hz,Ece;function JMe(){if(Ece)return hz;Ece=1;var e=ya(),t=va(),r=rr(),n=ch().resizeText,o=fW();function s(f){var i=f._fullLayout._iciclelayer.selectAll(".trace");n(f,i,"icicle"),i.each(function(l){var u=e.select(this),c=l[0],h=c.trace;u.style("opacity",h.opacity),u.selectAll("path.surface").each(function(d){e.select(this).call(a,d,h,f)})})}function a(f,i,l,u){var c=i.data.data,h=!i.children,d=c.i,v=r.castOption(l,d,"marker.line.color")||t.defaultLine,p=r.castOption(l,d,"marker.line.width")||0;f.call(o,i,l,u).style("stroke-width",p).call(t.stroke,v).style("opacity",h?l.leaf.opacity:null)}return hz={style:s,styleOne:a},hz}var dz,kce;function mje(){if(kce)return dz;kce=1;var e=ya(),t=rr(),r=Ba(),n=ns(),o=yje(),s=JMe().styleOne,a=ab(),f=hy(),i=pM(),l=cW().formatSliceLabel,u=!1;return dz=function(h,d,v,p,m){var y=m.width,b=m.height,g=m.viewX,T=m.viewY,S=m.pathSlice,A=m.toMoveInsideSlice,M=m.strTransform,w=m.hasTransition,C=m.handleSlicesExit,x=m.makeUpdateSliceInterpolator,_=m.makeUpdateTextInterpolator,k=m.prevEntry,E={},I=h._context.staticPlot,F=h._fullLayout,D=d[0],z=D.trace,N=z.textposition.indexOf("left")!==-1,q=z.textposition.indexOf("right")!==-1,P=z.textposition.indexOf("bottom")!==-1,B=o(v,[y,b],{flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1,orientation:z.tiling.orientation,pad:{inner:z.tiling.pad},maxDepth:z._maxDepth}),$=B.descendants(),Q=1/0,J=-1/0;$.forEach(function(j){var Y=j.depth;Y>=z._maxDepth?(j.x0=j.x1=(j.x0+j.x1)/2,j.y0=j.y1=(j.y0+j.y1)/2):(Q=Math.min(Q,Y),J=Math.max(J,Y))}),p=p.data($,f.getPtId),z._maxVisibleLayers=isFinite(J)?J-Q+1:0,p.enter().append("g").classed("slice",!0),C(p,u,E,[y,b],S),p.order();var ne=null;if(w&&k){var te=f.getPtId(k);p.each(function(j){ne===null&&f.getPtId(j)===te&&(ne={x0:j.x0,x1:j.x1,y0:j.y0,y1:j.y1})})}var Z=function(){return ne||{x0:0,x1:y,y0:0,y1:b}},G=p;return w&&(G=G.transition().each("end",function(){var j=e.select(this);f.setSliceCursor(j,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(j){j._x0=g(j.x0),j._x1=g(j.x1),j._y0=T(j.y0),j._y1=T(j.y1),j._hoverX=g(j.x1-z.tiling.pad),j._hoverY=T(P?j.y1-z.tiling.pad/2:j.y0+z.tiling.pad/2);var Y=e.select(this),K=t.ensureSingle(Y,"path","surface",function(oe){oe.style("pointer-events",I?"none":"all")});w?K.transition().attrTween("d",function(oe){var fe=x(oe,u,Z(),[y,b],{orientation:z.tiling.orientation,flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1});return function(de){return S(fe(de))}}):K.attr("d",S),Y.call(i,v,h,d,{styleOne:s,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,h,{isTransitioning:h._transitioning}),K.call(s,j,z,h,{hovered:!1}),j.x0===j.x1||j.y0===j.y1?j._text="":j._text=l(j,v,z,d,F)||"";var X=t.ensureSingle(Y,"g","slicetext"),ee=t.ensureSingle(X,"text","",function(oe){oe.attr("data-notex",1)}),le=t.ensureUniformFontSize(h,f.determineTextFont(z,j,F.font));ee.text(j._text||" ").classed("slicetext",!0).attr("text-anchor",q?"end":N?"start":"middle").call(r.font,le).call(n.convertToTspans,h),j.textBB=r.bBox(ee.node()),j.transform=A(j,{fontSize:le.size}),j.transform.fontSize=le.size,w?ee.transition().attrTween("transform",function(oe){var fe=_(oe,u,Z(),[y,b]);return function(de){return M(fe(de))}}):ee.attr("transform",M(j))}),ne},dz}var vz,Cce;function xje(){if(Cce)return vz;Cce=1;var e=XMe(),t=mje();return vz=function(n,o,s,a){return e(n,o,s,a,{type:"icicle",drawDescendants:t})},vz}var pz,Rce;function bje(){return Rce||(Rce=1,pz={moduleType:"trace",name:"icicle",basePlotModule:vje(),categories:[],animatable:!0,attributes:ZMe(),layoutAttributes:KMe(),supplyDefaults:pje(),supplyLayoutDefaults:gje(),calc:Sce().calc,crossTraceCalc:Sce().crossTraceCalc,plot:xje(),style:JMe().style,colorbar:fh(),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The icicle sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}),pz}var gz,Lce;function _je(){return Lce||(Lce=1,gz=bje()),gz}var yz={},Pce;function wje(){return Pce||(Pce=1,(function(e){var t=Ts();e.name="funnelarea",e.plot=function(r,n,o,s){t.plotBasePlot(e.name,r,n,o,s)},e.clean=function(r,n,o,s){t.cleanBasePlot(e.name,r,n,o,s)}})(yz)),yz}var mz,Dce;function QMe(){if(Dce)return mz;Dce=1;var e=rb(),t=qo(),r=Vs().attributes,n=bi().hovertemplateAttrs,o=bi().texttemplateAttrs,s=ja().extendFlat;return mz={labels:e.labels,label0:e.label0,dlabel:e.dlabel,values:e.values,marker:{colors:e.marker.colors,line:{color:s({},e.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:s({},e.marker.line.width,{dflt:1}),editType:"calc"},pattern:e.marker.pattern,editType:"calc"},text:e.text,hovertext:e.hovertext,scalegroup:s({},e.scalegroup,{description:["If there are multiple funnelareas that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")}),textinfo:s({},e.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:s({},t.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:n({},{keys:["label","color","value","text","percent"]}),textposition:s({},e.textposition,{values:["inside","none"],dflt:"inside"}),textfont:e.textfont,insidetextfont:e.insidetextfont,title:{text:e.title.text,font:e.title.font,position:s({},e.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:r({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the ratio between height and width"].join(" ")},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot",description:["Sets the ratio between bottom length and maximum top length."].join(" ")}},mz}var xz,Ice;function eEe(){if(Ice)return xz;Ice=1;var e=nW().hiddenlabels;return xz={hiddenlabels:e,funnelareacolorway:{valType:"colorlist",editType:"calc",description:["Sets the default funnelarea slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendfunnelareacolors`."].join(" ")},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the funnelarea slice colors (whether given by `funnelareacolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},xz}var bz,Oce;function Tje(){if(Oce)return bz;Oce=1;var e=rr(),t=QMe(),r=Vs().defaults,n=Ev().handleText,o=mx().handleLabelsAndValues,s=mx().handleMarkerDefaults;return bz=function(f,i,l,u){function c(S,A){return e.coerce(f,i,t,S,A)}var h=c("labels"),d=c("values"),v=o(h,d),p=v.len;if(i._hasLabels=v.hasLabels,i._hasValues=v.hasValues,!i._hasLabels&&i._hasValues&&(c("label0"),c("dlabel")),!p){i.visible=!1;return}i._length=p,s(f,i,u,c),c("scalegroup");var m=c("text"),y=c("texttemplate"),b;if(y||(b=c("textinfo",Array.isArray(m)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),y||b&&b!=="none"){var g=c("textposition");n(f,i,u,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else b==="none"&&c("textposition","none");r(i,u,c);var T=c("title.text");T&&(c("title.position"),e.coerceFont(c,"title.font",u.font)),c("aspectratio"),c("baseratio")},bz}var _z,zce;function Aje(){if(zce)return _z;zce=1;var e=rr(),t=eEe();return _z=function(n,o){function s(a,f){return e.coerce(n,o,t,a,f)}s("hiddenlabels"),s("funnelareacolorway",o.colorway),s("extendfunnelareacolors")},_z}var wz,Fce;function Nce(){if(Fce)return wz;Fce=1;var e=a2();function t(n,o){return e.calc(n,o)}function r(n){e.crossTraceCalc(n,{type:"funnelarea"})}return wz={calc:t,crossTraceCalc:r},wz}var Tz,Bce;function Sje(){if(Bce)return Tz;Bce=1;var e=ya(),t=Ba(),r=rr(),n=r.strScale,o=r.strTranslate,s=ns(),a=Wx(),f=a.toMoveInsideBar,i=ch(),l=i.recordMinTextSize,u=i.clearMinTextSize,c=Nm(),h=aW(),d=h.attachFxHandlers,v=h.determineInsideTextFont,p=h.layoutAreas,m=h.prerenderTitles,y=h.positionTitleOutside,b=h.formatSliceLabel;Tz=function(M,w){var C=M._context.staticPlot,x=M._fullLayout;u("funnelarea",x),m(w,M),p(w,x._size),r.makeTraceGroups(x._funnelarealayer,w,"trace").each(function(_){var k=e.select(this),E=_[0],I=E.trace;S(_),k.each(function(){var F=e.select(this).selectAll("g.slice").data(_);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(z,N){if(z.hidden){e.select(this).selectAll("path,g").remove();return}z.pointNumber=z.i,z.curveNumber=I.index;var q=E.cx,P=E.cy,B=e.select(this),$=B.selectAll("path.surface").data([z]);$.enter().append("path").classed("surface",!0).style({"pointer-events":C?"none":"all"}),B.call(d,M,_);var Q="M"+(q+z.TR[0])+","+(P+z.TR[1])+g(z.TR,z.BR)+g(z.BR,z.BL)+g(z.BL,z.TL)+"Z";$.attr("d",Q),b(M,z,E);var J=c.castOption(I.textposition,z.pts),ne=B.selectAll("g.slicetext").data(z.text&&J!=="none"?[0]:[]);ne.enter().append("g").classed("slicetext",!0),ne.exit().remove(),ne.each(function(){var te=r.ensureSingle(e.select(this),"text","",function(le){le.attr("data-notex",1)}),Z=r.ensureUniformFontSize(M,v(I,z,x.font));te.text(z.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,Z).call(s.convertToTspans,M);var G=t.bBox(te.node()),j,Y,K,X=Math.min(z.BL[1],z.BR[1])+P,ee=Math.max(z.TL[1],z.TR[1])+P;Y=Math.max(z.TL[0],z.BL[0])+q,K=Math.min(z.TR[0],z.BR[0])+q,j=f(Y,K,X,ee,G,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),j.fontSize=Z.size,l(I.type,j,x),_[N].transform=j,r.setTransormAndDisplay(te,j)})});var D=e.select(this).selectAll("g.titletext").data(I.title.text?[0]:[]);D.enter().append("g").classed("titletext",!0),D.exit().remove(),D.each(function(){var z=r.ensureSingle(e.select(this),"text","",function(P){P.attr("data-notex",1)}),N=I.title.text;I._meta&&(N=r.templateString(N,I._meta)),z.text(N).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,I.title.font).call(s.convertToTspans,M);var q=y(E,x._size);z.attr("transform",o(q.x,q.y)+n(Math.min(1,q.scale))+o(q.tx,q.ty))})})})};function g(A,M){var w=M[0]-A[0],C=M[1]-A[1];return"l"+w+","+C}function T(A,M){return[.5*(A[0]+M[0]),.5*(A[1]+M[1])]}function S(A){if(!A.length)return;var M=A[0],w=M.trace,C=w.aspectratio,x=w.baseratio;x>.999&&(x=.999);var _=Math.pow(x,2),k=M.vTotal,E=k*_/(1-_),I=k,F=E/k;function D(){var oe=Math.sqrt(F);return{x:oe,y:-oe}}function z(){var oe=D();return[oe.x,oe.y]}var N,q=[];q.push(z());var P,B;for(P=A.length-1;P>-1;P--)if(B=A[P],!B.hidden){var $=B.v/I;F+=$,q.push(z())}var Q=1/0,J=-1/0;for(P=0;P-1;P--)if(B=A[P],!B.hidden){X+=1;var ee=q[X][0],le=q[X][1];B.TL=[-ee,le],B.TR=[ee,le],B.BL=Y,B.BR=K,B.pxmid=T(B.TR,B.BR),Y=B.TL,K=B.TR}}return Tz}var Az,qce;function Mje(){if(qce)return Az;qce=1;var e=ya(),t=D2(),r=ch().resizeText;return Az=function(o){var s=o._fullLayout._funnelarealayer.selectAll(".trace");r(o,s,"funnelarea"),s.each(function(a){var f=a[0],i=f.trace,l=e.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(u){e.select(this).call(t,u,i,o)})})},Az}var Sz,jce;function Eje(){return jce||(jce=1,Sz={moduleType:"trace",name:"funnelarea",basePlotModule:wje(),categories:["pie-like","funnelarea","showLegend"],attributes:QMe(),layoutAttributes:eEe(),supplyDefaults:Tje(),supplyLayoutDefaults:Aje(),calc:Nce().calc,crossTraceCalc:Nce().crossTraceCalc,plot:Sje(),style:Mje(),styleOne:D2(),meta:{description:["Visualize stages in a process using area-encoded trapezoids. This trace can be used",'to show data in a part-to-whole representation similar to a "pie" trace, wherein','each item appears in a single stage. See also the "funnel" trace type for a different',"approach to visualizing funnel data."].join(" ")}}),Sz}var Mz,Uce;function kje(){return Uce||(Uce=1,Mz=Eje()),Mz}var Ez={exports:{}},Hce;function Hl(){return Hce||(Hce=1,(function(e,t){(function(n,o){e.exports=o()})(self,function(){return(function(){var r={7386:(function(a,f,i){a.exports={alpha_shape:i(2350),convex_hull:i(5537),delaunay_triangulate:i(4419),gl_cone3d:i(1140),gl_error3d:i(3110),gl_heatmap2d:i(6386),gl_line3d:i(6086),gl_mesh3d:i(8116),gl_plot2d:i(2117),gl_plot3d:i(1059),gl_pointcloud2d:i(8271),gl_scatter3d:i(2182),gl_select_box:i(6623),gl_spikes2d:i(3050),gl_streamtube3d:i(7307),gl_surface3d:i(3754),ndarray:i(5050),ndarray_linear_interpolate:i(3581)}}),2146:(function(a,f,i){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function l(He,Ie){if(!(He instanceof Ie))throw new TypeError("Cannot call a class as a function")}function u(He,Ie){for(var je=0;je"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(He){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(je){return je.__proto__||Object.getPrototypeOf(je)},b(He)}function g(He){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ie){return typeof Ie}:function(Ie){return Ie&&typeof Symbol=="function"&&Ie.constructor===Symbol&&Ie!==Symbol.prototype?"symbol":typeof Ie},g(He)}var T=i(3910),S=i(3187),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;f.lW=x,f.h2=50;var M=2147483647;x.TYPED_ARRAY_SUPPORT=w(),!x.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function w(){try{var He=new Uint8Array(1),Ie={foo:function(){return 42}};return Object.setPrototypeOf(Ie,Uint8Array.prototype),Object.setPrototypeOf(He,Ie),He.foo()===42}catch{return!1}}Object.defineProperty(x.prototype,"parent",{enumerable:!0,get:function(){if(x.isBuffer(this))return this.buffer}}),Object.defineProperty(x.prototype,"offset",{enumerable:!0,get:function(){if(x.isBuffer(this))return this.byteOffset}});function C(He){if(He>M)throw new RangeError('The value "'+He+'" is invalid for option "size"');var Ie=new Uint8Array(He);return Object.setPrototypeOf(Ie,x.prototype),Ie}function x(He,Ie,je){if(typeof He=="number"){if(typeof Ie=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(He)}return _(He,Ie,je)}x.poolSize=8192;function _(He,Ie,je){if(typeof He=="string")return F(He,Ie);if(ArrayBuffer.isView(He))return z(He);if(He==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+g(He));if(Jt(He,ArrayBuffer)||He&&Jt(He.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(He,SharedArrayBuffer)||He&&Jt(He.buffer,SharedArrayBuffer)))return N(He,Ie,je);if(typeof He=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var pe=He.valueOf&&He.valueOf();if(pe!=null&&pe!==He)return x.from(pe,Ie,je);var ye=q(He);if(ye)return ye;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof He[Symbol.toPrimitive]=="function")return x.from(He[Symbol.toPrimitive]("string"),Ie,je);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+g(He))}x.from=function(He,Ie,je){return _(He,Ie,je)},Object.setPrototypeOf(x.prototype,Uint8Array.prototype),Object.setPrototypeOf(x,Uint8Array);function k(He){if(typeof He!="number")throw new TypeError('"size" argument must be of type number');if(He<0)throw new RangeError('The value "'+He+'" is invalid for option "size"')}function E(He,Ie,je){return k(He),He<=0?C(He):Ie!==void 0?typeof je=="string"?C(He).fill(Ie,je):C(He).fill(Ie):C(He)}x.alloc=function(He,Ie,je){return E(He,Ie,je)};function I(He){return k(He),C(He<0?0:P(He)|0)}x.allocUnsafe=function(He){return I(He)},x.allocUnsafeSlow=function(He){return I(He)};function F(He,Ie){if((typeof Ie!="string"||Ie==="")&&(Ie="utf8"),!x.isEncoding(Ie))throw new TypeError("Unknown encoding: "+Ie);var je=B(He,Ie)|0,pe=C(je),ye=pe.write(He,Ie);return ye!==je&&(pe=pe.slice(0,ye)),pe}function D(He){for(var Ie=He.length<0?0:P(He.length)|0,je=C(Ie),pe=0;pe=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return He|0}x.isBuffer=function(Ie){return Ie!=null&&Ie._isBuffer===!0&&Ie!==x.prototype},x.compare=function(Ie,je){if(Jt(Ie,Uint8Array)&&(Ie=x.from(Ie,Ie.offset,Ie.byteLength)),Jt(je,Uint8Array)&&(je=x.from(je,je.offset,je.byteLength)),!x.isBuffer(Ie)||!x.isBuffer(je))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ie===je)return 0;for(var pe=Ie.length,ye=je.length,Se=0,Pe=Math.min(pe,ye);Seye.length?(x.isBuffer(Pe)||(Pe=x.from(Pe)),Pe.copy(ye,Se)):Uint8Array.prototype.set.call(ye,Pe,Se);else if(x.isBuffer(Pe))Pe.copy(ye,Se);else throw new TypeError('"list" argument must be an Array of Buffers');Se+=Pe.length}return ye};function B(He,Ie){if(x.isBuffer(He))return He.length;if(ArrayBuffer.isView(He)||Jt(He,ArrayBuffer))return He.byteLength;if(typeof He!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+g(He));var je=He.length,pe=arguments.length>2&&arguments[2]===!0;if(!pe&&je===0)return 0;for(var ye=!1;;)switch(Ie){case"ascii":case"latin1":case"binary":return je;case"utf8":case"utf-8":return ot(He).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return je*2;case"hex":return je>>>1;case"base64":return Ht(He).length;default:if(ye)return pe?-1:ot(He).length;Ie=(""+Ie).toLowerCase(),ye=!0}}x.byteLength=B;function $(He,Ie,je){var pe=!1;if((Ie===void 0||Ie<0)&&(Ie=0),Ie>this.length||((je===void 0||je>this.length)&&(je=this.length),je<=0)||(je>>>=0,Ie>>>=0,je<=Ie))return"";for(He||(He="utf8");;)switch(He){case"hex":return de(this,Ie,je);case"utf8":case"utf-8":return X(this,Ie,je);case"ascii":return oe(this,Ie,je);case"latin1":case"binary":return fe(this,Ie,je);case"base64":return K(this,Ie,je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,Ie,je);default:if(pe)throw new TypeError("Unknown encoding: "+He);He=(He+"").toLowerCase(),pe=!0}}x.prototype._isBuffer=!0;function Q(He,Ie,je){var pe=He[Ie];He[Ie]=He[je],He[je]=pe}x.prototype.swap16=function(){var Ie=this.length;if(Ie%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var je=0;jeje&&(Ie+=" ... "),""},A&&(x.prototype[A]=x.prototype.inspect),x.prototype.compare=function(Ie,je,pe,ye,Se){if(Jt(Ie,Uint8Array)&&(Ie=x.from(Ie,Ie.offset,Ie.byteLength)),!x.isBuffer(Ie))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+g(Ie));if(je===void 0&&(je=0),pe===void 0&&(pe=Ie?Ie.length:0),ye===void 0&&(ye=0),Se===void 0&&(Se=this.length),je<0||pe>Ie.length||ye<0||Se>this.length)throw new RangeError("out of range index");if(ye>=Se&&je>=pe)return 0;if(ye>=Se)return-1;if(je>=pe)return 1;if(je>>>=0,pe>>>=0,ye>>>=0,Se>>>=0,this===Ie)return 0;for(var Pe=Se-ye,it=pe-je,vt=Math.min(Pe,it),Pt=this.slice(ye,Se),Bt=Ie.slice(je,pe),It=0;It2147483647?je=2147483647:je<-2147483648&&(je=-2147483648),je=+je,Tt(je)&&(je=ye?0:He.length-1),je<0&&(je=He.length+je),je>=He.length){if(ye)return-1;je=He.length-1}else if(je<0)if(ye)je=0;else return-1;if(typeof Ie=="string"&&(Ie=x.from(Ie,pe)),x.isBuffer(Ie))return Ie.length===0?-1:ne(He,Ie,je,pe,ye);if(typeof Ie=="number")return Ie=Ie&255,typeof Uint8Array.prototype.indexOf=="function"?ye?Uint8Array.prototype.indexOf.call(He,Ie,je):Uint8Array.prototype.lastIndexOf.call(He,Ie,je):ne(He,[Ie],je,pe,ye);throw new TypeError("val must be string, number or Buffer")}function ne(He,Ie,je,pe,ye){var Se=1,Pe=He.length,it=Ie.length;if(pe!==void 0&&(pe=String(pe).toLowerCase(),pe==="ucs2"||pe==="ucs-2"||pe==="utf16le"||pe==="utf-16le")){if(He.length<2||Ie.length<2)return-1;Se=2,Pe/=2,it/=2,je/=2}function vt(pr,_r){return Se===1?pr[_r]:pr.readUInt16BE(_r*Se)}var Pt;if(ye){var Bt=-1;for(Pt=je;PtPe&&(je=Pe-it),Pt=je;Pt>=0;Pt--){for(var It=!0,qt=0;qtye&&(pe=ye)):pe=ye;var Se=Ie.length;pe>Se/2&&(pe=Se/2);var Pe;for(Pe=0;Pe>>0,isFinite(pe)?(pe=pe>>>0,ye===void 0&&(ye="utf8")):(ye=pe,pe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Se=this.length-je;if((pe===void 0||pe>Se)&&(pe=Se),Ie.length>0&&(pe<0||je<0)||je>this.length)throw new RangeError("Attempt to write outside buffer bounds");ye||(ye="utf8");for(var Pe=!1;;)switch(ye){case"hex":return te(this,Ie,je,pe);case"utf8":case"utf-8":return Z(this,Ie,je,pe);case"ascii":case"latin1":case"binary":return G(this,Ie,je,pe);case"base64":return j(this,Ie,je,pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,Ie,je,pe);default:if(Pe)throw new TypeError("Unknown encoding: "+ye);ye=(""+ye).toLowerCase(),Pe=!0}},x.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function K(He,Ie,je){return Ie===0&&je===He.length?T.fromByteArray(He):T.fromByteArray(He.slice(Ie,je))}function X(He,Ie,je){je=Math.min(He.length,je);for(var pe=[],ye=Ie;ye239?4:Se>223?3:Se>191?2:1;if(ye+it<=je){var vt=void 0,Pt=void 0,Bt=void 0,It=void 0;switch(it){case 1:Se<128&&(Pe=Se);break;case 2:vt=He[ye+1],(vt&192)===128&&(It=(Se&31)<<6|vt&63,It>127&&(Pe=It));break;case 3:vt=He[ye+1],Pt=He[ye+2],(vt&192)===128&&(Pt&192)===128&&(It=(Se&15)<<12|(vt&63)<<6|Pt&63,It>2047&&(It<55296||It>57343)&&(Pe=It));break;case 4:vt=He[ye+1],Pt=He[ye+2],Bt=He[ye+3],(vt&192)===128&&(Pt&192)===128&&(Bt&192)===128&&(It=(Se&15)<<18|(vt&63)<<12|(Pt&63)<<6|Bt&63,It>65535&&It<1114112&&(Pe=It))}}Pe===null?(Pe=65533,it=1):Pe>65535&&(Pe-=65536,pe.push(Pe>>>10&1023|55296),Pe=56320|Pe&1023),pe.push(Pe),ye+=it}return le(pe)}var ee=4096;function le(He){var Ie=He.length;if(Ie<=ee)return String.fromCharCode.apply(String,He);for(var je="",pe=0;pepe)&&(je=pe);for(var ye="",Se=Ie;Sepe&&(Ie=pe),je<0?(je+=pe,je<0&&(je=0)):je>pe&&(je=pe),jeje)throw new RangeError("Trying to access beyond buffer length")}x.prototype.readUintLE=x.prototype.readUIntLE=function(Ie,je,pe){Ie=Ie>>>0,je=je>>>0,pe||we(Ie,je,this.length);for(var ye=this[Ie],Se=1,Pe=0;++Pe>>0,je=je>>>0,pe||we(Ie,je,this.length);for(var ye=this[Ie+--je],Se=1;je>0&&(Se*=256);)ye+=this[Ie+--je]*Se;return ye},x.prototype.readUint8=x.prototype.readUInt8=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,1,this.length),this[Ie]},x.prototype.readUint16LE=x.prototype.readUInt16LE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,2,this.length),this[Ie]|this[Ie+1]<<8},x.prototype.readUint16BE=x.prototype.readUInt16BE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,2,this.length),this[Ie]<<8|this[Ie+1]},x.prototype.readUint32LE=x.prototype.readUInt32LE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,4,this.length),(this[Ie]|this[Ie+1]<<8|this[Ie+2]<<16)+this[Ie+3]*16777216},x.prototype.readUint32BE=x.prototype.readUInt32BE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,4,this.length),this[Ie]*16777216+(this[Ie+1]<<16|this[Ie+2]<<8|this[Ie+3])},x.prototype.readBigUInt64LE=gt(function(Ie){Ie=Ie>>>0,me(Ie,"offset");var je=this[Ie],pe=this[Ie+7];(je===void 0||pe===void 0)&&Ce(Ie,this.length-8);var ye=je+this[++Ie]*Math.pow(2,8)+this[++Ie]*Math.pow(2,16)+this[++Ie]*Math.pow(2,24),Se=this[++Ie]+this[++Ie]*Math.pow(2,8)+this[++Ie]*Math.pow(2,16)+pe*Math.pow(2,24);return BigInt(ye)+(BigInt(Se)<>>0,me(Ie,"offset");var je=this[Ie],pe=this[Ie+7];(je===void 0||pe===void 0)&&Ce(Ie,this.length-8);var ye=je*Math.pow(2,24)+this[++Ie]*Math.pow(2,16)+this[++Ie]*Math.pow(2,8)+this[++Ie],Se=this[++Ie]*Math.pow(2,24)+this[++Ie]*Math.pow(2,16)+this[++Ie]*Math.pow(2,8)+pe;return(BigInt(ye)<>>0,je=je>>>0,pe||we(Ie,je,this.length);for(var ye=this[Ie],Se=1,Pe=0;++Pe=Se&&(ye-=Math.pow(2,8*je)),ye},x.prototype.readIntBE=function(Ie,je,pe){Ie=Ie>>>0,je=je>>>0,pe||we(Ie,je,this.length);for(var ye=je,Se=1,Pe=this[Ie+--ye];ye>0&&(Se*=256);)Pe+=this[Ie+--ye]*Se;return Se*=128,Pe>=Se&&(Pe-=Math.pow(2,8*je)),Pe},x.prototype.readInt8=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,1,this.length),this[Ie]&128?(255-this[Ie]+1)*-1:this[Ie]},x.prototype.readInt16LE=function(Ie,je){Ie=Ie>>>0,je||we(Ie,2,this.length);var pe=this[Ie]|this[Ie+1]<<8;return pe&32768?pe|4294901760:pe},x.prototype.readInt16BE=function(Ie,je){Ie=Ie>>>0,je||we(Ie,2,this.length);var pe=this[Ie+1]|this[Ie]<<8;return pe&32768?pe|4294901760:pe},x.prototype.readInt32LE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,4,this.length),this[Ie]|this[Ie+1]<<8|this[Ie+2]<<16|this[Ie+3]<<24},x.prototype.readInt32BE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,4,this.length),this[Ie]<<24|this[Ie+1]<<16|this[Ie+2]<<8|this[Ie+3]},x.prototype.readBigInt64LE=gt(function(Ie){Ie=Ie>>>0,me(Ie,"offset");var je=this[Ie],pe=this[Ie+7];(je===void 0||pe===void 0)&&Ce(Ie,this.length-8);var ye=this[Ie+4]+this[Ie+5]*Math.pow(2,8)+this[Ie+6]*Math.pow(2,16)+(pe<<24);return(BigInt(ye)<>>0,me(Ie,"offset");var je=this[Ie],pe=this[Ie+7];(je===void 0||pe===void 0)&&Ce(Ie,this.length-8);var ye=(je<<24)+this[++Ie]*Math.pow(2,16)+this[++Ie]*Math.pow(2,8)+this[++Ie];return(BigInt(ye)<>>0,je||we(Ie,4,this.length),S.read(this,Ie,!0,23,4)},x.prototype.readFloatBE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,4,this.length),S.read(this,Ie,!1,23,4)},x.prototype.readDoubleLE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,8,this.length),S.read(this,Ie,!0,52,8)},x.prototype.readDoubleBE=function(Ie,je){return Ie=Ie>>>0,je||we(Ie,8,this.length),S.read(this,Ie,!1,52,8)};function Oe(He,Ie,je,pe,ye,Se){if(!x.isBuffer(He))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ie>ye||IeHe.length)throw new RangeError("Index out of range")}x.prototype.writeUintLE=x.prototype.writeUIntLE=function(Ie,je,pe,ye){if(Ie=+Ie,je=je>>>0,pe=pe>>>0,!ye){var Se=Math.pow(2,8*pe)-1;Oe(this,Ie,je,pe,Se,0)}var Pe=1,it=0;for(this[je]=Ie&255;++it>>0,pe=pe>>>0,!ye){var Se=Math.pow(2,8*pe)-1;Oe(this,Ie,je,pe,Se,0)}var Pe=pe-1,it=1;for(this[je+Pe]=Ie&255;--Pe>=0&&(it*=256);)this[je+Pe]=Ie/it&255;return je+pe},x.prototype.writeUint8=x.prototype.writeUInt8=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,1,255,0),this[je]=Ie&255,je+1},x.prototype.writeUint16LE=x.prototype.writeUInt16LE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,2,65535,0),this[je]=Ie&255,this[je+1]=Ie>>>8,je+2},x.prototype.writeUint16BE=x.prototype.writeUInt16BE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,2,65535,0),this[je]=Ie>>>8,this[je+1]=Ie&255,je+2},x.prototype.writeUint32LE=x.prototype.writeUInt32LE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,4,4294967295,0),this[je+3]=Ie>>>24,this[je+2]=Ie>>>16,this[je+1]=Ie>>>8,this[je]=Ie&255,je+4},x.prototype.writeUint32BE=x.prototype.writeUInt32BE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,4,4294967295,0),this[je]=Ie>>>24,this[je+1]=Ie>>>16,this[je+2]=Ie>>>8,this[je+3]=Ie&255,je+4};function be(He,Ie,je,pe,ye){De(Ie,pe,ye,He,je,7);var Se=Number(Ie&BigInt(4294967295));He[je++]=Se,Se=Se>>8,He[je++]=Se,Se=Se>>8,He[je++]=Se,Se=Se>>8,He[je++]=Se;var Pe=Number(Ie>>BigInt(32)&BigInt(4294967295));return He[je++]=Pe,Pe=Pe>>8,He[je++]=Pe,Pe=Pe>>8,He[je++]=Pe,Pe=Pe>>8,He[je++]=Pe,je}function Te(He,Ie,je,pe,ye){De(Ie,pe,ye,He,je,7);var Se=Number(Ie&BigInt(4294967295));He[je+7]=Se,Se=Se>>8,He[je+6]=Se,Se=Se>>8,He[je+5]=Se,Se=Se>>8,He[je+4]=Se;var Pe=Number(Ie>>BigInt(32)&BigInt(4294967295));return He[je+3]=Pe,Pe=Pe>>8,He[je+2]=Pe,Pe=Pe>>8,He[je+1]=Pe,Pe=Pe>>8,He[je]=Pe,je+8}x.prototype.writeBigUInt64LE=gt(function(Ie){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return be(this,Ie,je,BigInt(0),BigInt("0xffffffffffffffff"))}),x.prototype.writeBigUInt64BE=gt(function(Ie){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Te(this,Ie,je,BigInt(0),BigInt("0xffffffffffffffff"))}),x.prototype.writeIntLE=function(Ie,je,pe,ye){if(Ie=+Ie,je=je>>>0,!ye){var Se=Math.pow(2,8*pe-1);Oe(this,Ie,je,pe,Se-1,-Se)}var Pe=0,it=1,vt=0;for(this[je]=Ie&255;++Pe>0)-vt&255;return je+pe},x.prototype.writeIntBE=function(Ie,je,pe,ye){if(Ie=+Ie,je=je>>>0,!ye){var Se=Math.pow(2,8*pe-1);Oe(this,Ie,je,pe,Se-1,-Se)}var Pe=pe-1,it=1,vt=0;for(this[je+Pe]=Ie&255;--Pe>=0&&(it*=256);)Ie<0&&vt===0&&this[je+Pe+1]!==0&&(vt=1),this[je+Pe]=(Ie/it>>0)-vt&255;return je+pe},x.prototype.writeInt8=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,1,127,-128),Ie<0&&(Ie=255+Ie+1),this[je]=Ie&255,je+1},x.prototype.writeInt16LE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,2,32767,-32768),this[je]=Ie&255,this[je+1]=Ie>>>8,je+2},x.prototype.writeInt16BE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,2,32767,-32768),this[je]=Ie>>>8,this[je+1]=Ie&255,je+2},x.prototype.writeInt32LE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,4,2147483647,-2147483648),this[je]=Ie&255,this[je+1]=Ie>>>8,this[je+2]=Ie>>>16,this[je+3]=Ie>>>24,je+4},x.prototype.writeInt32BE=function(Ie,je,pe){return Ie=+Ie,je=je>>>0,pe||Oe(this,Ie,je,4,2147483647,-2147483648),Ie<0&&(Ie=4294967295+Ie+1),this[je]=Ie>>>24,this[je+1]=Ie>>>16,this[je+2]=Ie>>>8,this[je+3]=Ie&255,je+4},x.prototype.writeBigInt64LE=gt(function(Ie){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return be(this,Ie,je,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),x.prototype.writeBigInt64BE=gt(function(Ie){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Te(this,Ie,je,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ke(He,Ie,je,pe,ye,Se){if(je+pe>He.length)throw new RangeError("Index out of range");if(je<0)throw new RangeError("Index out of range")}function Ee(He,Ie,je,pe,ye){return Ie=+Ie,je=je>>>0,ye||ke(He,Ie,je,4),S.write(He,Ie,je,pe,23,4),je+4}x.prototype.writeFloatLE=function(Ie,je,pe){return Ee(this,Ie,je,!0,pe)},x.prototype.writeFloatBE=function(Ie,je,pe){return Ee(this,Ie,je,!1,pe)};function Le(He,Ie,je,pe,ye){return Ie=+Ie,je=je>>>0,ye||ke(He,Ie,je,8),S.write(He,Ie,je,pe,52,8),je+8}x.prototype.writeDoubleLE=function(Ie,je,pe){return Le(this,Ie,je,!0,pe)},x.prototype.writeDoubleBE=function(Ie,je,pe){return Le(this,Ie,je,!1,pe)},x.prototype.copy=function(Ie,je,pe,ye){if(!x.isBuffer(Ie))throw new TypeError("argument should be a Buffer");if(pe||(pe=0),!ye&&ye!==0&&(ye=this.length),je>=Ie.length&&(je=Ie.length),je||(je=0),ye>0&&ye=this.length)throw new RangeError("Index out of range");if(ye<0)throw new RangeError("sourceEnd out of bounds");ye>this.length&&(ye=this.length),Ie.length-je>>0,pe=pe===void 0?this.length:pe>>>0,Ie||(Ie=0);var Pe;if(typeof Ie=="number")for(Pe=je;PeMath.pow(2,32)?ye=We(String(je)):typeof je=="bigint"&&(ye=String(je),(je>Math.pow(BigInt(2),BigInt(32))||je<-Math.pow(BigInt(2),BigInt(32)))&&(ye=We(ye)),ye+="n"),pe+=" It must be ".concat(Ie,". Received ").concat(ye),pe},RangeError);function We(He){for(var Ie="",je=He.length,pe=He[0]==="-"?1:0;je>=pe+4;je-=3)Ie="_".concat(He.slice(je-3,je)).concat(Ie);return"".concat(He.slice(0,je)).concat(Ie)}function Qe(He,Ie,je){me(Ie,"offset"),(He[Ie]===void 0||He[Ie+je]===void 0)&&Ce(Ie,He.length-(je+1))}function De(He,Ie,je,pe,ye,Se){if(He>je||He= 0".concat(Pe," and < 2").concat(Pe," ** ").concat((Se+1)*8).concat(Pe):it=">= -(2".concat(Pe," ** ").concat((Se+1)*8-1).concat(Pe,") and < 2 ** ")+"".concat((Se+1)*8-1).concat(Pe),new Fe.ERR_OUT_OF_RANGE("value",it,He)}Qe(pe,ye,Se)}function me(He,Ie){if(typeof He!="number")throw new Fe.ERR_INVALID_ARG_TYPE(Ie,"number",He)}function Ce(He,Ie,je){throw Math.floor(He)!==He?(me(He,je),new Fe.ERR_OUT_OF_RANGE("offset","an integer",He)):Ie<0?new Fe.ERR_BUFFER_OUT_OF_BOUNDS:new Fe.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Ie),He)}var et=/[^+/0-9A-Za-z-_]/g;function st(He){if(He=He.split("=")[0],He=He.trim().replace(et,""),He.length<2)return"";for(;He.length%4!==0;)He=He+"=";return He}function ot(He,Ie){Ie=Ie||1/0;for(var je,pe=He.length,ye=null,Se=[],Pe=0;Pe55295&&je<57344){if(!ye){if(je>56319){(Ie-=3)>-1&&Se.push(239,191,189);continue}else if(Pe+1===pe){(Ie-=3)>-1&&Se.push(239,191,189);continue}ye=je;continue}if(je<56320){(Ie-=3)>-1&&Se.push(239,191,189),ye=je;continue}je=(ye-55296<<10|je-56320)+65536}else ye&&(Ie-=3)>-1&&Se.push(239,191,189);if(ye=null,je<128){if((Ie-=1)<0)break;Se.push(je)}else if(je<2048){if((Ie-=2)<0)break;Se.push(je>>6|192,je&63|128)}else if(je<65536){if((Ie-=3)<0)break;Se.push(je>>12|224,je>>6&63|128,je&63|128)}else if(je<1114112){if((Ie-=4)<0)break;Se.push(je>>18|240,je>>12&63|128,je>>6&63|128,je&63|128)}else throw new Error("Invalid code point")}return Se}function ut(He){for(var Ie=[],je=0;je>8,ye=je%256,Se.push(ye),Se.push(pe);return Se}function Ht(He){return T.toByteArray(st(He))}function Et(He,Ie,je,pe){var ye;for(ye=0;ye=Ie.length||ye>=He.length);++ye)Ie[ye+je]=He[ye];return ye}function Jt(He,Ie){return He instanceof Ie||He!=null&&He.constructor!=null&&He.constructor.name!=null&&He.constructor.name===Ie.name}function Tt(He){return He!==He}var rt=(function(){for(var He="0123456789abcdef",Ie=new Array(256),je=0;je<16;++je)for(var pe=je*16,ye=0;ye<16;++ye)Ie[pe+ye]=He[je]+He[ye];return Ie})();function gt(He){return typeof BigInt>"u"?mt:He}function mt(){throw new Error("BigInt not supported")}}),2321:(function(a){a.exports=u,a.exports.isMobile=u,a.exports.default=u;var f=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/CrOS/,l=/android|ipad|playbook|silk/i;function u(c){c||(c={});var h=c.ua;if(!h&&typeof navigator<"u"&&(h=navigator.userAgent),h&&h.headers&&typeof h.headers["user-agent"]=="string"&&(h=h.headers["user-agent"]),typeof h!="string")return!1;var d=f.test(h)&&!i.test(h)||!!c.tablet&&l.test(h);return!d&&c.tablet&&c.featureDetect&&navigator&&navigator.maxTouchPoints>1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(d=!0),d}}),3910:(function(a,f){f.byteLength=p,f.toByteArray=y,f.fromByteArray=T;for(var i=[],l=[],u=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=c.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var M=S.indexOf("=");M===-1&&(M=A);var w=M===A?0:4-M%4;return[M,w]}function p(S){var A=v(S),M=A[0],w=A[1];return(M+w)*3/4-w}function m(S,A,M){return(A+M)*3/4-M}function y(S){var A,M=v(S),w=M[0],C=M[1],x=new u(m(S,w,C)),_=0,k=C>0?w-4:w,E;for(E=0;E>16&255,x[_++]=A>>8&255,x[_++]=A&255;return C===2&&(A=l[S.charCodeAt(E)]<<2|l[S.charCodeAt(E+1)]>>4,x[_++]=A&255),C===1&&(A=l[S.charCodeAt(E)]<<10|l[S.charCodeAt(E+1)]<<4|l[S.charCodeAt(E+2)]>>2,x[_++]=A>>8&255,x[_++]=A&255),x}function b(S){return i[S>>18&63]+i[S>>12&63]+i[S>>6&63]+i[S&63]}function g(S,A,M){for(var w,C=[],x=A;xk?k:_+x));return w===1?(A=S[M-1],C.push(i[A>>2]+i[A<<4&63]+"==")):w===2&&(A=(S[M-2]<<8)+S[M-1],C.push(i[A>>10]+i[A>>4&63]+i[A<<2&63]+"=")),C.join("")}}),3187:(function(a,f){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */f.read=function(i,l,u,c,h){var d,v,p=h*8-c-1,m=(1<>1,b=-7,g=u?h-1:0,T=u?-1:1,S=i[l+g];for(g+=T,d=S&(1<<-b)-1,S>>=-b,b+=p;b>0;d=d*256+i[l+g],g+=T,b-=8);for(v=d&(1<<-b)-1,d>>=-b,b+=c;b>0;v=v*256+i[l+g],g+=T,b-=8);if(d===0)d=1-y;else{if(d===m)return v?NaN:(S?-1:1)*(1/0);v=v+Math.pow(2,c),d=d-y}return(S?-1:1)*v*Math.pow(2,d-c)},f.write=function(i,l,u,c,h,d){var v,p,m,y=d*8-h-1,b=(1<>1,T=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=c?0:d-1,A=c?1:-1,M=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(p=isNaN(l)?1:0,v=b):(v=Math.floor(Math.log(l)/Math.LN2),l*(m=Math.pow(2,-v))<1&&(v--,m*=2),v+g>=1?l+=T/m:l+=T*Math.pow(2,1-g),l*m>=2&&(v++,m/=2),v+g>=b?(p=0,v=b):v+g>=1?(p=(l*m-1)*Math.pow(2,h),v=v+g):(p=l*Math.pow(2,g-1)*Math.pow(2,h),v=0));h>=8;i[u+S]=p&255,S+=A,p/=256,h-=8);for(v=v<0;i[u+S]=v&255,S+=A,v/=256,y-=8);i[u+S-A]|=M*128}}),1152:(function(a,f,i){a.exports=v;var l=i(3440),u=i(7774),c=i(9298);function h(p,m){this._controllerNames=Object.keys(p),this._controllerList=this._controllerNames.map(function(y){return p[y]}),this._mode=m,this._active=p[m],this._active||(this._mode="turntable",this._active=p.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var d=h.prototype;d.flush=function(p){for(var m=this._controllerList,y=0;y"u"?i(5346):WeakMap,u=i(5827),c=i(2944),h=new l;function d(v){var p=h.get(v),m=p&&(p._triangleBuffer.handle||p._triangleBuffer.buffer);if(!m||!v.isBuffer(m)){var y=u(v,new Float32Array([-1,-1,-1,4,4,-1]));p=c(v,[{buffer:y,type:v.FLOAT,size:2}]),p._triangleBuffer=y,h.set(v,p)}p.bind(),v.drawArrays(v.TRIANGLES,0,3),p.unbind()}a.exports=d}),8008:(function(a,f,i){var l=i(4930);a.exports=u;function u(c,h,d){h=typeof h=="number"?h:1,d=d||": ";var v=c.split(/\r?\n/),p=String(v.length+h-1).length;return v.map(function(m,y){var b=y+h,g=String(b).length,T=l(b,p-g);return T+d+m}).join(` +`)}}),2153:(function(a,f,i){a.exports=c;var l=i(417);function u(h,d){for(var v=new Array(d+1),p=0;p0?g=g.ushln(b):b<0&&(T=T.ushln(-b)),d(g,T)}}),234:(function(a,f,i){var l=i(3218);a.exports=u;function u(c){return Array.isArray(c)&&c.length===2&&l(c[0])&&l(c[1])}}),4275:(function(a,f,i){var l=i(1928);a.exports=u;function u(c){return c.cmp(new l(0))}}),9958:(function(a,f,i){var l=i(4275);a.exports=u;function u(c){var h=c.length,d=c.words,v=0;if(h===1)v=d[0];else if(h===2)v=d[0]+d[1]*67108864;else for(var p=0;p20?52:v+32}}),3218:(function(a,f,i){i(1928),a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}}),5514:(function(a,f,i){var l=i(1928),u=i(8362);a.exports=c;function c(h){var d=u.exponent(h);return d<52?new l(h):new l(h*Math.pow(2,52-d)).ushln(d-52)}}),8524:(function(a,f,i){var l=i(5514),u=i(4275);a.exports=c;function c(h,d){var v=u(h),p=u(d);if(v===0)return[l(0),l(1)];if(p===0)return[l(0),l(0)];p<0&&(h=h.neg(),d=d.neg());var m=h.gcd(d);return m.cmpn(1)?[h.div(m),d.div(m)]:[h,d]}}),2813:(function(a,f,i){var l=i(1928);a.exports=u;function u(c){return new l(c)}}),3962:(function(a,f,i){var l=i(8524);a.exports=u;function u(c,h){return l(c[0].mul(h[0]),c[1].mul(h[1]))}}),4951:(function(a,f,i){var l=i(4275);a.exports=u;function u(c){return l(c[0])*l(c[1])}}),4354:(function(a,f,i){var l=i(8524);a.exports=u;function u(c,h){return l(c[0].mul(h[1]).sub(c[1].mul(h[0])),c[1].mul(h[1]))}}),7999:(function(a,f,i){var l=i(9958),u=i(1112);a.exports=c;function c(h){var d=h[0],v=h[1];if(d.cmpn(0)===0)return 0;var p=d.abs().divmod(v.abs()),m=p.div,y=l(m),b=p.mod,g=d.negative!==v.negative?-1:1;if(b.cmpn(0)===0)return g*y;if(y){var T=u(y)+4,S=l(b.ushln(T).divRound(v));return g*(y+S*Math.pow(2,-T))}else{var A=v.bitLength()-b.bitLength()+53,S=l(b.ushln(A).divRound(v));return A<1023?g*S*Math.pow(2,-A):(S*=Math.pow(2,-1023),g*S*Math.pow(2,1023-A))}}}),5070:(function(a){function f(d,v,p,m,y){for(var b=y+1;m<=y;){var g=m+y>>>1,T=d[g],S=p!==void 0?p(T,v):T-v;S>=0?(b=g,y=g-1):m=g+1}return b}function i(d,v,p,m,y){for(var b=y+1;m<=y;){var g=m+y>>>1,T=d[g],S=p!==void 0?p(T,v):T-v;S>0?(b=g,y=g-1):m=g+1}return b}function l(d,v,p,m,y){for(var b=m-1;m<=y;){var g=m+y>>>1,T=d[g],S=p!==void 0?p(T,v):T-v;S<0?(b=g,m=g+1):y=g-1}return b}function u(d,v,p,m,y){for(var b=m-1;m<=y;){var g=m+y>>>1,T=d[g],S=p!==void 0?p(T,v):T-v;S<=0?(b=g,m=g+1):y=g-1}return b}function c(d,v,p,m,y){for(;m<=y;){var b=m+y>>>1,g=d[b],T=p!==void 0?p(g,v):g-v;if(T===0)return b;T<=0?m=b+1:y=b-1}return-1}function h(d,v,p,m,y,b){return typeof p=="function"?b(d,v,p,m===void 0?0:m|0,y===void 0?d.length-1:y|0):b(d,v,void 0,p===void 0?0:p|0,m===void 0?d.length-1:m|0)}a.exports={ge:function(d,v,p,m,y){return h(d,v,p,m,y,f)},gt:function(d,v,p,m,y){return h(d,v,p,m,y,i)},lt:function(d,v,p,m,y){return h(d,v,p,m,y,l)},le:function(d,v,p,m,y){return h(d,v,p,m,y,u)},eq:function(d,v,p,m,y){return h(d,v,p,m,y,c)}}}),2288:(function(a,f){"use restrict";var i=32;f.INT_BITS=i,f.INT_MAX=2147483647,f.INT_MIN=-1<0)-(c<0)},f.abs=function(c){var h=c>>i-1;return(c^h)-h},f.min=function(c,h){return h^(c^h)&-(c65535)<<4,c>>>=h,d=(c>255)<<3,c>>>=d,h|=d,d=(c>15)<<2,c>>>=d,h|=d,d=(c>3)<<1,c>>>=d,h|=d,h|c>>1},f.log10=function(c){return c>=1e9?9:c>=1e8?8:c>=1e7?7:c>=1e6?6:c>=1e5?5:c>=1e4?4:c>=1e3?3:c>=100?2:c>=10?1:0},f.popCount=function(c){return c=c-(c>>>1&1431655765),c=(c&858993459)+(c>>>2&858993459),(c+(c>>>4)&252645135)*16843009>>>24};function l(c){var h=32;return c&=-c,c&&h--,c&65535&&(h-=16),c&16711935&&(h-=8),c&252645135&&(h-=4),c&858993459&&(h-=2),c&1431655765&&(h-=1),h}f.countTrailingZeros=l,f.nextPow2=function(c){return c+=c===0,--c,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c+1},f.prevPow2=function(c){return c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c-(c>>>1)},f.parity=function(c){return c^=c>>>16,c^=c>>>8,c^=c>>>4,c&=15,27030>>>c&1};var u=new Array(256);(function(c){for(var h=0;h<256;++h){var d=h,v=h,p=7;for(d>>>=1;d;d>>>=1)v<<=1,v|=d&1,--p;c[h]=v<>>8&255]<<16|u[c>>>16&255]<<8|u[c>>>24&255]},f.interleave2=function(c,h){return c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,c|h<<1},f.deinterleave2=function(c,h){return c=c>>>h&1431655765,c=(c|c>>>1)&858993459,c=(c|c>>>2)&252645135,c=(c|c>>>4)&16711935,c=(c|c>>>16)&65535,c<<16>>16},f.interleave3=function(c,h,d){return c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,c|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,c|d<<2},f.deinterleave3=function(c,h){return c=c>>>h&1227133513,c=(c|c>>>2)&3272356035,c=(c|c>>>4)&251719695,c=(c|c>>>8)&4278190335,c=(c|c>>>16)&1023,c<<22>>22},f.nextCombination=function(c){var h=c|c-1;return h+1|(~h&-~h)-1>>>l(c)+1}}),1928:(function(a,f,i){a=i.nmd(a),(function(l,u){function c(q,P){if(!q)throw new Error(P||"Assertion failed")}function h(q,P){q.super_=P;var B=function(){};B.prototype=P.prototype,q.prototype=new B,q.prototype.constructor=q}function d(q,P,B){if(d.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((P==="le"||P==="be")&&(B=P,P=10),this._init(q||0,P||10,B||"be"))}typeof l=="object"?l.exports=d:u.BN=d,d.BN=d,d.wordSize=26;var v;try{typeof window<"u"&&typeof window.Buffer<"u"?v=window.Buffer:v=i(6601).Buffer}catch{}d.isBN=function(P){return P instanceof d?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===d.wordSize&&Array.isArray(P.words)},d.max=function(P,B){return P.cmp(B)>0?P:B},d.min=function(P,B){return P.cmp(B)<0?P:B},d.prototype._init=function(P,B,$){if(typeof P=="number")return this._initNumber(P,B,$);if(typeof P=="object")return this._initArray(P,B,$);B==="hex"&&(B=16),c(B===(B|0)&&B>=2&&B<=36),P=P.toString().replace(/\s+/g,"");var Q=0;P[0]==="-"&&(Q++,this.negative=1),Q=0;Q-=3)ne=P[Q]|P[Q-1]<<8|P[Q-2]<<16,this.words[J]|=ne<>>26-te&67108863,te+=24,te>=26&&(te-=26,J++);else if($==="le")for(Q=0,J=0;Q>>26-te&67108863,te+=24,te>=26&&(te-=26,J++);return this.strip()};function p(q,P){var B=q.charCodeAt(P);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function m(q,P,B){var $=p(q,B);return B-1>=P&&($|=p(q,B-1)<<4),$}d.prototype._parseHex=function(P,B,$){this.length=Math.ceil((P.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=2)te=m(P,B,Q)<=18?(J-=18,ne+=1,this.words[ne]|=te>>>26):J+=8;else{var Z=P.length-B;for(Q=Z%2===0?B+1:B;Q=18?(J-=18,ne+=1,this.words[ne]|=te>>>26):J+=8}this.strip()};function y(q,P,B,$){for(var Q=0,J=Math.min(q.length,B),ne=P;ne=49?Q+=te-49+10:te>=17?Q+=te-17+10:Q+=te}return Q}d.prototype._parseBase=function(P,B,$){this.words=[0],this.length=1;for(var Q=0,J=1;J<=67108863;J*=B)Q++;Q--,J=J/B|0;for(var ne=P.length-$,te=ne%Q,Z=Math.min(ne,ne-te)+$,G=0,j=$;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},d.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];d.prototype.toString=function(P,B){P=P||10,B=B|0||1;var $;if(P===16||P==="hex"){$="";for(var Q=0,J=0,ne=0;ne>>24-Q&16777215,J!==0||ne!==this.length-1?$=b[6-Z.length]+Z+$:$=Z+$,Q+=2,Q>=26&&(Q-=26,ne--)}for(J!==0&&($=J.toString(16)+$);$.length%B!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}if(P===(P|0)&&P>=2&&P<=36){var G=g[P],j=T[P];$="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var K=Y.modn(j).toString(P);Y=Y.idivn(j),Y.isZero()?$=K+$:$=b[G-K.length]+K+$}for(this.isZero()&&($="0"+$);$.length%B!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(P,B){return c(typeof v<"u"),this.toArrayLike(v,P,B)},d.prototype.toArray=function(P,B){return this.toArrayLike(Array,P,B)},d.prototype.toArrayLike=function(P,B,$){var Q=this.byteLength(),J=$||Math.max(1,Q);c(Q<=J,"byte array longer than desired length"),c(J>0,"Requested array length <= 0"),this.strip();var ne=B==="le",te=new P(J),Z,G,j=this.clone();if(ne){for(G=0;!j.isZero();G++)Z=j.andln(255),j.iushrn(8),te[G]=Z;for(;G=4096&&($+=13,B>>>=13),B>=64&&($+=7,B>>>=7),B>=8&&($+=4,B>>>=4),B>=2&&($+=2,B>>>=2),$+B},d.prototype._zeroBits=function(P){if(P===0)return 26;var B=P,$=0;return(B&8191)===0&&($+=13,B>>>=13),(B&127)===0&&($+=7,B>>>=7),(B&15)===0&&($+=4,B>>>=4),(B&3)===0&&($+=2,B>>>=2),(B&1)===0&&$++,$},d.prototype.bitLength=function(){var P=this.words[this.length-1],B=this._countBits(P);return(this.length-1)*26+B};function S(q){for(var P=new Array(q.bitLength()),B=0;B>>Q}return P}d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,B=0;BP.length?this.clone().ior(P):P.clone().ior(this)},d.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},d.prototype.iuand=function(P){var B;this.length>P.length?B=P:B=this;for(var $=0;$P.length?this.clone().iand(P):P.clone().iand(this)},d.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},d.prototype.iuxor=function(P){var B,$;this.length>P.length?(B=this,$=P):(B=P,$=this);for(var Q=0;Q<$.length;Q++)this.words[Q]=B.words[Q]^$.words[Q];if(this!==B)for(;QP.length?this.clone().ixor(P):P.clone().ixor(this)},d.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},d.prototype.inotn=function(P){c(typeof P=="number"&&P>=0);var B=Math.ceil(P/26)|0,$=P%26;this._expand(B),$>0&&B--;for(var Q=0;Q0&&(this.words[Q]=~this.words[Q]&67108863>>26-$),this.strip()},d.prototype.notn=function(P){return this.clone().inotn(P)},d.prototype.setn=function(P,B){c(typeof P=="number"&&P>=0);var $=P/26|0,Q=P%26;return this._expand($+1),B?this.words[$]=this.words[$]|1<P.length?($=this,Q=P):($=P,Q=this);for(var J=0,ne=0;ne>>26;for(;J!==0&&ne<$.length;ne++)B=($.words[ne]|0)+J,this.words[ne]=B&67108863,J=B>>>26;if(this.length=$.length,J!==0)this.words[this.length]=J,this.length++;else if($!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this},d.prototype.add=function(P){var B;return P.negative!==0&&this.negative===0?(P.negative=0,B=this.sub(P),P.negative^=1,B):P.negative===0&&this.negative!==0?(this.negative=0,B=P.sub(this),this.negative=1,B):this.length>P.length?this.clone().iadd(P):P.clone().iadd(this)},d.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var B=this.iadd(P);return P.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var $=this.cmp(P);if($===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,J;$>0?(Q=this,J=P):(Q=P,J=this);for(var ne=0,te=0;te>26,this.words[te]=B&67108863;for(;ne!==0&&te>26,this.words[te]=B&67108863;if(ne===0&&te>>26,Y=Z&67108863,K=Math.min(G,P.length-1),X=Math.max(0,G-q.length+1);X<=K;X++){var ee=G-X|0;Q=q.words[ee]|0,J=P.words[X]|0,ne=Q*J+Y,j+=ne/67108864|0,Y=ne&67108863}B.words[G]=Y|0,Z=j|0}return Z!==0?B.words[G]=Z|0:B.length--,B.strip()}var M=function(P,B,$){var Q=P.words,J=B.words,ne=$.words,te=0,Z,G,j,Y=Q[0]|0,K=Y&8191,X=Y>>>13,ee=Q[1]|0,le=ee&8191,oe=ee>>>13,fe=Q[2]|0,de=fe&8191,_e=fe>>>13,we=Q[3]|0,Oe=we&8191,be=we>>>13,Te=Q[4]|0,ke=Te&8191,Ee=Te>>>13,Le=Q[5]|0,Fe=Le&8191,qe=Le>>>13,We=Q[6]|0,Qe=We&8191,De=We>>>13,me=Q[7]|0,Ce=me&8191,et=me>>>13,st=Q[8]|0,ot=st&8191,ut=st>>>13,ht=Q[9]|0,Ht=ht&8191,Et=ht>>>13,Jt=J[0]|0,Tt=Jt&8191,rt=Jt>>>13,gt=J[1]|0,mt=gt&8191,He=gt>>>13,Ie=J[2]|0,je=Ie&8191,pe=Ie>>>13,ye=J[3]|0,Se=ye&8191,Pe=ye>>>13,it=J[4]|0,vt=it&8191,Pt=it>>>13,Bt=J[5]|0,It=Bt&8191,qt=Bt>>>13,pr=J[6]|0,_r=pr&8191,Rr=pr>>>13,an=J[7]|0,Br=an&8191,Gr=an>>>13,en=J[8]|0,cn=en&8191,hn=en>>>13,Wr=J[9]|0,bt=Wr&8191,tt=Wr>>>13;$.negative=P.negative^B.negative,$.length=19,Z=Math.imul(K,Tt),G=Math.imul(K,rt),G=G+Math.imul(X,Tt)|0,j=Math.imul(X,rt);var yt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(yt>>>26)|0,yt&=67108863,Z=Math.imul(le,Tt),G=Math.imul(le,rt),G=G+Math.imul(oe,Tt)|0,j=Math.imul(oe,rt),Z=Z+Math.imul(K,mt)|0,G=G+Math.imul(K,He)|0,G=G+Math.imul(X,mt)|0,j=j+Math.imul(X,He)|0;var wt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(wt>>>26)|0,wt&=67108863,Z=Math.imul(de,Tt),G=Math.imul(de,rt),G=G+Math.imul(_e,Tt)|0,j=Math.imul(_e,rt),Z=Z+Math.imul(le,mt)|0,G=G+Math.imul(le,He)|0,G=G+Math.imul(oe,mt)|0,j=j+Math.imul(oe,He)|0,Z=Z+Math.imul(K,je)|0,G=G+Math.imul(K,pe)|0,G=G+Math.imul(X,je)|0,j=j+Math.imul(X,pe)|0;var Ft=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,Z=Math.imul(Oe,Tt),G=Math.imul(Oe,rt),G=G+Math.imul(be,Tt)|0,j=Math.imul(be,rt),Z=Z+Math.imul(de,mt)|0,G=G+Math.imul(de,He)|0,G=G+Math.imul(_e,mt)|0,j=j+Math.imul(_e,He)|0,Z=Z+Math.imul(le,je)|0,G=G+Math.imul(le,pe)|0,G=G+Math.imul(oe,je)|0,j=j+Math.imul(oe,pe)|0,Z=Z+Math.imul(K,Se)|0,G=G+Math.imul(K,Pe)|0,G=G+Math.imul(X,Se)|0,j=j+Math.imul(X,Pe)|0;var er=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(er>>>26)|0,er&=67108863,Z=Math.imul(ke,Tt),G=Math.imul(ke,rt),G=G+Math.imul(Ee,Tt)|0,j=Math.imul(Ee,rt),Z=Z+Math.imul(Oe,mt)|0,G=G+Math.imul(Oe,He)|0,G=G+Math.imul(be,mt)|0,j=j+Math.imul(be,He)|0,Z=Z+Math.imul(de,je)|0,G=G+Math.imul(de,pe)|0,G=G+Math.imul(_e,je)|0,j=j+Math.imul(_e,pe)|0,Z=Z+Math.imul(le,Se)|0,G=G+Math.imul(le,Pe)|0,G=G+Math.imul(oe,Se)|0,j=j+Math.imul(oe,Pe)|0,Z=Z+Math.imul(K,vt)|0,G=G+Math.imul(K,Pt)|0,G=G+Math.imul(X,vt)|0,j=j+Math.imul(X,Pt)|0;var cr=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(cr>>>26)|0,cr&=67108863,Z=Math.imul(Fe,Tt),G=Math.imul(Fe,rt),G=G+Math.imul(qe,Tt)|0,j=Math.imul(qe,rt),Z=Z+Math.imul(ke,mt)|0,G=G+Math.imul(ke,He)|0,G=G+Math.imul(Ee,mt)|0,j=j+Math.imul(Ee,He)|0,Z=Z+Math.imul(Oe,je)|0,G=G+Math.imul(Oe,pe)|0,G=G+Math.imul(be,je)|0,j=j+Math.imul(be,pe)|0,Z=Z+Math.imul(de,Se)|0,G=G+Math.imul(de,Pe)|0,G=G+Math.imul(_e,Se)|0,j=j+Math.imul(_e,Pe)|0,Z=Z+Math.imul(le,vt)|0,G=G+Math.imul(le,Pt)|0,G=G+Math.imul(oe,vt)|0,j=j+Math.imul(oe,Pt)|0,Z=Z+Math.imul(K,It)|0,G=G+Math.imul(K,qt)|0,G=G+Math.imul(X,It)|0,j=j+Math.imul(X,qt)|0;var lr=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(lr>>>26)|0,lr&=67108863,Z=Math.imul(Qe,Tt),G=Math.imul(Qe,rt),G=G+Math.imul(De,Tt)|0,j=Math.imul(De,rt),Z=Z+Math.imul(Fe,mt)|0,G=G+Math.imul(Fe,He)|0,G=G+Math.imul(qe,mt)|0,j=j+Math.imul(qe,He)|0,Z=Z+Math.imul(ke,je)|0,G=G+Math.imul(ke,pe)|0,G=G+Math.imul(Ee,je)|0,j=j+Math.imul(Ee,pe)|0,Z=Z+Math.imul(Oe,Se)|0,G=G+Math.imul(Oe,Pe)|0,G=G+Math.imul(be,Se)|0,j=j+Math.imul(be,Pe)|0,Z=Z+Math.imul(de,vt)|0,G=G+Math.imul(de,Pt)|0,G=G+Math.imul(_e,vt)|0,j=j+Math.imul(_e,Pt)|0,Z=Z+Math.imul(le,It)|0,G=G+Math.imul(le,qt)|0,G=G+Math.imul(oe,It)|0,j=j+Math.imul(oe,qt)|0,Z=Z+Math.imul(K,_r)|0,G=G+Math.imul(K,Rr)|0,G=G+Math.imul(X,_r)|0,j=j+Math.imul(X,Rr)|0;var Ue=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,Z=Math.imul(Ce,Tt),G=Math.imul(Ce,rt),G=G+Math.imul(et,Tt)|0,j=Math.imul(et,rt),Z=Z+Math.imul(Qe,mt)|0,G=G+Math.imul(Qe,He)|0,G=G+Math.imul(De,mt)|0,j=j+Math.imul(De,He)|0,Z=Z+Math.imul(Fe,je)|0,G=G+Math.imul(Fe,pe)|0,G=G+Math.imul(qe,je)|0,j=j+Math.imul(qe,pe)|0,Z=Z+Math.imul(ke,Se)|0,G=G+Math.imul(ke,Pe)|0,G=G+Math.imul(Ee,Se)|0,j=j+Math.imul(Ee,Pe)|0,Z=Z+Math.imul(Oe,vt)|0,G=G+Math.imul(Oe,Pt)|0,G=G+Math.imul(be,vt)|0,j=j+Math.imul(be,Pt)|0,Z=Z+Math.imul(de,It)|0,G=G+Math.imul(de,qt)|0,G=G+Math.imul(_e,It)|0,j=j+Math.imul(_e,qt)|0,Z=Z+Math.imul(le,_r)|0,G=G+Math.imul(le,Rr)|0,G=G+Math.imul(oe,_r)|0,j=j+Math.imul(oe,Rr)|0,Z=Z+Math.imul(K,Br)|0,G=G+Math.imul(K,Gr)|0,G=G+Math.imul(X,Br)|0,j=j+Math.imul(X,Gr)|0;var Ne=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,Z=Math.imul(ot,Tt),G=Math.imul(ot,rt),G=G+Math.imul(ut,Tt)|0,j=Math.imul(ut,rt),Z=Z+Math.imul(Ce,mt)|0,G=G+Math.imul(Ce,He)|0,G=G+Math.imul(et,mt)|0,j=j+Math.imul(et,He)|0,Z=Z+Math.imul(Qe,je)|0,G=G+Math.imul(Qe,pe)|0,G=G+Math.imul(De,je)|0,j=j+Math.imul(De,pe)|0,Z=Z+Math.imul(Fe,Se)|0,G=G+Math.imul(Fe,Pe)|0,G=G+Math.imul(qe,Se)|0,j=j+Math.imul(qe,Pe)|0,Z=Z+Math.imul(ke,vt)|0,G=G+Math.imul(ke,Pt)|0,G=G+Math.imul(Ee,vt)|0,j=j+Math.imul(Ee,Pt)|0,Z=Z+Math.imul(Oe,It)|0,G=G+Math.imul(Oe,qt)|0,G=G+Math.imul(be,It)|0,j=j+Math.imul(be,qt)|0,Z=Z+Math.imul(de,_r)|0,G=G+Math.imul(de,Rr)|0,G=G+Math.imul(_e,_r)|0,j=j+Math.imul(_e,Rr)|0,Z=Z+Math.imul(le,Br)|0,G=G+Math.imul(le,Gr)|0,G=G+Math.imul(oe,Br)|0,j=j+Math.imul(oe,Gr)|0,Z=Z+Math.imul(K,cn)|0,G=G+Math.imul(K,hn)|0,G=G+Math.imul(X,cn)|0,j=j+Math.imul(X,hn)|0;var At=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(At>>>26)|0,At&=67108863,Z=Math.imul(Ht,Tt),G=Math.imul(Ht,rt),G=G+Math.imul(Et,Tt)|0,j=Math.imul(Et,rt),Z=Z+Math.imul(ot,mt)|0,G=G+Math.imul(ot,He)|0,G=G+Math.imul(ut,mt)|0,j=j+Math.imul(ut,He)|0,Z=Z+Math.imul(Ce,je)|0,G=G+Math.imul(Ce,pe)|0,G=G+Math.imul(et,je)|0,j=j+Math.imul(et,pe)|0,Z=Z+Math.imul(Qe,Se)|0,G=G+Math.imul(Qe,Pe)|0,G=G+Math.imul(De,Se)|0,j=j+Math.imul(De,Pe)|0,Z=Z+Math.imul(Fe,vt)|0,G=G+Math.imul(Fe,Pt)|0,G=G+Math.imul(qe,vt)|0,j=j+Math.imul(qe,Pt)|0,Z=Z+Math.imul(ke,It)|0,G=G+Math.imul(ke,qt)|0,G=G+Math.imul(Ee,It)|0,j=j+Math.imul(Ee,qt)|0,Z=Z+Math.imul(Oe,_r)|0,G=G+Math.imul(Oe,Rr)|0,G=G+Math.imul(be,_r)|0,j=j+Math.imul(be,Rr)|0,Z=Z+Math.imul(de,Br)|0,G=G+Math.imul(de,Gr)|0,G=G+Math.imul(_e,Br)|0,j=j+Math.imul(_e,Gr)|0,Z=Z+Math.imul(le,cn)|0,G=G+Math.imul(le,hn)|0,G=G+Math.imul(oe,cn)|0,j=j+Math.imul(oe,hn)|0,Z=Z+Math.imul(K,bt)|0,G=G+Math.imul(K,tt)|0,G=G+Math.imul(X,bt)|0,j=j+Math.imul(X,tt)|0;var Rt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,Z=Math.imul(Ht,mt),G=Math.imul(Ht,He),G=G+Math.imul(Et,mt)|0,j=Math.imul(Et,He),Z=Z+Math.imul(ot,je)|0,G=G+Math.imul(ot,pe)|0,G=G+Math.imul(ut,je)|0,j=j+Math.imul(ut,pe)|0,Z=Z+Math.imul(Ce,Se)|0,G=G+Math.imul(Ce,Pe)|0,G=G+Math.imul(et,Se)|0,j=j+Math.imul(et,Pe)|0,Z=Z+Math.imul(Qe,vt)|0,G=G+Math.imul(Qe,Pt)|0,G=G+Math.imul(De,vt)|0,j=j+Math.imul(De,Pt)|0,Z=Z+Math.imul(Fe,It)|0,G=G+Math.imul(Fe,qt)|0,G=G+Math.imul(qe,It)|0,j=j+Math.imul(qe,qt)|0,Z=Z+Math.imul(ke,_r)|0,G=G+Math.imul(ke,Rr)|0,G=G+Math.imul(Ee,_r)|0,j=j+Math.imul(Ee,Rr)|0,Z=Z+Math.imul(Oe,Br)|0,G=G+Math.imul(Oe,Gr)|0,G=G+Math.imul(be,Br)|0,j=j+Math.imul(be,Gr)|0,Z=Z+Math.imul(de,cn)|0,G=G+Math.imul(de,hn)|0,G=G+Math.imul(_e,cn)|0,j=j+Math.imul(_e,hn)|0,Z=Z+Math.imul(le,bt)|0,G=G+Math.imul(le,tt)|0,G=G+Math.imul(oe,bt)|0,j=j+Math.imul(oe,tt)|0;var Ct=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,Z=Math.imul(Ht,je),G=Math.imul(Ht,pe),G=G+Math.imul(Et,je)|0,j=Math.imul(Et,pe),Z=Z+Math.imul(ot,Se)|0,G=G+Math.imul(ot,Pe)|0,G=G+Math.imul(ut,Se)|0,j=j+Math.imul(ut,Pe)|0,Z=Z+Math.imul(Ce,vt)|0,G=G+Math.imul(Ce,Pt)|0,G=G+Math.imul(et,vt)|0,j=j+Math.imul(et,Pt)|0,Z=Z+Math.imul(Qe,It)|0,G=G+Math.imul(Qe,qt)|0,G=G+Math.imul(De,It)|0,j=j+Math.imul(De,qt)|0,Z=Z+Math.imul(Fe,_r)|0,G=G+Math.imul(Fe,Rr)|0,G=G+Math.imul(qe,_r)|0,j=j+Math.imul(qe,Rr)|0,Z=Z+Math.imul(ke,Br)|0,G=G+Math.imul(ke,Gr)|0,G=G+Math.imul(Ee,Br)|0,j=j+Math.imul(Ee,Gr)|0,Z=Z+Math.imul(Oe,cn)|0,G=G+Math.imul(Oe,hn)|0,G=G+Math.imul(be,cn)|0,j=j+Math.imul(be,hn)|0,Z=Z+Math.imul(de,bt)|0,G=G+Math.imul(de,tt)|0,G=G+Math.imul(_e,bt)|0,j=j+Math.imul(_e,tt)|0;var Wt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,Z=Math.imul(Ht,Se),G=Math.imul(Ht,Pe),G=G+Math.imul(Et,Se)|0,j=Math.imul(Et,Pe),Z=Z+Math.imul(ot,vt)|0,G=G+Math.imul(ot,Pt)|0,G=G+Math.imul(ut,vt)|0,j=j+Math.imul(ut,Pt)|0,Z=Z+Math.imul(Ce,It)|0,G=G+Math.imul(Ce,qt)|0,G=G+Math.imul(et,It)|0,j=j+Math.imul(et,qt)|0,Z=Z+Math.imul(Qe,_r)|0,G=G+Math.imul(Qe,Rr)|0,G=G+Math.imul(De,_r)|0,j=j+Math.imul(De,Rr)|0,Z=Z+Math.imul(Fe,Br)|0,G=G+Math.imul(Fe,Gr)|0,G=G+Math.imul(qe,Br)|0,j=j+Math.imul(qe,Gr)|0,Z=Z+Math.imul(ke,cn)|0,G=G+Math.imul(ke,hn)|0,G=G+Math.imul(Ee,cn)|0,j=j+Math.imul(Ee,hn)|0,Z=Z+Math.imul(Oe,bt)|0,G=G+Math.imul(Oe,tt)|0,G=G+Math.imul(be,bt)|0,j=j+Math.imul(be,tt)|0;var Qt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,Z=Math.imul(Ht,vt),G=Math.imul(Ht,Pt),G=G+Math.imul(Et,vt)|0,j=Math.imul(Et,Pt),Z=Z+Math.imul(ot,It)|0,G=G+Math.imul(ot,qt)|0,G=G+Math.imul(ut,It)|0,j=j+Math.imul(ut,qt)|0,Z=Z+Math.imul(Ce,_r)|0,G=G+Math.imul(Ce,Rr)|0,G=G+Math.imul(et,_r)|0,j=j+Math.imul(et,Rr)|0,Z=Z+Math.imul(Qe,Br)|0,G=G+Math.imul(Qe,Gr)|0,G=G+Math.imul(De,Br)|0,j=j+Math.imul(De,Gr)|0,Z=Z+Math.imul(Fe,cn)|0,G=G+Math.imul(Fe,hn)|0,G=G+Math.imul(qe,cn)|0,j=j+Math.imul(qe,hn)|0,Z=Z+Math.imul(ke,bt)|0,G=G+Math.imul(ke,tt)|0,G=G+Math.imul(Ee,bt)|0,j=j+Math.imul(Ee,tt)|0;var Xt=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,Z=Math.imul(Ht,It),G=Math.imul(Ht,qt),G=G+Math.imul(Et,It)|0,j=Math.imul(Et,qt),Z=Z+Math.imul(ot,_r)|0,G=G+Math.imul(ot,Rr)|0,G=G+Math.imul(ut,_r)|0,j=j+Math.imul(ut,Rr)|0,Z=Z+Math.imul(Ce,Br)|0,G=G+Math.imul(Ce,Gr)|0,G=G+Math.imul(et,Br)|0,j=j+Math.imul(et,Gr)|0,Z=Z+Math.imul(Qe,cn)|0,G=G+Math.imul(Qe,hn)|0,G=G+Math.imul(De,cn)|0,j=j+Math.imul(De,hn)|0,Z=Z+Math.imul(Fe,bt)|0,G=G+Math.imul(Fe,tt)|0,G=G+Math.imul(qe,bt)|0,j=j+Math.imul(qe,tt)|0;var $t=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+($t>>>26)|0,$t&=67108863,Z=Math.imul(Ht,_r),G=Math.imul(Ht,Rr),G=G+Math.imul(Et,_r)|0,j=Math.imul(Et,Rr),Z=Z+Math.imul(ot,Br)|0,G=G+Math.imul(ot,Gr)|0,G=G+Math.imul(ut,Br)|0,j=j+Math.imul(ut,Gr)|0,Z=Z+Math.imul(Ce,cn)|0,G=G+Math.imul(Ce,hn)|0,G=G+Math.imul(et,cn)|0,j=j+Math.imul(et,hn)|0,Z=Z+Math.imul(Qe,bt)|0,G=G+Math.imul(Qe,tt)|0,G=G+Math.imul(De,bt)|0,j=j+Math.imul(De,tt)|0;var ur=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(ur>>>26)|0,ur&=67108863,Z=Math.imul(Ht,Br),G=Math.imul(Ht,Gr),G=G+Math.imul(Et,Br)|0,j=Math.imul(Et,Gr),Z=Z+Math.imul(ot,cn)|0,G=G+Math.imul(ot,hn)|0,G=G+Math.imul(ut,cn)|0,j=j+Math.imul(ut,hn)|0,Z=Z+Math.imul(Ce,bt)|0,G=G+Math.imul(Ce,tt)|0,G=G+Math.imul(et,bt)|0,j=j+Math.imul(et,tt)|0;var fr=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,Z=Math.imul(Ht,cn),G=Math.imul(Ht,hn),G=G+Math.imul(Et,cn)|0,j=Math.imul(Et,hn),Z=Z+Math.imul(ot,bt)|0,G=G+Math.imul(ot,tt)|0,G=G+Math.imul(ut,bt)|0,j=j+Math.imul(ut,tt)|0;var mr=(te+Z|0)+((G&8191)<<13)|0;te=(j+(G>>>13)|0)+(mr>>>26)|0,mr&=67108863,Z=Math.imul(Ht,bt),G=Math.imul(Ht,tt),G=G+Math.imul(Et,bt)|0,j=Math.imul(Et,tt);var br=(te+Z|0)+((G&8191)<<13)|0;return te=(j+(G>>>13)|0)+(br>>>26)|0,br&=67108863,ne[0]=yt,ne[1]=wt,ne[2]=Ft,ne[3]=er,ne[4]=cr,ne[5]=lr,ne[6]=Ue,ne[7]=Ne,ne[8]=At,ne[9]=Rt,ne[10]=Ct,ne[11]=Wt,ne[12]=Qt,ne[13]=Xt,ne[14]=$t,ne[15]=ur,ne[16]=fr,ne[17]=mr,ne[18]=br,te!==0&&(ne[19]=te,$.length++),$};Math.imul||(M=A);function w(q,P,B){B.negative=P.negative^q.negative,B.length=q.length+P.length;for(var $=0,Q=0,J=0;J>>26)|0,Q+=ne>>>26,ne&=67108863}B.words[J]=te,$=ne,ne=Q}return $!==0?B.words[J]=$:B.length--,B.strip()}function C(q,P,B){var $=new x;return $.mulp(q,P,B)}d.prototype.mulTo=function(P,B){var $,Q=this.length+P.length;return this.length===10&&P.length===10?$=M(this,P,B):Q<63?$=A(this,P,B):Q<1024?$=w(this,P,B):$=C(this,P,B),$};function x(q,P){this.x=q,this.y=P}x.prototype.makeRBT=function(P){for(var B=new Array(P),$=d.prototype._countBits(P)-1,Q=0;Q>=1;return Q},x.prototype.permute=function(P,B,$,Q,J,ne){for(var te=0;te>>1)J++;return 1<>>13,$[2*ne+1]=J&8191,J=J>>>13;for(ne=2*B;ne>=26,B+=Q/67108864|0,B+=J>>>26,this.words[$]=J&67108863}return B!==0&&(this.words[$]=B,this.length++),this},d.prototype.muln=function(P){return this.clone().imuln(P)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(P){var B=S(P);if(B.length===0)return new d(1);for(var $=this,Q=0;Q=0);var B=P%26,$=(P-B)/26,Q=67108863>>>26-B<<26-B,J;if(B!==0){var ne=0;for(J=0;J>>26-B}ne&&(this.words[J]=ne,this.length++)}if($!==0){for(J=this.length-1;J>=0;J--)this.words[J+$]=this.words[J];for(J=0;J<$;J++)this.words[J]=0;this.length+=$}return this.strip()},d.prototype.ishln=function(P){return c(this.negative===0),this.iushln(P)},d.prototype.iushrn=function(P,B,$){c(typeof P=="number"&&P>=0);var Q;B?Q=(B-B%26)/26:Q=0;var J=P%26,ne=Math.min((P-J)/26,this.length),te=67108863^67108863>>>J<ne)for(this.length-=ne,G=0;G=0&&(j!==0||G>=Q);G--){var Y=this.words[G]|0;this.words[G]=j<<26-J|Y>>>J,j=Y&te}return Z&&j!==0&&(Z.words[Z.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(P,B,$){return c(this.negative===0),this.iushrn(P,B,$)},d.prototype.shln=function(P){return this.clone().ishln(P)},d.prototype.ushln=function(P){return this.clone().iushln(P)},d.prototype.shrn=function(P){return this.clone().ishrn(P)},d.prototype.ushrn=function(P){return this.clone().iushrn(P)},d.prototype.testn=function(P){c(typeof P=="number"&&P>=0);var B=P%26,$=(P-B)/26,Q=1<=0);var B=P%26,$=(P-B)/26;if(c(this.negative===0,"imaskn works only with positive numbers"),this.length<=$)return this;if(B!==0&&$++,this.length=Math.min($,this.length),B!==0){var Q=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},d.prototype.isubn=function(P){if(c(typeof P=="number"),c(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(Z/67108864|0),this.words[J+$]=ne&67108863}for(;J>26,this.words[J+$]=ne&67108863;if(te===0)return this.strip();for(c(te===-1),te=0,J=0;J>26,this.words[J]=ne&67108863;return this.negative=1,this.strip()},d.prototype._wordDiv=function(P,B){var $=this.length-P.length,Q=this.clone(),J=P,ne=J.words[J.length-1]|0,te=this._countBits(ne);$=26-te,$!==0&&(J=J.ushln($),Q.iushln($),ne=J.words[J.length-1]|0);var Z=Q.length-J.length,G;if(B!=="mod"){G=new d(null),G.length=Z+1,G.words=new Array(G.length);for(var j=0;j=0;K--){var X=(Q.words[J.length+K]|0)*67108864+(Q.words[J.length+K-1]|0);for(X=Math.min(X/ne|0,67108863),Q._ishlnsubmul(J,X,K);Q.negative!==0;)X--,Q.negative=0,Q._ishlnsubmul(J,1,K),Q.isZero()||(Q.negative^=1);G&&(G.words[K]=X)}return G&&G.strip(),Q.strip(),B!=="div"&&$!==0&&Q.iushrn($),{div:G||null,mod:Q}},d.prototype.divmod=function(P,B,$){if(c(!P.isZero()),this.isZero())return{div:new d(0),mod:new d(0)};var Q,J,ne;return this.negative!==0&&P.negative===0?(ne=this.neg().divmod(P,B),B!=="mod"&&(Q=ne.div.neg()),B!=="div"&&(J=ne.mod.neg(),$&&J.negative!==0&&J.iadd(P)),{div:Q,mod:J}):this.negative===0&&P.negative!==0?(ne=this.divmod(P.neg(),B),B!=="mod"&&(Q=ne.div.neg()),{div:Q,mod:ne.mod}):(this.negative&P.negative)!==0?(ne=this.neg().divmod(P.neg(),B),B!=="div"&&(J=ne.mod.neg(),$&&J.negative!==0&&J.isub(P)),{div:ne.div,mod:J}):P.length>this.length||this.cmp(P)<0?{div:new d(0),mod:this}:P.length===1?B==="div"?{div:this.divn(P.words[0]),mod:null}:B==="mod"?{div:null,mod:new d(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new d(this.modn(P.words[0]))}:this._wordDiv(P,B)},d.prototype.div=function(P){return this.divmod(P,"div",!1).div},d.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},d.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},d.prototype.divRound=function(P){var B=this.divmod(P);if(B.mod.isZero())return B.div;var $=B.div.negative!==0?B.mod.isub(P):B.mod,Q=P.ushrn(1),J=P.andln(1),ne=$.cmp(Q);return ne<0||J===1&&ne===0?B.div:B.div.negative!==0?B.div.isubn(1):B.div.iaddn(1)},d.prototype.modn=function(P){c(P<=67108863);for(var B=(1<<26)%P,$=0,Q=this.length-1;Q>=0;Q--)$=(B*$+(this.words[Q]|0))%P;return $},d.prototype.idivn=function(P){c(P<=67108863);for(var B=0,$=this.length-1;$>=0;$--){var Q=(this.words[$]|0)+B*67108864;this.words[$]=Q/P|0,B=Q%P}return this.strip()},d.prototype.divn=function(P){return this.clone().idivn(P)},d.prototype.egcd=function(P){c(P.negative===0),c(!P.isZero());var B=this,$=P.clone();B.negative!==0?B=B.umod(P):B=B.clone();for(var Q=new d(1),J=new d(0),ne=new d(0),te=new d(1),Z=0;B.isEven()&&$.isEven();)B.iushrn(1),$.iushrn(1),++Z;for(var G=$.clone(),j=B.clone();!B.isZero();){for(var Y=0,K=1;(B.words[0]&K)===0&&Y<26;++Y,K<<=1);if(Y>0)for(B.iushrn(Y);Y-- >0;)(Q.isOdd()||J.isOdd())&&(Q.iadd(G),J.isub(j)),Q.iushrn(1),J.iushrn(1);for(var X=0,ee=1;($.words[0]&ee)===0&&X<26;++X,ee<<=1);if(X>0)for($.iushrn(X);X-- >0;)(ne.isOdd()||te.isOdd())&&(ne.iadd(G),te.isub(j)),ne.iushrn(1),te.iushrn(1);B.cmp($)>=0?(B.isub($),Q.isub(ne),J.isub(te)):($.isub(B),ne.isub(Q),te.isub(J))}return{a:ne,b:te,gcd:$.iushln(Z)}},d.prototype._invmp=function(P){c(P.negative===0),c(!P.isZero());var B=this,$=P.clone();B.negative!==0?B=B.umod(P):B=B.clone();for(var Q=new d(1),J=new d(0),ne=$.clone();B.cmpn(1)>0&&$.cmpn(1)>0;){for(var te=0,Z=1;(B.words[0]&Z)===0&&te<26;++te,Z<<=1);if(te>0)for(B.iushrn(te);te-- >0;)Q.isOdd()&&Q.iadd(ne),Q.iushrn(1);for(var G=0,j=1;($.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for($.iushrn(G);G-- >0;)J.isOdd()&&J.iadd(ne),J.iushrn(1);B.cmp($)>=0?(B.isub($),Q.isub(J)):($.isub(B),J.isub(Q))}var Y;return B.cmpn(1)===0?Y=Q:Y=J,Y.cmpn(0)<0&&Y.iadd(P),Y},d.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var B=this.clone(),$=P.clone();B.negative=0,$.negative=0;for(var Q=0;B.isEven()&&$.isEven();Q++)B.iushrn(1),$.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;$.isEven();)$.iushrn(1);var J=B.cmp($);if(J<0){var ne=B;B=$,$=ne}else if(J===0||$.cmpn(1)===0)break;B.isub($)}while(!0);return $.iushln(Q)},d.prototype.invm=function(P){return this.egcd(P).a.umod(P)},d.prototype.isEven=function(){return(this.words[0]&1)===0},d.prototype.isOdd=function(){return(this.words[0]&1)===1},d.prototype.andln=function(P){return this.words[0]&P},d.prototype.bincn=function(P){c(typeof P=="number");var B=P%26,$=(P-B)/26,Q=1<>>26,te&=67108863,this.words[ne]=te}return J!==0&&(this.words[ne]=J,this.length++),this},d.prototype.isZero=function(){return this.length===1&&this.words[0]===0},d.prototype.cmpn=function(P){var B=P<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var $;if(this.length>1)$=1;else{B&&(P=-P),c(P<=67108863,"Number is too big");var Q=this.words[0]|0;$=Q===P?0:QP.length)return 1;if(this.length=0;$--){var Q=this.words[$]|0,J=P.words[$]|0;if(Q!==J){QJ&&(B=1);break}}return B},d.prototype.gtn=function(P){return this.cmpn(P)===1},d.prototype.gt=function(P){return this.cmp(P)===1},d.prototype.gten=function(P){return this.cmpn(P)>=0},d.prototype.gte=function(P){return this.cmp(P)>=0},d.prototype.ltn=function(P){return this.cmpn(P)===-1},d.prototype.lt=function(P){return this.cmp(P)===-1},d.prototype.lten=function(P){return this.cmpn(P)<=0},d.prototype.lte=function(P){return this.cmp(P)<=0},d.prototype.eqn=function(P){return this.cmpn(P)===0},d.prototype.eq=function(P){return this.cmp(P)===0},d.red=function(P){return new z(P)},d.prototype.toRed=function(P){return c(!this.red,"Already a number in reduction context"),c(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(P){return this.red=P,this},d.prototype.forceRed=function(P){return c(!this.red,"Already a number in reduction context"),this._forceRed(P)},d.prototype.redAdd=function(P){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},d.prototype.redIAdd=function(P){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},d.prototype.redSub=function(P){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},d.prototype.redISub=function(P){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},d.prototype.redShl=function(P){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},d.prototype.redMul=function(P){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},d.prototype.redIMul=function(P){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(P){return c(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var _={k256:null,p224:null,p192:null,p25519:null};function k(q,P){this.name=q,this.p=new d(P,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var P=new d(null);return P.words=new Array(Math.ceil(this.n/13)),P},k.prototype.ireduce=function(P){var B=P,$;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),$=B.bitLength();while($>this.n);var Q=$0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},k.prototype.split=function(P,B){P.iushrn(this.n,0,B)},k.prototype.imulK=function(P){return P.imul(this.k)};function E(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(E,k),E.prototype.split=function(P,B){for(var $=4194303,Q=Math.min(P.length,9),J=0;J>>22,ne=te}ne>>>=22,P.words[J-10]=ne,ne===0&&P.length>10?P.length-=10:P.length-=9},E.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var B=0,$=0;$>>=26,P.words[$]=J,B=Q}return B!==0&&(P.words[P.length++]=B),P},d._prime=function(P){if(_[P])return _[P];var B;if(P==="k256")B=new E;else if(P==="p224")B=new I;else if(P==="p192")B=new F;else if(P==="p25519")B=new D;else throw new Error("Unknown prime "+P);return _[P]=B,B};function z(q){if(typeof q=="string"){var P=d._prime(q);this.m=P.p,this.prime=P}else c(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}z.prototype._verify1=function(P){c(P.negative===0,"red works only with positives"),c(P.red,"red works only with red numbers")},z.prototype._verify2=function(P,B){c((P.negative|B.negative)===0,"red works only with positives"),c(P.red&&P.red===B.red,"red works only with red numbers")},z.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},z.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},z.prototype.add=function(P,B){this._verify2(P,B);var $=P.add(B);return $.cmp(this.m)>=0&&$.isub(this.m),$._forceRed(this)},z.prototype.iadd=function(P,B){this._verify2(P,B);var $=P.iadd(B);return $.cmp(this.m)>=0&&$.isub(this.m),$},z.prototype.sub=function(P,B){this._verify2(P,B);var $=P.sub(B);return $.cmpn(0)<0&&$.iadd(this.m),$._forceRed(this)},z.prototype.isub=function(P,B){this._verify2(P,B);var $=P.isub(B);return $.cmpn(0)<0&&$.iadd(this.m),$},z.prototype.shl=function(P,B){return this._verify1(P),this.imod(P.ushln(B))},z.prototype.imul=function(P,B){return this._verify2(P,B),this.imod(P.imul(B))},z.prototype.mul=function(P,B){return this._verify2(P,B),this.imod(P.mul(B))},z.prototype.isqr=function(P){return this.imul(P,P.clone())},z.prototype.sqr=function(P){return this.mul(P,P)},z.prototype.sqrt=function(P){if(P.isZero())return P.clone();var B=this.m.andln(3);if(c(B%2===1),B===3){var $=this.m.add(new d(1)).iushrn(2);return this.pow(P,$)}for(var Q=this.m.subn(1),J=0;!Q.isZero()&&Q.andln(1)===0;)J++,Q.iushrn(1);c(!Q.isZero());var ne=new d(1).toRed(this),te=ne.redNeg(),Z=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new d(2*G*G).toRed(this);this.pow(G,Z).cmp(te)!==0;)G.redIAdd(te);for(var j=this.pow(G,Q),Y=this.pow(P,Q.addn(1).iushrn(1)),K=this.pow(P,Q),X=J;K.cmp(ne)!==0;){for(var ee=K,le=0;ee.cmp(ne)!==0;le++)ee=ee.redSqr();c(le=0;J--){for(var j=B.words[J],Y=G-1;Y>=0;Y--){var K=j>>Y&1;if(ne!==Q[0]&&(ne=this.sqr(ne)),K===0&&te===0){Z=0;continue}te<<=1,te|=K,Z++,!(Z!==$&&(J!==0||Y!==0))&&(ne=this.mul(ne,Q[te]),Z=0,te=0)}G=26}return ne},z.prototype.convertTo=function(P){var B=P.umod(this.m);return B===P?B.clone():B},z.prototype.convertFrom=function(P){var B=P.clone();return B.red=null,B},d.mont=function(P){return new N(P)};function N(q){z.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new d(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(N,z),N.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},N.prototype.convertFrom=function(P){var B=this.imod(P.mul(this.rinv));return B.red=null,B},N.prototype.imul=function(P,B){if(P.isZero()||B.isZero())return P.words[0]=0,P.length=1,P;var $=P.imul(B),Q=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=$.isub(Q).iushrn(this.shift),ne=J;return J.cmp(this.m)>=0?ne=J.isub(this.m):J.cmpn(0)<0&&(ne=J.iadd(this.m)),ne._forceRed(this)},N.prototype.mul=function(P,B){if(P.isZero()||B.isZero())return new d(0)._forceRed(this);var $=P.mul(B),Q=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=$.isub(Q).iushrn(this.shift),ne=J;return J.cmp(this.m)>=0?ne=J.isub(this.m):J.cmpn(0)<0&&(ne=J.iadd(this.m)),ne._forceRed(this)},N.prototype.invm=function(P){var B=this.imod(P._invmp(this.m).mul(this.r2));return B._forceRed(this)}})(a,this)}),2692:(function(a){a.exports=f;function f(i){var l,u,c,h=i.length,d=0;for(l=0;l>>1;if(!(x<=0)){var _,k=l.mallocDouble(2*x*w),E=l.mallocInt32(w);if(w=d(T,x,k,E),w>0){if(x===1&&M)u.init(w),_=u.sweepComplete(x,A,0,w,k,E,0,w,k,E);else{var I=l.mallocDouble(2*x*C),F=l.mallocInt32(C);C=d(S,x,I,F),C>0&&(u.init(w+C),x===1?_=u.sweepBipartite(x,A,0,w,k,E,0,C,I,F):_=c(x,A,M,w,k,E,C,I,F),l.free(I),l.free(F))}l.free(k),l.free(E)}return _}}}var p;function m(T,S){p.push([T,S])}function y(T){return p=[],v(T,T,m,!0),p}function b(T,S){return p=[],v(T,S,m,!1),p}function g(T,S,A){switch(arguments.length){case 1:return y(T);case 2:return typeof S=="function"?v(T,T,S,!0):b(T,S);case 3:return v(T,S,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),7333:(function(a,f){function i(){function c(v,p,m,y,b,g,T,S,A,M,w){for(var C=2*v,x=y,_=C*y;xA-S?c(v,p,m,y,b,g,T,S,A,M,w):h(v,p,m,y,b,g,T,S,A,M,w)}return d}function l(){function c(m,y,b,g,T,S,A,M,w,C,x){for(var _=2*m,k=g,E=_*g;kC-w?g?c(m,y,b,T,S,A,M,w,C,x,_):h(m,y,b,T,S,A,M,w,C,x,_):g?d(m,y,b,T,S,A,M,w,C,x,_):v(m,y,b,T,S,A,M,w,C,x,_)}return p}function u(c){return c?i():l()}f.partial=u(!1),f.full=u(!0)}),2337:(function(a,f,i){a.exports=q;var l=i(5306),u=i(2288),c=i(7333),h=c.partial,d=c.full,v=i(1390),p=i(2464),m=i(122),y=128,b=1<<22,g=1<<22,T=m("!(lo>=p0)&&!(p1>=hi)"),S=m("lo===p0"),A=m("lo0;){j-=1;var X=j*x,ee=E[X],le=E[X+1],oe=E[X+2],fe=E[X+3],de=E[X+4],_e=E[X+5],we=j*_,Oe=I[we],be=I[we+1],Te=_e&1,ke=!!(_e&16),Ee=J,Le=ne,Fe=Z,qe=G;if(Te&&(Ee=Z,Le=G,Fe=J,qe=ne),!(_e&2&&(oe=A(P,ee,le,oe,Ee,Le,be),le>=oe))&&!(_e&4&&(le=M(P,ee,le,oe,Ee,Le,Oe),le>=oe))){var We=oe-le,Qe=de-fe;if(ke){if(P*We*(We+Qe)m&&b[C+p]>M;--w,C-=T){for(var x=C,_=C+T,k=0;k>>1,M=2*v,w=A,C=b[M*A+p];T=I?(w=E,C=I):k>=D?(w=_,C=k):(w=F,C=D):I>=D?(w=E,C=I):D>=k?(w=_,C=k):(w=F,C=D);for(var q=M*(S-1),P=M*w,z=0;z=p0)&&!(p1>=hi)":p};function i(m){return f[m]}function l(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+_];if(I===A)if(x===E)x+=1,C+=M;else{for(var F=0;M>F;++F){var D=T[w+F];T[w+F]=T[C],T[C++]=D}var z=S[E];S[E]=S[x],S[x++]=z}}return x}function u(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+_];if(IF;++F){var D=T[w+F];T[w+F]=T[C],T[C++]=D}var z=S[E];S[E]=S[x],S[x++]=z}}return x}function c(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+k];if(I<=A)if(x===E)x+=1,C+=M;else{for(var F=0;M>F;++F){var D=T[w+F];T[w+F]=T[C],T[C++]=D}var z=S[E];S[E]=S[x],S[x++]=z}}return x}function h(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+k];if(I<=A)if(x===E)x+=1,C+=M;else{for(var F=0;M>F;++F){var D=T[w+F];T[w+F]=T[C],T[C++]=D}var z=S[E];S[E]=S[x],S[x++]=z}}return x}function d(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+_],F=T[w+k];if(I<=A&&A<=F)if(x===E)x+=1,C+=M;else{for(var D=0;M>D;++D){var z=T[w+D];T[w+D]=T[C],T[C++]=z}var N=S[E];S[E]=S[x],S[x++]=N}}return x}function v(m,y,b,g,T,S,A){for(var M=2*m,w=M*b,C=w,x=b,_=y,k=m+y,E=b;g>E;++E,w+=M){var I=T[w+_],F=T[w+k];if(ID;++D){var z=T[w+D];T[w+D]=T[C],T[C++]=z}var N=S[E];S[E]=S[x],S[x++]=N}}return x}function p(m,y,b,g,T,S,A,M){for(var w=2*m,C=w*b,x=C,_=b,k=y,E=m+y,I=b;g>I;++I,C+=w){var F=T[C+k],D=T[C+E];if(!(F>=A)&&!(M>=D))if(_===I)_+=1,x+=w;else{for(var z=0;w>z;++z){var N=T[C+z];T[C+z]=T[x],T[x++]=N}var q=S[I];S[I]=S[_],S[_++]=q}}return _}}),309:(function(a){a.exports=i;var f=32;function i(y,b){b<=4*f?l(0,b-1,y):m(0,b-1,y)}function l(y,b,g){for(var T=2*(y+1),S=y+1;S<=b;++S){for(var A=g[T++],M=g[T++],w=S,C=T-2;w-- >y;){var x=g[C-2],_=g[C-1];if(xg[b+1]:!0}function p(y,b,g,T){y*=2;var S=T[y];return S>1,w=M-T,C=M+T,x=S,_=w,k=M,E=C,I=A,F=y+1,D=b-1,z=0;v(x,_,g)&&(z=x,x=_,_=z),v(E,I,g)&&(z=E,E=I,I=z),v(x,k,g)&&(z=x,x=k,k=z),v(_,k,g)&&(z=_,_=k,k=z),v(x,E,g)&&(z=x,x=E,E=z),v(k,E,g)&&(z=k,k=E,E=z),v(_,I,g)&&(z=_,_=I,I=z),v(_,k,g)&&(z=_,_=k,k=z),v(E,I,g)&&(z=E,E=I,I=z);for(var N=g[2*_],q=g[2*_+1],P=g[2*E],B=g[2*E+1],$=2*x,Q=2*k,J=2*I,ne=2*S,te=2*M,Z=2*A,G=0;G<2;++G){var j=g[$+G],Y=g[Q+G],K=g[J+G];g[ne+G]=j,g[te+G]=Y,g[Z+G]=K}c(w,y,g),c(C,b,g);for(var X=F;X<=D;++X)if(p(X,N,q,g))X!==F&&u(X,F,g),++F;else if(!p(X,P,B,g))for(;;)if(p(D,P,B,g)){p(D,N,q,g)?(h(X,F,D,g),++F,--D):(u(X,D,g),--D);break}else{if(--D>>1;c(T,Y);for(var K=0,X=0,te=0;te=h)ee=ee-h|0,A(m,y,X--,ee);else if(ee>=0)A(v,p,K--,ee);else if(ee<=-h){ee=-ee-h|0;for(var le=0;le>>1;c(T,Y);for(var K=0,X=0,ee=0,te=0;te>1===T[2*te+3]>>1&&(oe=2,te+=1),le<0){for(var fe=-(le>>1)-1,de=0;de>1)-1;oe===0?A(v,p,K--,fe):oe===1?A(m,y,X--,fe):oe===2&&A(b,g,ee--,fe)}}}function x(k,E,I,F,D,z,N,q,P,B,$,Q){var J=0,ne=2*k,te=E,Z=E+k,G=1,j=1;F?j=h:G=h;for(var Y=D;Y>>1;c(T,le);for(var oe=0,Y=0;Y=h?(de=!F,K-=h):(de=!!F,K-=1),de)M(v,p,oe++,K);else{var _e=Q[K],we=ne*K,Oe=$[we+E+1],be=$[we+E+1+k];e:for(var Te=0;Te>>1;c(T,K);for(var X=0,Z=0;Z=h)v[X++]=G-h;else{G-=1;var le=$[G],oe=J*G,fe=B[oe+E+1],de=B[oe+E+1+k];e:for(var _e=0;_e=0;--_e)if(v[_e]===G){for(var Te=_e+1;Te0;){for(var T=v.pop(),y=v.pop(),S=-1,A=-1,b=m[y],w=1;w=0||(d.flip(y,T),u(h,d,v,S,y,A),u(h,d,v,y,A,S),u(h,d,v,A,T,S),u(h,d,v,T,S,A))}}}),7098:(function(a,f,i){var l=i(5070);a.exports=p;function u(m,y,b,g,T,S,A){this.cells=m,this.neighbor=y,this.flags=g,this.constraint=b,this.active=T,this.next=S,this.boundary=A}var c=u.prototype;function h(m,y){return m[0]-y[0]||m[1]-y[1]||m[2]-y[2]}c.locate=(function(){var m=[0,0,0];return function(y,b,g){var T=y,S=b,A=g;return b0||A.length>0;){for(;S.length>0;){var _=S.pop();if(M[_]!==-T){M[_]=T,w[_];for(var k=0;k<3;++k){var E=x[3*_+k];E>=0&&M[E]===0&&(C[3*_+k]?A.push(E):(S.push(E),M[E]=T))}}}var I=A;A=S,S=I,A.length=0,T=-T}var F=v(w,M,y);return b?F.concat(g.boundary):F}}),9971:(function(a,f,i){var l=i(5070),u=i(417)[3],c=0,h=1,d=2;a.exports=A;function v(M,w,C,x,_){this.a=M,this.b=w,this.idx=C,this.lowerIds=x,this.upperIds=_}function p(M,w,C,x){this.a=M,this.b=w,this.type=C,this.idx=x}function m(M,w){var C=M.a[0]-w.a[0]||M.a[1]-w.a[1]||M.type-w.type;return C||M.type!==c&&(C=u(M.a,M.b,w.b),C)?C:M.idx-w.idx}function y(M,w){return u(M.a,M.b,w)}function b(M,w,C,x,_){for(var k=l.lt(w,x,y),E=l.gt(w,x,y),I=k;I1&&u(C[D[N-2]],C[D[N-1]],x)>0;)M.push([D[N-1],D[N-2],_]),N-=1;D.length=N,D.push(_);for(var z=F.upperIds,N=z.length;N>1&&u(C[z[N-2]],C[z[N-1]],x)<0;)M.push([z[N-2],z[N-1],_]),N-=1;z.length=N,z.push(_)}}function g(M,w){var C;return M.a[0]F[0]&&_.push(new p(F,I,d,k),new p(I,F,h,k))}_.sort(m);for(var D=_[0].a[0]-(1+Math.abs(_[0].a[0]))*Math.pow(2,-52),z=[new v([D,1],[D,0],-1,[],[])],N=[],k=0,q=_.length;k=0}})(),c.removeTriangle=function(v,p,m){var y=this.stars;h(y[v],p,m),h(y[p],m,v),h(y[m],v,p)},c.addTriangle=function(v,p,m){var y=this.stars;y[v].push(p,m),y[p].push(m,v),y[m].push(v,p)},c.opposite=function(v,p){for(var m=this.stars[p],y=1,b=m.length;y=0;--P){var j=N[P];B=j[0];var Y=D[B],K=Y[0],X=Y[1],ee=F[K],le=F[X];if((ee[0]-le[0]||ee[1]-le[1])<0){var oe=K;K=X,X=oe}Y[0]=K;var fe=Y[1]=j[1],de;for(q&&(de=Y[2]);P>0&&N[P-1][0]===B;){var j=N[--P],_e=j[1];q?D.push([fe,_e,de]):D.push([fe,_e]),fe=_e}q?D.push([fe,X,de]):D.push([fe,X])}return $}function w(F,D,z){for(var N=D.length,q=new l(N),P=[],B=0;BD[2]?1:0)}function _(F,D,z){if(F.length!==0){if(D)for(var N=0;N0||B.length>0}function I(F,D,z){var N;if(z){N=D;for(var q=new Array(D.length),P=0;PM+1)throw new Error(S+" map requires nshades to be at least size "+T.length);Array.isArray(p.alpha)?p.alpha.length!==2?w=[1,1]:w=p.alpha.slice():typeof p.alpha=="number"?w=[p.alpha,p.alpha]:w=[1,1],m=T.map(function(I){return Math.round(I.index*M)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var x=T.map(function(I,F){var D=T[F].index,z=T[F].rgb.slice();return z.length===4&&z[3]>=0&&z[3]<=1||(z[3]=w[0]+(w[1]-w[0])*D),z}),_=[];for(C=0;C=0}function p(m,y,b,g){var T=l(y,b,g);if(T===0){var S=u(l(m,y,b)),A=u(l(m,y,g));if(S===A){if(S===0){var M=v(m,y,b),w=v(m,y,g);return M===w?0:M?1:-1}return 0}else{if(A===0)return S>0||v(m,y,g)?-1:1;if(S===0)return A>0||v(m,y,b)?1:-1}return u(A-S)}var C=l(m,y,b);if(C>0)return T>0&&l(m,y,g)>0?1:-1;if(C<0)return T>0||l(m,y,g)>0?1:-1;var x=l(m,y,g);return x>0||v(m,y,b)?1:-1}}),7538:(function(a){a.exports=function(i){return i<0?-1:i>0?1:0}}),9209:(function(a){a.exports=l;var f=Math.min;function i(u,c){return u-c}function l(u,c){var h=u.length,d=u.length-c.length;if(d)return d;switch(h){case 0:return 0;case 1:return u[0]-c[0];case 2:return u[0]+u[1]-c[0]-c[1]||f(u[0],u[1])-f(c[0],c[1]);case 3:var v=u[0]+u[1],p=c[0]+c[1];if(d=v+u[2]-(p+c[2]),d)return d;var m=f(u[0],u[1]),y=f(c[0],c[1]);return f(m,u[2])-f(y,c[2])||f(m+u[2],v)-f(y+c[2],p);case 4:var b=u[0],g=u[1],T=u[2],S=u[3],A=c[0],M=c[1],w=c[2],C=c[3];return b+g+T+S-(A+M+w+C)||f(b,g,T,S)-f(A,M,w,C,A)||f(b+g,b+T,b+S,g+T,g+S,T+S)-f(A+M,A+w,A+C,M+w,M+C,w+C)||f(b+g+T,b+g+S,b+T+S,g+T+S)-f(A+M+w,A+M+C,A+w+C,M+w+C);default:for(var x=u.slice().sort(i),_=c.slice().sort(i),k=0;ki[u][0]&&(u=c);return lu?[[u],[l]]:[[l]]}}),8722:(function(a,f,i){a.exports=u;var l=i(3266);function u(c){var h=l(c),d=h.length;if(d<=2)return[];for(var v=new Array(d),p=h[d-1],m=0;m=p[A]&&(S+=1);g[T]=S}}return v}function d(v,p){try{return l(v,!0)}catch{var m=u(v);if(m.length<=p)return[];var y=c(v,m),b=l(y,!0);return h(b,m)}}}),9680:(function(a){function f(l,u,c,h,d,v){var p=6*d*d-6*d,m=3*d*d-4*d+1,y=-6*d*d+6*d,b=3*d*d-2*d;if(l.length){v||(v=new Array(l.length));for(var g=l.length-1;g>=0;--g)v[g]=p*l[g]+m*u[g]+y*c[g]+b*h[g];return v}return p*l+m*u+y*c[g]+b*h}function i(l,u,c,h,d,v){var p=d-1,m=d*d,y=p*p,b=(1+2*d)*y,g=d*y,T=m*(3-2*d),S=m*p;if(l.length){v||(v=new Array(l.length));for(var A=l.length-1;A>=0;--A)v[A]=b*l[A]+g*u[A]+T*c[A]+S*h[A];return v}return b*l+g*u+T*c+S*h}a.exports=i,a.exports.derivative=f}),4419:(function(a,f,i){var l=i(2183),u=i(1215);a.exports=v;function c(p,m){this.point=p,this.index=m}function h(p,m){for(var y=p.point,b=m.point,g=y.length,T=0;T=2)return!1;z[q]=P}return!0}):D=D.filter(function(z){for(var N=0;N<=b;++N){var q=k[z[N]];if(q<0)return!1;z[N]=q}return!0}),b&1)for(var S=0;S>>31},a.exports.exponent=function(T){var S=a.exports.hi(T);return(S<<1>>>21)-1023},a.exports.fraction=function(T){var S=a.exports.lo(T),A=a.exports.hi(T),M=A&(1<<20)-1;return A&2146435072&&(M+=1048576),[S,M]},a.exports.denormalized=function(T){var S=a.exports.hi(T);return!(S&2146435072)}}),3094:(function(a){function f(u,c,h){var d=u[h]|0;if(d<=0)return[];var v=new Array(d),p;if(h===u.length-1)for(p=0;p"u"&&(c=0),typeof u){case"number":if(u>0)return i(u|0,c);break;case"object":if(typeof u.length=="number")return f(u,c,0);break}return[]}a.exports=l}),8348:(function(a,f,i){a.exports=u;var l=i(1215);function u(c,h){var d=c.length;if(typeof h!="number"){h=0;for(var v=0;v=b-1)for(var C=S.length-1,_=m-y[b-1],x=0;x=b-1){var w=S.length-1;m-y[b-1];for(var C=0;C=0;--b)if(m[--y])return!1;return!0},d.jump=function(m){var y=this.lastT(),b=this.dimension;if(!(m0;--x)g.push(c(M[x-1],w[x-1],arguments[x])),T.push(0)}},d.push=function(m){var y=this.lastT(),b=this.dimension;if(!(m1e-6?1/A:0;this._time.push(m);for(var _=b;_>0;--_){var k=c(w[_-1],C[_-1],arguments[_]);g.push(k),T.push((k-g[S++])*x)}}},d.set=function(m){var y=this.dimension;if(!(m0;--M)b.push(c(S[M-1],A[M-1],arguments[M])),g.push(0)}},d.move=function(m){var y=this.lastT(),b=this.dimension;if(!(m<=y||arguments.length!==b+1)){var g=this._state,T=this._velocity,S=g.length-this.dimension,A=this.bounds,M=A[0],w=A[1],C=m-y,x=C>1e-6?1/C:0;this._time.push(m);for(var _=b;_>0;--_){var k=arguments[_];g.push(c(M[_-1],w[_-1],g[S++]+k)),T.push(k*x)}}},d.idle=function(m){var y=this.lastT();if(!(m=0;--x)g.push(c(M[x],w[x],g[S]+C*T[S])),T.push(0),S+=1}};function v(m){for(var y=new Array(m),b=0;b=0;--F){var _=k[F];E[F]<=0?k[F]=new l(_._color,_.key,_.value,k[F+1],_.right,_._count+1):k[F]=new l(_._color,_.key,_.value,_.left,k[F+1],_._count+1)}for(var F=k.length-1;F>1;--F){var D=k[F-1],_=k[F];if(D._color===i||_._color===i)break;var z=k[F-2];if(z.left===D)if(D.left===_){var N=z.right;if(N&&N._color===f)D._color=i,z.right=c(i,N),z._color=f,F-=1;else{if(z._color=f,z.left=D.right,D._color=i,D.right=z,k[F-2]=D,k[F-1]=_,h(z),h(D),F>=3){var q=k[F-3];q.left===z?q.left=D:q.right=D}break}}else{var N=z.right;if(N&&N._color===f)D._color=i,z.right=c(i,N),z._color=f,F-=1;else{if(D.right=_.left,z._color=f,z.left=_.right,_._color=i,_.left=D,_.right=z,k[F-2]=_,k[F-1]=D,h(z),h(D),h(_),F>=3){var q=k[F-3];q.left===z?q.left=_:q.right=_}break}}else if(D.right===_){var N=z.left;if(N&&N._color===f)D._color=i,z.left=c(i,N),z._color=f,F-=1;else{if(z._color=f,z.right=D.left,D._color=i,D.left=z,k[F-2]=D,k[F-1]=_,h(z),h(D),F>=3){var q=k[F-3];q.right===z?q.right=D:q.left=D}break}}else{var N=z.left;if(N&&N._color===f)D._color=i,z.left=c(i,N),z._color=f,F-=1;else{if(D.left=_.right,z._color=f,z.right=_.left,_._color=i,_.right=D,_.left=z,k[F-2]=_,k[F-1]=D,h(z),h(D),h(_),F>=3){var q=k[F-3];q.right===z?q.right=_:q.left=_}break}}}return k[0]._color=i,new d(x,k[0])};function p(w,C){if(C.left){var x=p(w,C.left);if(x)return x}var x=w(C.key,C.value);if(x)return x;if(C.right)return p(w,C.right)}function m(w,C,x,_){var k=C(w,_.key);if(k<=0){if(_.left){var E=m(w,C,x,_.left);if(E)return E}var E=x(_.key,_.value);if(E)return E}if(_.right)return m(w,C,x,_.right)}function y(w,C,x,_,k){var E=x(w,k.key),I=x(C,k.key),F;if(E<=0&&(k.left&&(F=y(w,C,x,_,k.left),F)||I>0&&(F=_(k.key,k.value),F)))return F;if(I>0&&k.right)return y(w,C,x,_,k.right)}v.forEach=function(C,x,_){if(this.root)switch(arguments.length){case 1:return p(C,this.root);case 2:return m(x,this._compare,C,this.root);case 3:return this._compare(x,_)>=0?void 0:y(x,_,this._compare,C,this.root)}},Object.defineProperty(v,"begin",{get:function(){for(var w=[],C=this.root;C;)w.push(C),C=C.left;return new b(this,w)}}),Object.defineProperty(v,"end",{get:function(){for(var w=[],C=this.root;C;)w.push(C),C=C.right;return new b(this,w)}}),v.at=function(w){if(w<0)return new b(this,[]);for(var C=this.root,x=[];;){if(x.push(C),C.left){if(w=C.right._count)break;C=C.right}else break}return new b(this,[])},v.ge=function(w){for(var C=this._compare,x=this.root,_=[],k=0;x;){var E=C(w,x.key);_.push(x),E<=0&&(k=_.length),E<=0?x=x.left:x=x.right}return _.length=k,new b(this,_)},v.gt=function(w){for(var C=this._compare,x=this.root,_=[],k=0;x;){var E=C(w,x.key);_.push(x),E<0&&(k=_.length),E<0?x=x.left:x=x.right}return _.length=k,new b(this,_)},v.lt=function(w){for(var C=this._compare,x=this.root,_=[],k=0;x;){var E=C(w,x.key);_.push(x),E>0&&(k=_.length),E<=0?x=x.left:x=x.right}return _.length=k,new b(this,_)},v.le=function(w){for(var C=this._compare,x=this.root,_=[],k=0;x;){var E=C(w,x.key);_.push(x),E>=0&&(k=_.length),E<0?x=x.left:x=x.right}return _.length=k,new b(this,_)},v.find=function(w){for(var C=this._compare,x=this.root,_=[];x;){var k=C(w,x.key);if(_.push(x),k===0)return new b(this,_);k<=0?x=x.left:x=x.right}return new b(this,[])},v.remove=function(w){var C=this.find(w);return C?C.remove():this},v.get=function(w){for(var C=this._compare,x=this.root;x;){var _=C(w,x.key);if(_===0)return x.value;_<=0?x=x.left:x=x.right}};function b(w,C){this.tree=w,this._stack=C}var g=b.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new b(this.tree,this._stack.slice())};function T(w,C){w.key=C.key,w.value=C.value,w.left=C.left,w.right=C.right,w._color=C._color,w._count=C._count}function S(w){for(var C,x,_,k,E=w.length-1;E>=0;--E){if(C=w[E],E===0){C._color=i;return}if(x=w[E-1],x.left===C){if(_=x.right,_.right&&_.right._color===f){if(_=x.right=u(_),k=_.right=u(_.right),x.right=_.left,_.left=x,_.right=k,_._color=x._color,C._color=i,x._color=i,k._color=i,h(x),h(_),E>1){var I=w[E-2];I.left===x?I.left=_:I.right=_}w[E-1]=_;return}else if(_.left&&_.left._color===f){if(_=x.right=u(_),k=_.left=u(_.left),x.right=k.left,_.left=k.right,k.left=x,k.right=_,k._color=x._color,x._color=i,_._color=i,C._color=i,h(x),h(_),h(k),E>1){var I=w[E-2];I.left===x?I.left=k:I.right=k}w[E-1]=k;return}if(_._color===i)if(x._color===f){x._color=i,x.right=c(f,_);return}else{x.right=c(f,_);continue}else{if(_=u(_),x.right=_.left,_.left=x,_._color=x._color,x._color=f,h(x),h(_),E>1){var I=w[E-2];I.left===x?I.left=_:I.right=_}w[E-1]=_,w[E]=x,E+11){var I=w[E-2];I.right===x?I.right=_:I.left=_}w[E-1]=_;return}else if(_.right&&_.right._color===f){if(_=x.left=u(_),k=_.right=u(_.right),x.left=k.right,_.right=k.left,k.right=x,k.left=_,k._color=x._color,x._color=i,_._color=i,C._color=i,h(x),h(_),h(k),E>1){var I=w[E-2];I.right===x?I.right=k:I.left=k}w[E-1]=k;return}if(_._color===i)if(x._color===f){x._color=i,x.left=c(f,_);return}else{x.left=c(f,_);continue}else{if(_=u(_),x.left=_.right,_.right=x,_._color=x._color,x._color=f,h(x),h(_),E>1){var I=w[E-2];I.right===x?I.right=_:I.left=_}w[E-1]=_,w[E]=x,E+1=0;--_){var x=w[_];x.left===w[_+1]?C[_]=new l(x._color,x.key,x.value,C[_+1],x.right,x._count):C[_]=new l(x._color,x.key,x.value,x.left,C[_+1],x._count)}if(x=C[C.length-1],x.left&&x.right){var k=C.length;for(x=x.left;x.right;)C.push(x),x=x.right;var E=C[k-1];C.push(new l(x._color,E.key,E.value,x.left,x.right,x._count)),C[k-1].key=x.key,C[k-1].value=x.value;for(var _=C.length-2;_>=k;--_)x=C[_],C[_]=new l(x._color,x.key,x.value,x.left,C[_+1],x._count);C[k-1].left=C[k]}if(x=C[C.length-1],x._color===f){var I=C[C.length-2];I.left===x?I.left=null:I.right===x&&(I.right=null),C.pop();for(var _=0;_0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var w=0,C=this._stack;if(C.length===0){var x=this.tree.root;return x?x._count:0}else C[C.length-1].left&&(w=C[C.length-1].left._count);for(var _=C.length-2;_>=0;--_)C[_+1]===C[_].right&&(++w,C[_].left&&(w+=C[_].left._count));return w},enumerable:!0}),g.next=function(){var w=this._stack;if(w.length!==0){var C=w[w.length-1];if(C.right)for(C=C.right;C;)w.push(C),C=C.left;else for(w.pop();w.length>0&&w[w.length-1].right===C;)C=w[w.length-1],w.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var C=w.length-1;C>0;--C)if(w[C-1].left===w[C])return!0;return!1}}),g.update=function(w){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var x=new Array(C.length),_=C[C.length-1];x[x.length-1]=new l(_._color,_.key,w,_.left,_.right,_._count);for(var k=C.length-2;k>=0;--k)_=C[k],_.left===C[k+1]?x[k]=new l(_._color,_.key,_.value,x[k+1],_.right,_._count):x[k]=new l(_._color,_.key,_.value,_.left,x[k+1],_._count);return new d(this.tree._compare,x[0])},g.prev=function(){var w=this._stack;if(w.length!==0){var C=w[w.length-1];if(C.left)for(C=C.left;C;)w.push(C),C=C.right;else for(w.pop();w.length>0&&w[w.length-1].left===C;)C=w[w.length-1],w.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var C=w.length-1;C>0;--C)if(w[C-1].right===w[C])return!0;return!1}});function A(w,C){return wC?1:0}function M(w){return new d(w||A,null)}}),7453:(function(a,f,i){a.exports=_;var l=i(9557),u=i(1681),c=i(1011),h=i(2864),d=i(8468),v=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function p(k,E){return k[0]=E[0],k[1]=E[1],k[2]=E[2],k}function m(k){this.gl=k,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=c(k)}var y=m.prototype;y.update=function(k){k=k||{};function E(ne,te,Z){if(Z in k){var G=k[Z],j=this[Z],Y;(ne?Array.isArray(G)&&Array.isArray(G[0]):Array.isArray(G))?this[Z]=Y=[te(G[0]),te(G[1]),te(G[2])]:this[Z]=Y=[te(G),te(G),te(G)];for(var K=0;K<3;++K)if(Y[K]!==j[K])return!0}return!1}var I=E.bind(this,!1,Number),F=E.bind(this,!1,Boolean),D=E.bind(this,!1,String),z=E.bind(this,!0,function(ne){if(Array.isArray(ne)){if(ne.length===3)return[+ne[0],+ne[1],+ne[2],1];if(ne.length===4)return[+ne[0],+ne[1],+ne[2],+ne[3]]}return[0,0,0,1]}),N,q=!1,P=!1;if("bounds"in k)for(var B=k.bounds,$=0;$<2;++$)for(var Q=0;Q<3;++Q)B[$][Q]!==this.bounds[$][Q]&&(P=!0),this.bounds[$][Q]=B[$][Q];if("ticks"in k){N=k.ticks,q=!0,this.autoTicks=!1;for(var $=0;$<3;++$)this.tickSpacing[$]=0}else I("tickSpacing")&&(this.autoTicks=!0,P=!0);if(this._firstInit&&("ticks"in k||"tickSpacing"in k||(this.autoTicks=!0),P=!0,q=!0,this._firstInit=!1),P&&this.autoTicks&&(N=d.create(this.bounds,this.tickSpacing),q=!0),q){for(var $=0;$<3;++$)N[$].sort(function(te,Z){return te.x-Z.x});d.equal(N,this.ticks)?q=!1:this.ticks=N}F("tickEnable"),D("tickFont")&&(q=!0),I("tickSize"),I("tickAngle"),I("tickPad"),z("tickColor");var J=D("labels");D("labelFont")&&(J=!0),F("labelEnable"),I("labelSize"),I("labelPad"),z("labelColor"),F("lineEnable"),F("lineMirror"),I("lineWidth"),z("lineColor"),F("lineTickEnable"),F("lineTickMirror"),I("lineTickLength"),I("lineTickWidth"),z("lineTickColor"),F("gridEnable"),I("gridWidth"),z("gridColor"),F("zeroEnable"),z("zeroLineColor"),I("zeroLineWidth"),F("backgroundEnable"),z("backgroundColor"),this._text?this._text&&(J||q)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=l(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&q&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function b(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var g=[new b,new b,new b];function T(k,E,I,F,D){for(var z=k.primalOffset,N=k.primalMinor,q=k.mirrorOffset,P=k.mirrorMinor,B=F[E],$=0;$<3;++$)if(E!==$){var Q=z,J=q,ne=N,te=P;B&1<<$&&(Q=q,J=z,ne=P,te=N),Q[$]=I[0][$],J[$]=I[1][$],D[$]>0?(ne[$]=-1,te[$]=0):(ne[$]=0,te[$]=1)}}var S=[0,0,0],A={model:v,view:v,projection:v,_ortho:!1};y.isOpaque=function(){return!0},y.isTransparent=function(){return!1},y.drawTransparent=function(k){};var M=0,w=[0,0,0],C=[0,0,0],x=[0,0,0];y.draw=function(k){k=k||A;for(var j=this.gl,E=k.model||v,I=k.view||v,F=k.projection||v,D=this.bounds,z=k._ortho||!1,N=h(E,I,F,D,z),q=N.cubeEdges,P=N.axis,B=I[12],$=I[13],Q=I[14],J=I[15],ne=z?2:1,te=ne*this.pixelRatio*(F[3]*B+F[7]*$+F[11]*Q+F[15]*J)/j.drawingBufferHeight,Z=0;Z<3;++Z)this.lastCubeProps.cubeEdges[Z]=q[Z],this.lastCubeProps.axis[Z]=P[Z];for(var G=g,Z=0;Z<3;++Z)T(g[Z],Z,this.bounds,q,P);for(var j=this.gl,Y=S,Z=0;Z<3;++Z)this.backgroundEnable[Z]?Y[Z]=P[Z]:Y[Z]=0;this._background.draw(E,I,F,D,Y,this.backgroundColor),this._lines.bind(E,I,F,this);for(var Z=0;Z<3;++Z){var K=[0,0,0];P[Z]>0?K[Z]=D[1][Z]:K[Z]=D[0][Z];for(var X=0;X<2;++X){var ee=(Z+1+X)%3,le=(Z+1+(X^1))%3;this.gridEnable[ee]&&this._lines.drawGrid(ee,le,this.bounds,K,this.gridColor[ee],this.gridWidth[ee]*this.pixelRatio)}for(var X=0;X<2;++X){var ee=(Z+1+X)%3,le=(Z+1+(X^1))%3;this.zeroEnable[le]&&Math.min(D[0][le],D[1][le])<=0&&Math.max(D[0][le],D[1][le])>=0&&this._lines.drawZero(ee,le,this.bounds,K,this.zeroLineColor[le],this.zeroLineWidth[le]*this.pixelRatio)}}for(var Z=0;Z<3;++Z){this.lineEnable[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].primalOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio),this.lineMirror[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].mirrorOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio);for(var oe=p(w,G[Z].primalMinor),fe=p(C,G[Z].mirrorMinor),de=this.lineTickLength,X=0;X<3;++X){var _e=te/E[5*X];oe[X]*=de[X]*_e,fe[X]*=de[X]*_e}this.lineTickEnable[Z]&&this._lines.drawAxisTicks(Z,G[Z].primalOffset,oe,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio),this.lineTickMirror[Z]&&this._lines.drawAxisTicks(Z,G[Z].mirrorOffset,fe,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio)}this._lines.unbind(),this._text.bind(E,I,F,this.pixelRatio);var we,Oe=.5,be,Te;function ke(Qe){Te=[0,0,0],Te[Qe]=1}function Ee(Qe,De,me){var Ce=(Qe+1)%3,et=(Qe+2)%3,st=De[Ce],ot=De[et],ut=me[Ce],ht=me[et];if(st>0&&ht>0){ke(Ce);return}else if(st>0&&ht<0){ke(Ce);return}else if(st<0&&ht>0){ke(Ce);return}else if(st<0&&ht<0){ke(Ce);return}else if(ot>0&&ut>0){ke(et);return}else if(ot>0&&ut<0){ke(et);return}else if(ot<0&&ut>0){ke(et);return}else if(ot<0&&ut<0){ke(et);return}}for(var Z=0;Z<3;++Z){for(var Le=G[Z].primalMinor,Fe=G[Z].mirrorMinor,qe=p(x,G[Z].primalOffset),X=0;X<3;++X)this.lineTickEnable[Z]&&(qe[X]+=te*Le[X]*Math.max(this.lineTickLength[X],0)/E[5*X]);var We=[0,0,0];if(We[Z]=1,this.tickEnable[Z]){this.tickAngle[Z]===-3600?(this.tickAngle[Z]=0,this.tickAlign[Z]="auto"):this.tickAlign[Z]=-1,be=1,we=[this.tickAlign[Z],Oe,be],we[0]==="auto"?we[0]=M:we[0]=parseInt(""+we[0]),Te=[0,0,0],Ee(Z,Le,Fe);for(var X=0;X<3;++X)qe[X]+=te*Le[X]*this.tickPad[X]/E[5*X];this._text.drawTicks(Z,this.tickSize[Z],this.tickAngle[Z],qe,this.tickColor[Z],We,Te,we)}if(this.labelEnable[Z]){be=0,Te=[0,0,0],this.labels[Z].length>4&&(ke(Z),be=1),we=[this.labelAlign[Z],Oe,be],we[0]==="auto"?we[0]=M:we[0]=parseInt(""+we[0]);for(var X=0;X<3;++X)qe[X]+=te*Le[X]*this.labelPad[X]/E[5*X];qe[Z]+=.5*(D[0][Z]+D[1][Z]),this._text.drawLabel(Z,this.labelSize[Z],this.labelAngle[Z],qe,this.labelColor[Z],[0,0,0],Te,we)}}this._text.unbind()},y.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function _(k,E){var I=new m(k);return I.update(E),I}}),1011:(function(a,f,i){a.exports=v;var l=i(5827),u=i(2944),c=i(1943).bg;function h(p,m,y,b){this.gl=p,this.buffer=m,this.vao=y,this.shader=b}var d=h.prototype;d.draw=function(p,m,y,b,g,T){for(var S=!1,A=0;A<3;++A)S=S||g[A];if(S){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:p,view:m,projection:y,bounds:b,enable:g,colors:T},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function v(p){for(var m=[],y=[],b=0,g=0;g<3;++g)for(var T=(g+1)%3,S=(g+2)%3,A=[0,0,0],M=[0,0,0],w=-1;w<=1;w+=2){y.push(b,b+2,b+1,b+1,b+2,b+3),A[g]=w,M[g]=w;for(var C=-1;C<=1;C+=2){A[T]=C;for(var x=-1;x<=1;x+=2)A[S]=x,m.push(A[0],A[1],A[2],M[0],M[1],M[2]),b+=1}var _=T;T=S,S=_}var k=l(p,new Float32Array(m)),E=l(p,new Uint16Array(y),p.ELEMENT_ARRAY_BUFFER),I=u(p,[{buffer:k,type:p.FLOAT,size:3,offset:0,stride:24},{buffer:k,type:p.FLOAT,size:3,offset:12,stride:24}],E),F=c(p);return F.attributes.position.location=0,F.attributes.normal.location=1,new h(p,k,I,F)}}),2864:(function(a,f,i){a.exports=w;var l=i(2288),u=i(104),c=i(4670),h=i(417),d=new Array(16),v=new Array(8),p=new Array(8),m=new Array(3),y=[0,0,0];(function(){for(var C=0;C<8;++C)v[C]=[1,1,1,1],p[C]=[1,1,1]})();function b(C,x,_){for(var k=0;k<4;++k){C[k]=_[12+k];for(var E=0;E<3;++E)C[k]+=x[E]*_[4*E+k]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function T(C){for(var x=0;xJ&&(N|=1<J){N|=1<p[F][1])&&(X=F);for(var ee=-1,F=0;F<3;++F){var le=X^1<p[oe][0]&&(oe=le)}}var fe=S;fe[0]=fe[1]=fe[2]=0,fe[l.log2(ee^X)]=X&ee,fe[l.log2(X^oe)]=X&oe;var de=oe^7;de===N||de===K?(de=ee^7,fe[l.log2(oe^de)]=de&oe):fe[l.log2(ee^de)]=deⅇfor(var _e=A,we=N,B=0;B<3;++B)we&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +}`]),v=l([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);f.f=function(y){return u(y,d,v,null,[{name:"position",type:"vec3"}])};var p=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * view * model * vec4(nPosition, 1.0); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +}`]),m=l([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);f.bg=function(y){return u(y,p,m,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),9557:(function(a,f,i){a.exports=T;var l=i(5827),u=i(2944),c=i(875),h=i(1943).f,d=window||Ya.global||{},v=d.__TEXT_CACHE||{};d.__TEXT_CACHE={};var p=3;function m(S,A,M,w){this.gl=S,this.shader=A,this.buffer=M,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var y=m.prototype,b=[0,0];y.bind=function(S,A,M,w){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=S,C.view=A,C.projection=M,C.pixelScale=w,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},y.unbind=function(){this.vao.unbind()},y.update=function(S,A,M,w,C){var x=[];function _(P,B,$,Q,J,ne){var te=v[$];te||(te=v[$]={});var Z=te[B];Z||(Z=te[B]=g(B,{triangles:!0,font:$,textAlign:"center",textBaseline:"middle",lineSpacing:J,styletags:ne}));for(var G=(Q||12)/12,j=Z.positions,Y=Z.cells,K=0,X=Y.length;K=0;--le){var oe=j[ee[le]];x.push(G*oe[0],-G*oe[1],P)}}for(var k=[0,0,0],E=[0,0,0],I=[0,0,0],F=[0,0,0],D=1.25,z={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},N=0;N<3;++N){I[N]=x.length/p|0,_(.5*(S[0][N]+S[1][N]),A[N],M[N],12,D,z),F[N]=(x.length/p|0)-I[N],k[N]=x.length/p|0;for(var q=0;q=0&&(p=d.length-v-1);var m=Math.pow(10,p),y=Math.round(c*h*m),b=y+"";if(b.indexOf("e")>=0)return b;var g=y/m,T=y%m;y<0?(g=-Math.ceil(g)|0,T=-T|0):(g=Math.floor(g)|0,T=T|0);var S=""+g;if(y<0&&(S="-"+S),p){for(var A=""+T;A.length=c[0][v];--m)p.push({x:m*h[v],text:i(h[v],m)});d.push(p)}return d}function u(c,h){for(var d=0;d<3;++d){if(c[d].length!==h[d].length)return!1;for(var v=0;vS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(T,w,M),S}function m(g,T){for(var S=l.malloc(g.length,T),A=g.length,M=0;M=0;--A){if(T[A]!==S)return!1;S*=g[A]}return!0}v.update=function(g,T){if(typeof T!="number"&&(T=-1),this.bind(),typeof g=="object"&&typeof g.shape<"u"){var S=g.dtype;if(h.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&S!=="uint16"?S="uint32":S="uint16"}if(S===g.dtype&&y(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,g.data,T):this.length=p(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),T);else{var M=l.malloc(g.size,S),w=c(M,g.shape);u.assign(w,g),T<0?this.length=p(this.gl,this.type,this.length,this.usage,M,T):this.length=p(this.gl,this.type,this.length,this.usage,M.subarray(0,g.size),T),l.free(M)}}else if(Array.isArray(g)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=m(g,"uint16"):C=m(g,"float32"),T<0?this.length=p(this.gl,this.type,this.length,this.usage,C,T):this.length=p(this.gl,this.type,this.length,this.usage,C.subarray(0,g.length),T),l.free(C)}else if(typeof g=="object"&&typeof g.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,g,T);else if(typeof g=="number"||g===void 0){if(T>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function b(g,T,S,A){if(S=S||g.ARRAY_BUFFER,A=A||g.DYNAMIC_DRAW,S!==g.ARRAY_BUFFER&&S!==g.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==g.DYNAMIC_DRAW&&A!==g.STATIC_DRAW&&A!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=g.createBuffer(),w=new d(g,S,M,0,A);return w.update(T),w}a.exports=b}),1140:(function(a,f,i){var l=i(2858);a.exports=function(c,h){var d=c.positions,v=c.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:c.vertexIntensityBounds,vectors:[],cells:[],coneOffset:c.coneOffset,colormap:c.colormap};if(c.positions.length===0)return h&&(h[0]=[0,0,0],h[1]=[0,0,0]),p;for(var m=0,y=1/0,b=-1/0,g=1/0,T=-1/0,S=1/0,A=-1/0,M=null,w=null,C=[],x=1/0,_=!1,k=0;km&&(m=l.length(I)),k){var F=2*l.distance(M,E)/(l.length(w)+l.length(I));F?(x=Math.min(x,F),_=!1):_=!0}_||(M=E,w=I),C.push(I)}var D=[y,g,S],z=[b,T,A];h&&(h[0]=D,h[1]=z),m===0&&(m=1);var N=1/m;isFinite(x)||(x=1),p.vectorScale=x;var q=c.coneSize||.5;c.absoluteConeSize&&(q=c.absoluteConeSize*N),p.coneScale=q;for(var k=0,P=0;k=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(C){this.pickId=C};function T(C){for(var x=m({colormap:C,nshades:256,format:"rgba"}),_=new Uint8Array(256*4),k=0;k<256;++k){for(var E=x[k],I=0;I<3;++I)_[4*k+I]=E[I];_[4*k+3]=E[3]*255}return p(_,[256,256,4],[4,0,1])}function S(C){for(var x=C.length,_=new Array(x),k=0;k0){var B=this.triShader;B.bind(),B.uniforms=D,this.triangleVAO.bind(),x.drawArrays(x.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(C){C=C||{};for(var x=this.gl,_=C.model||y,k=C.view||y,E=C.projection||y,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],F=0;F<3;++F)I[0][F]=Math.max(I[0][F],this.clipBounds[0][F]),I[1][F]=Math.min(I[1][F],this.clipBounds[1][F]);this._model=[].slice.call(_),this._view=[].slice.call(k),this._projection=[].slice.call(E),this._resolution=[x.drawingBufferWidth,x.drawingBufferHeight];var D={model:_,view:k,projection:E,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},z=this.pickShader;z.bind(),z.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),x.drawArrays(x.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(C){if(!C||C.id!==this.pickId)return null;var x=C.value[0]+256*C.value[1]+65536*C.value[2],_=this.cells[x],k=this.positions[_[1]].slice(0,3),E={position:k,dataCoordinate:k,index:Math.floor(_[1]/48)};return this.traceType==="cone"?E.index=Math.floor(_[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[_[1]],E.velocity=this.vectors[_[1]].slice(0,3),E.divergence=this.vectors[_[1]][3],E.index=x),E},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(C,x){var _=l(C,x.meshShader.vertex,x.meshShader.fragment,null,x.meshShader.attributes);return _.attributes.position.location=0,_.attributes.color.location=2,_.attributes.uv.location=3,_.attributes.vector.location=4,_}function M(C,x){var _=l(C,x.pickShader.vertex,x.pickShader.fragment,null,x.pickShader.attributes);return _.attributes.position.location=0,_.attributes.id.location=1,_.attributes.vector.location=4,_}function w(C,x,_){var k=_.shaders;arguments.length===1&&(x=C,C=x.gl);var E=A(C,k),I=M(C,k),F=h(C,p(new Uint8Array([255,255,255,255]),[1,1,4]));F.generateMipmap(),F.minFilter=C.LINEAR_MIPMAP_LINEAR,F.magFilter=C.LINEAR;var D=u(C),z=u(C),N=u(C),q=u(C),P=u(C),B=c(C,[{buffer:D,type:C.FLOAT,size:4},{buffer:P,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:N,type:C.FLOAT,size:4},{buffer:q,type:C.FLOAT,size:2},{buffer:z,type:C.FLOAT,size:4}]),$=new b(C,F,E,I,D,z,P,N,q,B,_.traceType||"cone");return $.update(x),$}a.exports=w}),7234:(function(a,f,i){var l=i(6832),u=l([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),c=l([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),h=l([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * view * conePosition; + f_id = id; + f_position = position.xyz; +} +`]),d=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);f.meshShader={vertex:u,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},f.pickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),1950:(function(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}}),6603:(function(a,f,i){var l=i(1950);a.exports=function(c){return l[c]}}),3110:(function(a,f,i){a.exports=b;var l=i(5827),u=i(2944),c=i(7667),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(g,T,S,A){this.gl=g,this.shader=A,this.buffer=T,this.vao=S,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var v=d.prototype;v.isOpaque=function(){return!this.hasAlpha},v.isTransparent=function(){return this.hasAlpha},v.drawTransparent=v.draw=function(g){var T=this.gl,S=this.shader.uniforms;this.shader.bind();var A=S.view=g.view||h,M=S.projection=g.projection||h;S.model=g.model||h,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var w=A[12],C=A[13],x=A[14],_=A[15],k=g._ortho||!1,E=k?2:1,I=E*this.pixelRatio*(M[3]*w+M[7]*C+M[11]*x+M[15]*_)/T.drawingBufferHeight;this.vao.bind();for(var F=0;F<3;++F)T.lineWidth(this.lineWidth[F]*this.pixelRatio),S.capSize=this.capSize[F]*I,this.lineCount[F]&&T.drawArrays(T.LINES,this.lineOffset[F],this.lineCount[F]);this.vao.unbind()};function p(g,T){for(var S=0;S<3;++S)g[0][S]=Math.min(g[0][S],T[S]),g[1][S]=Math.max(g[1][S],T[S])}var m=(function(){for(var g=new Array(3),T=0;T<3;++T){for(var S=[],A=1;A<=2;++A)for(var M=-1;M<=1;M+=2){var w=(A+T)%3,C=[0,0,0];C[w]=M,S.push(C)}g[T]=S}return g})();function y(g,T,S,A){for(var M=m[A],w=0;w0){var D=k.slice();D[x]+=I[1][x],M.push(k[0],k[1],k[2],F[0],F[1],F[2],F[3],0,0,0,D[0],D[1],D[2],F[0],F[1],F[2],F[3],0,0,0),p(this.bounds,D),C+=2+y(M,D,F,x)}}}this.lineCount[x]=C-this.lineOffset[x]}this.buffer.update(M)}},v.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(g){var T=g.gl,S=l(T),A=u(T,[{buffer:S,type:T.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:T.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:T.FLOAT,size:3,offset:28,stride:40}]),M=c(T);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var w=new d(T,S,A,M);return w.update(g),w}}),7667:(function(a,f,i){var l=i(6832),u=i(5158),c=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * view * worldPosition; + fragColor = color; + fragPosition = position; +}`]),h=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);a.exports=function(d){return u(d,c,h,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),4234:(function(a,f,i){var l=i(8931);a.exports=C;var u=null,c,h,d,v;function p(x){var _=x.getParameter(x.FRAMEBUFFER_BINDING),k=x.getParameter(x.RENDERBUFFER_BINDING),E=x.getParameter(x.TEXTURE_BINDING_2D);return[_,k,E]}function m(x,_){x.bindFramebuffer(x.FRAMEBUFFER,_[0]),x.bindRenderbuffer(x.RENDERBUFFER,_[1]),x.bindTexture(x.TEXTURE_2D,_[2])}function y(x,_){var k=x.getParameter(_.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(k+1);for(var E=0;E<=k;++E){for(var I=new Array(k),F=0;F1&&z.drawBuffersWEBGL(u[D]);var $=k.getExtension("WEBGL_depth_texture");$?N?x.depth=g(k,I,F,$.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):q&&(x.depth=g(k,I,F,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):q&&N?x._depth_rb=T(k,I,F,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):q?x._depth_rb=T(k,I,F,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):N&&(x._depth_rb=T(k,I,F,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var Q=k.checkFramebufferStatus(k.FRAMEBUFFER);if(Q!==k.FRAMEBUFFER_COMPLETE){x._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(x.handle),x.handle=null,x.depth&&(x.depth.dispose(),x.depth=null),x._depth_rb&&(k.deleteRenderbuffer(x._depth_rb),x._depth_rb=null);for(var B=0;BI||k<0||k>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");x._shape[0]=_,x._shape[1]=k;for(var F=p(E),D=0;DF||k<0||k>F)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var D=1;if("color"in E){if(D=Math.max(E.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(I){if(D>x.getParameter(I.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var z=x.UNSIGNED_BYTE,N=x.getExtension("OES_texture_float");if(E.float&&D>0){if(!N)throw new Error("gl-fbo: Context does not support floating point textures");z=x.FLOAT}else E.preferFloat&&D>0&&N&&(z=x.FLOAT);var q=!0;"depth"in E&&(q=!!E.depth);var P=!1;return"stencil"in E&&(P=!!E.stencil),new A(x,_,k,z,D,q,P,I)}}),3530:(function(a,f,i){var l=i(8974).sprintf,u=i(6603),c=i(9365),h=i(8008);a.exports=d;function d(v,p,m){var y=c(p)||"of unknown name (see npm glsl-shader-name)",b="unknown type";m!==void 0&&(b=m===u.FRAGMENT_SHADER?"fragment":"vertex");for(var g=l(`Error compiling %s shader %s: +`,b,y),T=l("%s%s",g,v),S=v.split(` +`),A={},M=0;M>D*8&255;this.pickOffset=S,M.bind();var z=M.uniforms;z.viewTransform=g,z.pickOffset=T,z.shape=this.shape;var N=M.attributes;return this.positionBuffer.bind(),N.position.pointer(),this.weightBuffer.bind(),N.weight.pointer(x.UNSIGNED_BYTE,!1),this.idBuffer.bind(),N.pickId.pointer(x.UNSIGNED_BYTE,!1),x.drawArrays(x.TRIANGLES,0,C),S+this.shape[0]*this.shape[1]}}})(),m.pick=function(g,T,S){var A=this.pickOffset,M=this.shape[0]*this.shape[1];if(S=A+M)return null;var w=S-A,C=this.xData,x=this.yData;return{object:this,pointId:w,dataCoord:[C[w%this.shape[0]],x[w/this.shape[0]|0]]}},m.update=function(g){g=g||{};var T=g.shape||[0,0],S=g.x||u(T[0]),A=g.y||u(T[1]),M=g.z||new Float32Array(T[0]*T[1]),w=g.zsmooth!==!1;this.xData=S,this.yData=A;var C=g.colorLevels||[0],x=g.colorValues||[0,0,0,1],_=C.length,k=this.bounds,E,I,F,D;w?(E=k[0]=S[0],I=k[1]=A[0],F=k[2]=S[S.length-1],D=k[3]=A[A.length-1]):(E=k[0]=S[0]+(S[1]-S[0])/2,I=k[1]=A[0]+(A[1]-A[0])/2,F=k[2]=S[S.length-1]+(S[S.length-1]-S[S.length-2])/2,D=k[3]=A[A.length-1]+(A[A.length-1]-A[A.length-2])/2);var z=1/(F-E),N=1/(D-I),q=T[0],P=T[1];this.shape=[q,P];var B=(w?(q-1)*(P-1):q*P)*(y.length>>>1);this.numVertices=B;for(var $=c.mallocUint8(B*4),Q=c.mallocFloat32(B*2),J=c.mallocUint8(B*2),ne=c.mallocUint32(B),te=0,Z=w?q-1:q,G=w?P-1:P,j=0;j max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),d=l([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),v=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];f.createShader=function(p){return u(p,c,h,null,v)},f.createPickShader=function(p){return u(p,c,d,null,v)}}),6086:(function(a,f,i){a.exports=x;var l=i(5827),u=i(2944),c=i(8931),h=new Uint8Array(4),d=new Float32Array(h.buffer);function v(_,k,E,I){return h[0]=I,h[1]=E,h[2]=k,h[3]=_,d[0]}var p=i(5070),m=i(5050),y=i(248),b=y.createShader,g=y.createPickShader,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(_,k){for(var E=0,I=0;I<3;++I){var F=_[I]-k[I];E+=F*F}return Math.sqrt(E)}function A(_){for(var k=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)k[0][E]=Math.max(_[0][E],k[0][E]),k[1][E]=Math.min(_[1][E],k[1][E]);return k}function M(_,k,E,I){this.arcLength=_,this.position=k,this.index=E,this.dataCoordinate=I}function w(_,k,E,I,F,D){this.gl=_,this.shader=k,this.pickShader=E,this.buffer=I,this.vao=F,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=D,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=w.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(_){this.pickId=_},C.drawTransparent=C.draw=function(_){if(this.vertexCount){var k=this.gl,E=this.shader,I=this.vao;E.bind(),E.uniforms={model:_.model||T,view:_.view||T,projection:_.projection||T,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[k.drawingBufferWidth,k.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(k.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},C.drawPick=function(_){if(this.vertexCount){var k=this.gl,E=this.pickShader,I=this.vao;E.bind(),E.uniforms={model:_.model||T,view:_.view||T,projection:_.projection||T,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[k.drawingBufferWidth,k.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(k.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},C.update=function(_){var k,E;this.dirty=!0;var I=!!_.connectGaps;"dashScale"in _&&(this.dashScale=_.dashScale),this.hasAlpha=!1,"opacity"in _&&(this.opacity=+_.opacity,this.opacity<1&&(this.hasAlpha=!0));var F=[],D=[],z=[],N=0,q=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],B=_.position||_.positions;if(B){var $=_.color||_.colors||[0,0,0,1],Q=_.lineWidth||1,J=!1;e:for(k=1;k0){for(var Z=0;Z<24;++Z)F.push(F[F.length-12]);q+=2,J=!0}continue e}P[0][E]=Math.min(P[0][E],ne[E],te[E]),P[1][E]=Math.max(P[1][E],ne[E],te[E])}var G,j;Array.isArray($[0])?(G=$.length>k-1?$[k-1]:$.length>0?$[$.length-1]:[0,0,0,1],j=$.length>k?$[k]:$.length>0?$[$.length-1]:[0,0,0,1]):G=j=$,G.length===3&&(G=[G[0],G[1],G[2],1]),j.length===3&&(j=[j[0],j[1],j[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var Y;Array.isArray(Q)?Y=Q.length>k-1?Q[k-1]:Q.length>0?Q[Q.length-1]:[0,0,0,1]:Y=Q;var K=N;if(N+=S(ne,te),J){for(E=0;E<2;++E)F.push(ne[0],ne[1],ne[2],te[0],te[1],te[2],K,Y,G[0],G[1],G[2],G[3]);q+=2,J=!1}F.push(ne[0],ne[1],ne[2],te[0],te[1],te[2],K,Y,G[0],G[1],G[2],G[3],ne[0],ne[1],ne[2],te[0],te[1],te[2],K,-Y,G[0],G[1],G[2],G[3],te[0],te[1],te[2],ne[0],ne[1],ne[2],N,-Y,j[0],j[1],j[2],j[3],te[0],te[1],te[2],ne[0],ne[1],ne[2],N,Y,j[0],j[1],j[2],j[3]),q+=4}}if(this.buffer.update(F),D.push(N),z.push(B[B.length-1].slice()),this.bounds=P,this.vertexCount=q,this.points=z,this.arcLength=D,"dashes"in _){var X=_.dashes,ee=X.slice();for(ee.unshift(0),k=1;k1.0001)return null;E+=k[M]}return Math.abs(E-1)>.001?null:[w,v(m,k),k]}}),2056:(function(a,f,i){var l=i(6832),u=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * view * model * vec4(p, 1.0); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),c=l([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),h=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_color = color; + f_data = position; + f_uv = uv; +}`]),d=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),v=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),p=l([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),m=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_id = id; + f_position = position; +}`]),y=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),b=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),g=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); +}`]),T=l([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);f.meshShader={vertex:u,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},f.wireShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},f.pointShader={vertex:v,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},f.pickShader={vertex:m,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},f.pointPickShader={vertex:b,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},f.contourShader={vertex:g,fragment:T,attributes:[{name:"position",type:"vec3"}]}}),8116:(function(a,f,i){var l=1e-6,u=1e-6,c=i(5158),h=i(5827),d=i(2944),v=i(8931),p=i(115),m=i(104),y=i(7437),b=i(5050),g=i(9156),T=i(7212),S=i(5306),A=i(2056),M=i(4340),w=A.meshShader,C=A.wireShader,x=A.pointShader,_=A.pickShader,k=A.pointPickShader,E=A.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function F(Z,G,j,Y,K,X,ee,le,oe,fe,de,_e,we,Oe,be,Te,ke,Ee,Le,Fe,qe,We,Qe,De,me,Ce,et){this.gl=Z,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=j,this.lineShader=Y,this.pointShader=K,this.pickShader=X,this.pointPickShader=ee,this.contourShader=le,this.trianglePositions=oe,this.triangleColors=de,this.triangleNormals=we,this.triangleUVs=_e,this.triangleIds=fe,this.triangleVAO=Oe,this.triangleCount=0,this.lineWidth=1,this.edgePositions=be,this.edgeColors=ke,this.edgeUVs=Ee,this.edgeIds=Te,this.edgeVAO=Le,this.edgeCount=0,this.pointPositions=Fe,this.pointColors=We,this.pointUVs=Qe,this.pointSizes=De,this.pointIds=qe,this.pointVAO=me,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ce,this.contourVAO=et,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=I,this._view=I,this._projection=I,this._resolution=[1,1]}var D=F.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(Z){this.pickId=Z};function z(Z,G){if(!G||!G.length)return 1;for(var j=0;jZ&&j>0){var Y=(G[j][0]-Z)/(G[j][0]-G[j-1][0]);return G[j][1]*(1-Y)+Y*G[j-1][1]}}return 1}function N(Z,G){for(var j=g({colormap:Z,nshades:256,format:"rgba"}),Y=new Uint8Array(256*4),K=0;K<256;++K){for(var X=j[K],ee=0;ee<3;++ee)Y[4*K+ee]=X[ee];G?Y[4*K+3]=255*z(K/255,G):Y[4*K+3]=255*X[3]}return b(Y,[256,256,4],[4,0,1])}function q(Z){for(var G=Z.length,j=new Array(G),Y=0;Y0){var we=this.triShader;we.bind(),we.uniforms=le,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=le,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=le,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=le,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(Z){Z=Z||{};for(var G=this.gl,j=Z.model||I,Y=Z.view||I,K=Z.projection||I,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ee=0;ee<3;++ee)X[0][ee]=Math.max(X[0][ee],this.clipBounds[0][ee]),X[1][ee]=Math.min(X[1][ee],this.clipBounds[1][ee]);this._model=[].slice.call(j),this._view=[].slice.call(Y),this._projection=[].slice.call(K),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var le={model:j,view:Y,projection:K,clipBounds:X,pickId:this.pickId/255},oe=this.pickShader;if(oe.bind(),oe.uniforms=le,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var oe=this.pointPickShader;oe.bind(),oe.uniforms=le,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;for(var G=Z.value[0]+256*Z.value[1]+65536*Z.value[2],j=this.cells[G],Y=this.positions,K=new Array(j.length),X=0;Xw[J]&&(A.uniforms.dataAxis=y,A.uniforms.screenOffset=b,A.uniforms.color=D[T],A.uniforms.angle=z[T],C.drawArrays(C.TRIANGLES,w[J],w[ne]-w[J]))),N[T]&&Q&&(b[T^1]-=te*E*q[T],A.uniforms.dataAxis=g,A.uniforms.screenOffset=b,A.uniforms.color=P[T],A.uniforms.angle=B[T],C.drawArrays(C.TRIANGLES,$,Q)),b[T^1]=te*x[2+(T^1)]-1,I[T+2]&&(b[T^1]+=te*E*F[T+2],Jw[J]&&(A.uniforms.dataAxis=y,A.uniforms.screenOffset=b,A.uniforms.color=D[T+2],A.uniforms.angle=z[T+2],C.drawArrays(C.TRIANGLES,w[J],w[ne]-w[J]))),N[T+2]&&Q&&(b[T^1]+=te*E*q[T+2],A.uniforms.dataAxis=g,A.uniforms.screenOffset=b,A.uniforms.color=P[T+2],A.uniforms.angle=B[T+2],C.drawArrays(C.TRIANGLES,$,Q))}})(),p.drawTitle=(function(){var y=[0,0],b=[0,0];return function(){var g=this.plot,T=this.shader,S=g.gl,A=g.screenBox,M=g.titleCenter,w=g.titleAngle,C=g.titleColor,x=g.pixelRatio;if(this.titleCount){for(var _=0;_<2;++_)b[_]=2*(M[_]*x-A[_])/(A[2+_]-A[_])-1;T.bind(),T.uniforms.dataAxis=y,T.uniforms.screenOffset=b,T.uniforms.angle=w,T.uniforms.color=C,S.drawArrays(S.TRIANGLES,this.titleOffset,this.titleCount)}}})(),p.bind=(function(){var y=[0,0],b=[0,0],g=[0,0];return function(){var T=this.plot,S=this.shader,A=T._tickBounds,M=T.dataBox,w=T.screenBox,C=T.viewBox;S.bind();for(var x=0;x<2;++x){var _=A[x],k=A[x+2],E=k-_,I=.5*(M[x+2]+M[x]),F=M[x+2]-M[x],D=C[x],z=C[x+2],N=z-D,q=w[x],P=w[x+2],B=P-q;b[x]=2*E/F*N/B,y[x]=2*(_-I)/F*N/B}g[1]=2*T.pixelRatio/(w[3]-w[1]),g[0]=g[1]*(w[3]-w[1])/(w[2]-w[0]),S.uniforms.dataScale=b,S.uniforms.dataShift=y,S.uniforms.textScale=g,this.vbo.bind(),S.attributes.textCoordinate.pointer()}})(),p.update=function(y){var b=[],g=y.ticks,T=y.bounds,S,A,M,w,C;for(C=0;C<2;++C){var x=[Math.floor(b.length/3)],_=[-1/0],k=g[C];for(S=0;S=0))){var N=T[z]-A[z]*(T[z+2]-T[z])/(A[z+2]-A[z]);z===0?C.drawLine(N,T[1],N,T[3],D[z],F[z]):C.drawLine(T[0],N,T[2],N,D[z],F[z])}}for(var z=0;z<_.length;++z)_[z].draw();g.viewport(T[0],T[1],T[2]-T[0],T[3]-T[1]),g.scissor(T[0],T[1],T[2]-T[0],T[3]-T[1]),this.grid.drawTickMarks(),C.bind();var q=this.borderLineEnable,P=this.borderLineWidth,B=this.borderLineColor;q[1]&&C.drawLine(S[0],S[1]-.5*P[1]*M,S[0],S[3]+.5*P[3]*M,P[1],B[1]),q[0]&&C.drawLine(S[0]-.5*P[0]*M,S[1],S[2]+.5*P[2]*M,S[1],P[0],B[0]),q[3]&&C.drawLine(S[2],S[1]-.5*P[1]*M,S[2],S[3]+.5*P[3]*M,P[3],B[3]),q[2]&&C.drawLine(S[0]-.5*P[0]*M,S[3],S[2]+.5*P[2]*M,S[3],P[2],B[2]),x.bind();for(var z=0;z<2;++z)x.drawTicks(z);this.titleEnable&&x.drawTitle();for(var $=this.overlays,z=0;z<$.length;++z)$[z].draw();g.disable(g.SCISSOR_TEST),g.disable(g.BLEND),g.depthMask(!0)}}})(),p.drawPick=(function(){return function(){if(!this.static){var g=this.pickBuffer;this.gl,this._pickTimeout=null,g.begin();for(var T=1,S=this.objects,A=0;A=0;--g)this.objects[g].dispose();this.objects.length=0;for(var g=this.overlays.length-1;g>=0;--g)this.overlays[g].dispose();this.overlays.length=0,this.gl=null},p.addObject=function(g){this.objects.indexOf(g)<0&&(this.objects.push(g),this.setDirty())},p.removeObject=function(g){for(var T=this.objects,S=0;SMath.abs(_))g.rotate(I,0,0,-x*k*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var F=-w.zoomSpeed*E*_/window.innerHeight*(I-g.lastT())/20;g.pan(I,0,0,S*(Math.exp(F)-1))}}},!0)},w.enableMouseListeners(),w}}),8245:(function(a,f,i){var l=i(6832),u=i(5158),c=l([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),h=l([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);a.exports=function(d){return u(d,c,h,null,[{name:"position",type:"vec2"}])}}),1059:(function(a,f,i){var l=i(4296),u=i(7453),c=i(2771),h=i(6496),d=i(2611),v=i(4234),p=i(8126),m=i(6145),y=i(1120),b=i(5268),g=i(8245),T=i(2321)({tablet:!0,featureDetect:!0});a.exports={createScene:C,createCamera:l};function S(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(_,k){var E=null;try{E=_.getContext("webgl",k),E||(E=_.getContext("experimental-webgl",k))}catch{return null}return E}function M(_){var k=Math.round(Math.log(Math.abs(_))/Math.log(10));if(k<0){var E=Math.round(Math.pow(10,-k));return Math.ceil(_*E)/E}else if(k>0){var E=Math.round(Math.pow(10,k));return Math.ceil(_/E)*E}return Math.ceil(_)}function w(_){return typeof _=="boolean"?_:!0}function C(_){_=_||{},_.camera=_.camera||{};var k=_.canvas;if(!k)if(k=document.createElement("canvas"),_.container){var E=_.container;E.appendChild(k)}else document.body.appendChild(k);var I=_.gl;if(I||(_.glOptions&&(T=!!_.glOptions.preserveDrawingBuffer),I=A(k,_.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:T})),!I)throw new Error("webgl not supported");var F=_.bounds||[[-10,-10,-10],[10,10,10]],D=new S,z=v(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!T}),N=g(I),q=_.cameraObject&&_.cameraObject._ortho===!0||_.camera.projection&&_.camera.projection.type==="orthographic"||!1,P={eye:_.camera.eye||[2,0,0],center:_.camera.center||[0,0,0],up:_.camera.up||[0,1,0],zoomMin:_.camera.zoomMax||.1,zoomMax:_.camera.zoomMin||100,mode:_.camera.mode||"turntable",_ortho:q},B=_.axes||{},$=u(I,B);$.enable=!B.disable;var Q=_.spikes||{},J=h(I,Q),ne=[],te=[],Z=[],G=[],j=!0,ee=!0,Y=new Array(16),K=new Array(16),X={view:null,projection:Y,model:K,_ortho:!1},ee=!0,le=[I.drawingBufferWidth,I.drawingBufferHeight],oe=_.cameraObject||l(k,P),fe={gl:I,contextLost:!1,pixelRatio:_.pixelRatio||1,canvas:k,selection:D,camera:oe,axes:$,axesPixels:null,spikes:J,bounds:F,objects:ne,shape:le,aspect:_.aspectRatio||[1,1,1],pickRadius:_.pickRadius||10,zNear:_.zNear||.01,zFar:_.zFar||1e3,fovy:_.fovy||Math.PI/4,clearColor:_.clearColor||[0,0,0,0],autoResize:w(_.autoResize),autoBounds:w(_.autoBounds),autoScale:!!_.autoScale,autoCenter:w(_.autoCenter),clipToBounds:w(_.clipToBounds),snapToData:!!_.snapToData,onselect:_.onselect||null,onrender:_.onrender||null,onclick:_.onclick||null,cameraParams:X,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Fe){this.aspect[0]=Fe.x,this.aspect[1]=Fe.y,this.aspect[2]=Fe.z,ee=!0},setBounds:function(Fe,qe){this.bounds[0][Fe]=qe.min,this.bounds[1][Fe]=qe.max},setClearColor:function(Fe){this.clearColor=Fe},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},de=[I.drawingBufferWidth/fe.pixelRatio|0,I.drawingBufferHeight/fe.pixelRatio|0];function _e(){if(!fe._stopped&&fe.autoResize){var Fe=k.parentNode,qe=1,We=1;Fe&&Fe!==document.body?(qe=Fe.clientWidth,We=Fe.clientHeight):(qe=window.innerWidth,We=window.innerHeight);var Qe=Math.ceil(qe*fe.pixelRatio)|0,De=Math.ceil(We*fe.pixelRatio)|0;if(Qe!==k.width||De!==k.height){k.width=Qe,k.height=De;var me=k.style;me.position=me.position||"absolute",me.left="0px",me.top="0px",me.width=qe+"px",me.height=We+"px",j=!0}}}fe.autoResize&&_e(),window.addEventListener("resize",_e);function we(){for(var Fe=ne.length,qe=G.length,We=0;We0&&Z[qe-1]===0;)Z.pop(),G.pop().dispose()}fe.update=function(Fe){fe._stopped||(j=!0,ee=!0)},fe.add=function(Fe){fe._stopped||(Fe.axes=$,ne.push(Fe),te.push(-1),j=!0,ee=!0,we())},fe.remove=function(Fe){if(!fe._stopped){var qe=ne.indexOf(Fe);qe<0||(ne.splice(qe,1),te.pop(),j=!0,ee=!0,we())}},fe.dispose=function(){if(!fe._stopped&&(fe._stopped=!0,window.removeEventListener("resize",_e),k.removeEventListener("webglcontextlost",Oe),fe.mouseListener.enabled=!1,!fe.contextLost)){$.dispose(),J.dispose();for(var Fe=0;FeD.distance)continue;for(var ot=0;ot 1.0) { + discard; + } + baseColor = mix(borderColor, color, step(radius, centerFraction)); + gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); + } +} +`]),f.pickVertex=l([`precision mediump float; +#define GLSLIFY 1 + +attribute vec2 position; +attribute vec4 pickId; + +uniform mat3 matrix; +uniform float pointSize; +uniform vec4 pickOffset; + +varying vec4 fragId; + +void main() { + vec3 hgPosition = matrix * vec3(position, 1); + gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); + gl_PointSize = pointSize; + + vec4 id = pickId + pickOffset; + id.y += floor(id.x / 256.0); + id.x -= floor(id.x / 256.0) * 256.0; + + id.z += floor(id.y / 256.0); + id.y -= floor(id.y / 256.0) * 256.0; + + id.w += floor(id.z / 256.0); + id.z -= floor(id.z / 256.0) * 256.0; + + fragId = id; +} +`]),f.pickFragment=l([`precision mediump float; +#define GLSLIFY 1 + +varying vec4 fragId; + +void main() { + float radius = length(2.0 * gl_PointCoord.xy - 1.0); + if(radius > 1.0) { + discard; + } + gl_FragColor = fragId / 255.0; +} +`])}),8271:(function(a,f,i){var l=i(5158),u=i(5827),c=i(5306),h=i(8023);a.exports=m;function d(y,b,g,T,S){this.plot=y,this.offsetBuffer=b,this.pickBuffer=g,this.shader=T,this.pickShader=S,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}var v=d.prototype;v.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},v.update=function(y){var b;y=y||{};function g(x,_){return x in y?y[x]:_}this.sizeMin=g("sizeMin",.5),this.sizeMax=g("sizeMax",20),this.color=g("color",[1,0,0,1]).slice(),this.areaRatio=g("areaRatio",1),this.borderColor=g("borderColor",[0,0,0,1]).slice(),this.blend=g("blend",!1);var T=y.positions.length>>>1,S=y.positions instanceof Float32Array,A=y.idToIndex instanceof Int32Array&&y.idToIndex.length>=T,M=y.positions,w=S?M:c.mallocFloat32(M.length),C=A?y.idToIndex:c.mallocInt32(T);if(S||w.set(M),!A)for(w.set(M),b=0;b>>1,S;for(S=0;S=b[0]&&A<=b[2]&&M>=b[1]&&M<=b[3]&&g++}return g}v.unifiedDraw=(function(){var y=[1,0,0,0,1,0,0,0,1],b=[0,0,0,0];return function(g){var T=g!==void 0,S=T?this.pickShader:this.shader,A=this.plot.gl,M=this.plot.dataBox;if(this.pointCount===0)return g;var w=M[2]-M[0],C=M[3]-M[1],x=p(this.points,M),_=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(x,.33333)));y[0]=2/w,y[4]=2/C,y[6]=-2*M[0]/w-1,y[7]=-2*M[1]/C-1,this.offsetBuffer.bind(),S.bind(),S.attributes.position.pointer(),S.uniforms.matrix=y,S.uniforms.color=this.color,S.uniforms.borderColor=this.borderColor,S.uniforms.pointCloud=_<5,S.uniforms.pointSize=_,S.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),T&&(b[0]=g&255,b[1]=g>>8&255,b[2]=g>>16&255,b[3]=g>>24&255,this.pickBuffer.bind(),S.attributes.pickId.pointer(A.UNSIGNED_BYTE),S.uniforms.pickOffset=b,this.pickOffset=g);var k=A.getParameter(A.BLEND),E=A.getParameter(A.DITHER);return k&&!this.blend&&A.disable(A.BLEND),E&&A.disable(A.DITHER),A.drawArrays(A.POINTS,0,this.pointCount),k&&!this.blend&&A.enable(A.BLEND),E&&A.enable(A.DITHER),g+this.pointCount}})(),v.draw=v.unifiedDraw,v.drawPick=v.unifiedDraw,v.pick=function(y,b,g){var T=this.pickOffset,S=this.pointCount;if(g=T+S)return null;var A=g-T,M=this.points;return{object:this,pointId:A,dataCoord:[M[2*A],M[2*A+1]]}};function m(y,b){var g=y.gl,T=u(g),S=u(g),A=l(g,h.pointVertex,h.pointFragment),M=l(g,h.pickVertex,h.pickFragment),w=new d(y,T,S,A,M);return w.update(b),y.addObject(w),w}}),6093:(function(a){a.exports=f;function f(i,l,u,c){var h=l[0],d=l[1],v=l[2],p=l[3],m=u[0],y=u[1],b=u[2],g=u[3],T,S,A,M,w;return S=h*m+d*y+v*b+p*g,S<0&&(S=-S,m=-m,y=-y,b=-b,g=-g),1-S>1e-6?(T=Math.acos(S),A=Math.sin(T),M=Math.sin((1-c)*T)/A,w=Math.sin(c*T)/A):(M=1-c,w=c),i[0]=M*h+w*m,i[1]=M*d+w*y,i[2]=M*v+w*b,i[3]=M*p+w*g,i}}),8240:(function(a){a.exports=function(f){return!f&&f!==0?"":f.toString()}}),4123:(function(a,f,i){var l=i(875);a.exports=c;var u={};function c(h,d,v){var p=u[d];if(p||(p=u[d]={}),h in p)return p[h];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:d,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var y=l(h,m);m.triangles=!1;var b=l(h,m),g,T;if(v&&v!==1){for(g=0;g max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),h=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),d=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * view * model * vec4(position, 1); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),v=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),p=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),m=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],y={vertex:c,fragment:v,attributes:m},b={vertex:h,fragment:v,attributes:m},g={vertex:d,fragment:v,attributes:m},T={vertex:c,fragment:p,attributes:m},S={vertex:h,fragment:p,attributes:m},A={vertex:d,fragment:p,attributes:m};function M(w,C){var x=l(w,C),_=x.attributes;return _.position.location=0,_.color.location=1,_.glyph.location=2,_.id.location=3,x}f.createPerspective=function(w){return M(w,y)},f.createOrtho=function(w){return M(w,b)},f.createProject=function(w){return M(w,g)},f.createPickPerspective=function(w){return M(w,T)},f.createPickOrtho=function(w){return M(w,S)},f.createPickProject=function(w){return M(w,A)}}),2182:(function(a,f,i){var l=i(3596),u=i(5827),c=i(2944),h=i(5306),d=i(104),v=i(9282),p=i(4123),m=i(8240),y=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];a.exports=te;function b(Z,G){var j=Z[0],Y=Z[1],K=Z[2],X=Z[3];return Z[0]=G[0]*j+G[4]*Y+G[8]*K+G[12]*X,Z[1]=G[1]*j+G[5]*Y+G[9]*K+G[13]*X,Z[2]=G[2]*j+G[6]*Y+G[10]*K+G[14]*X,Z[3]=G[3]*j+G[7]*Y+G[11]*K+G[15]*X,Z}function g(Z,G,j,Y){return b(Y,Y),b(Y,Y),b(Y,Y)}function T(Z,G){this.index=Z,this.dataCoordinate=this.position=G}function S(Z){return Z===!0||Z>1?1:Z}function A(Z,G,j,Y,K,X,ee,le,oe,fe,de,_e){this.gl=Z,this.pixelRatio=1,this.shader=G,this.orthoShader=j,this.projectShader=Y,this.pointBuffer=K,this.colorBuffer=X,this.glyphBuffer=ee,this.idBuffer=le,this.vao=oe,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=fe,this.pickOrthoShader=de,this.pickProjectShader=_e,this.points=[],this._selectResult=new T(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var M=A.prototype;M.pickSlots=1,M.setPickBase=function(Z){this.pickId=Z},M.isTransparent=function(){if(this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&this.projectHasAlpha)return!0;return!1},M.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&!this.projectHasAlpha)return!0;return!1};var w=[0,0],C=[0,0,0],x=[0,0,0],_=[0,0,0,1],k=[0,0,0,1],E=y.slice(),I=[0,0,0],F=[[0,0,0],[0,0,0]];function D(Z){return Z[0]=Z[1]=Z[2]=0,Z}function z(Z,G){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[3]=1,Z}function N(Z,G,j,Y){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[j]=Y,Z}function q(Z){for(var G=F,j=0;j<2;++j)for(var Y=0;Y<3;++Y)G[j][Y]=Math.max(Math.min(Z[j][Y],1e8),-1e8);return G}function P(Z,G,j,Y){var K=G.axesProject,X=G.gl,ee=Z.uniforms,le=j.model||y,oe=j.view||y,fe=j.projection||y,de=G.axesBounds,_e=q(G.clipBounds),we;G.axes&&G.axes.lastCubeProps?we=G.axes.lastCubeProps.axis:we=[1,1,1],w[0]=2/X.drawingBufferWidth,w[1]=2/X.drawingBufferHeight,Z.bind(),ee.view=oe,ee.projection=fe,ee.screenSize=w,ee.highlightId=G.highlightId,ee.highlightScale=G.highlightScale,ee.clipBounds=_e,ee.pickGroup=G.pickId/255,ee.pixelRatio=Y;for(var Oe=0;Oe<3;++Oe)if(K[Oe]){ee.scale=G.projectScale[Oe],ee.opacity=G.projectOpacity[Oe];for(var be=E,Te=0;Te<16;++Te)be[Te]=0;for(var Te=0;Te<4;++Te)be[5*Te]=1;be[5*Oe]=0,we[Oe]<0?be[12+Oe]=de[0][Oe]:be[12+Oe]=de[1][Oe],d(be,le,be),ee.model=be;var ke=(Oe+1)%3,Ee=(Oe+2)%3,Le=D(C),Fe=D(x);Le[ke]=1,Fe[Ee]=1;var qe=g(fe,oe,le,z(_,Le)),We=g(fe,oe,le,z(k,Fe));if(Math.abs(qe[1])>Math.abs(We[1])){var Qe=qe;qe=We,We=Qe,Qe=Le,Le=Fe,Fe=Qe;var De=ke;ke=Ee,Ee=De}qe[0]<0&&(Le[ke]=-1),We[1]>0&&(Fe[Ee]=-1);for(var me=0,Ce=0,Te=0;Te<4;++Te)me+=Math.pow(le[4*ke+Te],2),Ce+=Math.pow(le[4*Ee+Te],2);Le[ke]/=Math.sqrt(me),Fe[Ee]/=Math.sqrt(Ce),ee.axes[0]=Le,ee.axes[1]=Fe,ee.fragClipBounds[0]=N(I,_e[0],Oe,-1e8),ee.fragClipBounds[1]=N(I,_e[1],Oe,1e8),G.vao.bind(),G.vao.draw(X.TRIANGLES,G.vertexCount),G.lineWidth>0&&(X.lineWidth(G.lineWidth*Y),G.vao.draw(X.LINES,G.lineVertexCount,G.vertexCount)),G.vao.unbind()}}var B=[-1e8,-1e8,-1e8],$=[1e8,1e8,1e8],Q=[B,$];function J(Z,G,j,Y,K,X,ee){var le=j.gl;if((X===j.projectHasAlpha||ee)&&P(G,j,Y,K),X===j.hasAlpha||ee){Z.bind();var oe=Z.uniforms;oe.model=Y.model||y,oe.view=Y.view||y,oe.projection=Y.projection||y,w[0]=2/le.drawingBufferWidth,w[1]=2/le.drawingBufferHeight,oe.screenSize=w,oe.highlightId=j.highlightId,oe.highlightScale=j.highlightScale,oe.fragClipBounds=Q,oe.clipBounds=j.axes.bounds,oe.opacity=j.opacity,oe.pickGroup=j.pickId/255,oe.pixelRatio=K,j.vao.bind(),j.vao.draw(le.TRIANGLES,j.vertexCount),j.lineWidth>0&&(le.lineWidth(j.lineWidth*K),j.vao.draw(le.LINES,j.lineVertexCount,j.vertexCount)),j.vao.unbind()}}M.draw=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;J(G,this.projectShader,this,Z,this.pixelRatio,!1,!1)},M.drawTransparent=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;J(G,this.projectShader,this,Z,this.pixelRatio,!0,!1)},M.drawPick=function(Z){var G=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;J(G,this.pickProjectShader,this,Z,1,!0,!0)},M.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;var G=Z.value[2]+(Z.value[1]<<8)+(Z.value[0]<<16);if(G>=this.pointCount||G<0)return null;var j=this.points[G],Y=this._selectResult;Y.index=G;for(var K=0;K<3;++K)Y.position[K]=Y.dataCoordinate[K]=j[K];return Y},M.highlight=function(Z){if(!Z)this.highlightId=[1,1,1,1];else{var G=Z.index,j=G&255,Y=G>>8&255,K=G>>16&255;this.highlightId=[j/255,Y/255,K/255,0]}};function ne(Z,G,j,Y){var K;Array.isArray(Z)?G0){var Ht=0,Et=Ee,Jt=[0,0,0,1],Tt=[0,0,0,1],rt=Array.isArray(we)&&Array.isArray(we[0]),gt=Array.isArray(Te)&&Array.isArray(Te[0]);e:for(var Y=0;Y0?1-Ce[0][0]:Se<0?1+Ce[1][0]:1,Pe*=Pe>0?1-Ce[0][1]:Pe<0?1+Ce[1][1]:1;for(var it=[Se,Pe],qt=De.cells||[],pr=De.positions||[],We=0;We0){var D=y*C;S.drawBox(x-D,_-D,k+D,_+D,T),S.drawBox(x-D,E-D,k+D,E+D,T),S.drawBox(x-D,_-D,x+D,E+D,T),S.drawBox(k-D,_-D,k+D,E+D,T)}}}},d.update=function(p){p=p||{},this.innerFill=!!p.innerFill,this.outerFill=!!p.outerFill,this.innerColor=(p.innerColor||[0,0,0,.5]).slice(),this.outerColor=(p.outerColor||[0,0,0,.5]).slice(),this.borderColor=(p.borderColor||[0,0,0,1]).slice(),this.borderWidth=p.borderWidth||0,this.selectBox=(p.selectBox||this.selectBox).slice()},d.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function v(p,m){var y=p.gl,b=u(y,[0,0,0,1,1,0,1,1]),g=l(y,c.boxVertex,c.boxFragment),T=new h(p,b,g);return T.update(m),p.addOverlay(T),T}}),2611:(function(a,f,i){a.exports=y;var l=i(4234),u=i(5306),c=i(5050),h=i(2288).nextPow2,d=function(b,g,T){for(var S=1e8,A=-1,M=-1,w=b.shape[0],C=b.shape[1],x=0;xthis.buffer.length){u.free(this.buffer);for(var S=this.buffer=u.mallocUint8(h(T*g*4)),A=0;AS)for(g=S;gT)for(g=T;g=0){for(var q=N.type.charAt(N.type.length-1)|0,P=new Array(q),B=0;B=0;)$+=1;D[z]=$}var Q=new Array(S.length);function J(){w.program=h.program(C,w._vref,w._fref,F,D);for(var ne=0;ne=0){var _=C.charCodeAt(C.length-1)-48;if(_<2||_>4)throw new l("","Invalid data type for attribute "+w+": "+C);d(m,y,x[0],g,_,T,w)}else if(C.indexOf("mat")>=0){var _=C.charCodeAt(C.length-1)-48;if(_<2||_>4)throw new l("","Invalid data type for attribute "+w+": "+C);v(m,y,x,g,_,T,w)}else throw new l("","Unknown data type for attribute "+w+": "+C);break}}return T}}),9016:(function(a,f,i){var l=i(3984),u=i(9068);a.exports=d;function c(v){return function(){return v}}function h(v,p){for(var m=new Array(v),y=0;y4)throw new u("","Invalid data type");switch($.charAt(0)){case"b":case"i":v["uniform"+Q+"iv"](y[D],z);break;case"v":v["uniform"+Q+"fv"](y[D],z);break;default:throw new u("","Unrecognized data type for vector "+name+": "+$)}}else if($.indexOf("mat")===0&&$.length===4){if(Q=$.charCodeAt($.length-1)-48,Q<2||Q>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+$);v["uniformMatrix"+Q+"fv"](y[D],!1,z);break}else throw new u("","Unknown uniform data type for "+name+": "+$)}}}}}function T(C,x){if(typeof x!="object")return[[C,x]];var _=[];for(var k in x){var E=x[k],I=C;parseInt(k)+""===k?I+="["+k+"]":I+="."+k,typeof E=="object"?_.push.apply(_,T(I,E)):_.push([I,E])}return _}function S(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var x=C.indexOf("vec");if(0<=x&&x<=1&&C.length===4+x){var _=C.charCodeAt(C.length-1)-48;if(_<2||_>4)throw new u("","Invalid data type");return C.charAt(0)==="b"?h(_,!1):h(_,0)}else if(C.indexOf("mat")===0&&C.length===4){var _=C.charCodeAt(C.length-1)-48;if(_<2||_>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+C);return h(_*_,0)}else throw new u("","Unknown uniform data type for "+name+": "+C)}}function A(C,x,_){if(typeof _=="object"){var k=M(_);Object.defineProperty(C,x,{get:c(k),set:g(_),enumerable:!0,configurable:!1})}else y[_]?Object.defineProperty(C,x,{get:b(_),set:g(_),enumerable:!0,configurable:!1}):C[x]=S(m[_].type)}function M(C){var x;if(Array.isArray(C)){x=new Array(C.length);for(var _=0;_1){m[0]in v||(v[m[0]]=[]),v=v[m[0]];for(var y=1;y1)for(var T=0;T"u"?i(4037):WeakMap,h=new c,d=0;function v(A,M,w,C,x,_,k){this.id=A,this.src=M,this.type=w,this.shader=C,this.count=_,this.programs=[],this.cache=k}v.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,M=A.gl,w=this.programs,C=0,x=w.length;C 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),c=l([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),h=l([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * view * tubePosition; + f_id = id; + f_position = position.xyz; +} +`]),d=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);f.meshShader={vertex:u,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},f.pickShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),7307:(function(a,f,i){var l=i(2858),u=i(4020),c=["xyz","xzy","yxz","yzx","zxy","zyx"],h=function(S,A,M,w){for(var C=S.points,x=S.velocities,_=S.divergences,k=[],E=[],I=[],F=[],D=[],z=[],N=0,q=0,P=u.create(),B=u.create(),$=8,Q=0;Q0)for(var Z=0;Z<$;Z++){var G=(Z+1)%$;k.push(F[Z],D[Z],D[G],D[G],F[G],F[Z]),I.push(B,P,P,P,B,B),z.push(N,q,q,q,N,N);var j=k.length;E.push([j-6,j-5,j-4],[j-3,j-2,j-1])}var Y=F;F=D,D=Y;var K=B;B=P,P=K;var X=N;N=q,q=X}return{positions:k,cells:E,vectors:I,vertexIntensity:z}},d=function(S,A,M,w){for(var C=0,x=0;xA)return w-1}return w},p=function(S,A,M){return SM?M:S},m=function(S,A,M){var w=A.vectors,C=A.meshgrid,x=S[0],_=S[1],k=S[2],E=C[0].length,I=C[1].length,F=C[2].length,D=v(C[0],x),z=v(C[1],_),N=v(C[2],k),q=D+1,P=z+1,B=N+1;if(D=p(D,0,E-1),q=p(q,0,E-1),z=p(z,0,I-1),P=p(P,0,I-1),N=p(N,0,F-1),B=p(B,0,F-1),D<0||z<0||N<0||q>E-1||P>I-1||B>F-1)return l.create();var $=C[0][D],Q=C[0][q],J=C[1][z],ne=C[1][P],te=C[2][N],Z=C[2][B],G=(x-$)/(Q-$),j=(_-J)/(ne-J),Y=(k-te)/(Z-te);isFinite(G)||(G=.5),isFinite(j)||(j=.5),isFinite(Y)||(Y=.5);var K,X,ee,le,oe,fe;switch(M.reversedX&&(D=E-1-D,q=E-1-q),M.reversedY&&(z=I-1-z,P=I-1-P),M.reversedZ&&(N=F-1-N,B=F-1-B),M.filled){case 5:oe=N,fe=B,ee=z*F,le=P*F,K=D*F*I,X=q*F*I;break;case 4:oe=N,fe=B,K=D*F,X=q*F,ee=z*F*E,le=P*F*E;break;case 3:ee=z,le=P,oe=N*I,fe=B*I,K=D*I*F,X=q*I*F;break;case 2:ee=z,le=P,K=D*I,X=q*I,oe=N*I*E,fe=B*I*E;break;case 1:K=D,X=q,oe=N*E,fe=B*E,ee=z*E*F,le=P*E*F;break;default:K=D,X=q,ee=z*E,le=P*E,oe=N*E*I,fe=B*E*I;break}var de=w[K+ee+oe],_e=w[K+ee+fe],we=w[K+le+oe],Oe=w[K+le+fe],be=w[X+ee+oe],Te=w[X+ee+fe],ke=w[X+le+oe],Ee=w[X+le+fe],Le=l.create(),Fe=l.create(),qe=l.create(),We=l.create();l.lerp(Le,de,be,G),l.lerp(Fe,_e,Te,G),l.lerp(qe,we,ke,G),l.lerp(We,Oe,Ee,G);var Qe=l.create(),De=l.create();l.lerp(Qe,Le,qe,j),l.lerp(De,Fe,We,j);var me=l.create();return l.lerp(me,Qe,De,Y),me},y=function(S){var A=1/0;S.sort(function(x,_){return x-_});for(var M=S.length,w=1;wq||EeP||LeB)},Q=l.distance(A[0],A[1]),J=10*Q/w,ne=J*J,te=1,Z=0,G=M.length;G>1&&(te=b(M));for(var j=0;jZ&&(Z=de),oe.push(de),F.push({points:K,velocities:X,divergences:oe});for(var _e=0;_ene&&l.scale(we,we,J/Math.sqrt(Oe)),l.add(we,we,Y),ee=E(we),l.squaredDistance(le,we)-ne>-1e-4*ne){K.push(we),le=we,X.push(ee);var fe=I(we,ee),de=l.length(fe);isFinite(de)&&de>Z&&(Z=de),oe.push(de)}Y=we}}var be=d(F,S.colormap,Z,te);return x?be.tubeScale=x:(Z===0&&(Z=1),be.tubeScale=C*.5*te/Z),be};var g=i(9578),T=i(1140).createMesh;a.exports.createTubeMesh=function(S,A){return T(S,A,{shaders:g,traceType:"streamtube"})}}),9054:(function(a,f,i){var l=i(5158),u=i(6832),c=u([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + vec4 clipPosition = projection * view * worldPosition; + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),h=u([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color — in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),d=u([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + + vec4 clipPosition = projection * view * worldPosition; + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),v=u([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);f.createShader=function(p){var m=l(p,c,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},f.createPickShader=function(p){var m=l(p,c,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},f.createContourShader=function(p){var m=l(p,d,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m},f.createPickContourShader=function(p){var m=l(p,d,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m}}),3754:(function(a,f,i){a.exports=X;var l=i(2288),u=i(5827),c=i(2944),h=i(8931),d=i(5306),v=i(9156),p=i(7498),m=i(7382),y=i(5050),b=i(4162),g=i(104),T=i(7437),S=i(5070),A=i(9144),M=i(9054),w=M.createShader,C=M.createContourShader,x=M.createPickShader,_=M.createPickContourShader,k=40,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],I=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],F=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ee=0;ee<3;++ee){var le=F[ee],oe=(ee+1)%3,fe=(ee+2)%3;le[oe+0]=1,le[fe+3]=1,le[ee+6]=1}})();function D(ee,le,oe,fe,de){this.position=ee,this.index=le,this.uv=oe,this.level=fe,this.dataCoordinate=de}var z=256;function N(ee,le,oe,fe,de,_e,we,Oe,be,Te,ke,Ee,Le,Fe,qe){this.gl=ee,this.shape=le,this.bounds=oe,this.objectOffset=qe,this.intensityBounds=[],this._shader=fe,this._pickShader=de,this._coordinateBuffer=_e,this._vao=we,this._colorMap=Oe,this._contourShader=be,this._contourPickShader=Te,this._contourBuffer=ke,this._contourVAO=Ee,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Le,this._dynamicVAO=Fe,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0]),y(d.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var q=N.prototype;q.genColormap=function(ee,le){var oe=!1,fe=m([v({colormap:ee,nshades:z,format:"rgba"}).map(function(de,_e){var we=le?P(_e/255,le):de[3];return we<1&&(oe=!0),[de[0],de[1],de[2],255*we]})]);return p.divseq(fe,255),this.hasAlphaScale=oe,fe},q.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},q.isOpaque=function(){return!this.isTransparent()},q.pickSlots=1,q.setPickBase=function(ee){this.pickId=ee};function P(ee,le){if(!le||!le.length)return 1;for(var oe=0;oeee&&oe>0){var fe=(le[oe][0]-ee)/(le[oe][0]-le[oe-1][0]);return le[oe][1]*(1-fe)+fe*le[oe-1][1]}}return 1}var B=[0,0,0],$={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function Q(ee,le){var oe,fe,de,_e=le.axes&&le.axes.lastCubeProps.axis||B,we=le.showSurface,Oe=le.showContour;for(oe=0;oe<3;++oe)for(we=we||le.surfaceProject[oe],fe=0;fe<3;++fe)Oe=Oe||le.contourProject[oe][fe];for(oe=0;oe<3;++oe){var be=$.projections[oe];for(fe=0;fe<16;++fe)be[fe]=0;for(fe=0;fe<4;++fe)be[5*fe]=1;be[5*oe]=0,be[12+oe]=le.axesBounds[+(_e[oe]>0)][oe],g(be,ee.model,be);var Te=$.clipBounds[oe];for(de=0;de<2;++de)for(fe=0;fe<3;++fe)Te[de][fe]=ee.clipBounds[de][fe];Te[0][oe]=-1e8,Te[1][oe]=1e8}return $.showSurface=we,$.showContour=Oe,$}var J={model:E,view:E,projection:E,inverseModel:E.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},ne=E.slice(),te=[1,0,0,0,1,0,0,0,1];function Z(ee,le){ee=ee||{};var oe=this.gl;oe.disable(oe.CULL_FACE),this._colorMap.bind(0);var fe=J;fe.model=ee.model||E,fe.view=ee.view||E,fe.projection=ee.projection||E,fe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],fe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],fe.objectOffset=this.objectOffset,fe.contourColor=this.contourColor[0],fe.inverseModel=T(fe.inverseModel,fe.model);for(var de=0;de<2;++de)for(var _e=fe.clipBounds[de],we=0;we<3;++we)_e[we]=Math.min(Math.max(this.clipBounds[de][we],-1e8),1e8);fe.kambient=this.ambientLight,fe.kdiffuse=this.diffuseLight,fe.kspecular=this.specularLight,fe.roughness=this.roughness,fe.fresnel=this.fresnel,fe.opacity=this.opacity,fe.height=0,fe.permutation=te,fe.vertexColor=this.vertexColor;var Oe=ne;for(g(Oe,fe.view,fe.model),g(Oe,fe.projection,Oe),T(Oe,Oe),de=0;de<3;++de)fe.eyePosition[de]=Oe[12+de]/Oe[15];var be=Oe[15];for(de=0;de<3;++de)be+=this.lightPosition[de]*Oe[4*de+3];for(de=0;de<3;++de){var Te=Oe[12+de];for(we=0;we<3;++we)Te+=Oe[4*we+de]*this.lightPosition[we];fe.lightPosition[de]=Te/be}var ke=Q(fe,this);if(ke.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(oe.TRIANGLES,this._vertexCount),de=0;de<3;++de)!this.surfaceProject[de]||!this.vertexCount||(this._shader.uniforms.model=ke.projections[de],this._shader.uniforms.clipBounds=ke.clipBounds[de],this._vao.draw(oe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ke.showContour){var Ee=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,Ee.bind(),Ee.uniforms=fe;var Le=this._contourVAO;for(Le.bind(),de=0;de<3;++de)for(Ee.uniforms.permutation=F[de],oe.lineWidth(this.contourWidth[de]*this.pixelRatio),we=0;we>4)/16)/255,de=Math.floor(fe),_e=fe-de,we=le[1]*(ee.value[1]+(ee.value[2]&15)/16)/255,Oe=Math.floor(we),be=we-Oe;de+=1,Oe+=1;var Te=oe.position;Te[0]=Te[1]=Te[2]=0;for(var ke=0;ke<2;++ke)for(var Ee=ke?_e:1-_e,Le=0;Le<2;++Le)for(var Fe=Le?be:1-be,qe=de+ke,We=Oe+Le,Qe=Ee*Fe,De=0;De<3;++De)Te[De]+=this._field[De].get(qe,We)*Qe;for(var me=this._pickResult.level,Ce=0;Ce<3;++Ce)if(me[Ce]=S.le(this.contourLevels[Ce],Te[Ce]),me[Ce]<0)this.contourLevels[Ce].length>0&&(me[Ce]=0);else if(me[Ce]Math.abs(st-Te[Ce])&&(me[Ce]+=1)}for(oe.index[0]=_e<.5?de:de+1,oe.index[1]=be<.5?Oe:Oe+1,oe.uv[0]=fe/le[0],oe.uv[1]=we/le[1],De=0;De<3;++De)oe.dataCoordinate[De]=this._field[De].get(oe.index[0],oe.index[1]);return oe},q.padField=function(ee,le){var oe=le.shape.slice(),fe=ee.shape.slice();p.assign(ee.lo(1,1).hi(oe[0],oe[1]),le),p.assign(ee.lo(1).hi(oe[0],1),le.hi(oe[0],1)),p.assign(ee.lo(1,fe[1]-1).hi(oe[0],1),le.lo(0,oe[1]-1).hi(oe[0],1)),p.assign(ee.lo(0,1).hi(1,oe[1]),le.hi(1)),p.assign(ee.lo(fe[0]-1,1).hi(1,oe[1]),le.lo(oe[0]-1)),ee.set(0,0,le.get(0,0)),ee.set(0,fe[1]-1,le.get(0,oe[1]-1)),ee.set(fe[0]-1,0,le.get(oe[0]-1,0)),ee.set(fe[0]-1,fe[1]-1,le.get(oe[0]-1,oe[1]-1))};function j(ee,le){return Array.isArray(ee)?[le(ee[0]),le(ee[1]),le(ee[2])]:[le(ee),le(ee),le(ee)]}function Y(ee){return Array.isArray(ee)?ee.length===3?[ee[0],ee[1],ee[2],1]:[ee[0],ee[1],ee[2],ee[3]]:[0,0,0,1]}function K(ee){if(Array.isArray(ee)){if(Array.isArray(ee))return[Y(ee[0]),Y(ee[1]),Y(ee[2])];var le=Y(ee);return[le.slice(),le.slice(),le.slice()]}}q.update=function(ee){ee=ee||{},this.objectOffset=ee.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ee&&(this.contourWidth=j(ee.contourWidth,Number)),"showContour"in ee&&(this.showContour=j(ee.showContour,Boolean)),"showSurface"in ee&&(this.showSurface=!!ee.showSurface),"contourTint"in ee&&(this.contourTint=j(ee.contourTint,Boolean)),"contourColor"in ee&&(this.contourColor=K(ee.contourColor)),"contourProject"in ee&&(this.contourProject=j(ee.contourProject,function(Ct){return j(Ct,Boolean)})),"surfaceProject"in ee&&(this.surfaceProject=ee.surfaceProject),"dynamicColor"in ee&&(this.dynamicColor=K(ee.dynamicColor)),"dynamicTint"in ee&&(this.dynamicTint=j(ee.dynamicTint,Number)),"dynamicWidth"in ee&&(this.dynamicWidth=j(ee.dynamicWidth,Number)),"opacity"in ee&&(this.opacity=ee.opacity),"opacityscale"in ee&&(this.opacityscale=ee.opacityscale),"colorBounds"in ee&&(this.colorBounds=ee.colorBounds),"vertexColor"in ee&&(this.vertexColor=ee.vertexColor?1:0),"colormap"in ee&&this._colorMap.setPixels(this.genColormap(ee.colormap,this.opacityscale));var le=ee.field||ee.coords&&ee.coords[2]||null,oe=!1;if(le||(this._field[2].shape[0]||this._field[2].shape[2]?le=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):le=this._field[2].hi(0,0)),"field"in ee||"coords"in ee){var fe=(le.shape[0]+2)*(le.shape[1]+2);fe>this._field[2].data.length&&(d.freeFloat(this._field[2].data),this._field[2].data=d.mallocFloat(l.nextPow2(fe))),this._field[2]=y(this._field[2].data,[le.shape[0]+2,le.shape[1]+2]),this.padField(this._field[2],le),this.shape=le.shape.slice();for(var de=this.shape,_e=0;_e<2;++_e)this._field[2].size>this._field[_e].data.length&&(d.freeFloat(this._field[_e].data),this._field[_e].data=d.mallocFloat(this._field[2].size)),this._field[_e]=y(this._field[_e].data,[de[0]+2,de[1]+2]);if(ee.coords){var we=ee.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(_e=0;_e<2;++_e){var Oe=we[_e];for(Le=0;Le<2;++Le)if(Oe.shape[Le]!==de[Le])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[_e],Oe)}}else if(ee.ticks){var be=ee.ticks;if(!Array.isArray(be)||be.length!==2)throw new Error("gl-surface: invalid ticks");for(_e=0;_e<2;++_e){var Te=be[_e];if((Array.isArray(Te)||Te.length)&&(Te=y(Te)),Te.shape[0]!==de[_e])throw new Error("gl-surface: invalid tick length");var ke=y(Te.data,de);ke.stride[_e]=Te.stride[0],ke.stride[_e^1]=0,this.padField(this._field[_e],ke)}}else{for(_e=0;_e<2;++_e){var Ee=[0,0];Ee[_e]=1,this._field[_e]=y(this._field[_e].data,[de[0]+2,de[1]+2],Ee,0)}this._field[0].set(0,0,0);for(var Le=0;Le0){for(var At=0;At<5;++At)qt.pop();Ie-=1}continue e}}}an.push(Ie)}this._contourOffsets[pr]=Rr,this._contourCounts[pr]=an}var Rt=d.mallocFloat(qt.length);for(_e=0;_eD||I<0||I>D)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[E,I],k.bind(),F.texImage2D(F.TEXTURE_2D,0,k.format,E,I,0,k.format,k.type,null),k._mipLevels=[0],k}function g(k,E,I,F,D,z){this.gl=k,this.handle=E,this.format=D,this.type=z,this._shape=[I,F],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var N=this,q=[this._wrapS,this._wrapT];Object.defineProperties(q,[{get:function(){return N._wrapS},set:function(B){return N.wrapS=B}},{get:function(){return N._wrapT},set:function(B){return N.wrapT=B}}]),this._wrapVector=q;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return N._shape[0]},set:function(B){return N.width=B}},{get:function(){return N._shape[1]},set:function(B){return N.height=B}}]),this._shapeVector=P}var T=g.prototype;Object.defineProperties(T,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var E=this.gl;if(this.type===E.FLOAT&&h.indexOf(k)>=0&&(E.getExtension("OES_texture_float_linear")||(k=E.NEAREST)),d.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var E=this.gl;if(this.type===E.FLOAT&&h.indexOf(k)>=0&&(E.getExtension("OES_texture_float_linear")||(k=E.NEAREST)),d.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var E=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,E!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),v.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),v.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(v.indexOf(k[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,b(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,b(this,this._shape[0],k),k}}}),T.bind=function(k){var E=this.gl;return k!==void 0&&E.activeTexture(E.TEXTURE0+(k|0)),E.bindTexture(E.TEXTURE_2D,this.handle),k!==void 0?k|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},T.dispose=function(){this.gl.deleteTexture(this.handle)},T.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),E=0;k>0;++E,k>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},T.setPixels=function(k,E,I,F){var D=this.gl;this.bind(),Array.isArray(E)?(F=I,I=E[1]|0,E=E[0]|0):(E=E||0,I=I||0),F=F||0;var z=m(k)?k:k.raw;if(z){var N=this._mipLevels.indexOf(F)<0;N?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,z),this._mipLevels.push(F)):D.texSubImage2D(D.TEXTURE_2D,F,E,I,this.format,this.type,z)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||E+k.shape[1]>this._shape[1]>>>F||I+k.shape[0]>this._shape[0]>>>F||E<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(D,E,I,F,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function S(k,E){return k.length===3?E[2]===1&&E[1]===k[0]*k[2]&&E[0]===k[2]:E[0]===1&&E[1]===k[0]}function A(k,E,I,F,D,z,N,q){var P=q.dtype,B=q.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var $=0,Q=0,J=S(B,q.stride.slice());if(P==="float32"?$=k.FLOAT:P==="float64"?($=k.FLOAT,J=!1,P="float32"):P==="uint8"?$=k.UNSIGNED_BYTE:($=k.UNSIGNED_BYTE,J=!1,P="uint8"),B.length===2)Q=k.LUMINANCE,B=[B[0],B[1],1],q=l(q.data,B,[q.stride[0],q.stride[1],1],q.offset);else if(B.length===3){if(B[2]===1)Q=k.ALPHA;else if(B[2]===2)Q=k.LUMINANCE_ALPHA;else if(B[2]===3)Q=k.RGB;else if(B[2]===4)Q=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((Q===k.LUMINANCE||Q===k.ALPHA)&&(D===k.LUMINANCE||D===k.ALPHA)&&(Q=D),Q!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=q.size,te=N.indexOf(F)<0;if(te&&N.push(F),$===z&&J)q.offset===0&&q.data.length===ne?te?k.texImage2D(k.TEXTURE_2D,F,D,B[0],B[1],0,D,z,q.data):k.texSubImage2D(k.TEXTURE_2D,F,E,I,B[0],B[1],D,z,q.data):te?k.texImage2D(k.TEXTURE_2D,F,D,B[0],B[1],0,D,z,q.data.subarray(q.offset,q.offset+ne)):k.texSubImage2D(k.TEXTURE_2D,F,E,I,B[0],B[1],D,z,q.data.subarray(q.offset,q.offset+ne));else{var Z;z===k.FLOAT?Z=c.mallocFloat32(ne):Z=c.mallocUint8(ne);var G=l(Z,B,[B[2],B[2]*B[0],1]);$===k.FLOAT&&z===k.UNSIGNED_BYTE?y(G,q):u.assign(G,q),te?k.texImage2D(k.TEXTURE_2D,F,D,B[0],B[1],0,D,z,Z.subarray(0,ne)):k.texSubImage2D(k.TEXTURE_2D,F,E,I,B[0],B[1],D,z,Z.subarray(0,ne)),z===k.FLOAT?c.freeFloat32(Z):c.freeUint8(Z)}}function M(k){var E=k.createTexture();return k.bindTexture(k.TEXTURE_2D,E),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),E}function w(k,E,I,F,D){var z=k.getParameter(k.MAX_TEXTURE_SIZE);if(E<0||E>z||I<0||I>z)throw new Error("gl-texture2d: Invalid texture shape");if(D===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var N=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,E,I,0,F,D,null),new g(k,N,E,I,F,D)}function C(k,E,I,F,D,z){var N=M(k);return k.texImage2D(k.TEXTURE_2D,0,D,D,z,E),new g(k,N,I,F,D,z)}function x(k,E){var I=E.dtype,F=E.shape.slice(),D=k.getParameter(k.MAX_TEXTURE_SIZE);if(F[0]<0||F[0]>D||F[1]<0||F[1]>D)throw new Error("gl-texture2d: Invalid texture size");var z=S(F,E.stride.slice()),N=0;I==="float32"?N=k.FLOAT:I==="float64"?(N=k.FLOAT,z=!1,I="float32"):I==="uint8"?N=k.UNSIGNED_BYTE:(N=k.UNSIGNED_BYTE,z=!1,I="uint8");var q=0;if(F.length===2)q=k.LUMINANCE,F=[F[0],F[1],1],E=l(E.data,F,[E.stride[0],E.stride[1],1],E.offset);else if(F.length===3)if(F[2]===1)q=k.ALPHA;else if(F[2]===2)q=k.LUMINANCE_ALPHA;else if(F[2]===3)q=k.RGB;else if(F[2]===4)q=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");N===k.FLOAT&&!k.getExtension("OES_texture_float")&&(N=k.UNSIGNED_BYTE,z=!1);var P,B,$=E.size;if(z)E.offset===0&&E.data.length===$?P=E.data:P=E.data.subarray(E.offset,E.offset+$);else{var Q=[F[2],F[2]*F[0],1];B=c.malloc($,I);var J=l(B,F,Q,0);(I==="float32"||I==="float64")&&N===k.UNSIGNED_BYTE?y(J,E):u.assign(J,E),P=B.subarray(0,$)}var ne=M(k);return k.texImage2D(k.TEXTURE_2D,0,q,F[0],F[1],0,q,N,P),z||c.free(B),new g(k,ne,F[0],F[1],q,N)}function _(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(h||p(k),typeof arguments[1]=="number")return w(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],I=m(E)?E:E.raw;if(I)return C(k,I,E.width|0,E.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return x(k,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),3056:(function(a){function f(i,l,u){l?l.bind():i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null);var c=i.getParameter(i.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>c)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h1?0:Math.acos(y)}}),8827:(function(a){a.exports=f;function f(i,l){return i[0]=Math.ceil(l[0]),i[1]=Math.ceil(l[1]),i[2]=Math.ceil(l[2]),i}}),7622:(function(a){a.exports=f;function f(i){var l=new Float32Array(3);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l}}),8782:(function(a){a.exports=f;function f(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i}}),8501:(function(a){a.exports=f;function f(){var i=new Float32Array(3);return i[0]=0,i[1]=0,i[2]=0,i}}),903:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2],v=u[0],p=u[1],m=u[2];return i[0]=h*m-d*p,i[1]=d*v-c*m,i[2]=c*p-h*v,i}}),5981:(function(a,f,i){a.exports=i(8288)}),8288:(function(a){a.exports=f;function f(i,l){var u=l[0]-i[0],c=l[1]-i[1],h=l[2]-i[2];return Math.sqrt(u*u+c*c+h*h)}}),8629:(function(a,f,i){a.exports=i(7979)}),7979:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i}}),9305:(function(a){a.exports=f;function f(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]}}),154:(function(a){a.exports=1e-6}),4932:(function(a,f,i){a.exports=u;var l=i(154);function u(c,h){var d=c[0],v=c[1],p=c[2],m=h[0],y=h[1],b=h[2];return Math.abs(d-m)<=l*Math.max(1,Math.abs(d),Math.abs(m))&&Math.abs(v-y)<=l*Math.max(1,Math.abs(v),Math.abs(y))&&Math.abs(p-b)<=l*Math.max(1,Math.abs(p),Math.abs(b))}}),5777:(function(a){a.exports=f;function f(i,l){return i[0]===l[0]&&i[1]===l[1]&&i[2]===l[2]}}),3306:(function(a){a.exports=f;function f(i,l){return i[0]=Math.floor(l[0]),i[1]=Math.floor(l[1]),i[2]=Math.floor(l[2]),i}}),7447:(function(a,f,i){a.exports=u;var l=i(8501)();function u(c,h,d,v,p,m){var y,b;for(h||(h=3),d||(d=0),v?b=Math.min(v*h+d,c.length):b=c.length,y=d;y0&&(d=1/Math.sqrt(d),i[0]=l[0]*d,i[1]=l[1]*d,i[2]=l[2]*d),i}}),6660:(function(a){a.exports=f;function f(i,l){l=l||1;var u=Math.random()*2*Math.PI,c=Math.random()*2-1,h=Math.sqrt(1-c*c)*l;return i[0]=Math.cos(u)*h,i[1]=Math.sin(u)*h,i[2]=c*l,i}}),392:(function(a){a.exports=f;function f(i,l,u,c){var h=u[1],d=u[2],v=l[1]-h,p=l[2]-d,m=Math.sin(c),y=Math.cos(c);return i[0]=l[0],i[1]=h+v*y-p*m,i[2]=d+v*m+p*y,i}}),3222:(function(a){a.exports=f;function f(i,l,u,c){var h=u[0],d=u[2],v=l[0]-h,p=l[2]-d,m=Math.sin(c),y=Math.cos(c);return i[0]=h+p*m+v*y,i[1]=l[1],i[2]=d+p*y-v*m,i}}),3388:(function(a){a.exports=f;function f(i,l,u,c){var h=u[0],d=u[1],v=l[0]-h,p=l[1]-d,m=Math.sin(c),y=Math.cos(c);return i[0]=h+v*y-p*m,i[1]=d+v*m+p*y,i[2]=l[2],i}}),1624:(function(a){a.exports=f;function f(i,l){return i[0]=Math.round(l[0]),i[1]=Math.round(l[1]),i[2]=Math.round(l[2]),i}}),5685:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i}}),6722:(function(a){a.exports=f;function f(i,l,u,c){return i[0]=l[0]+u[0]*c,i[1]=l[1]+u[1]*c,i[2]=l[2]+u[2]*c,i}}),831:(function(a){a.exports=f;function f(i,l,u,c){return i[0]=l,i[1]=u,i[2]=c,i}}),5294:(function(a,f,i){a.exports=i(6403)}),3303:(function(a,f,i){a.exports=i(4337)}),6403:(function(a){a.exports=f;function f(i,l){var u=l[0]-i[0],c=l[1]-i[1],h=l[2]-i[2];return u*u+c*c+h*h}}),4337:(function(a){a.exports=f;function f(i){var l=i[0],u=i[1],c=i[2];return l*l+u*u+c*c}}),8921:(function(a,f,i){a.exports=i(911)}),911:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i}}),9908:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2];return i[0]=c*u[0]+h*u[3]+d*u[6],i[1]=c*u[1]+h*u[4]+d*u[7],i[2]=c*u[2]+h*u[5]+d*u[8],i}}),3255:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2],v=u[3]*c+u[7]*h+u[11]*d+u[15];return v=v||1,i[0]=(u[0]*c+u[4]*h+u[8]*d+u[12])/v,i[1]=(u[1]*c+u[5]*h+u[9]*d+u[13])/v,i[2]=(u[2]*c+u[6]*h+u[10]*d+u[14])/v,i}}),6568:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2],v=u[0],p=u[1],m=u[2],y=u[3],b=y*c+p*d-m*h,g=y*h+m*c-v*d,T=y*d+v*h-p*c,S=-v*c-p*h-m*d;return i[0]=b*y+S*-v+g*-m-T*-p,i[1]=g*y+S*-p+T*-v-b*-m,i[2]=T*y+S*-m+b*-p-g*-v,i}}),3433:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]+u[0],i[1]=l[1]+u[1],i[2]=l[2]+u[2],i[3]=l[3]+u[3],i}}),1413:(function(a){a.exports=f;function f(i){var l=new Float32Array(4);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l[3]=i[3],l}}),3470:(function(a){a.exports=f;function f(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i[3]=l[3],i}}),5313:(function(a){a.exports=f;function f(){var i=new Float32Array(4);return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i}}),5446:(function(a){a.exports=f;function f(i,l){var u=l[0]-i[0],c=l[1]-i[1],h=l[2]-i[2],d=l[3]-i[3];return Math.sqrt(u*u+c*c+h*h+d*d)}}),205:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i[3]=l[3]/u[3],i}}),4242:(function(a){a.exports=f;function f(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3]*l[3]}}),5680:(function(a){a.exports=f;function f(i,l,u,c){var h=new Float32Array(4);return h[0]=i,h[1]=l,h[2]=u,h[3]=c,h}}),4020:(function(a,f,i){a.exports={create:i(5313),clone:i(1413),fromValues:i(5680),copy:i(3470),set:i(6453),add:i(3433),subtract:i(2705),multiply:i(746),divide:i(205),min:i(2170),max:i(3030),scale:i(5510),scaleAndAdd:i(4224),distance:i(5446),squaredDistance:i(1542),length:i(8177),squaredLength:i(9037),negate:i(6459),inverse:i(8057),normalize:i(381),dot:i(4242),lerp:i(8746),random:i(3770),transformMat4:i(6342),transformQuat:i(5022)}}),8057:(function(a){a.exports=f;function f(i,l){return i[0]=1/l[0],i[1]=1/l[1],i[2]=1/l[2],i[3]=1/l[3],i}}),8177:(function(a){a.exports=f;function f(i){var l=i[0],u=i[1],c=i[2],h=i[3];return Math.sqrt(l*l+u*u+c*c+h*h)}}),8746:(function(a){a.exports=f;function f(i,l,u,c){var h=l[0],d=l[1],v=l[2],p=l[3];return i[0]=h+c*(u[0]-h),i[1]=d+c*(u[1]-d),i[2]=v+c*(u[2]-v),i[3]=p+c*(u[3]-p),i}}),3030:(function(a){a.exports=f;function f(i,l,u){return i[0]=Math.max(l[0],u[0]),i[1]=Math.max(l[1],u[1]),i[2]=Math.max(l[2],u[2]),i[3]=Math.max(l[3],u[3]),i}}),2170:(function(a){a.exports=f;function f(i,l,u){return i[0]=Math.min(l[0],u[0]),i[1]=Math.min(l[1],u[1]),i[2]=Math.min(l[2],u[2]),i[3]=Math.min(l[3],u[3]),i}}),746:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]*u[0],i[1]=l[1]*u[1],i[2]=l[2]*u[2],i[3]=l[3]*u[3],i}}),6459:(function(a){a.exports=f;function f(i,l){return i[0]=-l[0],i[1]=-l[1],i[2]=-l[2],i[3]=-l[3],i}}),381:(function(a){a.exports=f;function f(i,l){var u=l[0],c=l[1],h=l[2],d=l[3],v=u*u+c*c+h*h+d*d;return v>0&&(v=1/Math.sqrt(v),i[0]=u*v,i[1]=c*v,i[2]=h*v,i[3]=d*v),i}}),3770:(function(a,f,i){var l=i(381),u=i(5510);a.exports=c;function c(h,d){return d=d||1,h[0]=Math.random(),h[1]=Math.random(),h[2]=Math.random(),h[3]=Math.random(),l(h,h),u(h,h,d),h}}),5510:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i[3]=l[3]*u,i}}),4224:(function(a){a.exports=f;function f(i,l,u,c){return i[0]=l[0]+u[0]*c,i[1]=l[1]+u[1]*c,i[2]=l[2]+u[2]*c,i[3]=l[3]+u[3]*c,i}}),6453:(function(a){a.exports=f;function f(i,l,u,c,h){return i[0]=l,i[1]=u,i[2]=c,i[3]=h,i}}),1542:(function(a){a.exports=f;function f(i,l){var u=l[0]-i[0],c=l[1]-i[1],h=l[2]-i[2],d=l[3]-i[3];return u*u+c*c+h*h+d*d}}),9037:(function(a){a.exports=f;function f(i){var l=i[0],u=i[1],c=i[2],h=i[3];return l*l+u*u+c*c+h*h}}),2705:(function(a){a.exports=f;function f(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i[3]=l[3]-u[3],i}}),6342:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2],v=l[3];return i[0]=u[0]*c+u[4]*h+u[8]*d+u[12]*v,i[1]=u[1]*c+u[5]*h+u[9]*d+u[13]*v,i[2]=u[2]*c+u[6]*h+u[10]*d+u[14]*v,i[3]=u[3]*c+u[7]*h+u[11]*d+u[15]*v,i}}),5022:(function(a){a.exports=f;function f(i,l,u){var c=l[0],h=l[1],d=l[2],v=u[0],p=u[1],m=u[2],y=u[3],b=y*c+p*d-m*h,g=y*h+m*c-v*d,T=y*d+v*h-p*c,S=-v*c-p*h-m*d;return i[0]=b*y+S*-v+g*-m-T*-p,i[1]=g*y+S*-p+T*-v-b*-m,i[2]=T*y+S*-m+b*-p-g*-v,i[3]=l[3],i}}),9365:(function(a,f,i){var l=i(8096),u=i(7896);a.exports=c;function c(h){for(var d=Array.isArray(h)?h:l(h),v=0;v0)continue;De=qe.slice(0,1).join("")}return ee(De),J+=De.length,P=P.slice(De.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(N)?(ee(P.join("")),z=v,F):(P.push(N),q=N,F+1)}function Ee(){return N==="."||/[eE]/.test(N)?(P.push(N),z=S,q=N,F+1):N==="x"&&P.length===1&&P[0]==="0"?(z=_,P.push(N),q=N,F+1):/[^\d]/.test(N)?(ee(P.join("")),z=v,F):(P.push(N),q=N,F+1)}function Le(){return N==="f"&&(P.push(N),q=N,F+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(q)?(P.push(N),q=N,F+1):/[^\d]/.test(N)?(ee(P.join("")),z=v,F):(P.push(N),q=N,F+1)}function Fe(){if(/[^\d\w_]/.test(N)){var qe=P.join("");return X[qe]?z=w:K[qe]?z=M:z=A,ee(P.join("")),z=v,F}return P.push(N),q=N,F+1}}}),3585:(function(a,f,i){var l=i(9525);l=l.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),a.exports=l.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),9525:(function(a){a.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}),9458:(function(a,f,i){var l=i(399);a.exports=l.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),399:(function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),9746:(function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),8096:(function(a,f,i){var l=i(3193);a.exports=u;function u(c,h){var d=l(h),v=[];return v=v.concat(d(c)),v=v.concat(d(null)),v}}),6832:(function(a){a.exports=function(f){typeof f=="string"&&(f=[f]);for(var i=[].slice.call(arguments,1),l=[],u=0;u0;){T=x.pop();for(var _=T.adjacent,k=0;k<=A;++k){var E=_[k];if(!(!E.boundary||E.lastVisited<=-M)){for(var I=E.vertices,F=0;F<=A;++F){var D=I[F];D<0?w[F]=S:w[F]=C[D]}var z=this.orient();if(z>0)return E;E.lastVisited=-M,z===0&&x.push(E)}}}return null},b.walk=function(T,S){var A=this.vertices.length-1,M=this.dimension,w=this.vertices,C=this.tuple,x=S?this.interior.length*Math.random()|0:this.interior.length-1,_=this.interior[x];e:for(;!_.boundary;){for(var k=_.vertices,E=_.adjacent,I=0;I<=M;++I)C[I]=w[k[I]];_.lastVisited=A;for(var I=0;I<=M;++I){var F=E[I];if(!(F.lastVisited>=A)){var D=C[I];C[I]=T;var z=this.orient();if(C[I]=D,z<0){_=F;continue e}else F.boundary?F.lastVisited=-A:F.lastVisited=A}}return}return _},b.addPeaks=function(T,S){var A=this.vertices.length-1,M=this.dimension,w=this.vertices,C=this.tuple,x=this.interior,_=this.simplices,k=[S];S.lastVisited=A,S.vertices[S.vertices.indexOf(-1)]=A,S.boundary=!1,x.push(S);for(var E=[];k.length>0;){var S=k.pop(),I=S.vertices,F=S.adjacent,D=I.indexOf(A);if(!(D<0)){for(var z=0;z<=M;++z)if(z!==D){var N=F[z];if(!(!N.boundary||N.lastVisited>=A)){var q=N.vertices;if(N.lastVisited!==-A){for(var P=0,B=0;B<=M;++B)q[B]<0?(P=B,C[B]=T):C[B]=w[q[B]];var $=this.orient();if($>0){q[P]=A,N.boundary=!1,x.push(N),k.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var Q=N.adjacent,J=I.slice(),ne=F.slice(),te=new c(J,ne,!0);_.push(te);var Z=Q.indexOf(S);if(!(Z<0)){Q[Z]=te,ne[D]=N,J[z]=-1,ne[z]=S,F[z]=te,te.flip();for(var B=0;B<=M;++B){var G=J[B];if(!(G<0||G===A)){for(var j=new Array(M-1),Y=0,K=0;K<=M;++K){var X=J[K];X<0||K===B||(j[Y++]=X)}E.push(new h(j,te,B))}}}}}}}E.sort(d);for(var z=0;z+1=0?x[k++]=_[I]:E=I&1;if(E===(T&1)){var F=x[0];x[0]=x[1],x[1]=F}S.push(x)}}return S};function g(T,S){var A=T.length;if(A===0)throw new Error("Must have at least d+1 points");var M=T[0].length;if(A<=M)throw new Error("Must input at least d+1 points");var w=T.slice(0,M+1),C=l.apply(void 0,w);if(C===0)throw new Error("Input not in general position");for(var x=new Array(M+1),_=0;_<=M;++_)x[_]=_;C<0&&(x[0]=1,x[1]=0);for(var k=new c(x,new Array(M+1),!1),E=k.adjacent,I=new Array(M+2),_=0;_<=M;++_){for(var F=x.slice(),D=0;D<=M;++D)D===_&&(F[D]=-1);var z=F[0];F[0]=F[1],F[1]=z;var N=new c(F,new Array(M+1),!0);E[_]=N,I[_]=N}I[M+1]=k;for(var _=0;_<=M;++_)for(var F=E[_].vertices,q=E[_].adjacent,D=0;D<=M;++D){var P=F[D];if(P<0){q[D]=k;continue}for(var B=0;B<=M;++B)E[B].vertices.indexOf(P)<0&&(q[D]=E[B])}for(var $=new y(M,w,I),Q=!!S,_=M+1;_3*(I+1)?y(this,E):this.left.insert(E):this.left=C([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?y(this,E):this.right.insert(E):this.right=C([E]);else{var F=l.ge(this.leftPoints,E,M),D=l.ge(this.rightPoints,E,w);this.leftPoints.splice(F,0,E),this.rightPoints.splice(D,0,E)}},v.remove=function(E){var I=this.count-this.leftPoints;if(E[1]3*(I-1))return b(this,E);var D=this.left.remove(E);return D===h?(this.left=null,this.count-=1,c):(D===c&&(this.count-=1),D)}else if(E[0]>this.mid){if(!this.right)return u;var z=this.left?this.left.count:0;if(4*z>3*(I-1))return b(this,E);var D=this.right.remove(E);return D===h?(this.right=null,this.count-=1,c):(D===c&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===E?h:u;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var N=this,q=this.left;q.right;)N=q,q=q.right;if(N===this)q.right=this.right;else{var P=this.left,D=this.right;N.count-=q.count,N.right=q.left,q.left=P,q.right=D}p(this,q),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?p(this,this.left):p(this,this.right);return c}for(var P=l.ge(this.leftPoints,E,M);P=0&&E[D][1]>=I;--D){var z=F(E[D]);if(z)return z}}function S(E,I){for(var F=0;Fthis.mid){if(this.right){var F=this.right.queryPoint(E,I);if(F)return F}return T(this.rightPoints,E,I)}else return S(this.leftPoints,I)},v.queryInterval=function(E,I,F){if(Ethis.mid&&this.right){var D=this.right.queryInterval(E,I,F);if(D)return D}return Ithis.mid?T(this.rightPoints,E,F):S(this.leftPoints,F)};function A(E,I){return E-I}function M(E,I){var F=E[0]-I[0];return F||E[1]-I[1]}function w(E,I){var F=E[1]-I[1];return F||E[0]-I[0]}function C(E){if(E.length===0)return null;for(var I=[],F=0;F>1],z=[],N=[],q=[],F=0;F + * @license MIT + */a.exports=function(l){return l!=null&&(f(l)||i(l)||!!l._isBuffer)};function f(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function i(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&f(l.slice(0,0))}}),3596:(function(a){a.exports=function(f){for(var i=f.length,l,u=0;u13)&&l!==32&&l!==133&&l!==160&&l!==5760&&l!==6158&&(l<8192||l>8205)&&l!==8232&&l!==8233&&l!==8239&&l!==8287&&l!==8288&&l!==12288&&l!==65279)return!1;return!0}}),3578:(function(a){function f(i,l,u){return i*(1-u)+l*u}a.exports=f}),7191:(function(a,f,i){var l=i(4690),u=i(9823),c=i(7332),h=i(7787),d=i(7437),v=i(2142),p={length:i(4693),normalize:i(899),dot:i(9305),cross:i(903)},m=u(),y=u(),b=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],T=[0,0,0];a.exports=function(C,x,_,k,E,I){if(x||(x=[0,0,0]),_||(_=[0,0,0]),k||(k=[0,0,0]),E||(E=[0,0,0,1]),I||(I=[0,0,0,1]),!l(m,C)||(c(y,m),y[3]=0,y[7]=0,y[11]=0,y[15]=1,Math.abs(h(y)<1e-8)))return!1;var F=m[3],D=m[7],z=m[11],N=m[12],q=m[13],P=m[14],B=m[15];if(F!==0||D!==0||z!==0){b[0]=F,b[1]=D,b[2]=z,b[3]=B;var $=d(y,y);if(!$)return!1;v(y,y),S(E,b,y)}else E[0]=E[1]=E[2]=0,E[3]=1;if(x[0]=N,x[1]=q,x[2]=P,A(g,m),_[0]=p.length(g[0]),p.normalize(g[0],g[0]),k[0]=p.dot(g[0],g[1]),M(g[1],g[1],g[0],1,-k[0]),_[1]=p.length(g[1]),p.normalize(g[1],g[1]),k[0]/=_[1],k[1]=p.dot(g[0],g[2]),M(g[2],g[2],g[0],1,-k[1]),k[2]=p.dot(g[1],g[2]),M(g[2],g[2],g[1],1,-k[2]),_[2]=p.length(g[2]),p.normalize(g[2],g[2]),k[1]/=_[2],k[2]/=_[2],p.cross(T,g[1],g[2]),p.dot(g[0],T)<0)for(var Q=0;Q<3;Q++)_[Q]*=-1,g[Q][0]*=-1,g[Q][1]*=-1,g[Q][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(I[0]=-I[0]),g[0][2]>g[2][0]&&(I[1]=-I[1]),g[1][0]>g[0][1]&&(I[2]=-I[2]),!0};function S(w,C,x){var _=C[0],k=C[1],E=C[2],I=C[3];return w[0]=x[0]*_+x[4]*k+x[8]*E+x[12]*I,w[1]=x[1]*_+x[5]*k+x[9]*E+x[13]*I,w[2]=x[2]*_+x[6]*k+x[10]*E+x[14]*I,w[3]=x[3]*_+x[7]*k+x[11]*E+x[15]*I,w}function A(w,C){w[0][0]=C[0],w[0][1]=C[1],w[0][2]=C[2],w[1][0]=C[4],w[1][1]=C[5],w[1][2]=C[6],w[2][0]=C[8],w[2][1]=C[9],w[2][2]=C[10]}function M(w,C,x,_,k){w[0]=C[0]*_+x[0]*k,w[1]=C[1]*_+x[1]*k,w[2]=C[2]*_+x[2]*k}}),4690:(function(a){a.exports=function(i,l){var u=l[15];if(u===0)return!1;for(var c=1/u,h=0;h<16;h++)i[h]=l[h]*c;return!0}}),7649:(function(a,f,i){var l=i(1868),u=i(1102),c=i(7191),h=i(7787),d=i(1116),v=b(),p=b(),m=b();a.exports=y;function y(S,A,M,w){if(h(A)===0||h(M)===0)return!1;var C=c(A,v.translate,v.scale,v.skew,v.perspective,v.quaternion),x=c(M,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!C||!x?!1:(l(m.translate,v.translate,p.translate,w),l(m.skew,v.skew,p.skew,w),l(m.scale,v.scale,p.scale,w),l(m.perspective,v.perspective,p.perspective,w),d(m.quaternion,v.quaternion,p.quaternion,w),u(S,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function b(){return{translate:g(),scale:g(1),skew:g(),perspective:T(),quaternion:T()}}function g(S){return[S||0,S||0,S||0]}function T(){return[0,0,0,1]}}),1102:(function(a,f,i){var l={identity:i(9947),translate:i(998),multiply:i(104),create:i(9823),scale:i(3668),fromRotationTranslation:i(7280)};l.create();var u=l.create();a.exports=function(h,d,v,p,m,y){return l.identity(h),l.fromRotationTranslation(h,y,d),h[3]=m[0],h[7]=m[1],h[11]=m[2],h[15]=m[3],l.identity(u),p[2]!==0&&(u[9]=p[2],l.multiply(h,h,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],l.multiply(h,h,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],l.multiply(h,h,u)),l.scale(h,h,v),h}}),9298:(function(a,f,i){var l=i(5070),u=i(7649),c=i(7437),h=i(6109),d=i(7115),v=i(5240),p=i(3012),m=i(998);i(3668);var y=i(899),b=[0,0,0];a.exports=A;function g(M){this._components=M.slice(),this._time=[0],this.prevMatrix=M.slice(),this.nextMatrix=M.slice(),this.computedMatrix=M.slice(),this.computedInverse=M.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var T=g.prototype;T.recalcMatrix=function(M){var w=this._time,C=l.le(w,M),x=this.computedMatrix;if(!(C<0)){var _=this._components;if(C===w.length-1)for(var k=16*C,E=0;E<16;++E)x[E]=_[k++];else{for(var I=w[C+1]-w[C],k=16*C,F=this.prevMatrix,D=!0,E=0;E<16;++E)F[E]=_[k++];for(var z=this.nextMatrix,E=0;E<16;++E)z[E]=_[k++],D=D&&F[E]===z[E];if(I<1e-6||D)for(var E=0;E<16;++E)x[E]=F[E];else u(x,F,z,(M-w[C])/I)}var N=this.computedUp;N[0]=x[1],N[1]=x[5],N[2]=x[9],y(N,N);var q=this.computedInverse;c(q,x);var P=this.computedEye,B=q[15];P[0]=q[12]/B,P[1]=q[13]/B,P[2]=q[14]/B;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),E=0;E<3;++E)$[E]=P[E]-x[2+4*E]*Q}},T.idle=function(M){if(!(M1&&l(c[p[g-2]],c[p[g-1]],b)<=0;)g-=1,p.pop();for(p.push(y),g=m.length;g>1&&l(c[m[g-2]],c[m[g-1]],b)>=0;)g-=1,m.pop();m.push(y)}for(var T=new Array(m.length+p.length-2),S=0,d=0,A=p.length;d0;--M)T[S++]=m[M];return T}}),6145:(function(a,f,i){a.exports=u;var l=i(4110);function u(c,h){h||(h=c,c=window);var d=0,v=0,p=0,m={shift:!1,alt:!1,control:!1,meta:!1},y=!1;function b(E){var I=!1;return"altKey"in E&&(I=I||E.altKey!==m.alt,m.alt=!!E.altKey),"shiftKey"in E&&(I=I||E.shiftKey!==m.shift,m.shift=!!E.shiftKey),"ctrlKey"in E&&(I=I||E.ctrlKey!==m.control,m.control=!!E.ctrlKey),"metaKey"in E&&(I=I||E.metaKey!==m.meta,m.meta=!!E.metaKey),I}function g(E,I){var F=l.x(I),D=l.y(I);"buttons"in I&&(E=I.buttons|0),(E!==d||F!==v||D!==p||b(I))&&(d=E|0,v=F||0,p=D||0,h&&h(d,v,p,m))}function T(E){g(0,E)}function S(){(d||v||p||m.shift||m.alt||m.meta||m.control)&&(v=p=0,d=0,m.shift=m.alt=m.control=m.meta=!1,h&&h(0,0,0,m))}function A(E){b(E)&&h&&h(d,v,p,m)}function M(E){l.buttons(E)===0?g(0,E):g(d,E)}function w(E){g(d|l.buttons(E),E)}function C(E){g(d&~l.buttons(E),E)}function x(){y||(y=!0,c.addEventListener("mousemove",M),c.addEventListener("mousedown",w),c.addEventListener("mouseup",C),c.addEventListener("mouseleave",T),c.addEventListener("mouseenter",T),c.addEventListener("mouseout",T),c.addEventListener("mouseover",T),c.addEventListener("blur",S),c.addEventListener("keyup",A),c.addEventListener("keydown",A),c.addEventListener("keypress",A),c!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function _(){y&&(y=!1,c.removeEventListener("mousemove",M),c.removeEventListener("mousedown",w),c.removeEventListener("mouseup",C),c.removeEventListener("mouseleave",T),c.removeEventListener("mouseenter",T),c.removeEventListener("mouseout",T),c.removeEventListener("mouseover",T),c.removeEventListener("blur",S),c.removeEventListener("keyup",A),c.removeEventListener("keydown",A),c.removeEventListener("keypress",A),c!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}x();var k={element:c};return Object.defineProperties(k,{enabled:{get:function(){return y},set:function(E){E?x():_()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),k}}),2565:(function(a){var f={left:0,top:0};a.exports=i;function i(u,c,h){c=c||u.currentTarget||u.srcElement,Array.isArray(h)||(h=[0,0]);var d=u.clientX||0,v=u.clientY||0,p=l(c);return h[0]=d-p.left,h[1]=v-p.top,h}function l(u){return u===window||u===document||u===document.body?f:u.getBoundingClientRect()}}),4110:(function(a,f){function i(h){if(typeof h=="object"){if("buttons"in h)return h.buttons;if("which"in h){var d=h.which;if(d===2)return 4;if(d===3)return 2;if(d>0)return 1<=0)return 1<0){if(ne=1,G[Y++]=m(x[I],S,A,M),I+=$,w>0)for(J=1,F=x[I],K=G[Y]=m(F,S,A,M),le=G[Y+X],de=G[Y+oe],Oe=G[Y+_e],(K!==le||K!==de||K!==Oe)&&(z=x[I+D],q=x[I+N],B=x[I+P],v(J,ne,F,z,q,B,K,le,de,Oe,S,A,M),be=j[Y]=te++),Y+=1,I+=$,J=2;J0)for(J=1,F=x[I],K=G[Y]=m(F,S,A,M),le=G[Y+X],de=G[Y+oe],Oe=G[Y+_e],(K!==le||K!==de||K!==Oe)&&(z=x[I+D],q=x[I+N],B=x[I+P],v(J,ne,F,z,q,B,K,le,de,Oe,S,A,M),be=j[Y]=te++,Oe!==de&&p(j[Y+oe],be,q,B,de,Oe,S,A,M)),Y+=1,I+=$,J=2;J0){if(J=1,G[Y++]=m(x[I],S,A,M),I+=$,C>0)for(ne=1,F=x[I],K=G[Y]=m(F,S,A,M),de=G[Y+oe],le=G[Y+X],Oe=G[Y+_e],(K!==de||K!==le||K!==Oe)&&(z=x[I+D],q=x[I+N],B=x[I+P],v(J,ne,F,z,q,B,K,de,le,Oe,S,A,M),be=j[Y]=te++),Y+=1,I+=$,ne=2;ne0)for(ne=1,F=x[I],K=G[Y]=m(F,S,A,M),de=G[Y+oe],le=G[Y+X],Oe=G[Y+_e],(K!==de||K!==le||K!==Oe)&&(z=x[I+D],q=x[I+N],B=x[I+P],v(J,ne,F,z,q,B,K,de,le,Oe,S,A,M),be=j[Y]=te++,Oe!==de&&p(j[Y+oe],be,B,z,Oe,de,S,A,M)),Y+=1,I+=$,ne=2;ne 0"),typeof d.vertex!="function"&&v("Must specify vertex creation function"),typeof d.cell!="function"&&v("Must specify cell creation function"),typeof d.phase!="function"&&v("Must specify phase function");for(var b=d.getters||[],g=new Array(m),T=0;T=0?g[T]=!0:g[T]=!1;return c(d.vertex,d.cell,d.phase,y,p,g)}}),9144:(function(a,f,i){var l=i(3094),u={zero:function(A,M,w,C){var x=A[0],_=w[0];C|=0;var k=0,E=_;for(k=0;k2&&k[1]>2&&C(_.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),x.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),x.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(w(_.pick(0,-1).lo(1).hi(k[1]-2),x.pick(0,-1,1).lo(1).hi(k[1]-2)),M(x.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(w(_.pick(k[0]-1,-1).lo(1).hi(k[1]-2),x.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(x.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(w(_.pick(-1,0).lo(1).hi(k[0]-2),x.pick(-1,0,0).lo(1).hi(k[0]-2)),M(x.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(w(_.pick(-1,k[1]-1).lo(1).hi(k[0]-2),x.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(x.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),x.set(0,0,0,0),x.set(0,0,1,0),x.set(k[0]-1,0,0,0),x.set(k[0]-1,0,1,0),x.set(0,k[1]-1,0,0),x.set(0,k[1]-1,1,0),x.set(k[0]-1,k[1]-1,0,0),x.set(k[0]-1,k[1]-1,1,0),x}}function S(A){var M=A.join(),k=m[M];if(k)return k;for(var w=A.length,C=[y,b],x=1;x<=w;++x)C.push(g(x));var _=T,k=_.apply(void 0,C);return m[M]=k,k}a.exports=function(M,w,C){if(Array.isArray(C)||(typeof C=="string"?C=l(w.dimension,C):C=l(w.dimension,"clamp")),w.size===0)return M;if(w.dimension===0)return M.set(0),M;var x=S(C);return x(M,w)}}),3581:(function(a){function f(h,d){var v=Math.floor(d),p=d-v,m=0<=v&&v0;){q<64?(w=q,q=0):(w=64,q-=64);for(var P=m[1]|0;P>0;){P<64?(C=P,P=0):(C=64,P-=64),g=z+q*_+P*k,A=N+q*I+P*F;var B=0,$=0,Q=0,J=E,ne=_-x*E,te=k-w*_,Z=D,G=I-x*D,j=F-w*I;for(Q=0;Q0;){F<64?(w=F,F=0):(w=64,F-=64);for(var D=m[0]|0;D>0;){D<64?(M=D,D=0):(M=64,D-=64),g=E+F*x+D*C,A=I+F*k+D*_;var z=0,N=0,q=x,P=C-w*x,B=k,$=_-w*k;for(N=0;N0;){N<64?(C=N,N=0):(C=64,N-=64);for(var q=m[0]|0;q>0;){q<64?(M=q,q=0):(M=64,q-=64);for(var P=m[1]|0;P>0;){P<64?(w=P,P=0):(w=64,P-=64),g=D+N*k+q*x+P*_,A=z+N*F+q*E+P*I;var B=0,$=0,Q=0,J=k,ne=x-C*k,te=_-M*x,Z=F,G=E-C*F,j=I-M*E;for(Q=0;QT;){B=0,$=z-w;t:for(q=0;q<_;++q){if(Q=A[$],J=P[B],QJ)break t;$+=E,B+=I}for(B=z,$=z-w,q=0;q<_;++q)A[B]=A[$],B+=k,$+=k;z-=w}for(B=z,$=0,q=0;q<_;++q)A[B]=P[$++],B+=k}b(P)}}};function h(y,b){var g=u(b),T=[b,y].join(","),S=c[T];return g?S(g[0],g[1]):S()}var d={"uint32,1,0":function(y,b,g){return function T(S,A,M,w,C,x,_,k,E,I,F){var D=(A-S+1)/6|0,z=S+D,N=A-D,q=S+A>>1,P=q-D,B=q+D,$=z,Q=P,J=q,ne=B,te=N,Z=S+1,G=A-1,j=!0,Y,K,X,ee,le,oe,fe,de,_e,we=0,Oe=0,be=0,Te,ke,Ee,Le,Fe,qe,We,Qe,De,me,Ce,et,st,ot,ut,ht,Ht=k,Et=b(Ht),Jt=b(Ht);ke=C*$,Ee=C*Q,ht=w;e:for(Te=0;Te0){K=$,$=Q,Q=K;break e}if(be<0)break e;ht+=I}ke=C*ne,Ee=C*te,ht=w;e:for(Te=0;Te0){K=ne,ne=te,te=K;break e}if(be<0)break e;ht+=I}ke=C*$,Ee=C*J,ht=w;e:for(Te=0;Te0){K=$,$=J,J=K;break e}if(be<0)break e;ht+=I}ke=C*Q,Ee=C*J,ht=w;e:for(Te=0;Te0){K=Q,Q=J,J=K;break e}if(be<0)break e;ht+=I}ke=C*$,Ee=C*ne,ht=w;e:for(Te=0;Te0){K=$,$=ne,ne=K;break e}if(be<0)break e;ht+=I}ke=C*J,Ee=C*ne,ht=w;e:for(Te=0;Te0){K=J,J=ne,ne=K;break e}if(be<0)break e;ht+=I}ke=C*Q,Ee=C*te,ht=w;e:for(Te=0;Te0){K=Q,Q=te,te=K;break e}if(be<0)break e;ht+=I}ke=C*Q,Ee=C*J,ht=w;e:for(Te=0;Te0){K=Q,Q=J,J=K;break e}if(be<0)break e;ht+=I}ke=C*ne,Ee=C*te,ht=w;e:for(Te=0;Te0){K=ne,ne=te,te=K;break e}if(be<0)break e;ht+=I}for(ke=C*$,Ee=C*Q,Le=C*J,Fe=C*ne,qe=C*te,We=C*z,Qe=C*q,De=C*N,ut=0,ht=w,Te=0;Te0)G--;else if(be<0){for(ke=C*oe,Ee=C*Z,Le=C*G,ht=w,Te=0;Te0)for(;;){fe=w+G*C,ut=0;e:for(Te=0;Te0){if(--GN){e:for(;;){for(fe=w+Z*C,ut=0,ht=w,Te=0;Te1&&T?A(g,T[0],T[1]):A(g)}var p={"uint32,1,0":function(y,b){return function(g){var T=g.data,S=g.offset|0,A=g.shape,M=g.stride,w=M[0]|0,C=A[0]|0,x=M[1]|0,_=A[1]|0,k=x,E=x,I=1;C<=32?y(0,C-1,T,S,w,x,C,_,k,E,I):b(0,C-1,T,S,w,x,C,_,k,E,I)}}};function m(y,b){var g=[b,y].join(","),T=p[g],S=h(y,b),A=v(y,b,S);return T(S,A)}a.exports=m}),8729:(function(a,f,i){var l=i(8139),u={};function c(h){var d=h.order,v=h.dtype,p=[d,v],m=p.join(":"),y=u[m];return y||(u[m]=y=l(d,v)),y(h),h}a.exports=c}),5050:(function(a,f,i){var l=i(4780),u=typeof Float64Array<"u";function c(b,g){return b[0]-g[0]}function h(){var b=this.stride,g=new Array(b.length),T;for(T=0;T=0&&(x=w|0,C+=k*x,_-=x),new S(this.data,_,k,C)},A.step=function(w){var C=this.shape[0],x=this.stride[0],_=this.offset,k=0,E=Math.ceil;return typeof w=="number"&&(k=w|0,k<0?(_+=x*(C-1),C=E(-C/k)):C=E(C/k),x*=k),new S(this.data,C,x,_)},A.transpose=function(w){w=w===void 0?0:w|0;var C=this.shape,x=this.stride;return new S(this.data,C[w],x[w],this.offset)},A.pick=function(w){var C=[],x=[],_=this.offset;typeof w=="number"&&w>=0?_=_+this.stride[0]*w|0:(C.push(this.shape[0]),x.push(this.stride[0]));var k=g[C.length+1];return k(this.data,C,x,_)},function(w,C,x,_){return new S(w,C[0],x[0],_)}},2:function(b,g,T){function S(M,w,C,x,_,k){this.data=M,this.shape=[w,C],this.stride=[x,_],this.offset=k|0}var A=S.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(w,C,x){return b==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*C,x):this.data[this.offset+this.stride[0]*w+this.stride[1]*C]=x},A.get=function(w,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*C):this.data[this.offset+this.stride[0]*w+this.stride[1]*C]},A.index=function(w,C){return this.offset+this.stride[0]*w+this.stride[1]*C},A.hi=function(w,C){return new S(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(w,C){var x=this.offset,_=0,k=this.shape[0],E=this.shape[1],I=this.stride[0],F=this.stride[1];return typeof w=="number"&&w>=0&&(_=w|0,x+=I*_,k-=_),typeof C=="number"&&C>=0&&(_=C|0,x+=F*_,E-=_),new S(this.data,k,E,I,F,x)},A.step=function(w,C){var x=this.shape[0],_=this.shape[1],k=this.stride[0],E=this.stride[1],I=this.offset,F=0,D=Math.ceil;return typeof w=="number"&&(F=w|0,F<0?(I+=k*(x-1),x=D(-x/F)):x=D(x/F),k*=F),typeof C=="number"&&(F=C|0,F<0?(I+=E*(_-1),_=D(-_/F)):_=D(_/F),E*=F),new S(this.data,x,_,k,E,I)},A.transpose=function(w,C){w=w===void 0?0:w|0,C=C===void 0?1:C|0;var x=this.shape,_=this.stride;return new S(this.data,x[w],x[C],_[w],_[C],this.offset)},A.pick=function(w,C){var x=[],_=[],k=this.offset;typeof w=="number"&&w>=0?k=k+this.stride[0]*w|0:(x.push(this.shape[0]),_.push(this.stride[0])),typeof C=="number"&&C>=0?k=k+this.stride[1]*C|0:(x.push(this.shape[1]),_.push(this.stride[1]));var E=g[x.length+1];return E(this.data,x,_,k)},function(w,C,x,_){return new S(w,C[0],C[1],x[0],x[1],_)}},3:function(b,g,T){function S(M,w,C,x,_,k,E,I){this.data=M,this.shape=[w,C,x],this.stride=[_,k,E],this.offset=I|0}var A=S.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var w=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),x=Math.abs(this.stride[2]);return w>C?C>x?[2,1,0]:w>x?[1,2,0]:[1,0,2]:w>x?[2,0,1]:x>C?[0,1,2]:[0,2,1]}}),A.set=function(w,C,x,_){return b==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x,_):this.data[this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x]=_},A.get=function(w,C,x){return b==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x):this.data[this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x]},A.index=function(w,C,x){return this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x},A.hi=function(w,C,x){return new S(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof x!="number"||x<0?this.shape[2]:x|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(w,C,x){var _=this.offset,k=0,E=this.shape[0],I=this.shape[1],F=this.shape[2],D=this.stride[0],z=this.stride[1],N=this.stride[2];return typeof w=="number"&&w>=0&&(k=w|0,_+=D*k,E-=k),typeof C=="number"&&C>=0&&(k=C|0,_+=z*k,I-=k),typeof x=="number"&&x>=0&&(k=x|0,_+=N*k,F-=k),new S(this.data,E,I,F,D,z,N,_)},A.step=function(w,C,x){var _=this.shape[0],k=this.shape[1],E=this.shape[2],I=this.stride[0],F=this.stride[1],D=this.stride[2],z=this.offset,N=0,q=Math.ceil;return typeof w=="number"&&(N=w|0,N<0?(z+=I*(_-1),_=q(-_/N)):_=q(_/N),I*=N),typeof C=="number"&&(N=C|0,N<0?(z+=F*(k-1),k=q(-k/N)):k=q(k/N),F*=N),typeof x=="number"&&(N=x|0,N<0?(z+=D*(E-1),E=q(-E/N)):E=q(E/N),D*=N),new S(this.data,_,k,E,I,F,D,z)},A.transpose=function(w,C,x){w=w===void 0?0:w|0,C=C===void 0?1:C|0,x=x===void 0?2:x|0;var _=this.shape,k=this.stride;return new S(this.data,_[w],_[C],_[x],k[w],k[C],k[x],this.offset)},A.pick=function(w,C,x){var _=[],k=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(_.push(this.shape[0]),k.push(this.stride[0])),typeof C=="number"&&C>=0?E=E+this.stride[1]*C|0:(_.push(this.shape[1]),k.push(this.stride[1])),typeof x=="number"&&x>=0?E=E+this.stride[2]*x|0:(_.push(this.shape[2]),k.push(this.stride[2]));var I=g[_.length+1];return I(this.data,_,k,E)},function(w,C,x,_){return new S(w,C[0],C[1],C[2],x[0],x[1],x[2],_)}},4:function(b,g,T){function S(M,w,C,x,_,k,E,I,F,D){this.data=M,this.shape=[w,C,x,_],this.stride=[k,E,I,F],this.offset=D|0}var A=S.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:T}),A.set=function(w,C,x,_,k){return b==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x+this.stride[3]*_,k):this.data[this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x+this.stride[3]*_]=k},A.get=function(w,C,x,_){return b==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x+this.stride[3]*_):this.data[this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x+this.stride[3]*_]},A.index=function(w,C,x,_){return this.offset+this.stride[0]*w+this.stride[1]*C+this.stride[2]*x+this.stride[3]*_},A.hi=function(w,C,x,_){return new S(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof x!="number"||x<0?this.shape[2]:x|0,typeof _!="number"||_<0?this.shape[3]:_|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(w,C,x,_){var k=this.offset,E=0,I=this.shape[0],F=this.shape[1],D=this.shape[2],z=this.shape[3],N=this.stride[0],q=this.stride[1],P=this.stride[2],B=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,k+=N*E,I-=E),typeof C=="number"&&C>=0&&(E=C|0,k+=q*E,F-=E),typeof x=="number"&&x>=0&&(E=x|0,k+=P*E,D-=E),typeof _=="number"&&_>=0&&(E=_|0,k+=B*E,z-=E),new S(this.data,I,F,D,z,N,q,P,B,k)},A.step=function(w,C,x,_){var k=this.shape[0],E=this.shape[1],I=this.shape[2],F=this.shape[3],D=this.stride[0],z=this.stride[1],N=this.stride[2],q=this.stride[3],P=this.offset,B=0,$=Math.ceil;return typeof w=="number"&&(B=w|0,B<0?(P+=D*(k-1),k=$(-k/B)):k=$(k/B),D*=B),typeof C=="number"&&(B=C|0,B<0?(P+=z*(E-1),E=$(-E/B)):E=$(E/B),z*=B),typeof x=="number"&&(B=x|0,B<0?(P+=N*(I-1),I=$(-I/B)):I=$(I/B),N*=B),typeof _=="number"&&(B=_|0,B<0?(P+=q*(F-1),F=$(-F/B)):F=$(F/B),q*=B),new S(this.data,k,E,I,F,D,z,N,q,P)},A.transpose=function(w,C,x,_){w=w===void 0?0:w|0,C=C===void 0?1:C|0,x=x===void 0?2:x|0,_=_===void 0?3:_|0;var k=this.shape,E=this.stride;return new S(this.data,k[w],k[C],k[x],k[_],E[w],E[C],E[x],E[_],this.offset)},A.pick=function(w,C,x,_){var k=[],E=[],I=this.offset;typeof w=="number"&&w>=0?I=I+this.stride[0]*w|0:(k.push(this.shape[0]),E.push(this.stride[0])),typeof C=="number"&&C>=0?I=I+this.stride[1]*C|0:(k.push(this.shape[1]),E.push(this.stride[1])),typeof x=="number"&&x>=0?I=I+this.stride[2]*x|0:(k.push(this.shape[2]),E.push(this.stride[2])),typeof _=="number"&&_>=0?I=I+this.stride[3]*_|0:(k.push(this.shape[3]),E.push(this.stride[3]));var F=g[k.length+1];return F(this.data,k,E,I)},function(w,C,x,_){return new S(w,C[0],C[1],C[2],C[3],x[0],x[1],x[2],x[3],_)}},5:function(g,T,S){function A(w,C,x,_,k,E,I,F,D,z,N,q){this.data=w,this.shape=[C,x,_,k,E],this.stride=[I,F,D,z,N],this.offset=q|0}var M=A.prototype;return M.dtype=g,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:S}),M.set=function(C,x,_,k,E,I){return g==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*x+this.stride[2]*_+this.stride[3]*k+this.stride[4]*E,I):this.data[this.offset+this.stride[0]*C+this.stride[1]*x+this.stride[2]*_+this.stride[3]*k+this.stride[4]*E]=I},M.get=function(C,x,_,k,E){return g==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*x+this.stride[2]*_+this.stride[3]*k+this.stride[4]*E):this.data[this.offset+this.stride[0]*C+this.stride[1]*x+this.stride[2]*_+this.stride[3]*k+this.stride[4]*E]},M.index=function(C,x,_,k,E){return this.offset+this.stride[0]*C+this.stride[1]*x+this.stride[2]*_+this.stride[3]*k+this.stride[4]*E},M.hi=function(C,x,_,k,E){return new A(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof x!="number"||x<0?this.shape[1]:x|0,typeof _!="number"||_<0?this.shape[2]:_|0,typeof k!="number"||k<0?this.shape[3]:k|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(C,x,_,k,E){var I=this.offset,F=0,D=this.shape[0],z=this.shape[1],N=this.shape[2],q=this.shape[3],P=this.shape[4],B=this.stride[0],$=this.stride[1],Q=this.stride[2],J=this.stride[3],ne=this.stride[4];return typeof C=="number"&&C>=0&&(F=C|0,I+=B*F,D-=F),typeof x=="number"&&x>=0&&(F=x|0,I+=$*F,z-=F),typeof _=="number"&&_>=0&&(F=_|0,I+=Q*F,N-=F),typeof k=="number"&&k>=0&&(F=k|0,I+=J*F,q-=F),typeof E=="number"&&E>=0&&(F=E|0,I+=ne*F,P-=F),new A(this.data,D,z,N,q,P,B,$,Q,J,ne,I)},M.step=function(C,x,_,k,E){var I=this.shape[0],F=this.shape[1],D=this.shape[2],z=this.shape[3],N=this.shape[4],q=this.stride[0],P=this.stride[1],B=this.stride[2],$=this.stride[3],Q=this.stride[4],J=this.offset,ne=0,te=Math.ceil;return typeof C=="number"&&(ne=C|0,ne<0?(J+=q*(I-1),I=te(-I/ne)):I=te(I/ne),q*=ne),typeof x=="number"&&(ne=x|0,ne<0?(J+=P*(F-1),F=te(-F/ne)):F=te(F/ne),P*=ne),typeof _=="number"&&(ne=_|0,ne<0?(J+=B*(D-1),D=te(-D/ne)):D=te(D/ne),B*=ne),typeof k=="number"&&(ne=k|0,ne<0?(J+=$*(z-1),z=te(-z/ne)):z=te(z/ne),$*=ne),typeof E=="number"&&(ne=E|0,ne<0?(J+=Q*(N-1),N=te(-N/ne)):N=te(N/ne),Q*=ne),new A(this.data,I,F,D,z,N,q,P,B,$,Q,J)},M.transpose=function(C,x,_,k,E){C=C===void 0?0:C|0,x=x===void 0?1:x|0,_=_===void 0?2:_|0,k=k===void 0?3:k|0,E=E===void 0?4:E|0;var I=this.shape,F=this.stride;return new A(this.data,I[C],I[x],I[_],I[k],I[E],F[C],F[x],F[_],F[k],F[E],this.offset)},M.pick=function(C,x,_,k,E){var I=[],F=[],D=this.offset;typeof C=="number"&&C>=0?D=D+this.stride[0]*C|0:(I.push(this.shape[0]),F.push(this.stride[0])),typeof x=="number"&&x>=0?D=D+this.stride[1]*x|0:(I.push(this.shape[1]),F.push(this.stride[1])),typeof _=="number"&&_>=0?D=D+this.stride[2]*_|0:(I.push(this.shape[2]),F.push(this.stride[2])),typeof k=="number"&&k>=0?D=D+this.stride[3]*k|0:(I.push(this.shape[3]),F.push(this.stride[3])),typeof E=="number"&&E>=0?D=D+this.stride[4]*E|0:(I.push(this.shape[4]),F.push(this.stride[4]));var z=T[I.length+1];return z(this.data,I,F,D)},function(C,x,_,k){return new A(C,x[0],x[1],x[2],x[3],x[4],_[0],_[1],_[2],_[3],_[4],k)}}};function v(b,g){var T=g===-1?"T":String(g),S=d[T];return g===-1?S(b):g===0?S(b,m[b][0]):S(b,m[b],h)}function p(b){if(l(b))return"buffer";if(u)switch(Object.prototype.toString.call(b)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(b)?"array":"generic"}var m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function y(b,g,T,S){if(b===void 0){var _=m.array[0];return _([])}else typeof b=="number"&&(b=[b]);g===void 0&&(g=[b.length]);var A=g.length;if(T===void 0){T=new Array(A);for(var M=A-1,w=1;M>=0;--M)T[M]=w,w*=g[M]}if(S===void 0){S=0;for(var M=0;M>>0;a.exports=h;function h(d,v){if(isNaN(d)||isNaN(v))return NaN;if(d===v)return d;if(d===0)return v<0?-u:u;var p=l.hi(d),m=l.lo(d);return v>d==d>0?m===c?(p+=1,m=0):m+=1:m===0?(m=c,p-=1):m-=1,l.pack(m,p)}}),115:(function(a,f){var i=1e-6,l=1e-6;f.vertexNormals=function(u,c,h){for(var d=c.length,v=new Array(d),p=h===void 0?i:h,m=0;mp)for(var I=v[g],F=1/Math.sqrt(x*k),E=0;E<3;++E){var D=(E+1)%3,z=(E+2)%3;I[E]+=F*(_[D]*C[z]-_[z]*C[D])}}for(var m=0;mp)for(var F=1/Math.sqrt(N),E=0;E<3;++E)I[E]*=F;else for(var E=0;E<3;++E)I[E]=0}return v},f.faceNormals=function(u,c,h){for(var d=u.length,v=new Array(d),p=h===void 0?l:h,m=0;mp?M=1/Math.sqrt(M):M=0;for(var g=0;g<3;++g)A[g]*=M;v[m]=A}return v}}),567:(function(a){a.exports=f;function f(i,l,u,c,h,d,v,p,m,y){var b=l+d+y;if(g>0){var g=Math.sqrt(b+1);i[0]=.5*(v-m)/g,i[1]=.5*(p-c)/g,i[2]=.5*(u-d)/g,i[3]=.5*g}else{var T=Math.max(l,d,y),g=Math.sqrt(2*T-b+1);l>=T?(i[0]=.5*g,i[1]=.5*(h+u)/g,i[2]=.5*(p+c)/g,i[3]=.5*(v-m)/g):d>=T?(i[0]=.5*(u+h)/g,i[1]=.5*g,i[2]=.5*(m+v)/g,i[3]=.5*(p-c)/g):(i[0]=.5*(c+p)/g,i[1]=.5*(v+m)/g,i[2]=.5*g,i[3]=.5*(u-h)/g)}return i}}),7774:(function(a,f,i){a.exports=g;var l=i(8444),u=i(3012),c=i(5950),h=i(7437),d=i(567);function v(T,S,A){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(A,2))}function p(T,S,A,M){return Math.sqrt(Math.pow(T,2)+Math.pow(S,2)+Math.pow(A,2)+Math.pow(M,2))}function m(T,S){var A=S[0],M=S[1],w=S[2],C=S[3],x=p(A,M,w,C);x>1e-6?(T[0]=A/x,T[1]=M/x,T[2]=w/x,T[3]=C/x):(T[0]=T[1]=T[2]=0,T[3]=1)}function y(T,S,A){this.radius=l([A]),this.center=l(S),this.rotation=l(T),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var b=y.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(T){this.radius.curve(T),this.center.curve(T),this.rotation.curve(T);var S=this.computedRotation;m(S,S);var A=this.computedMatrix;c(A,S);var M=this.computedCenter,w=this.computedEye,C=this.computedUp,x=Math.exp(this.computedRadius[0]);w[0]=M[0]+x*A[2],w[1]=M[1]+x*A[6],w[2]=M[2]+x*A[10],C[0]=A[1],C[1]=A[5],C[2]=A[9];for(var _=0;_<3;++_){for(var k=0,E=0;E<3;++E)k+=A[_+4*E]*w[E];A[12+_]=-k}},b.getMatrix=function(T,S){this.recalcMatrix(T);var A=this.computedMatrix;if(S){for(var M=0;M<16;++M)S[M]=A[M];return S}return A},b.idle=function(T){this.center.idle(T),this.radius.idle(T),this.rotation.idle(T)},b.flush=function(T){this.center.flush(T),this.radius.flush(T),this.rotation.flush(T)},b.pan=function(T,S,A,M){S=S||0,A=A||0,M=M||0,this.recalcMatrix(T);var w=this.computedMatrix,C=w[1],x=w[5],_=w[9],k=v(C,x,_);C/=k,x/=k,_/=k;var E=w[0],I=w[4],F=w[8],D=E*C+I*x+F*_;E-=C*D,I-=x*D,F-=_*D;var z=v(E,I,F);E/=z,I/=z,F/=z,w[2],w[6],w[10];var N=E*S+C*A,q=I*S+x*A,P=F*S+_*A;this.center.move(T,N,q,P);var B=Math.exp(this.computedRadius[0]);B=Math.max(1e-4,B+M),this.radius.set(T,Math.log(B))},b.rotate=function(T,S,A,M){this.recalcMatrix(T),S=S||0,A=A||0;var w=this.computedMatrix,C=w[0],x=w[4],_=w[8],k=w[1],E=w[5],I=w[9],F=w[2],D=w[6],z=w[10],N=S*C+A*k,q=S*x+A*E,P=S*_+A*I,B=-(D*P-z*q),$=-(z*N-F*P),Q=-(F*q-D*N),J=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow($,2)-Math.pow(Q,2))),ne=p(B,$,Q,J);ne>1e-6?(B/=ne,$/=ne,Q/=ne,J/=ne):(B=$=Q=0,J=1);var te=this.computedRotation,Z=te[0],G=te[1],j=te[2],Y=te[3],K=Z*J+Y*B+G*Q-j*$,X=G*J+Y*$+j*B-Z*Q,ee=j*J+Y*Q+Z*$-G*B,le=Y*J-Z*B-G*$-j*Q;if(M){B=F,$=D,Q=z;var oe=Math.sin(M)/v(B,$,Q);B*=oe,$*=oe,Q*=oe,J=Math.cos(S),K=K*J+le*B+X*Q-ee*$,X=X*J+le*$+ee*B-K*Q,ee=ee*J+le*Q+K*$-X*B,le=le*J-K*B-X*$-ee*Q}var fe=p(K,X,ee,le);fe>1e-6?(K/=fe,X/=fe,ee/=fe,le/=fe):(K=X=ee=0,le=1),this.rotation.set(T,K,X,ee,le)},b.lookAt=function(T,S,A,M){this.recalcMatrix(T),A=A||this.computedCenter,S=S||this.computedEye,M=M||this.computedUp;var w=this.computedMatrix;u(w,S,A,M);var C=this.computedRotation;d(C,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),m(C,C),this.rotation.set(T,C[0],C[1],C[2],C[3]);for(var x=0,_=0;_<3;++_)x+=Math.pow(A[_]-S[_],2);this.radius.set(T,.5*Math.log(Math.max(x,1e-6))),this.center.set(T,A[0],A[1],A[2])},b.translate=function(T,S,A,M){this.center.move(T,S||0,A||0,M||0)},b.setMatrix=function(T,S){var A=this.computedRotation;d(A,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),m(A,A),this.rotation.set(T,A[0],A[1],A[2],A[3]);var M=this.computedMatrix;h(M,S);var w=M[15];if(Math.abs(w)>1e-6){var C=M[12]/w,x=M[13]/w,_=M[14]/w;this.recalcMatrix(T);var k=Math.exp(this.computedRadius[0]);this.center.set(T,C-M[2]*k,x-M[6]*k,_-M[10]*k),this.radius.idle(T)}else this.center.idle(T),this.radius.idle(T)},b.setDistance=function(T,S){S>0&&this.radius.set(T,Math.log(S))},b.setDistanceLimits=function(T,S){T>0?T=Math.log(T):T=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=S},b.getDistanceLimits=function(T){var S=this.radius.bounds;return T?(T[0]=Math.exp(S[0][0]),T[1]=Math.exp(S[1][0]),T):[Math.exp(S[0][0]),Math.exp(S[1][0])]},b.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},b.fromJSON=function(T){var S=this.lastT(),A=T.center;A&&this.center.set(S,A[0],A[1],A[2]);var M=T.rotation;M&&this.rotation.set(S,M[0],M[1],M[2],M[3]);var w=T.distance;w&&w>0&&this.radius.set(S,Math.log(w)),this.setDistanceLimits(T.zoomMin,T.zoomMax)};function g(T){T=T||{};var S=T.center||[0,0,0],A=T.rotation||[0,0,0,1],M=T.radius||1;S=[].slice.call(S,0,3),A=[].slice.call(A,0,4),m(A,A);var w=new y(A,S,Math.log(M));return w.setDistanceLimits(T.zoomMin,T.zoomMax),("eye"in T||"up"in T)&&w.lookAt(0,T.eye,T.center,T.up),w}}),4930:(function(a,f,i){/*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */var l=i(6184);a.exports=function(c,h,d){return d=typeof d<"u"?d+"":" ",l(d,h)+c}}),4405:(function(a){a.exports=function(i,l){l||(l=[0,""]),i=String(i);var u=parseFloat(i,10);return l[0]=u,l[1]=i.match(/[\d.\-\+]*\s*(.*)/)[1]||"",l}}),4166:(function(a,f,i){a.exports=u;var l=i(9398);function u(c,h){for(var d=h.length|0,v=c.length,p=[new Array(d),new Array(d)],m=0;m0){E=p[D][_][0],F=D;break}I=E[F^1];for(var z=0;z<2;++z)for(var N=p[z][_],q=0;q0&&(E=P,I=B,F=z)}return k||E&&g(E,F),I}function S(x,_){var k=p[_][x][0],E=[x];g(k,_);for(var I=k[_^1];;){for(;I!==x;)E.push(I),I=T(E[E.length-2],I,!1);if(p[0][x].length+p[1][x].length===0)break;var F=E[E.length-1],D=x,z=E[1],N=T(F,D,!0);if(l(h[F],h[D],h[z],h[N])<0)break;E.push(x),I=T(F,D)}return E}function A(x,_){return _[1]===_[_.length-1]}for(var m=0;m0;){p[0][m].length;var C=S(m,M);A(w,C)?w.push.apply(w,C):(w.length>0&&b.push(w),w=C)}w.length>0&&b.push(w)}return b}}),3959:(function(a,f,i){a.exports=u;var l=i(8348);function u(c,h){for(var d=l(c,h.length),v=new Array(h.length),p=new Array(h.length),m=[],y=0;y0;){var g=m.pop();v[g]=!1;for(var T=d[g],y=0;y0}w=w.filter(C);for(var x=w.length,_=new Array(x),k=new Array(x),M=0;M0;){var oe=X.pop(),fe=J[oe];v(fe,function(be,Te){return be-Te});var de=fe.length,_e=ee[oe],we;if(_e===0){var N=w[oe];we=[N]}for(var M=0;M=0)&&(ee[Oe]=_e^1,X.push(Oe),_e===0)){var N=w[Oe];K(N)||(N.reverse(),we.push(N))}}_e===0&&le.push(we)}return le}}),211:(function(a,f,i){a.exports=T;var l=i(417)[3],u=i(4385),c=i(9014),h=i(5070);function d(){return!0}function v(S){return function(A,M){var w=S[A];return w?!!w.queryPoint(M,d):!1}}function p(S){for(var A={},M=0;M0&&A[w]===M[0])C=S[w-1];else return 1;for(var x=1;C;){var _=C.key,k=l(M,_[0],_[1]);if(_[0][0]<_[1][0])if(k<0)C=C.left;else if(k>0)x=-1,C=C.right;else return 0;else if(k>0)C=C.left;else if(k<0)x=1,C=C.right;else return 0}return x}}function y(S){return 1}function b(S){return function(M){return S(M[0],M[1])?0:1}}function g(S,A){return function(w){return S(w[0],w[1])?0:A(w)}}function T(S){for(var A=S.length,M=[],w=[],C=0;C=y?(_=1,E=y+2*T+A):(_=-T/y,E=T*_+A)):(_=0,S>=0?(k=0,E=A):-S>=g?(k=1,E=g+2*S+A):(k=-S/g,E=S*k+A));else if(k<0)k=0,T>=0?(_=0,E=A):-T>=y?(_=1,E=y+2*T+A):(_=-T/y,E=T*_+A);else{var I=1/x;_*=I,k*=I,E=_*(y*_+b*k+2*T)+k*(b*_+g*k+2*S)+A}else{var F,D,z,N;_<0?(F=b+T,D=g+S,D>F?(z=D-F,N=y-2*b+g,z>=N?(_=1,k=0,E=y+2*T+A):(_=z/N,k=1-_,E=_*(y*_+b*k+2*T)+k*(b*_+g*k+2*S)+A)):(_=0,D<=0?(k=1,E=g+2*S+A):S>=0?(k=0,E=A):(k=-S/g,E=S*k+A))):k<0?(F=b+S,D=y+T,D>F?(z=D-F,N=y-2*b+g,z>=N?(k=1,_=0,E=g+2*S+A):(k=z/N,_=1-k,E=_*(y*_+b*k+2*T)+k*(b*_+g*k+2*S)+A)):(k=0,D<=0?(_=1,E=y+2*T+A):T>=0?(_=0,E=A):(_=-T/y,E=T*_+A))):(z=g+S-b-T,z<=0?(_=0,k=1,E=g+2*S+A):(N=y-2*b+g,z>=N?(_=1,k=0,E=y+2*T+A):(_=z/N,k=1-_,E=_*(y*_+b*k+2*T)+k*(b*_+g*k+2*S)+A)))}for(var q=1-_-k,m=0;m0){var g=d[p-1];if(l(y,g)===0&&c(g)!==b){p-=1;continue}}d[p++]=y}}return d.length=p,d}}),6184:(function(a){/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */var f="",i;a.exports=l;function l(u,c){if(typeof u!="string")throw new TypeError("expected a string");if(c===1)return u;if(c===2)return u+u;var h=u.length*c;if(i!==u||typeof i>"u")i=u,f="";else if(f.length>=h)return f.substr(0,h);for(;h>f.length&&c>1;)c&1&&(f+=u),c>>=1,u+=u;return f+=u,f=f.substr(0,h),f}}),8161:(function(a,f,i){a.exports=i.g.performance&&i.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),402:(function(a){a.exports=f;function f(i){for(var l=i.length,u=i[i.length-1],c=l,h=l-2;h>=0;--h){var d=u,v=i[h];u=d+v;var p=u-d,m=v-p;m&&(i[--c]=u,u=m)}for(var y=0,h=c;h0){if(D<=0)return z;N=F+D}else if(F<0){if(D>=0)return z;N=-(F+D)}else return z;var q=p*N;return z>=q||z<=-q?z:S(k,E,I)},function(k,E,I,F){var D=k[0]-F[0],z=E[0]-F[0],N=I[0]-F[0],q=k[1]-F[1],P=E[1]-F[1],B=I[1]-F[1],$=k[2]-F[2],Q=E[2]-F[2],J=I[2]-F[2],ne=z*B,te=N*P,Z=N*q,G=D*B,j=D*P,Y=z*q,K=$*(ne-te)+Q*(Z-G)+J*(j-Y),X=(Math.abs(ne)+Math.abs(te))*Math.abs($)+(Math.abs(Z)+Math.abs(G))*Math.abs(Q)+(Math.abs(j)+Math.abs(Y))*Math.abs(J),ee=m*X;return K>ee||-K>ee?K:A(k,E,I,F)}];function w(_){var k=M[_.length];return k||(k=M[_.length]=T(_.length)),k.apply(void 0,_)}function C(_,k,E,I,F,D,z){return function(q,P,B,$,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return I(q,P);case 3:return F(q,P,B);case 4:return D(q,P,B,$);case 5:return z(q,P,B,$,Q)}for(var J=new Array(arguments.length),ne=0;ne0&&y>0||m<0&&y<0)return!1;var b=l(v,h,d),g=l(p,h,d);return b>0&&g>0||b<0&&g<0?!1:m===0&&y===0&&b===0&&g===0?u(h,d,v,p):!0}}),4078:(function(a){a.exports=i;function f(l,u){var c=l+u,h=c-l,d=c-h,v=u-h,p=l-d,m=p+v;return m?[m,c]:[c]}function i(l,u){var c=l.length|0,h=u.length|0;if(c===1&&h===1)return f(l[0],-u[0]);var d=c+h,v=new Array(d),p=0,m=0,y=0,b=Math.abs,g=l[m],T=b(g),S=-u[y],A=b(S),M,w;T=h?(M=g,m+=1,m=h?(M=g,m+=1,m"u"&&(M=d(T));var w=T.length;if(w===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var C=v(S,+A),x=p(T,M),_=m(x,S,C,+A),k=y(x,S.length|0),E=h(M)(T,x.data,k,C),I=b(x),F=[].slice.call(_.data,0,_.shape[0]);return u.free(C),u.free(x.data),u.free(_.data),u.free(k),{cells:E,vertexIds:I,vertexWeights:F}}}),1168:(function(a){a.exports=i;var f=[function(){function u(c,h,d,v){for(var p=c.length,m=[],y=0;y>1,S=d[2*T+1];if(S===y)return T;y>1,S=d[2*T+1];if(S===y)return T;y>1,S=d[2*T+1];if(S===y)return T;y0)-(c<0)},f.abs=function(c){var h=c>>i-1;return(c^h)-h},f.min=function(c,h){return h^(c^h)&-(c65535)<<4,c>>>=h,d=(c>255)<<3,c>>>=d,h|=d,d=(c>15)<<2,c>>>=d,h|=d,d=(c>3)<<1,c>>>=d,h|=d,h|c>>1},f.log10=function(c){return c>=1e9?9:c>=1e8?8:c>=1e7?7:c>=1e6?6:c>=1e5?5:c>=1e4?4:c>=1e3?3:c>=100?2:c>=10?1:0},f.popCount=function(c){return c=c-(c>>>1&1431655765),c=(c&858993459)+(c>>>2&858993459),(c+(c>>>4)&252645135)*16843009>>>24};function l(c){var h=32;return c&=-c,c&&h--,c&65535&&(h-=16),c&16711935&&(h-=8),c&252645135&&(h-=4),c&858993459&&(h-=2),c&1431655765&&(h-=1),h}f.countTrailingZeros=l,f.nextPow2=function(c){return c+=c===0,--c,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c+1},f.prevPow2=function(c){return c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c-(c>>>1)},f.parity=function(c){return c^=c>>>16,c^=c>>>8,c^=c>>>4,c&=15,27030>>>c&1};var u=new Array(256);(function(c){for(var h=0;h<256;++h){var d=h,v=h,p=7;for(d>>>=1;d;d>>>=1)v<<=1,v|=d&1,--p;c[h]=v<>>8&255]<<16|u[c>>>16&255]<<8|u[c>>>24&255]},f.interleave2=function(c,h){return c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,h&=65535,h=(h|h<<8)&16711935,h=(h|h<<4)&252645135,h=(h|h<<2)&858993459,h=(h|h<<1)&1431655765,c|h<<1},f.deinterleave2=function(c,h){return c=c>>>h&1431655765,c=(c|c>>>1)&858993459,c=(c|c>>>2)&252645135,c=(c|c>>>4)&16711935,c=(c|c>>>16)&65535,c<<16>>16},f.interleave3=function(c,h,d){return c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,h&=1023,h=(h|h<<16)&4278190335,h=(h|h<<8)&251719695,h=(h|h<<4)&3272356035,h=(h|h<<2)&1227133513,c|=h<<1,d&=1023,d=(d|d<<16)&4278190335,d=(d|d<<8)&251719695,d=(d|d<<4)&3272356035,d=(d|d<<2)&1227133513,c|d<<2},f.deinterleave3=function(c,h){return c=c>>>h&1227133513,c=(c|c>>>2)&3272356035,c=(c|c>>>4)&251719695,c=(c|c>>>8)&4278190335,c=(c|c>>>16)&1023,c<<22>>22},f.nextCombination=function(c){var h=c|c-1;return h+1|(~h&-~h)-1>>>l(c)+1}}),6656:(function(a,f,i){"use restrict";var l=i(9392),u=i(9521);function c(_){for(var k=0,E=Math.max,I=0,F=_.length;I>1,z=v(_[D],k);z<=0?(z===0&&(F=D),E=D+1):z>0&&(I=D-1)}return F}f.findCell=b;function g(_,k){for(var E=new Array(_.length),I=0,F=E.length;I=_.length||v(_[J],D)!==0););}return E}f.incidence=g;function T(_,k){if(!k)return g(y(A(_,0)),_);for(var E=new Array(k),I=0;I>>P&1&&q.push(F[P]);k.push(q)}return m(k)}f.explode=S;function A(_,k){if(k<0)return[];for(var E=[],I=(1<>1:(Z>>1)-1}function I(Z){for(var G=k(Z);;){var j=G,Y=2*Z+1,K=2*(Z+1),X=Z;if(Y<$){var ee=k(Y);ee0;){var j=E(Z);if(j>=0){var Y=k(j);if(G0){var Z=q[0];return _(0,$-1),$-=1,I(0),Z}return-1}function z(Z,G){var j=q[Z];return T[j]===G?Z:(T[j]=-1/0,F(Z),D(),T[j]=G,$+=1,F($-1))}function N(Z){if(!S[Z]){S[Z]=!0;var G=b[Z],j=g[Z];b[j]>=0&&(b[j]=G),g[G]>=0&&(g[G]=j),P[G]>=0&&z(P[G],x(G)),P[j]>=0&&z(P[j],x(j))}}for(var q=[],P=new Array(m),A=0;A>1;A>=0;--A)I(A);for(;;){var Q=D();if(Q<0||T[Q]>p)break;N(Q)}for(var J=[],A=0;A=0&&j>=0&&G!==j){var Y=P[G],K=P[j];Y!==K&&te.push([Y,K])}}),u.unique(u.normalize(te)),{positions:J,edges:te}}}),6638:(function(a,f,i){a.exports=c;var l=i(417);function u(h,d){var v,p;if(d[0][0]d[1][0])v=d[1],p=d[0];else{var m=Math.min(h[0][1],h[1][1]),y=Math.max(h[0][1],h[1][1]),b=Math.min(d[0][1],d[1][1]),g=Math.max(d[0][1],d[1][1]);return yg?m-g:y-g}var T,S;h[0][1]d[1][0])v=d[1],p=d[0];else return u(d,h);var m,y;if(h[0][0]h[1][0])m=h[1],y=h[0];else return-u(h,d);var b=l(v,p,y),g=l(v,p,m);if(b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;if(b=l(y,m,p),g=l(y,m,v),b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;return p[0]-y[0]}}),4385:(function(a,f,i){a.exports=g;var l=i(5070),u=i(7080),c=i(417),h=i(6638);function d(T,S,A){this.slabs=T,this.coordinates=S,this.horizontal=A}var v=d.prototype;function p(T,S){return T.y-S}function m(T,S){for(var A=null;T;){var M=T.key,w,C;M[0][0]0)if(S[0]!==M[1][0])A=T,T=T.right;else{var _=m(T.right,S);if(_)return _;T=T.left}else{if(S[0]!==M[1][0])return T;var _=m(T.right,S);if(_)return _;T=T.left}}return A}v.castUp=function(T){var S=l.le(this.coordinates,T[0]);if(S<0)return-1;this.slabs[S];var A=m(this.slabs[S],T),M=-1;if(A&&(M=A.value),this.coordinates[S]===T[0]){var w=null;if(A&&(w=A.key),S>0){var C=m(this.slabs[S-1],T);C&&(w?h(C.key,w)>0&&(w=C.key,M=C.value):(M=C.value,w=C.key))}var x=this.horizontal[S];if(x.length>0){var _=l.ge(x,T[1],p);if(_=x.length)return M;k=x[_]}}if(k.start)if(w){var E=c(w[0],w[1],[T[0],k.y]);w[0][0]>w[1][0]&&(E=-E),E>0&&(M=k.index)}else M=k.index;else k.y!==T[1]&&(M=k.index)}}}return M};function y(T,S,A,M){this.y=T,this.index=S,this.start=A,this.closed=M}function b(T,S,A,M){this.x=T,this.segment=S,this.create=A,this.index=M}function g(T){for(var S=T.length,A=2*S,M=new Array(A),w=0;w1&&(S=1);for(var A=1-S,M=m.length,w=new Array(M),C=0;C0||T>0&&w<0){var C=h(S,w,A,T);b.push(C),g.push(C.slice())}w<0?g.push(A.slice()):w>0?b.push(A.slice()):(b.push(A.slice()),g.push(A.slice())),T=w}return{positive:b,negative:g}}function v(m,y){for(var b=[],g=c(m[m.length-1],y),T=m[m.length-1],S=m[0],A=0;A0||g>0&&M<0)&&b.push(h(T,M,S,g)),M>=0&&b.push(S.slice()),g=M}return b}function p(m,y){for(var b=[],g=c(m[m.length-1],y),T=m[m.length-1],S=m[0],A=0;A0||g>0&&M<0)&&b.push(h(T,M,S,g)),M<=0&&b.push(S.slice()),g=M}return b}}),8974:(function(a,f,i){var l;(function(){var u={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function c(m){return d(p(m),arguments)}function h(m,y){return c.apply(null,[m].concat(y||[]))}function d(m,y){var b=1,g=m.length,T,S="",A,M,w,C,x,_,k,E;for(A=0;A=0),w.type){case"b":T=parseInt(T,10).toString(2);break;case"c":T=String.fromCharCode(parseInt(T,10));break;case"d":case"i":T=parseInt(T,10);break;case"j":T=JSON.stringify(T,null,w.width?parseInt(w.width):0);break;case"e":T=w.precision?parseFloat(T).toExponential(w.precision):parseFloat(T).toExponential();break;case"f":T=w.precision?parseFloat(T).toFixed(w.precision):parseFloat(T);break;case"g":T=w.precision?String(Number(T.toPrecision(w.precision))):parseFloat(T);break;case"o":T=(parseInt(T,10)>>>0).toString(8);break;case"s":T=String(T),T=w.precision?T.substring(0,w.precision):T;break;case"t":T=String(!!T),T=w.precision?T.substring(0,w.precision):T;break;case"T":T=Object.prototype.toString.call(T).slice(8,-1).toLowerCase(),T=w.precision?T.substring(0,w.precision):T;break;case"u":T=parseInt(T,10)>>>0;break;case"v":T=T.valueOf(),T=w.precision?T.substring(0,w.precision):T;break;case"x":T=(parseInt(T,10)>>>0).toString(16);break;case"X":T=(parseInt(T,10)>>>0).toString(16).toUpperCase();break}u.json.test(w.type)?S+=T:(u.number.test(w.type)&&(!k||w.sign)?(E=k?"+":"-",T=T.toString().replace(u.sign,"")):E="",x=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",_=w.width-(E+T).length,C=w.width&&_>0?x.repeat(_):"",S+=w.align?E+T+C:x==="0"?E+C+T:C+E+T)}return S}var v=Object.create(null);function p(m){if(v[m])return v[m];for(var y=m,b,g=[],T=0;y;){if((b=u.text.exec(y))!==null)g.push(b[0]);else if((b=u.modulo.exec(y))!==null)g.push("%");else if((b=u.placeholder.exec(y))!==null){if(b[2]){T|=1;var S=[],A=b[2],M=[];if((M=u.key.exec(A))!==null)for(S.push(M[1]);(A=A.substring(M[0].length))!=="";)if((M=u.key_access.exec(A))!==null)S.push(M[1]);else if((M=u.index_access.exec(A))!==null)S.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");b[2]=S}else T|=2;if(T===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");y=y.substring(b[0].length)}return v[m]=g}f.sprintf=c,f.vsprintf=h,typeof window<"u"&&(window.sprintf=c,window.vsprintf=h,l=(function(){return{sprintf:c,vsprintf:h}}).call(f,i,f,a),l!==void 0&&(a.exports=l))})()}),4162:(function(a,f,i){a.exports=p;var l=i(9284),u=i(9584),c={"2d":function(m,y,b){var g=m({order:y,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(S,A,M,w){return S>w|0},vertex:function(S,A,M,w,C,x,_,k,E,I,F,D,z){var N=(_<<0)+(k<<1)+(E<<2)+(I<<3)|0;if(!(N===0||N===15))switch(N){case 0:F.push([S-.5,A-.5]);break;case 1:F.push([S-.25-.25*(w+M-2*z)/(M-w),A-.25-.25*(C+M-2*z)/(M-C)]);break;case 2:F.push([S-.75-.25*(-w-M+2*z)/(w-M),A-.25-.25*(x+w-2*z)/(w-x)]);break;case 3:F.push([S-.5,A-.5-.5*(C+M+x+w-4*z)/(M-C+w-x)]);break;case 4:F.push([S-.25-.25*(x+C-2*z)/(C-x),A-.75-.25*(-C-M+2*z)/(C-M)]);break;case 5:F.push([S-.5-.5*(w+M+x+C-4*z)/(M-w+C-x),A-.5]);break;case 6:F.push([S-.5-.25*(-w-M+x+C)/(w-M+C-x),A-.5-.25*(-C-M+x+w)/(C-M+w-x)]);break;case 7:F.push([S-.75-.25*(x+C-2*z)/(C-x),A-.75-.25*(x+w-2*z)/(w-x)]);break;case 8:F.push([S-.75-.25*(-x-C+2*z)/(x-C),A-.75-.25*(-x-w+2*z)/(x-w)]);break;case 9:F.push([S-.5-.25*(w+M+-x-C)/(M-w+x-C),A-.5-.25*(C+M+-x-w)/(M-C+x-w)]);break;case 10:F.push([S-.5-.5*(-w-M+-x-C+4*z)/(w-M+x-C),A-.5]);break;case 11:F.push([S-.25-.25*(-x-C+2*z)/(x-C),A-.75-.25*(C+M-2*z)/(M-C)]);break;case 12:F.push([S-.5,A-.5-.5*(-C-M+-x-w+4*z)/(C-M+x-w)]);break;case 13:F.push([S-.75-.25*(w+M-2*z)/(M-w),A-.25-.25*(-x-w+2*z)/(x-w)]);break;case 14:F.push([S-.25-.25*(-w-M+2*z)/(w-M),A-.25-.25*(-C-M+2*z)/(C-M)]);break;case 15:F.push([S-.5,A-.5]);break}},cell:function(S,A,M,w,C,x,_,k,E){C?k.push([S,A]):k.push([A,S])}});return function(T,S){var A=[],M=[];return g(T,A,M,S),{positions:A,cells:M}}}};function h(m,y){var b=m.length+"d",g=c[b];if(g)return g(l,m,y)}function d(m,y){for(var b=u(m,y),g=b.length,T=new Array(g),S=new Array(g),A=0;A0&&(M+=.02);for(var C=new Float32Array(A),x=0,_=-.5*M,w=0;wMath.max(w,C)?x[2]=1:w>Math.max(M,C)?x[0]=1:x[1]=1;for(var _=0,k=0,E=0;E<3;++E)_+=A[E]*A[E],k+=x[E]*A[E];for(var E=0;E<3;++E)x[E]-=k/_*A[E];return d(x,x),x}function b(A,M,w,C,x,_,k,E){this.center=l(w),this.up=l(C),this.right=l(x),this.radius=l([_]),this.angle=l([k,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var g=b.prototype;g.setDistanceLimits=function(A,M){A>0?A=Math.log(A):A=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=M},g.getDistanceLimits=function(A){var M=this.radius.bounds[0];return A?(A[0]=Math.exp(M[0][0]),A[1]=Math.exp(M[1][0]),A):[Math.exp(M[0][0]),Math.exp(M[1][0])]},g.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var M=this.computedUp,w=this.computedRight,C=0,x=0,_=0;_<3;++_)x+=M[_]*w[_],C+=M[_]*M[_];for(var k=Math.sqrt(C),E=0,_=0;_<3;++_)w[_]-=M[_]*x/C,E+=w[_]*w[_],M[_]/=k;for(var I=Math.sqrt(E),_=0;_<3;++_)w[_]/=I;var F=this.computedToward;h(F,M,w),d(F,F);for(var D=Math.exp(this.computedRadius[0]),z=this.computedAngle[0],N=this.computedAngle[1],q=Math.cos(z),P=Math.sin(z),B=Math.cos(N),$=Math.sin(N),Q=this.computedCenter,J=q*B,ne=P*B,te=$,Z=-q*$,G=-P*$,j=B,Y=this.computedEye,K=this.computedMatrix,_=0;_<3;++_){var X=J*w[_]+ne*F[_]+te*M[_];K[4*_+1]=Z*w[_]+G*F[_]+j*M[_],K[4*_+2]=X,K[4*_+3]=0}var ee=K[1],le=K[5],oe=K[9],fe=K[2],de=K[6],_e=K[10],we=le*_e-oe*de,Oe=oe*fe-ee*_e,be=ee*de-le*fe,Te=p(we,Oe,be);we/=Te,Oe/=Te,be/=Te,K[0]=we,K[4]=Oe,K[8]=be;for(var _=0;_<3;++_)Y[_]=Q[_]+K[2+4*_]*D;for(var _=0;_<3;++_){for(var E=0,ke=0;ke<3;++ke)E+=K[_+4*ke]*Y[ke];K[12+_]=-E}K[15]=1},g.getMatrix=function(A,M){this.recalcMatrix(A);var w=this.computedMatrix;if(M){for(var C=0;C<16;++C)M[C]=w[C];return M}return w};var T=[0,0,0];g.rotate=function(A,M,w,C){if(this.angle.move(A,M,w),C){this.recalcMatrix(A);var x=this.computedMatrix;T[0]=x[2],T[1]=x[6],T[2]=x[10];for(var _=this.computedUp,k=this.computedRight,E=this.computedToward,I=0;I<3;++I)x[4*I]=_[I],x[4*I+1]=k[I],x[4*I+2]=E[I];c(x,x,C,T);for(var I=0;I<3;++I)_[I]=x[4*I],k[I]=x[4*I+1];this.up.set(A,_[0],_[1],_[2]),this.right.set(A,k[0],k[1],k[2])}},g.pan=function(A,M,w,C){M=M||0,w=w||0,C=C||0,this.recalcMatrix(A);var x=this.computedMatrix;Math.exp(this.computedRadius[0]);var _=x[1],k=x[5],E=x[9],I=p(_,k,E);_/=I,k/=I,E/=I;var F=x[0],D=x[4],z=x[8],N=F*_+D*k+z*E;F-=_*N,D-=k*N,z-=E*N;var q=p(F,D,z);F/=q,D/=q,z/=q;var P=F*M+_*w,B=D*M+k*w,$=z*M+E*w;this.center.move(A,P,B,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+C),this.radius.set(A,Math.log(Q))},g.translate=function(A,M,w,C){this.center.move(A,M||0,w||0,C||0)},g.setMatrix=function(A,M,w,C){var x=1;typeof w=="number"&&(x=w|0),(x<0||x>3)&&(x=1);var _=(x+2)%3;M||(this.recalcMatrix(A),M=this.computedMatrix);var k=M[x],E=M[x+4],I=M[x+8];if(C){var D=Math.abs(k),z=Math.abs(E),N=Math.abs(I),q=Math.max(D,z,N);D===q?(k=k<0?-1:1,E=I=0):N===q?(I=I<0?-1:1,k=E=0):(E=E<0?-1:1,k=I=0)}else{var F=p(k,E,I);k/=F,E/=F,I/=F}var P=M[_],B=M[_+4],$=M[_+8],Q=P*k+B*E+$*I;P-=k*Q,B-=E*Q,$-=I*Q;var J=p(P,B,$);P/=J,B/=J,$/=J;var ne=E*$-I*B,te=I*P-k*$,Z=k*B-E*P,G=p(ne,te,Z);ne/=G,te/=G,Z/=G,this.center.jump(A,qe,We,Qe),this.radius.idle(A),this.up.jump(A,k,E,I),this.right.jump(A,P,B,$);var j,Y;if(x===2){var K=M[1],X=M[5],ee=M[9],le=K*P+X*B+ee*$,oe=K*ne+X*te+ee*Z;we<0?j=-Math.PI/2:j=Math.PI/2,Y=Math.atan2(oe,le)}else{var fe=M[2],de=M[6],_e=M[10],we=fe*k+de*E+_e*I,Oe=fe*P+de*B+_e*$,be=fe*ne+de*te+_e*Z;j=Math.asin(m(we)),Y=Math.atan2(be,Oe)}this.angle.jump(A,Y,j),this.recalcMatrix(A);var Te=M[2],ke=M[6],Ee=M[10],Le=this.computedMatrix;u(Le,M);var Fe=Le[15],qe=Le[12]/Fe,We=Le[13]/Fe,Qe=Le[14]/Fe,De=Math.exp(this.computedRadius[0]);this.center.jump(A,qe-Te*De,We-ke*De,Qe-Ee*De)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},g.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},g.setDistance=function(A,M){M>0&&this.radius.set(A,Math.log(M))},g.lookAt=function(A,M,w,C){this.recalcMatrix(A),M=M||this.computedEye,w=w||this.computedCenter,C=C||this.computedUp;var x=C[0],_=C[1],k=C[2],E=p(x,_,k);if(!(E<1e-6)){x/=E,_/=E,k/=E;var I=M[0]-w[0],F=M[1]-w[1],D=M[2]-w[2],z=p(I,F,D);if(!(z<1e-6)){I/=z,F/=z,D/=z;var N=this.computedRight,q=N[0],P=N[1],B=N[2],$=x*q+_*P+k*B;q-=$*x,P-=$*_,B-=$*k;var Q=p(q,P,B);if(!(Q<.01&&(q=_*D-k*F,P=k*I-x*D,B=x*F-_*I,Q=p(q,P,B),Q<1e-6))){q/=Q,P/=Q,B/=Q,this.up.set(A,x,_,k),this.right.set(A,q,P,B),this.center.set(A,w[0],w[1],w[2]),this.radius.set(A,Math.log(z));var J=_*B-k*P,ne=k*q-x*B,te=x*P-_*q,Z=p(J,ne,te);J/=Z,ne/=Z,te/=Z;var G=x*I+_*F+k*D,j=q*I+P*F+B*D,Y=J*I+ne*F+te*D,K=Math.asin(m(G)),X=Math.atan2(Y,j),ee=this.angle._state,le=ee[ee.length-1],oe=ee[ee.length-2];le=le%(2*Math.PI);var fe=Math.abs(le+2*Math.PI-X),de=Math.abs(le-X),_e=Math.abs(le-2*Math.PI-X);fe0?B.pop():new ArrayBuffer(q)}f.mallocArrayBuffer=T;function S(N){return new Uint8Array(T(N),0,N)}f.mallocUint8=S;function A(N){return new Uint16Array(T(2*N),0,N)}f.mallocUint16=A;function M(N){return new Uint32Array(T(4*N),0,N)}f.mallocUint32=M;function w(N){return new Int8Array(T(N),0,N)}f.mallocInt8=w;function C(N){return new Int16Array(T(2*N),0,N)}f.mallocInt16=C;function x(N){return new Int32Array(T(4*N),0,N)}f.mallocInt32=x;function _(N){return new Float32Array(T(4*N),0,N)}f.mallocFloat32=f.mallocFloat=_;function k(N){return new Float64Array(T(8*N),0,N)}f.mallocFloat64=f.mallocDouble=k;function E(N){return h?new Uint8ClampedArray(T(N),0,N):S(N)}f.mallocUint8Clamped=E;function I(N){return d?new BigUint64Array(T(8*N),0,N):null}f.mallocBigUint64=I;function F(N){return v?new BigInt64Array(T(8*N),0,N):null}f.mallocBigInt64=F;function D(N){return new DataView(T(N),0,N)}f.mallocDataView=D;function z(N){N=l.nextPow2(N);var q=l.log2(N),P=y[q];return P.length>0?P.pop():new c(N)}f.mallocBuffer=z,f.clearCache=function(){for(var q=0;q<32;++q)p.UINT8[q].length=0,p.UINT16[q].length=0,p.UINT32[q].length=0,p.INT8[q].length=0,p.INT16[q].length=0,p.INT32[q].length=0,p.FLOAT[q].length=0,p.DOUBLE[q].length=0,p.BIGUINT64[q].length=0,p.BIGINT64[q].length=0,p.UINT8C[q].length=0,m[q].length=0,y[q].length=0}}),1731:(function(a){"use restrict";a.exports=f;function f(l){this.roots=new Array(l),this.ranks=new Array(l);for(var u=0;u",B="",$=P.length,Q=B.length,J=z[0]===T||z[0]===M,ne=0,te=-Q;ne>-1&&(ne=N.indexOf(P,ne),!(ne===-1||(te=N.indexOf(B,ne+$),te===-1)||te<=ne));){for(var Z=ne;Z=te)q[Z]=null,N=N.substr(0,Z)+" "+N.substr(Z+1);else if(q[Z]!==null){var G=q[Z].indexOf(z[0]);G===-1?q[Z]+=z:J&&(q[Z]=q[Z].substr(0,G+1)+(1+parseInt(q[Z][G+1]))+q[Z].substr(G+2))}var j=ne+$,Y=N.substr(j,te-j),K=Y.indexOf(P);K!==-1?ne=K:ne=te+Q}return q}function x(D,z,N){for(var q=z.textAlign||"start",P=z.textBaseline||"alphabetic",B=[1<<30,1<<30],$=[0,0],Q=D.length,J=0;J/g,` +`):N=N.replace(/\/g," ");var $="",Q=[];for(le=0;le-1?parseInt(Qe[1+Ce]):0,ot=et>-1?parseInt(De[1+et]):0;st!==ot&&(me=me.replace(be(),"?px "),de*=Math.pow(.75,ot-st),me=me.replace("?px ",be())),fe+=.25*G*(ot-st)}if(B.superscripts===!0){var ut=Qe.indexOf(T),ht=De.indexOf(T),Ht=ut>-1?parseInt(Qe[1+ut]):0,Et=ht>-1?parseInt(De[1+ht]):0;Ht!==Et&&(me=me.replace(be(),"?px "),de*=Math.pow(.75,Et-Ht),me=me.replace("?px ",be())),fe-=.25*G*(Et-Ht)}if(B.bolds===!0){var Jt=Qe.indexOf(m)>-1,Tt=De.indexOf(m)>-1;!Jt&&Tt&&(rt?me=me.replace("italic ","italic bold "):me="bold "+me),Jt&&!Tt&&(me=me.replace("bold ",""))}if(B.italics===!0){var rt=Qe.indexOf(b)>-1,gt=De.indexOf(b)>-1;!rt&>&&(me="italic "+me),rt&&!gt&&(me=me.replace("italic ",""))}z.font=me}for(ee=0;ee0&&(P=q.size),q.lineSpacing&&q.lineSpacing>0&&(B=q.lineSpacing),q.styletags&&q.styletags.breaklines&&($.breaklines=!!q.styletags.breaklines),q.styletags&&q.styletags.bolds&&($.bolds=!!q.styletags.bolds),q.styletags&&q.styletags.italics&&($.italics=!!q.styletags.italics),q.styletags&&q.styletags.subscripts&&($.subscripts=!!q.styletags.subscripts),q.styletags&&q.styletags.superscripts&&($.superscripts=!!q.styletags.superscripts)),N.font=[q.fontStyle,q.fontVariant,q.fontWeight,P+"px",q.font].filter(function(J){return J}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var Q=_(z,N,D,P,B,$);return I(Q,q,P)}}),5346:(function(a){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function i(k){k.permitHostObjects___&&k.permitHostObjects___(i)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=i);var l=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var c=new u,h=Object.freeze({});if(c.set(h,1),c.get(h)!==1)l=!0;else{a.exports=WeakMap;return}}}var d=Object.getOwnPropertyNames,v=Object.defineProperty,p=Object.isExtensible,m="weakmap:",y=m+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var b=new ArrayBuffer(25),g=new Uint8Array(b);crypto.getRandomValues(g),y=m+"rand:"+Array.prototype.map.call(g,function(k){return(k%36).toString(36)}).join("")+"___"}function T(k){return!(k.substr(0,m.length)==m&&k.substr(k.length-3)==="___")}if(v(Object,"getOwnPropertyNames",{value:function(E){return d(E).filter(T)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;v(Object,"getPropertyNames",{value:function(E){return S(E).filter(T)}})}function A(k){if(k!==Object(k))throw new TypeError("Not an object: "+k);var E=k[y];if(E&&E.key===k)return E;if(p(k)){E={key:k};try{return v(k,y,{value:E,writable:!1,enumerable:!1,configurable:!1}),E}catch{return}}}(function(){var k=Object.freeze;v(Object,"freeze",{value:function(D){return A(D),k(D)}});var E=Object.seal;v(Object,"seal",{value:function(D){return A(D),E(D)}});var I=Object.preventExtensions;v(Object,"preventExtensions",{value:function(D){return A(D),I(D)}})})();function M(k){return k.prototype=null,Object.freeze(k)}var w=!1;function C(){!w&&typeof console<"u"&&(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var x=0,_=function(){this instanceof _||C();var k=[],E=[],I=x++;function F(q,P){var B,$=A(q);return $?I in $?$[I]:P:(B=k.indexOf(q),B>=0?E[B]:P)}function D(q){var P=A(q);return P?I in P:k.indexOf(q)>=0}function z(q,P){var B,$=A(q);return $?$[I]=P:(B=k.indexOf(q),B>=0?E[B]=P:(B=k.length,E[B]=P,k[B]=q)),this}function N(q){var P=A(q),B,$;return P?I in P&&delete P[I]:(B=k.indexOf(q),B<0?!1:($=k.length-1,k[B]=void 0,E[B]=E[$],k[B]=k[$],k.length=$,E.length=$,!0))}return Object.create(_.prototype,{get___:{value:M(F)},has___:{value:M(D)},set___:{value:M(z)},delete___:{value:M(N)}})};_.prototype=Object.create(Object.prototype,{get:{value:function(E,I){return this.get___(E,I)},writable:!0,configurable:!0},has:{value:function(E){return this.has___(E)},writable:!0,configurable:!0},set:{value:function(E,I){return this.set___(E,I)},writable:!0,configurable:!0},delete:{value:function(E){return this.delete___(E)},writable:!0,configurable:!0}}),typeof u=="function"?(function(){l&&typeof Proxy<"u"&&(Proxy=void 0);function k(){this instanceof _||C();var E=new u,I=void 0,F=!1;function D(P,B){return I?E.has(P)?E.get(P):I.get___(P,B):E.get(P,B)}function z(P){return E.has(P)||(I?I.has___(P):!1)}var N;l?N=function(P,B){return E.set(P,B),E.has(P)||(I||(I=new _),I.set(P,B)),this}:N=function(P,B){if(F)try{E.set(P,B)}catch{I||(I=new _),I.set___(P,B)}else E.set(P,B);return this};function q(P){var B=!!E.delete(P);return I&&I.delete___(P)||B}return Object.create(_.prototype,{get___:{value:M(D)},has___:{value:M(z)},set___:{value:M(N)},delete___:{value:M(q)},permitHostObjects___:{value:M(function(P){if(P===i)F=!0;else throw new Error("bogus call to permitHostObjects___")})}})}k.prototype=_.prototype,a.exports=k,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),a.exports=_)})()}),9222:(function(a,f,i){var l=i(7178);a.exports=u;function u(){var c={};return function(h){if((typeof h!="object"||h===null)&&typeof h!="function")throw new Error("Weakmap-shim: Key must be object");var d=h.valueOf(c);return d&&d.identity===c?d:l(h,c)}}}),7178:(function(a){a.exports=f;function f(i,l){var u={identity:l},c=i.valueOf;return Object.defineProperty(i,"valueOf",{value:function(h){return h!==l?c.apply(this,arguments):u},writable:!0}),u}}),4037:(function(a,f,i){var l=i(9222);a.exports=u;function u(){var c=l();return{get:function(h,d){var v=c(h);return v.hasOwnProperty("value")?v.value:d},set:function(h,d){return c(h).value=d,this},has:function(h){return"value"in c(h)},delete:function(h){return delete c(h).value}}}}),6183:(function(a){function f(){return function(d,v,p,m,y,b){var g=d[0],T=p[0],S=[0],A=T;m|=0;var M=0,w=T;for(M=0;M=0!=x>=0&&y.push(S[0]+.5+.5*(C+x)/(C-x))}m+=w,++S[0]}}}function i(){return f()}var l=i;function u(d){var v={};return function(m,y,b){var g=m.dtype,T=m.order,S=[g,T.join()].join(),A=v[S];return A||(v[S]=A=d([g,T])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,y,b)}}function c(d){return u(l.bind(void 0,d))}function h(d){return c({funcName:d.funcName})}a.exports=h({funcName:"zeroCrossings"})}),9584:(function(a,f,i){a.exports=u;var l=i(6183);function u(c,h){var d=[];return h=+h||0,l(c.hi(c.shape[0]-1),d,h),d}}),6601:(function(){})},n={};function o(a){var f=n[a];if(f!==void 0)return f.exports;var i=n[a]={id:a,loaded:!1,exports:{}};return r[a].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}(function(){o.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){o.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}})();var s=o(7386);return s})()})})(Ez)),Ez.exports}var kz,Gce;function Cje(){return Gce||(Gce=1,kz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),kz}var Cz,Vce;function tEe(){if(Vce)return Cz;Vce=1;var e=Object.prototype.toString;return Cz=function(t){var r;return e.call(t)==="[object Object]"&&(r=Object.getPrototypeOf(t),r===null||r===Object.getPrototypeOf({}))},Cz}var Rz,Yce;function rEe(){return Yce||(Yce=1,Rz=function(){for(var t=0;t10&&/[0-9](?:\s|\/)/.test(s)&&(f=s.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),l=s.match(/([a-z])/ig).join("").toLowerCase());else if(!isNaN(s))l="rgb",f=[s>>>16,(s&65280)>>>8,s&255];else if(t(s)){var p=r(s.r,s.red,s.R,null);p!==null?(l="rgb",f=[p,r(s.g,s.green,s.G),r(s.b,s.blue,s.B)]):(l="hsl",f=[r(s.h,s.hue,s.H),r(s.s,s.saturation,s.S),r(s.l,s.lightness,s.L,s.b,s.brightness)]),i=r(s.a,s.alpha,s.opacity,1),s.opacity!=null&&(i/=100)}else(Array.isArray(s)||Mu.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(s))&&(f=[s[0],s[1],s[2]],l="rgb",i=s.length===4?s[3]:1);return{space:l,values:f,alpha:i}}return Lz}var Pz,Wce;function Lje(){return Wce||(Wce=1,Pz={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}),Pz}var Dz,Xce;function Pje(){if(Xce)return Dz;Xce=1;var e=Lje();return Dz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var r=t[0]/360,n=t[1]/100,o=t[2]/100,s,a,f,i,l;if(n===0)return l=o*255,[l,l,l];o<.5?a=o*(1+n):a=o+n-o*n,s=2*o-a,i=[0,0,0];for(var u=0;u<3;u++)f=r+1/3*-(u-1),f<0?f++:f>1&&f--,6*f<1?l=s+(a-s)*6*f:2*f<1?l=a:3*f<2?l=s+(a-s)*(2/3-f)*6:l=s,i[u]=l*255;return i}},e.hsl=function(t){var r=t[0]/255,n=t[1]/255,o=t[2]/255,s=Math.min(r,n,o),a=Math.max(r,n,o),f=a-s,i,l,u;return a===s?i=0:r===a?i=(n-o)/f:n===a?i=2+(o-r)/f:o===a&&(i=4+(r-n)/f),i=Math.min(i*60,360),i<0&&(i+=360),u=(s+a)/2,a===s?l=0:u<=.5?l=f/(a+s):l=f/(2-a-s),[i,l*100,u*100]},Dz}var Iz,Zce;function gM(){if(Zce)return Iz;Zce=1,Iz=e;function e(t,r,n){return rn?n:t:tr?r:t}return Iz}var Oz,Kce;function nEe(){if(Kce)return Oz;Kce=1;var e=Rje(),t=Pje(),r=gM();return Oz=function(o){var s,a=e(o);return a.space?(s=Array(3),s[0]=r(a.values[0],0,255),s[1]=r(a.values[1],0,255),s[2]=r(a.values[2],0,255),a.space[0]==="h"&&(s=t.rgb(s)),s.push(r(a.alpha,0,1)),s):[]},Oz}var zz,Jce;function vW(){return Jce||(Jce=1,zz=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}),zz}var Fz,Qce;function Gm(){if(Qce)return Fz;Qce=1;var e=nEe(),t=gM(),r=vW();Fz=function(s,a){(a==="float"||!a)&&(a="array"),a==="uint"&&(a="uint8"),a==="uint_clamped"&&(a="uint8_clamped");var f=r(a),i=new f(4),l=a!=="uint8"&&a!=="uint8_clamped";return(!s.length||typeof s=="string")&&(s=e(s),s[0]/=255,s[1]/=255,s[2]/=255),n(s)?(i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3]!=null?s[3]:255,l&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(l?(i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3]!=null?s[3]:1):(i[0]=t(Math.floor(s[0]*255),0,255),i[1]=t(Math.floor(s[1]*255),0,255),i[2]=t(Math.floor(s[2]*255),0,255),i[3]=s[3]==null?255:t(Math.floor(s[3]*255),0,255)),i)};function n(o){return!!(o instanceof Uint8Array||o instanceof Uint8ClampedArray||Array.isArray(o)&&(o[0]>1||o[0]===0)&&(o[1]>1||o[1]===0)&&(o[2]>1||o[2]===0)&&(!o[3]||o[3]>1))}return Fz}var Nz,ehe;function xp(){if(ehe)return Nz;ehe=1;var e=Gm();function t(r){return r?e(r):[0,0,0,1]}return Nz=t,Nz}var Bz,the;function dy(){if(the)return Bz;the=1;var e=Ua(),t=wf(),r=Gm(),n=Hs(),o=Cu().defaultLine,s=lh().isArrayOrTypedArray,a=r(o),f=1;function i(d,v){var p=d;return p[3]*=v,p}function l(d){if(e(d))return a;var v=r(d);return v.length?v:a}function u(d){return e(d)?d:f}function c(d,v,p){var m=d.color;m&&m._inputArray&&(m=m._inputArray);var y=s(m),b=s(v),g=n.extractOpts(d),T=[],S,A,M,w,C;if(g.colorscale!==void 0?S=n.makeColorScaleFuncFromTrace(d):S=l,y?A=function(_,k){return _[k]===void 0?a:r(S(_[k]))}:A=l,b?M=function(_,k){return _[k]===void 0?f:u(_[k])}:M=u,y||b)for(var x=0;x0){var p=f.c2l(d);f._lowerLogErrorBound||(f._lowerLogErrorBound=p),f._lowerErrorBound=Math.min(f._lowerLogErrorBound,p)}}else l[u]=[-c[0]*a,c[1]*a]}return l}function r(o){for(var s=0;s-1?-1:k.indexOf("right")>-1?1:0}function g(k){return k==null?0:k.indexOf("top")>-1?-1:k.indexOf("bottom")>-1?1:0}function T(k){var E=0,I=0,F=[E,I];if(Array.isArray(k))for(var D=0;D=0){var B=m(q.position,q.delaunayColor,q.delaunayAxis);B.opacity=k.opacity,this.delaunayMesh?this.delaunayMesh.update(B):(B.gl=E,this.delaunayMesh=n(B),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},p.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function _(k,E){var I=new v(k,E.uid);return I.update(E),I}return Hz=_,Hz}var Gz={exports:{}},ohe;function iEe(){if(ohe)return Gz.exports;ohe=1;var e=Yl(),t=os(),r=ll().axisHoverFormat,n=bi().hovertemplateAttrs,o=bi().texttemplateAttrs,s=qo(),a=aEe(),f=pW(),i=ja().extendFlat,l=ws().overrideAll,u=qx(),c=e.line,h=e.marker,d=h.line,v=i({width:c.width,dash:{valType:"enumerated",values:u(a),dflt:"solid",description:"Sets the dash style of the lines."}},t("line"));function p(y){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",y,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var m=Gz.exports=l({x:e.x,y:e.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:i({},e.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:o({},{}),hovertext:i({},e.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:n(),xhoverformat:r("x"),yhoverformat:r("y"),zhoverformat:r("z"),mode:i({},e.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:p("x"),y:p("y"),z:p("z")},connectgaps:e.connectgaps,line:v,marker:i({symbol:{valType:"enumerated",values:u(f),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:i({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:i({},h.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:h.colorbar,line:i({width:i({},d.width,{arrayOk:!1})},t("marker.line"))},t("marker")),textposition:i({},e.textposition,{dflt:"top center"}),textfont:{color:e.textfont.color,size:e.textfont.size,family:i({},e.textfont.family,{arrayOk:!1})},opacity:s.opacity,hoverinfo:i({},s.hoverinfo)},"calc","nested");return m.x.editType=m.y.editType=m.z.editType="calc+clearAxisTypes",Gz.exports}var Vz,she;function Oje(){if(she)return Vz;she=1;var e=ga(),t=rr(),r=As(),n=gp(),o=y0(),s=m0(),a=iEe();Vz=function(l,u,c,h){function d(S,A){return t.coerce(l,u,a,S,A)}var v=f(l,u,d,h);if(!v){u.visible=!1;return}d("text"),d("hovertext"),d("hovertemplate"),d("xhoverformat"),d("yhoverformat"),d("zhoverformat"),d("mode"),r.hasMarkers(u)&&n(l,u,c,h,d,{noSelect:!0,noAngle:!0}),r.hasLines(u)&&(d("connectgaps"),o(l,u,c,h,d)),r.hasText(u)&&(d("texttemplate"),s(l,u,h,d,{noSelect:!0}));var p=(u.line||{}).color,m=(u.marker||{}).color;d("surfaceaxis")>=0&&d("surfacecolor",p||m);for(var y=["x","y","z"],b=0;b<3;++b){var g="projection."+y[b];d(g+".show")&&(d(g+".opacity"),d(g+".scale"))}var T=e.getComponentMethod("errorbars","supplyDefaults");T(l,u,p||m||c,{axis:"z"}),T(l,u,p||m||c,{axis:"y",inherit:"z"}),T(l,u,p||m||c,{axis:"x",inherit:"z"})};function f(i,l,u,c){var h=0,d=u("x"),v=u("y"),p=u("z"),m=e.getComponentMethod("calendars","handleTraceDefaults");return m(i,l,["x","y","z"],c),d&&v&&p&&(h=Math.min(d.length,v.length,p.length),l._length=l._xlength=l._ylength=l._zlength=h),h}return Vz}var Yz,lhe;function oEe(){if(lhe)return Yz;lhe=1;var e=lg(),t=yp();return Yz=function(n,o){var s=[{x:!1,y:!1,trace:o,t:{}}];return e(s,o),t(n,o),s},Yz}var rh={},$z,uhe;function zje(){if(uhe)return $z;uhe=1,$z=e;function e(t,r){if(typeof t!="string")throw new TypeError("must specify type string");if(r=r||{},typeof document>"u"&&!r.canvas)return null;var n=r.canvas||document.createElement("canvas");typeof r.width=="number"&&(n.width=r.width),typeof r.height=="number"&&(n.height=r.height);var o=r,s;try{var a=[t];t.indexOf("webgl")===0&&a.push("experimental-"+t);for(var f=0;f/g," "));l[u]=v,c.tickmode=h}}a.ticks=l;for(var u=0;u<3;++u){.5*(s.glplot.bounds[0][u]+s.glplot.bounds[1][u]);for(var p=0;p<2;++p)a.bounds[p][u]=s.glplot.bounds[p][u]}s.contourLevels=n(l)}return Jz}var Qz,phe;function qje(){if(phe)return Qz;phe=1;var e=Hl().gl_plot3d,t=e.createCamera,r=e.createScene,n=sEe(),o=zS(),s=ga(),a=rr(),f=a.preserveDrawingBuffer(),i=Ia(),l=yl(),u=xp(),c=gW(),h=YAe(),d=Fje(),v=Nje(),p=Bje(),m=Iv().applyAutorangeOptions,y,b,g=!1;function T(I,F){var D=document.createElement("div"),z=I.container;this.graphDiv=I.graphDiv;var N=document.createElementNS("http://www.w3.org/2000/svg","svg");N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",N.style["z-index"]=20,N.style["pointer-events"]="none",D.appendChild(N),this.svgContainer=N,D.id=I.id,D.style.position="absolute",D.style.top=D.style.left="0px",D.style.width=D.style.height="100%",z.appendChild(D),this.fullLayout=F,this.id=I.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=d(F,F[this.id]),this.spikeOptions=v(F[this.id]),this.container=D,this.staticMode=!!I.staticPlot,this.pixelRatio=this.pixelRatio||I.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=s.getComponentMethod("annotations3d","convert"),this.drawAnnotations=s.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var S=T.prototype;S.prepareOptions=function(){var I=this,F={canvas:I.canvas,gl:I.gl,glOptions:{preserveDrawingBuffer:f,premultipliedAlpha:!0,antialias:!0},container:I.container,axes:I.axesOptions,spikes:I.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:I.camera,pixelRatio:I.pixelRatio};if(I.staticMode){if(!b&&(y=document.createElement("canvas"),b=n({canvas:y,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");F.gl=b,F.canvas=y}return F};var A=!0;S.tryCreatePlot=function(){var I=this,F=I.prepareOptions(),D=!0;try{I.glplot=r(F)}catch{if(I.staticMode||!A||f)D=!1;else{a.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{f=F.glOptions.preserveDrawingBuffer=!0,I.glplot=r(F)}catch{f=F.glOptions.preserveDrawingBuffer=!1,D=!1}}}return A=!1,D},S.initializeGLCamera=function(){var I=this,F=I.fullSceneLayout.camera,D=F.projection.type==="orthographic";I.camera=t(I.container,{center:[F.center.x,F.center.y,F.center.z],eye:[F.eye.x,F.eye.y,F.eye.z],up:[F.up.x,F.up.y,F.up.z],_ortho:D,zoomMin:.01,zoomMax:100,mode:"orbit"})},S.initializeGLPlot=function(){var I=this;I.initializeGLCamera();var F=I.tryCreatePlot();if(!F)return c(I);I.traces={},I.make4thDimension();var D=I.graphDiv,z=D.layout,N=function(){var P={};return I.isCameraChanged(z)&&(P[I.id+".camera"]=I.getCamera()),I.isAspectChanged(z)&&(P[I.id+".aspectratio"]=I.glplot.getAspectratio(),z[I.id].aspectmode!=="manual"&&(I.fullSceneLayout.aspectmode=z[I.id].aspectmode=P[I.id+".aspectmode"]="manual")),P},q=function(P){if(P.fullSceneLayout.dragmode!==!1){var B=N();P.saveLayout(z),P.graphDiv.emit("plotly_relayout",B)}};return I.glplot.canvas&&(I.glplot.canvas.addEventListener("mouseup",function(){q(I)}),I.glplot.canvas.addEventListener("touchstart",function(){g=!0}),I.glplot.canvas.addEventListener("wheel",function(P){if(D._context._scrollZoom.gl3d){if(I.camera._ortho){var B=P.deltaX>P.deltaY?1.1:.9090909090909091,$=I.glplot.getAspectratio();I.glplot.setAspectratio({x:B*$.x,y:B*$.y,z:B*$.z})}q(I)}},o?{passive:!1}:!1),I.glplot.canvas.addEventListener("mousemove",function(){if(I.fullSceneLayout.dragmode!==!1&&I.camera.mouseListener.buttons!==0){var P=N();I.graphDiv.emit("plotly_relayouting",P)}}),I.staticMode||I.glplot.canvas.addEventListener("webglcontextlost",function(P){D&&D.emit&&D.emit("plotly_webglcontextlost",{event:P,layer:I.id})},!1)),I.glplot.oncontextloss=function(){I.recoverContext()},I.glplot.onrender=function(){I.render()},!0},S.render=function(){var I=this,F=I.graphDiv,D,z=I.svgContainer,N=I.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var q=F._fullLayout._invScaleX,P=F._fullLayout._invScaleY,B=N.width*q,$=N.height*P;z.setAttributeNS(null,"viewBox","0 0 "+B+" "+$),z.setAttributeNS(null,"width",B),z.setAttributeNS(null,"height",$),p(I),I.glplot.axes.update(I.axesOptions);for(var Q=Object.keys(I.traces),J=null,ne=I.glplot.selection,te=0;te")):D.type==="isosurface"||D.type==="volume"?(K.valueLabel=i.hoverLabelText(I._mockAxis,I._mockAxis.d2l(ne.traceCoordinate[3]),D.valuehoverformat),fe.push("value: "+K.valueLabel),ne.textLabel&&fe.push(ne.textLabel),oe=fe.join("
")):oe=ne.textLabel;var de={x:ne.traceCoordinate[0],y:ne.traceCoordinate[1],z:ne.traceCoordinate[2],data:j._input,fullData:j,curveNumber:j.index,pointNumber:Y};l.appendArrayPointValue(de,j,Y),D._module.eventData&&(de=j._module.eventData(de,ne,j,{},Y));var _e={points:[de]};if(I.fullSceneLayout.hovermode){var we=[];l.loneHover({trace:j,x:(.5+.5*G[0]/G[3])*B,y:(.5-.5*G[1]/G[3])*$,xLabel:K.xLabel,yLabel:K.yLabel,zLabel:K.zLabel,text:oe,name:J.name,color:l.castHoverOption(j,Y,"bgcolor")||J.color,borderColor:l.castHoverOption(j,Y,"bordercolor"),fontFamily:l.castHoverOption(j,Y,"font.family"),fontSize:l.castHoverOption(j,Y,"font.size"),fontColor:l.castHoverOption(j,Y,"font.color"),nameLength:l.castHoverOption(j,Y,"namelength"),textAlign:l.castHoverOption(j,Y,"align"),hovertemplate:a.castOption(j,Y,"hovertemplate"),hovertemplateLabels:a.extendFlat({},de,K),eventData:[de]},{container:z,gd:F,inOut_bbox:we}),de.bbox=we[0]}ne.distance<5&&(ne.buttons||g)?F.emit("plotly_click",_e):F.emit("plotly_hover",_e),this.oldEventData=_e}else l.loneUnhover(z),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;I.drawAnnotations(I)},S.recoverContext=function(){var I=this;I.glplot.dispose();var F=function(){if(I.glplot.gl.isContextLost()){requestAnimationFrame(F);return}if(!I.initializeGLPlot()){a.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}I.plot.apply(I,I.plotArgs)};requestAnimationFrame(F)};var M=["xaxis","yaxis","zaxis"];function w(I,F,D){for(var z=I.fullSceneLayout,N=0;N<3;N++){var q=M[N],P=q.charAt(0),B=z[q],$=F[P],Q=F[P+"calendar"],J=F["_"+P+"length"];if(!a.isArrayOrTypedArray($))D[0][N]=Math.min(D[0][N],0),D[1][N]=Math.max(D[1][N],J-1);else for(var ne,te=0;te<(J||$.length);te++)if(a.isArrayOrTypedArray($[te]))for(var Z=0;Z<$[te].length;++Z)ne=B.d2l($[te][Z],0,Q),!isNaN(ne)&&isFinite(ne)&&(D[0][N]=Math.min(D[0][N],ne),D[1][N]=Math.max(D[1][N],ne));else ne=B.d2l($[te],0,Q),!isNaN(ne)&&isFinite(ne)&&(D[0][N]=Math.min(D[0][N],ne),D[1][N]=Math.max(D[1][N],ne))}}function C(I,F){for(var D=I.fullSceneLayout,z=D.annotations||[],N=0;N<3;N++)for(var q=M[N],P=q.charAt(0),B=D[q],$=0;$j[1][P])j[0][P]=-1,j[1][P]=1;else{var Oe=j[1][P]-j[0][P];j[0][P]-=Oe/32,j[1][P]+=Oe/32}if(K=[j[0][P],j[1][P]],K=m(K,$),j[0][P]=K[0],j[1][P]=K[1],$.isReversed()){var be=j[0][P];j[0][P]=j[1][P],j[1][P]=be}}else K=$.range,j[0][P]=$.r2l(K[0]),j[1][P]=$.r2l(K[1]);j[0][P]===j[1][P]&&(j[0][P]-=1,j[1][P]+=1),$.range=[j[0][P],j[1][P]],$.limitRange(),z.glplot.setBounds(P,{min:$.range[0]*Z[P],max:$.range[1]*Z[P]})}var Te,ke=J.aspectmode;if(ke==="cube")Te=[1,1,1];else if(ke==="manual"){var Ee=J.aspectratio;Te=[Ee.x,Ee.y,Ee.z]}else if(ke==="auto"||ke==="data"){var Le=[1,1,1];for(P=0;P<3;++P){$=J[M[P]],Q=$.type;var Fe=Y[Q];Le[P]=Math.pow(Fe.acc,1/Fe.count)/Z[P]}ke==="data"||Math.max.apply(null,Le)/Math.min.apply(null,Le)<=4?Te=Le:Te=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");J.aspectratio.x=ne.aspectratio.x=Te[0],J.aspectratio.y=ne.aspectratio.y=Te[1],J.aspectratio.z=ne.aspectratio.z=Te[2],z.glplot.setAspectratio(J.aspectratio),z.viewInitial.aspectratio||(z.viewInitial.aspectratio={x:J.aspectratio.x,y:J.aspectratio.y,z:J.aspectratio.z}),z.viewInitial.aspectmode||(z.viewInitial.aspectmode=J.aspectmode);var qe=J.domain||null,We=F._size||null;if(qe&&We){var Qe=z.container.style;Qe.position="absolute",Qe.left=We.l+qe.x[0]*We.w+"px",Qe.top=We.t+(1-qe.y[1])*We.h+"px",Qe.width=We.w*(qe.x[1]-qe.x[0])+"px",Qe.height=We.h*(qe.y[1]-qe.y[0])+"px"}z.glplot.redraw()}},S.destroy=function(){var I=this;I.glplot&&(I.camera.mouseListener.enabled=!1,I.container.removeEventListener("wheel",I.camera.wheelListener),I.camera=null,I.glplot.dispose(),I.container.parentNode.removeChild(I.container),I.glplot=null)};function x(I){return[[I.eye.x,I.eye.y,I.eye.z],[I.center.x,I.center.y,I.center.z],[I.up.x,I.up.y,I.up.z]]}function _(I){return{up:{x:I.up[0],y:I.up[1],z:I.up[2]},center:{x:I.center[0],y:I.center[1],z:I.center[2]},eye:{x:I.eye[0],y:I.eye[1],z:I.eye[2]},projection:{type:I._ortho===!0?"orthographic":"perspective"}}}S.getCamera=function(){var I=this;return I.camera.view.recalcMatrix(I.camera.view.lastT()),_(I.camera)},S.setViewport=function(I){var F=this,D=I.camera;F.camera.lookAt.apply(this,x(D)),F.glplot.setAspectratio(I.aspectratio);var z=D.projection.type==="orthographic",N=F.camera._ortho;z!==N&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},S.isCameraChanged=function(I){var F=this,D=F.getCamera(),z=a.nestedProperty(I,F.id+".camera"),N=z.get();function q(Q,J,ne,te){var Z=["up","center","eye"],G=["x","y","z"];return J[Z[ne]]&&Q[Z[ne]][G[te]]===J[Z[ne]][G[te]]}var P=!1;if(N===void 0)P=!0;else{for(var B=0;B<3;B++)for(var $=0;$<3;$++)if(!q(D,N,B,$)){P=!0;break}(!N.projection||D.projection&&D.projection.type!==N.projection.type)&&(P=!0)}return P},S.isAspectChanged=function(I){var F=this,D=F.glplot.getAspectratio(),z=a.nestedProperty(I,F.id+".aspectratio"),N=z.get();return N===void 0||N.x!==D.x||N.y!==D.y||N.z!==D.z},S.saveLayout=function(I){var F=this,D=F.fullLayout,z,N,q,P,B,$,Q=F.isCameraChanged(I),J=F.isAspectChanged(I),ne=Q||J;if(ne){var te={};if(Q&&(z=F.getCamera(),N=a.nestedProperty(I,F.id+".camera"),q=N.get(),te[F.id+".camera"]=q),J&&(P=F.glplot.getAspectratio(),B=a.nestedProperty(I,F.id+".aspectratio"),$=B.get(),te[F.id+".aspectratio"]=$),s.call("_storeDirectGUIEdit",I,D._preGUI,te),Q){N.set(z);var Z=a.nestedProperty(D,F.id+".camera");Z.set(z)}if(J){B.set(P);var G=a.nestedProperty(D,F.id+".aspectratio");G.set(P),F.glplot.redraw()}}return ne},S.updateFx=function(I,F){var D=this,z=D.camera;if(z)if(I==="orbit")z.mode="orbit",z.keyBindingMode="rotate";else if(I==="turntable"){z.up=[0,0,1],z.mode="turntable",z.keyBindingMode="rotate";var N=D.graphDiv,q=N._fullLayout,P=D.fullSceneLayout.camera,B=P.up.x,$=P.up.y,Q=P.up.z;if(Q/Math.sqrt(B*B+$*$+Q*Q)<.999){var J=D.id+".camera.up",ne={x:0,y:0,z:1},te={};te[J]=ne;var Z=N.layout;s.call("_storeDirectGUIEdit",Z,q._preGUI,te),P.up=ne,a.nestedProperty(Z,J).set(ne)}}else z.keyBindingMode=I;D.fullSceneLayout.hovermode=F};function k(I,F,D){for(var z=0,N=D-1;z0)for(var B=255/P,$=0;$<3;++$)I[q+$]=Math.min(B*I[q+$],255)}}return S.toImage=function(I){var F=this;I||(I="png"),F.staticMode&&F.container.appendChild(y),F.glplot.redraw();var D=F.glplot.gl,z=D.drawingBufferWidth,N=D.drawingBufferHeight;D.bindFramebuffer(D.FRAMEBUFFER,null);var q=new Uint8Array(z*N*4);D.readPixels(0,0,z,N,D.RGBA,D.UNSIGNED_BYTE,q),k(q,z,N),E(q,z,N);var P=document.createElement("canvas");P.width=z,P.height=N;var B=P.getContext("2d",{willReadFrequently:!0}),$=B.createImageData(z,N);$.data.set(q),B.putImageData($,0,0);var Q;switch(I){case"jpeg":Q=P.toDataURL("image/jpeg");break;case"webp":Q=P.toDataURL("image/webp");break;default:Q=P.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(y),Q},S.setConvert=function(){for(var I=this,F=0;F<3;F++){var D=I.fullSceneLayout[M[F]];i.setConvert(D,I.fullLayout),D.setScale=a.noop}},S.make4thDimension=function(){var I=this,F=I.graphDiv,D=F._fullLayout;I._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},i.setConvert(I._mockAxis,D)},Qz=T,Qz}var eF,ghe;function jje(){return ghe||(ghe=1,eF={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}),eF}var tF,yhe;function lEe(){if(yhe)return tF;yhe=1;var e=va(),t=hc(),r=ja().extendFlat,n=ws().overrideAll;return tF=n({visible:t.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:e.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:t.color,categoryorder:t.categoryorder,categoryarray:t.categoryarray,title:{text:t.title.text,font:t.title.font},type:r({},t.type,{values:["-","linear","log","date","category"]}),autotypenumbers:t.autotypenumbers,autorange:t.autorange,autorangeoptions:{minallowed:t.autorangeoptions.minallowed,maxallowed:t.autorangeoptions.maxallowed,clipmin:t.autorangeoptions.clipmin,clipmax:t.autorangeoptions.clipmax,include:t.autorangeoptions.include,editType:"plot"},rangemode:t.rangemode,minallowed:t.minallowed,maxallowed:t.maxallowed,range:r({},t.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:t.minor.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,mirror:t.mirror,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,tickfont:t.tickfont,tickangle:t.tickangle,tickprefix:t.tickprefix,showtickprefix:t.showtickprefix,ticksuffix:t.ticksuffix,showticksuffix:t.showticksuffix,showexponent:t.showexponent,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,tickformat:t.tickformat,tickformatstops:t.tickformatstops,hoverformat:t.hoverformat,showline:t.showline,linecolor:t.linecolor,linewidth:t.linewidth,showgrid:t.showgrid,gridcolor:r({},t.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:t.gridwidth,zeroline:t.zeroline,zerolinecolor:t.zerolinecolor,zerolinewidth:t.zerolinewidth,_deprecated:{title:t._deprecated.title,titlefont:t._deprecated.titlefont}},"plot","from-root"),tF}var rF,mhe;function uEe(){if(mhe)return rF;mhe=1;var e=lEe(),t=Vs().attributes,r=ja().extendFlat,n=rr().counterRegex;function o(s,a,f){return{x:{valType:"number",dflt:s,editType:"camera"},y:{valType:"number",dflt:a,editType:"camera"},z:{valType:"number",dflt:f,editType:"camera"},editType:"camera"}}return rF={_arrayAttrRegexps:[n("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:r(o(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:r(o(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:r(o(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},editType:"calc"},editType:"camera"},domain:t({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:e,yaxis:e,zaxis:e,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}},rF}var nF,xhe;function Uje(){if(xhe)return nF;xhe=1;var e=wf().mix,t=rr(),r=go(),n=lEe(),o=GAe(),s=VS(),a=["xaxis","yaxis","zaxis"],f=13600/187;return nF=function(l,u,c){var h,d;function v(y,b){return t.coerce(h,d,n,y,b)}for(var p=0;p1;function v(p){if(!d){var m=e.validate(u[p],s[p]);if(m)return u[p]}}n(u,c,h,{type:f,attributes:s,handleDefaults:i,fullLayout:c,font:c.font,fullData:h,getDfltFromLayout:v,autotypenumbersDflt:c.autotypenumbers,paper_bgcolor:c.paper_bgcolor,calendar:c.calendar})};function i(l,u,c,h){for(var d=c("bgcolor"),v=t.combine(d,h.paper_bgcolor),p=["up","center","eye"],m=0;m.999)&&(S="turntable")}else S="turntable";c("dragmode",S),c("hovermode",h.getDfltFromLayout("hovermode"))}return aF}var _he;function Vm(){if(_he)return rh;_he=1;var e=ws().overrideAll,t=uy(),r=qje(),n=cc().getSubplotData,o=rr(),s=Dv(),a="gl3d",f="scene";return rh.name=a,rh.attr=f,rh.idRoot=f,rh.idRegex=rh.attrRegex=o.counterRegex("scene"),rh.attributes=jje(),rh.layoutAttributes=uEe(),rh.baseLayoutAttrOverrides=e({hoverlabel:t.hoverlabel},"plot","nested"),rh.supplyLayoutDefaults=Hje(),rh.plot=function(l){for(var u=l._fullLayout,c=l._fullData,h=u._subplots[a],d=0;d0){k=h[E];break}return k}function m(x,_){if(!(x<1||_<1)){for(var k=v(x),E=v(_),I=1,F=0;FT;)E--,E/=p(E),E++,E1?I:1};function S(x,_,k){var E=k[8]+k[2]*_[0]+k[5]*_[1];return x[0]=(k[6]+k[0]*_[0]+k[3]*_[1])/E,x[1]=(k[7]+k[1]*_[0]+k[4]*_[1])/E,x}function A(x,_,k){return M(x,_,S,k),x}function M(x,_,k,E){for(var I=[0,0],F=x.shape[0],D=x.shape[1],z=0;z0&&this.contourStart[E]!==null&&this.contourEnd[E]!==null&&this.contourEnd[E]>this.contourStart[E]))for(_[E]=!0,I=this.contourStart[E];I$&&(this.minValues[q]=$),this.maxValues[q]<$&&(this.maxValues[q]=$));for(q=0;q<3;q++)this.objectOffset[q]=.5*(this.minValues[q]+this.maxValues[q]);for(q=0;q<3;q++)for(P=0;P0*, the alpha-shape algorithm is used. In this case, the positive `alphahull` value","signals the use of the alpha-shape algorithm, _and_ its value","acts as the parameter for the mesh fitting.","If *0*, the convex-hull algorithm is used. It is suitable for convex bodies","or if the intention is to enclose the `x`, `y` and `z` point set into a convex","hull."].join(" ")},intensity:{valType:"data_array",editType:"calc",description:["Sets the intensity values for vertices or cells","as defined by `intensitymode`.","It can be used for plotting fields on meshes."].join(" ")},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc",description:["Determines the source of `intensity` values."].join(" ")},color:{valType:"color",editType:"calc",description:"Sets the color of the whole mesh"},vertexcolor:{valType:"data_array",editType:"calc",description:["Sets the color of each vertex","Overrides *color*. While Red, green and blue colors","are in the range of 0 and 255; in the case of having","vertex color data in RGBA format, the alpha color","should be normalized to be between 0 and 1."].join(" ")},facecolor:{valType:"data_array",editType:"calc",description:["Sets the color of each face","Overrides *color* and *vertexcolor*."].join(" ")},transforms:void 0},e("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:n.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not normal smoothing is applied to the meshes,","creating meshes with an angular, low-poly look via flat reflections."].join(" ")},contour:{show:s({},n.contours.x.show,{description:["Sets whether or not dynamic contours are shown on hover"].join(" ")}),color:n.contours.x.color,width:n.contours.x.width,editType:"calc"},lightposition:{x:s({},n.lightposition.x,{dflt:1e5}),y:s({},n.lightposition.y,{dflt:1e5}),z:s({},n.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},n.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"}),showlegend:s({},o.showlegend,{dflt:!1})}),vF}var Lhe;function yW(){if(Lhe)return dF.exports;Lhe=1;var e=os(),t=ll().axisHoverFormat,r=bi().hovertemplateAttrs,n=W2(),o=qo(),s=ja().extendFlat,a=ws().overrideAll;function f(u){return{show:{valType:"boolean",dflt:!1,description:["Determines whether or not slice planes about the",u,"dimension are drawn."].join(" ")},locations:{valType:"data_array",dflt:[],description:["Specifies the location(s) of slices on the axis.","When not specified slices would be created for","all points of the axis",u,"except start and end."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `slices`. The default fill value of the","`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}function i(u){return{show:{valType:"boolean",dflt:!0,description:["Sets the fill ratio of the `slices`. The default fill value of the",u,"`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `caps`. The default fill value of the","`caps` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}var l=dF.exports=a(s({x:{valType:"data_array",description:["Sets the X coordinates of the vertices on X axis."].join(" ")},y:{valType:"data_array",description:["Sets the Y coordinates of the vertices on Y axis."].join(" ")},z:{valType:"data_array",description:["Sets the Z coordinates of the vertices on Z axis."].join(" ")},value:{valType:"data_array",description:["Sets the 4th dimension (value) of the vertices."].join(" ")},isomin:{valType:"number",description:["Sets the minimum boundary for iso-surface plot."].join(" ")},isomax:{valType:"number",description:["Sets the maximum boundary for iso-surface plot."].join(" ")},surface:{show:{valType:"boolean",dflt:!0,description:["Hides/displays surfaces between minimum and maximum iso-values."].join(" ")},count:{valType:"integer",dflt:2,min:1,description:["Sets the number of iso-surfaces between minimum and maximum iso-values.","By default this value is 2 meaning that only minimum and maximum surfaces","would be drawn."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the iso-surface. The default fill value of the","surface is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all",description:["Sets the surface pattern of the iso-surface 3-D sections. The default pattern of","the surface is `all` meaning that the rest of surface elements would be shaded.","The check options (either 1 or 2) could be used to draw half of the squares","on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E`","may also be used to reduce the number of triangles on the iso-surfaces and","creating other patterns of interest."].join(" ")}},spaceframe:{show:{valType:"boolean",dflt:!1,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:.15,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 0.15 meaning that only 15% of the area of every faces of tetras would be","shaded. Applying a greater `fill` ratio would allow the creation of stronger","elements or could be sued to have entirely closed areas (in case of using 1)."].join(" ")}},slices:{x:f("x"),y:f("y"),z:f("z")},caps:{x:i("x"),y:i("y"),z:i("z")},text:{valType:"string",dflt:"",arrayOk:!0,description:["Sets the text elements associated with the vertices.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,description:"Same as `text`."},hovertemplate:r(),xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z"),valuehoverformat:t("value",1),showlegend:s({},o.showlegend,{dflt:!1})},e("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:n.opacity,lightposition:n.lightposition,lighting:n.lighting,flatshading:n.flatshading,contour:n.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");return l.flatshading.dflt=!0,l.lighting.facenormalsepsilon.dflt=0,l.x.editType=l.y.editType=l.z.editType=l.value.editType="calc+clearAxisTypes",l.transforms=void 0,dF.exports}var pF,Phe;function cEe(){if(Phe)return pF;Phe=1;var e=rr(),t=ga(),r=yW(),n=Tf();function o(a,f,i,l){function u(c,h){return e.coerce(a,f,r,c,h)}s(a,f,i,l,u)}function s(a,f,i,l,u){var c=u("isomin"),h=u("isomax");h!=null&&c!==void 0&&c!==null&&c>h&&(f.isomin=null,f.isomax=null);var d=u("x"),v=u("y"),p=u("z"),m=u("value");if(!d||!d.length||!v||!v.length||!p||!p.length||!m||!m.length){f.visible=!1;return}var y=t.getComponentMethod("calendars","handleTraceDefaults");y(a,f,["x","y","z"],l),u("valuehoverformat"),["x","y","z"].forEach(function(S){u(S+"hoverformat");var A="caps."+S,M=u(A+".show");M&&u(A+".fill");var w="slices."+S,C=u(w+".show");C&&(u(w+".fill"),u(w+".locations"))});var b=u("spaceframe.show");b&&u("spaceframe.fill");var g=u("surface.show");g&&(u("surface.count"),u("surface.fill"),u("surface.pattern"));var T=u("contour.show");T&&(u("contour.color"),u("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(S){u(S)}),n(a,f,l,u,{prefix:"",cLetter:"c"}),f._length=null}return pF={supplyDefaults:o,supplyIsoDefaults:s},pF}var gF,Dhe;function fV(){if(Dhe)return gF;Dhe=1;var e=rr(),t=md();function r(a,f){f._len=Math.min(f.u.length,f.v.length,f.w.length,f.x.length,f.y.length,f.z.length),f._u=s(f.u,f._len),f._v=s(f.v,f._len),f._w=s(f.w,f._len),f._x=s(f.x,f._len),f._y=s(f.y,f._len),f._z=s(f.z,f._len);var i=n(f);f._gridFill=i.fill,f._Xs=i.Xs,f._Ys=i.Ys,f._Zs=i.Zs,f._len=i.len;var l=0,u,c,h;f.starts&&(u=s(f.starts.x||[]),c=s(f.starts.y||[]),h=s(f.starts.z||[]),l=Math.min(u.length,c.length,h.length)),f._startsX=u||[],f._startsY=c||[],f._startsZ=h||[];var d=0,v=1/0,p;for(p=0;p1&&(C=f[u-1],_=i[u-1],E=l[u-1]),c=0;cC?"-":"+")+"x"),T=T.replace("y",(x>_?"-":"+")+"y"),T=T.replace("z",(k>E?"-":"+")+"z");var z=function(){u=0,I=[],F=[],D=[]};(!u||u0;v--){var p=Math.min(d[v],d[v-1]),m=Math.max(d[v],d[v-1]);if(m>p&&p-1}function ee(Tt,rt){return Tt===null?rt:Tt}function le(Tt,rt,gt){Q();var mt=[rt],He=[gt];if(j>=1)mt=[rt],He=[gt];else if(j>0){var Ie=K(rt,gt);mt=Ie.xyzv,He=Ie.abc}for(var je=0;je-1?gt[ye]:$(Se,Pe,it);Pt>-1?pe[ye]=Pt:pe[ye]=ne(Se,Pe,it,ee(Tt,vt))}te(pe[0],pe[1],pe[2])}}function oe(Tt,rt,gt){var mt=function(He,Ie,je){le(Tt,[rt[He],rt[Ie],rt[je]],[gt[He],gt[Ie],gt[je]])};mt(0,1,2),mt(2,3,0)}function fe(Tt,rt,gt){var mt=function(He,Ie,je){le(Tt,[rt[He],rt[Ie],rt[je]],[gt[He],gt[Ie],gt[je]])};mt(0,1,2),mt(3,0,1),mt(2,3,0),mt(1,2,3)}function de(Tt,rt,gt,mt){var He=Tt[3];Hemt&&(He=mt);for(var Ie=(Tt[3]-He)/(Tt[3]-rt[3]+1e-9),je=[],pe=0;pe<4;pe++)je[pe]=(1-Ie)*Tt[pe]+Ie*rt[pe];return je}function _e(Tt,rt,gt){return Tt>=rt&&Tt<=gt}function we(Tt){var rt=.001*(z-D);return Tt>=D-rt&&Tt<=z+rt}function Oe(Tt){for(var rt=[],gt=0;gt<4;gt++){var mt=Tt[gt];rt.push([h._x[mt],h._y[mt],h._z[mt],h._value[mt]])}return rt}var be=3;function Te(Tt,rt,gt,mt,He,Ie){Ie||(Ie=1),gt=[-1,-1,-1];var je=!1,pe=[_e(rt[0][3],mt,He),_e(rt[1][3],mt,He),_e(rt[2][3],mt,He)];if(!pe[0]&&!pe[1]&&!pe[2])return!1;var ye=function(Pe,it,vt){return we(it[0][3])&&we(it[1][3])&&we(it[2][3])?(le(Pe,it,vt),!0):Iepe?[I,Ie]:[Ie,F];st(rt,ye[0],ye[1])}}var Se=[[Math.min(D,F),Math.max(D,F)],[Math.min(I,z),Math.max(I,z)]];["x","y","z"].forEach(function(Pe){for(var it=[],vt=0;vt0&&(_r.push(Br.id),Pe==="x"?Rr.push([Br.distRatio,0,0]):Pe==="y"?Rr.push([0,Br.distRatio,0]):Rr.push([0,0,Br.distRatio]))}else Pe==="x"?pr=Ht(1,C-1):Pe==="y"?pr=Ht(1,x-1):pr=Ht(1,_-1);_r.length>0&&(Pe==="x"?it[Pt]=ot(Tt,_r,Bt,It,Rr,it[Pt]):Pe==="y"?it[Pt]=ut(Tt,_r,Bt,It,Rr,it[Pt]):it[Pt]=ht(Tt,_r,Bt,It,Rr,it[Pt]),Pt++),pr.length>0&&(Pe==="x"?it[Pt]=Qe(Tt,pr,Bt,It,it[Pt]):Pe==="y"?it[Pt]=De(Tt,pr,Bt,It,it[Pt]):it[Pt]=me(Tt,pr,Bt,It,it[Pt]),Pt++)}var Gr=h.caps[Pe];Gr.show&&Gr.fill&&(Y(Gr.fill),Pe==="x"?it[Pt]=Qe(Tt,[0,C-1],Bt,It,it[Pt]):Pe==="y"?it[Pt]=De(Tt,[0,x-1],Bt,It,it[Pt]):it[Pt]=me(Tt,[0,_-1],Bt,It,it[Pt]),Pt++)}}),g===0&&J(),h._meshX=N,h._meshY=q,h._meshZ=P,h._meshIntensity=B,h._Xs=A,h._Ys=M,h._Zs=w}return Jt(),h}function c(h,d){var v=h.glplot.gl,p=e({gl:v}),m=new f(h,p,d.uid);return p._trace=m,m.update(d),h.glplot.add(p),m}return xF={findNearestOnAxis:a,generateIsoMeshes:u,createIsosurfaceTrace:c},xF}var bF,Fhe;function Zje(){return Fhe||(Fhe=1,bF={attributes:yW(),supplyDefaults:cEe().supplyDefaults,calc:hEe(),colorbar:{min:"cmin",max:"cmax"},plot:cV().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:Vm(),categories:["gl3d","showLegend"],meta:{description:["Draws isosurfaces between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}),bF}var _F,Nhe;function Kje(){return Nhe||(Nhe=1,_F=Zje()),_F}var wF={exports:{}},Bhe;function dEe(){if(Bhe)return wF.exports;Bhe=1;var e=os(),t=yW(),r=yM(),n=qo(),o=ja().extendFlat,s=ws().overrideAll,a=wF.exports=s(o({x:t.x,y:t.y,z:t.z,value:t.value,isomin:t.isomin,isomax:t.isomax,surface:t.surface,spaceframe:{show:{valType:"boolean",dflt:!1,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 1 meaning that they are entirely shaded. Applying a `fill` ratio less","than one would allow the creation of openings parallel to the edges."].join(" ")}},slices:t.slices,caps:t.caps,text:t.text,hovertext:t.hovertext,xhoverformat:t.xhoverformat,yhoverformat:t.yhoverformat,zhoverformat:t.zhoverformat,valuehoverformat:t.valuehoverformat,hovertemplate:t.hovertemplate},e("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:t.colorbar,opacity:t.opacity,opacityscale:r.opacityscale,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:o({},n.hoverinfo),showlegend:o({},n.showlegend,{dflt:!1})}),"calc","nested");return a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes",a.transforms=void 0,wF.exports}var TF,qhe;function Jje(){if(qhe)return TF;qhe=1;var e=rr(),t=dEe(),r=cEe().supplyIsoDefaults,n=fEe().opacityscaleDefaults;return TF=function(s,a,f,i){function l(u,c){return e.coerce(s,a,t,u,c)}r(s,a,f,i,l),n(s,a,i,l)},TF}var AF,jhe;function Qje(){if(jhe)return AF;jhe=1;var e=Hl().gl_mesh3d,t=dy().parseColorScale,r=rr().isArrayOrTypedArray,n=xp(),o=Hs().extractOpts,s=X2(),a=cV().findNearestOnAxis,f=cV().generateIsoMeshes;function i(c,h,d){this.scene=c,this.uid=d,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var l=i.prototype;l.handlePick=function(c){if(c.object===this.mesh){var h=c.data.index,d=this.data._meshX[h],v=this.data._meshY[h],p=this.data._meshZ[h],m=this.data._Ys.length,y=this.data._Zs.length,b=a(d,this.data._Xs).id,g=a(v,this.data._Ys).id,T=a(p,this.data._Zs).id,S=c.index=T+y*g+y*m*b;c.traceCoordinate=[this.data._meshX[S],this.data._meshY[S],this.data._meshZ[S],this.data._value[S]];var A=this.data.hovertext||this.data.text;return r(A)&&A[S]!==void 0?c.textLabel=A[S]:A&&(c.textLabel=A),!0}},l.update=function(c){var h=this.scene,d=h.fullSceneLayout;this.data=f(c);function v(g,T,S,A){return T.map(function(M){return g.d2l(M,0,A)*S})}var p=s(v(d.xaxis,c._meshX,h.dataScale[0],c.xcalendar),v(d.yaxis,c._meshY,h.dataScale[1],c.ycalendar),v(d.zaxis,c._meshZ,h.dataScale[2],c.zcalendar)),m=s(c._meshI,c._meshJ,c._meshK),y={positions:p,cells:m,lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.opacity,opacityscale:c.opacityscale,contourEnable:c.contour.show,contourColor:n(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading},b=o(c);y.vertexIntensity=c._meshIntensity,y.vertexIntensityBounds=[b.min,b.max],y.colormap=t(c),this.mesh.update(y)},l.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function u(c,h){var d=c.glplot.gl,v=e({gl:d}),p=new i(c,v,h.uid);return v._trace=p,p.update(h),c.glplot.add(v),p}return AF=u,AF}var SF,Uhe;function eUe(){return Uhe||(Uhe=1,SF={attributes:dEe(),supplyDefaults:Jje(),calc:hEe(),colorbar:{min:"cmin",max:"cmax"},plot:Qje(),moduleType:"trace",name:"volume",basePlotModule:Vm(),categories:["gl3d","showLegend"],meta:{description:["Draws volume trace between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}),SF}var MF,Hhe;function tUe(){return Hhe||(Hhe=1,MF=eUe()),MF}var EF,Ghe;function rUe(){if(Ghe)return EF;Ghe=1;var e=ga(),t=rr(),r=Tf(),n=W2();return EF=function(s,a,f,i){function l(v,p){return t.coerce(s,a,n,v,p)}function u(v){var p=v.map(function(m){var y=l(m);return y&&t.isArrayOrTypedArray(y)?y:null});return p.every(function(m){return m&&m.length===p[0].length})&&p}var c=u(["x","y","z"]);if(!c){a.visible=!1;return}if(u(["i","j","k"]),a.i&&(!a.j||!a.k)||a.j&&(!a.k||!a.i)||a.k&&(!a.i||!a.j)){a.visible=!1;return}var h=e.getComponentMethod("calendars","handleTraceDefaults");h(s,a,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(v){l(v)});var d=l("contour.show");d&&(l("contour.color"),l("contour.width")),"intensity"in s?(l("intensity"),l("intensitymode"),r(s,a,i,l,{prefix:"",cLetter:"c"})):(a.showscale=!1,"facecolor"in s?l("facecolor"):"vertexcolor"in s?l("vertexcolor"):l("color",f)),l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),a._length=null},EF}var kF,Vhe;function nUe(){if(Vhe)return kF;Vhe=1;var e=md();return kF=function(r,n){n.intensity&&e(r,n,{vals:n.intensity,containerStr:"",cLetter:"c"})},kF}var CF,Yhe;function aUe(){if(Yhe)return CF;Yhe=1;var e=Hl().gl_mesh3d,t=Hl().delaunay_triangulate,r=Hl().alpha_shape,n=Hl().convex_hull,o=dy().parseColorScale,s=rr().isArrayOrTypedArray,a=xp(),f=Hs().extractOpts,i=X2();function l(y,b,g){this.scene=y,this.uid=g,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var u=l.prototype;u.handlePick=function(y){if(y.object===this.mesh){var b=y.index=y.data.index;y.data._cellCenter?y.traceCoordinate=y.data.dataCoordinate:y.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var g=this.data.hovertext||this.data.text;return s(g)&&g[b]!==void 0?y.textLabel=g[b]:g&&(y.textLabel=g),!0}};function c(y){for(var b=[],g=y.length,T=0;T=b-.5)return!1;return!0}u.update=function(y){var b=this.scene,g=b.fullSceneLayout;this.data=y;var T=y.x.length,S=i(h(g.xaxis,y.x,b.dataScale[0],y.xcalendar),h(g.yaxis,y.y,b.dataScale[1],y.ycalendar),h(g.zaxis,y.z,b.dataScale[2],y.zcalendar)),A;if(y.i&&y.j&&y.k){if(y.i.length!==y.j.length||y.j.length!==y.k.length||!p(y.i,T)||!p(y.j,T)||!p(y.k,T))return;A=i(d(y.i),d(y.j),d(y.k))}else y.alphahull===0?A=n(S):y.alphahull>0?A=r(y.alphahull,S):A=v(y.delaunayaxis,S);var M={positions:S,cells:A,lightPosition:[y.lightposition.x,y.lightposition.y,y.lightposition.z],ambient:y.lighting.ambient,diffuse:y.lighting.diffuse,specular:y.lighting.specular,roughness:y.lighting.roughness,fresnel:y.lighting.fresnel,vertexNormalsEpsilon:y.lighting.vertexnormalsepsilon,faceNormalsEpsilon:y.lighting.facenormalsepsilon,opacity:y.opacity,contourEnable:y.contour.show,contourColor:a(y.contour.color).slice(0,3),contourWidth:y.contour.width,useFacetNormals:y.flatshading};if(y.intensity){var w=f(y);this.color="#fff";var C=y.intensitymode;M[C+"Intensity"]=y.intensity,M[C+"IntensityBounds"]=[w.min,w.max],M.colormap=o(y)}else y.vertexcolor?(this.color=y.vertexcolor[0],M.vertexColors=c(y.vertexcolor)):y.facecolor?(this.color=y.facecolor[0],M.cellColors=c(y.facecolor)):(this.color=y.color,M.meshColor=a(y.color));this.mesh.update(M)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function m(y,b){var g=y.glplot.gl,T=e({gl:g}),S=new l(y,T,b.uid);return T._trace=S,S.update(b),y.glplot.add(T),S}return CF=m,CF}var RF,$he;function iUe(){return $he||($he=1,RF={attributes:W2(),supplyDefaults:rUe(),calc:nUe(),colorbar:{min:"cmin",max:"cmax"},plot:aUe(),moduleType:"trace",name:"mesh3d",basePlotModule:Vm(),categories:["gl3d","showLegend"],meta:{description:["Draws sets of triangles with coordinates given by","three 1-dimensional arrays in `x`, `y`, `z` and","(1) a sets of `i`, `j`, `k` indices","(2) Delaunay triangulation or","(3) the Alpha-shape algorithm or","(4) the Convex-hull algorithm"].join(" ")}}),RF}var LF,Whe;function oUe(){return Whe||(Whe=1,LF=iUe()),LF}var PF,Xhe;function vEe(){if(Xhe)return PF;Xhe=1;var e=os(),t=ll().axisHoverFormat,r=bi().hovertemplateAttrs,n=W2(),o=qo(),s=ja().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates of the vector field","and of the displayed cones."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the y coordinates of the vector field","and of the displayed cones."].join(" ")},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the z coordinates of the vector field","and of the displayed cones."].join(" ")},u:{valType:"data_array",editType:"calc",description:"Sets the x components of the vector field."},v:{valType:"data_array",editType:"calc",description:"Sets the y components of the vector field."},w:{valType:"data_array",editType:"calc",description:"Sets the z components of the vector field."},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled",description:["Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar","(normalized by the max u/v/w norm in the vector field) or as","*absolute* value (in the same units as the vector field)."].join(" ")},sizeref:{valType:"number",editType:"calc",min:0,description:["Adjusts the cone size scaling.","The size of the cones is determined by their u/v/w norm multiplied a factor and `sizeref`.",'This factor (computed internally) corresponds to the minimum "time" to travel across',"two successive x/y/z positions at the average velocity of those two successive positions.","All cones in a given trace use the same factor.","With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*","With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field,","its the default value is half the sample's maximum vector norm."].join(" ")},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm",description:["Sets the cones' anchor with respect to their x/y/z positions.","Note that *cm* denote the cone's center of mass which corresponds to","1/4 from the tail to tip."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets the text elements associated with the cones.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},hovertemplate:r({editType:"calc"},{keys:["norm"]}),uhoverformat:t("u",1),vhoverformat:t("v",1),whoverformat:t("w",1),xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z"),showlegend:s({},o.showlegend,{dflt:!1})};s(a,e("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var f=["opacity","lightposition","lighting"];return f.forEach(function(i){a[i]=n[i]}),a.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),a.transforms=void 0,PF=a,PF}var DF,Zhe;function sUe(){if(Zhe)return DF;Zhe=1;var e=rr(),t=Tf(),r=vEe();return DF=function(o,s,a,f){function i(p,m){return e.coerce(o,s,r,p,m)}var l=i("u"),u=i("v"),c=i("w"),h=i("x"),d=i("y"),v=i("z");if(!l||!l.length||!u||!u.length||!c||!c.length||!h||!h.length||!d||!d.length||!v||!v.length){s.visible=!1;return}i("sizeref"),i("sizemode"),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),t(o,s,f,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),s._length=null},DF}var IF,Khe;function lUe(){if(Khe)return IF;Khe=1;var e=md();return IF=function(r,n){for(var o=n.u,s=n.v,a=n.w,f=Math.min(n.x.length,n.y.length,n.z.length,o.length,s.length,a.length),i=-1/0,l=1/0,u=0;u2?p=d.slice(1,v-1):v===2?p=[(d[0]+d[1])/2]:p=d,p}function u(d){var v=d.length;return v===1?[.5,.5]:[d[1]-d[0],d[v-1]-d[v-2]]}function c(d,v){var p=d.fullSceneLayout,m=d.dataScale,y=v._len,b={};function g(ne,te){var Z=p[te],G=m[a[te]];return r.simpleMap(ne,function(j){return Z.d2l(j)*G})}if(b.vectors=s(g(v._u,"xaxis"),g(v._v,"yaxis"),g(v._w,"zaxis"),y),!y)return{positions:[],cells:[]};var T=g(v._Xs,"xaxis"),S=g(v._Ys,"yaxis"),A=g(v._Zs,"zaxis");b.meshgrid=[T,S,A],b.gridFill=v._gridFill;var M=v._slen;if(M)b.startingPositions=s(g(v._startsX,"xaxis"),g(v._startsY,"yaxis"),g(v._startsZ,"zaxis"));else{for(var w=S[0],C=l(T),x=l(A),_=new Array(C.length*x.length),k=0,E=0;Es&&(s=l[0]),l[1]a&&(a=l[1])}function i(l){switch(l.type){case"GeometryCollection":l.geometries.forEach(i);break;case"Point":f(l.coordinates);break;case"MultiPoint":l.coordinates.forEach(f);break}}e.arcs.forEach(function(l){for(var u=-1,c=l.length,h;++us&&(s=h[0]),h[1]a&&(a=h[1])});for(r in e.objects)i(e.objects[r]);return[n,o,s,a]}function mUe(e,t){for(var r,n=e.length,o=n-t;o<--n;)r=e[o],e[o++]=e[n],e[n]=r}function xUe(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(r){return cde(e,r)})}:cde(e,t)}function cde(e,t){var r=t.id,n=t.bbox,o=t.properties==null?{}:t.properties,s=xM(e,t);return r==null&&n==null?{type:"Feature",properties:o,geometry:s}:n==null?{type:"Feature",id:r,properties:o,geometry:s}:{type:"Feature",id:r,bbox:n,properties:o,geometry:s}}function xM(e,t){var r=mW(e.transform),n=e.arcs;function o(u,c){c.length&&c.pop();for(var h=n[u<0?~u:u],d=0,v=h.length;d1)n=_Ue(e,t,r);else for(o=0,n=new Array(s=e.arcs.length);o1)for(var c=1,h=f(l[0]),d,v;ch&&(v=l[0],l[0]=l[c],l[c]=v,h=d);return l}).filter(function(i){return i.length>0})}}function hde(e,t){for(var r=0,n=e.length;r>>1;e[o]=2))throw new Error("n must be ≥2");i=e.bbox||mEe(e);var r=i[0],n=i[1],o=i[2],s=i[3],a;t={scale:[o-r?(o-r)/(a-1):1,s-n?(s-n)/(a-1):1],translate:[r,n]}}else i=e.bbox;var f=wEe(t),i,l,u=e.objects,c={};function h(p){return f(p)}function d(p){var m;switch(p.type){case"GeometryCollection":m={type:"GeometryCollection",geometries:p.geometries.map(d)};break;case"Point":m={type:"Point",coordinates:h(p.coordinates)};break;case"MultiPoint":m={type:"MultiPoint",coordinates:p.coordinates.map(h)};break;default:return p}return p.id!=null&&(m.id=p.id),p.bbox!=null&&(m.bbox=p.bbox),p.properties!=null&&(m.properties=p.properties),m}function v(p){var m=0,y=1,b=p.length,g,T=new Array(b);for(T[0]=f(p[0],0);++m0&&(o.push(s),s=[])}return s.length>0&&o.push(s),o},X1.makeLine=function(t){return t.length===1?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},X1.makePolygon=function(t){if(t.length===1)return{type:"Polygon",coordinates:t};for(var r=new Array(t.length),n=0;n=0))throw new Error("precision must be a positive number");var E=Math.pow(10,k||0);return Math.round(_*E)/E}e.round=v;function p(_,k){k===void 0&&(k="kilometers");var E=e.factors[k];if(!E)throw new Error(k+" units is invalid");return _*E}e.radiansToLength=p;function m(_,k){k===void 0&&(k="kilometers");var E=e.factors[k];if(!E)throw new Error(k+" units is invalid");return _/E}e.lengthToRadians=m;function y(_,k){return g(m(_,k))}e.lengthToDegrees=y;function b(_){var k=_%360;return k<0&&(k+=360),k}e.bearingToAzimuth=b;function g(_){var k=_%(2*Math.PI);return k*180/Math.PI}e.radiansToDegrees=g;function T(_){var k=_%360;return k*Math.PI/180}e.degreesToRadians=T;function S(_,k,E){if(k===void 0&&(k="kilometers"),E===void 0&&(E="kilometers"),!(_>=0))throw new Error("length must be a positive number");return p(m(_,k),E)}e.convertLength=S;function A(_,k,E){if(k===void 0&&(k="meters"),E===void 0&&(E="kilometers"),!(_>=0))throw new Error("area must be a positive number");var I=e.areaFactors[k];if(!I)throw new Error("invalid original units");var F=e.areaFactors[E];if(!F)throw new Error("invalid final units");return _/I*F}e.convertArea=A;function M(_){return!isNaN(_)&&_!==null&&!Array.isArray(_)}e.isNumber=M;function w(_){return!!_&&_.constructor===Object}e.isObject=w;function C(_){if(!_)throw new Error("bbox is required");if(!Array.isArray(_))throw new Error("bbox must be an Array");if(_.length!==4&&_.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");_.forEach(function(k){if(!M(k))throw new Error("bbox must only contain numbers")})}e.validateBBox=C;function x(_){if(!_)throw new Error("id is required");if(["string","number"].indexOf(typeof _)===-1)throw new Error("id must be a number or a string")}e.validateId=x})(XF)),XF}var yde;function bW(){if(yde)return Vu;yde=1,Object.defineProperty(Vu,"__esModule",{value:!0});var e=AEe();function t(b,g,T){if(b!==null)for(var S,A,M,w,C,x,_,k=0,E=0,I,F=b.type,D=F==="FeatureCollection",z=F==="Feature",N=D?b.features.length:1,q=0;qx||D>_||z>k){C=E,x=S,_=D,k=z,M=0;return}var N=e.lineString([C,E],T.properties);if(g(N,S,A,z,M)===!1)return!1;M++,C=E})===!1)return!1}}})}function d(b,g,T){var S=T,A=!1;return h(b,function(M,w,C,x,_){A===!1&&T===void 0?S=M:S=g(S,M,w,C,x,_),A=!0}),S}function v(b,g){if(!b)throw new Error("geojson is required");u(b,function(T,S,A){if(T.geometry!==null){var M=T.geometry.type,w=T.geometry.coordinates;switch(M){case"LineString":if(g(T,S,A,0,0)===!1)return!1;break;case"Polygon":for(var C=0;C0){i+=Math.abs(s(f[0]));for(var l=1;l2){for(v=0;vo[0]&&(n[0]=o[0]),n[1]>o[1]&&(n[1]=o[1]),n[2]0&&I[F+1][0]<0)return F;return null}switch(M==="RUS"||M==="FJI"?C=function(I){var F;if(E(I)===null)F=I;else for(F=new Array(I.length),k=0;kF?D[z++]=[I[k][0]+360,I[k][1]]:k===F?(D[z++]=I[k],D[z++]=[I[k][0],-90]):D[z++]=I[k];var N=l.tester(D);N.pts.pop(),w.push(N)}:C=function(I){w.push(l.tester(I))},S.type){case"MultiPolygon":for(x=0;xw&&(w=_,A=x)}else A=S;return n.default(A).geometry.coordinates}function b(T){var S=window.PlotlyGeoAssets||{},A=[];function M(k){return new Promise(function(E,I){e.json(k,function(F,D){if(F){delete S[k];var z=F.status===404?'GeoJSON at URL "'+k+'" does not exist.':"Unexpected error while fetching from "+k;return I(new Error(z))}return S[k]=D,E(D)})})}function w(k){return new Promise(function(E,I){var F=0,D=setInterval(function(){if(S[k]&&S[k]!=="pending")return clearInterval(D),E(S[k]);if(F>100)return clearInterval(D),I("Unexpected error while fetching from "+k);F++},50)})}for(var C=0;C")}return QF}var eN,Mde;function PUe(){return Mde||(Mde=1,eN=function(t,r,n,o,s){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var a=o[s];return a.fIn&&a.fIn.properties&&(t.properties=a.fIn.properties),t}),eN}var tN,Ede;function DUe(){if(Ede)return tN;Ede=1;var e=As(),t=Pi().BADNUM;return tN=function(n,o){var s=n.cd,a=n.xaxis,f=n.yaxis,i=[],l=s[0].trace,u,c,h,d,v,p=!e.hasMarkers(l)&&!e.hasText(l);if(p)return[];if(o===!1)for(v=0;v0?1:e<0?-1:0},Xu=Math.sqrt,_W=Math.tan;function EEe(e){return e>1?0:e<-1?Mo:Math.acos(e)}function Uh(e){return e>1?fu:e<-1?-fu:Math.asin(e)}function Cde(e){return(e=$a(e/2))*e}function Gl(){}function tA(e,t){e&&Lde.hasOwnProperty(e.type)&&Lde[e.type](e,t)}var Rde={Feature:function(e,t){tA(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,o=r.length;++n=0?1:-1,o=n*r,s=li(t),a=$a(t),f=pV*a,i=vV*s+f*li(o),l=f*n*$a(o);rA.add(jh(l,i)),dV=e,vV=s,pV=a}function FUe(e){return nA.reset(),dd(e,u0),nA*2}function aA(e){return[jh(e[1],e[0]),Uh(e[2])]}function bm(e){var t=e[0],r=e[1],n=li(r);return[n*li(t),n*$a(t),$a(r)]}function HT(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function wx(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function nN(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function GT(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function iA(e){var t=Xu(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ul,hd,su,jd,Jy,LEe,PEe,hx,V_=vy(),Vg,X0,N0={point:gV,lineStart:Dde,lineEnd:Ide,polygonStart:function(){N0.point=IEe,N0.lineStart=NUe,N0.lineEnd=BUe,V_.reset(),u0.polygonStart()},polygonEnd:function(){u0.polygonEnd(),N0.point=gV,N0.lineStart=Dde,N0.lineEnd=Ide,rA<0?(Ul=-(su=180),hd=-(jd=90)):V_>xi?jd=90:V_<-xi&&(hd=-90),X0[0]=Ul,X0[1]=su},sphere:function(){Ul=-(su=180),hd=-(jd=90)}};function gV(e,t){Vg.push(X0=[Ul=e,su=e]),tjd&&(jd=t)}function DEe(e,t){var r=bm([e*ki,t*ki]);if(hx){var n=wx(hx,r),o=[n[1],-n[0],0],s=wx(o,n);iA(s),s=aA(s);var a=e-Jy,f=a>0?1:-1,i=s[0]*el*f,l,u=Go(a)>180;u^(f*Jyjd&&(jd=l)):(i=(i+360)%360-180,u^(f*Jyjd&&(jd=t))),u?eqd(Ul,su)&&(su=e):qd(e,su)>qd(Ul,su)&&(Ul=e):su>=Ul?(esu&&(su=e)):e>Jy?qd(Ul,e)>qd(Ul,su)&&(su=e):qd(e,su)>qd(Ul,su)&&(Ul=e)}else Vg.push(X0=[Ul=e,su=e]);tjd&&(jd=t),hx=r,Jy=e}function Dde(){N0.point=DEe}function Ide(){X0[0]=Ul,X0[1]=su,N0.point=gV,hx=null}function IEe(e,t){if(hx){var r=e-Jy;V_.add(Go(r)>180?r+(r>0?360:-360):r)}else LEe=e,PEe=t;u0.point(e,t),DEe(e,t)}function NUe(){u0.lineStart()}function BUe(){IEe(LEe,PEe),u0.lineEnd(),Go(V_)>xi&&(Ul=-(su=180)),X0[0]=Ul,X0[1]=su,hx=null}function qd(e,t){return(t-=e)<0?t+360:t}function qUe(e,t){return e[0]-t[0]}function Ode(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tqd(n[0],n[1])&&(n[1]=o[1]),qd(o[0],n[1])>qd(n[0],n[1])&&(n[0]=o[0])):s.push(n=o);for(a=-1/0,r=s.length-1,t=0,n=s[r];t<=r;n=o,++t)o=s[t],(f=qd(n[1],o[0]))>a&&(a=f,Ul=o[0],su=n[1])}return Vg=X0=null,Ul===1/0||hd===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ul,hd],[su,jd]]}var D_,oA,sA,lA,uA,fA,cA,hA,yV,mV,xV,zEe,FEe,Dh,Ih,Oh,fp={sphere:Gl,point:wW,lineStart:zde,lineEnd:Fde,polygonStart:function(){fp.lineStart=HUe,fp.lineEnd=GUe},polygonEnd:function(){fp.lineStart=zde,fp.lineEnd=Fde}};function wW(e,t){e*=ki,t*=ki;var r=li(t);J2(r*li(e),r*$a(e),$a(t))}function J2(e,t,r){++D_,sA+=(e-sA)/D_,lA+=(t-lA)/D_,uA+=(r-uA)/D_}function zde(){fp.point=jUe}function jUe(e,t){e*=ki,t*=ki;var r=li(t);Dh=r*li(e),Ih=r*$a(e),Oh=$a(t),fp.point=UUe,J2(Dh,Ih,Oh)}function UUe(e,t){e*=ki,t*=ki;var r=li(t),n=r*li(e),o=r*$a(e),s=$a(t),a=jh(Xu((a=Ih*s-Oh*o)*a+(a=Oh*n-Dh*s)*a+(a=Dh*o-Ih*n)*a),Dh*n+Ih*o+Oh*s);oA+=a,fA+=a*(Dh+(Dh=n)),cA+=a*(Ih+(Ih=o)),hA+=a*(Oh+(Oh=s)),J2(Dh,Ih,Oh)}function Fde(){fp.point=wW}function HUe(){fp.point=VUe}function GUe(){NEe(zEe,FEe),fp.point=wW}function VUe(e,t){zEe=e,FEe=t,e*=ki,t*=ki,fp.point=NEe;var r=li(t);Dh=r*li(e),Ih=r*$a(e),Oh=$a(t),J2(Dh,Ih,Oh)}function NEe(e,t){e*=ki,t*=ki;var r=li(t),n=r*li(e),o=r*$a(e),s=$a(t),a=Ih*s-Oh*o,f=Oh*n-Dh*s,i=Dh*o-Ih*n,l=Xu(a*a+f*f+i*i),u=Uh(l),c=l&&-u/l;yV+=c*a,mV+=c*f,xV+=c*i,oA+=u,fA+=u*(Dh+(Dh=n)),cA+=u*(Ih+(Ih=o)),hA+=u*(Oh+(Oh=s)),J2(Dh,Ih,Oh)}function ob(e){D_=oA=sA=lA=uA=fA=cA=hA=yV=mV=xV=0,dd(e,fp);var t=yV,r=mV,n=xV,o=t*t+r*r+n*n;return oMo?e+Math.round(-e/qh)*qh:e,t]}_V.invert=_V;function TW(e,t,r){return(e%=qh)?t||r?bV(Bde(e),qde(t,r)):Bde(e):t||r?qde(t,r):_V}function Nde(e){return function(t,r){return t+=e,[t>Mo?t-qh:t<-Mo?t+qh:t,r]}}function Bde(e){var t=Nde(e);return t.invert=Nde(-e),t}function qde(e,t){var r=li(e),n=$a(e),o=li(t),s=$a(t);function a(f,i){var l=li(i),u=li(f)*l,c=$a(f)*l,h=$a(i),d=h*r+u*n;return[jh(c*o-d*s,u*r-h*n),Uh(d*o+c*s)]}return a.invert=function(f,i){var l=li(i),u=li(f)*l,c=$a(f)*l,h=$a(i),d=h*o-c*s;return[jh(c*o+h*s,u*r+d*n),Uh(d*r-u*n)]},a}function Tx(e){e=TW(e[0]*ki,e[1]*ki,e.length>2?e[2]*ki:0);function t(r){return r=e(r[0]*ki,r[1]*ki),r[0]*=el,r[1]*=el,r}return t.invert=function(r){return r=e.invert(r[0]*ki,r[1]*ki),r[0]*=el,r[1]*=el,r},t}function BEe(e,t,r,n,o,s){if(r){var a=li(t),f=$a(t),i=n*r;o==null?(o=t+n*qh,s=t-i/2):(o=jde(a,o),s=jde(a,s),(n>0?os)&&(o+=n*qh));for(var l,u=o;n>0?u>s:u1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function T3(e,t){return Go(e[0]-t[0])=0;--f)o.point((c=u[f])[0],c[1]);else n(h.x,h.p.x,-1,o);h=h.p}h=h.o,u=h.z,d=!d}while(!h.v);o.lineEnd()}}}function Ude(e){if(t=e.length){for(var t,r=0,n=e[0],o;++r=0?1:-1,C=w*M,x=C>Mo,_=p*S;if(aN.add(jh(_*w*$a(C),m*A+_*li(C))),a+=x?M+w*qh:M,x^d>=r^g>=r){var k=wx(bm(h),bm(b));iA(k);var E=wx(s,k);iA(E);var I=(x^M>=0?-1:1)*Uh(E[2]);(n>I||n===I&&(k[0]||k[1]))&&(f+=x^M>=0?1:-1)}}return(a<-xi||at?1:e>=t?0:NaN}function YUe(e){return e.length===1&&(e=$Ue(e)),{left:function(t,r,n,o){for(n==null&&(n=0),o==null&&(o=t.length);n>>1;e(t[s],r)<0?n=s+1:o=s}return n},right:function(t,r,n,o){for(n==null&&(n=0),o==null&&(o=t.length);n>>1;e(t[s],r)>0?o=s:n=s+1}return n}}}function $Ue(e){return function(t,r){return _M(e(t),r)}}YUe(_M);function Hde(e){return e===null?NaN:+e}function Zg(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++n=o)for(s=o;++ns&&(s=o)}else for(;++n=o)for(s=o;++ns&&(s=o);return s}function Gde(e,t){var r=e.length,n=r,o=-1,s,a=0;if(t==null)for(;++o=0;)for(a=e[t],r=a.length;--r>=0;)s[--o]=a[r];return s}function sb(e,t){var r=e.length,n=-1,o,s;if(t==null){for(;++n=o)for(s=o;++no&&(s=o)}else for(;++n=o)for(s=o;++no&&(s=o);return s}function Jp(e,t){var r=e.length,n=-1,o,s=0;if(t==null)for(;++n0){for(i||(o.polygonStart(),i=!0),o.lineStart(),A=0;A1&&T&2&&S.push(S.pop().concat(S.shift())),u.push(S.filter(WUe))}}return h}}function WUe(e){return e.length>1}function XUe(e,t){return((e=e.x)[0]<0?e[1]-fu-xi:fu-e[1])-((t=t.x)[0]<0?t[1]-fu-xi:fu-t[1])}const wV=GEe(function(){return!0},ZUe,JUe,[-Mo,-fu]);function ZUe(e){var t=NaN,r=NaN,n=NaN,o;return{lineStart:function(){e.lineStart(),o=1},point:function(s,a){var f=s>0?Mo:-Mo,i=Go(s-t);Go(i-Mo)0?fu:-fu),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(f,r),e.point(s,r),o=0):n!==f&&i>=Mo&&(Go(t-n)xi?ib(($a(t)*(s=li(n))*$a(r)-$a(n)*(o=li(t))*$a(e))/(o*s*a)):(t+n)/2}function JUe(e,t,r,n){var o;if(e==null)o=r*fu,n.point(-Mo,o),n.point(0,o),n.point(Mo,o),n.point(Mo,0),n.point(Mo,-o),n.point(0,-o),n.point(-Mo,-o),n.point(-Mo,0),n.point(-Mo,o);else if(Go(e[0]-t[0])>xi){var s=e[0]0,o=Go(t)>xi;function s(u,c,h,d){BEe(d,e,r,h,u,c)}function a(u,c){return li(u)*li(c)>t}function f(u){var c,h,d,v,p;return{lineStart:function(){v=d=!1,p=1},point:function(m,y){var b=[m,y],g,T=a(m,y),S=n?T?0:l(m,y):T?l(m+(m<0?Mo:-Mo),y):0;if(!c&&(v=d=T)&&u.lineStart(),T!==d&&(g=i(c,b),(!g||T3(c,g)||T3(b,g))&&(b[2]=1)),T!==d)p=0,T?(u.lineStart(),g=i(b,c),u.point(g[0],g[1])):(g=i(c,b),u.point(g[0],g[1],2),u.lineEnd()),c=g;else if(o&&c&&n^T){var A;!(S&h)&&(A=i(b,c,!0))&&(p=0,n?(u.lineStart(),u.point(A[0][0],A[0][1]),u.point(A[1][0],A[1][1]),u.lineEnd()):(u.point(A[1][0],A[1][1]),u.lineEnd(),u.lineStart(),u.point(A[0][0],A[0][1],3)))}T&&(!c||!T3(c,b))&&u.point(b[0],b[1]),c=b,d=T,h=S},lineEnd:function(){d&&u.lineEnd(),c=null},clean:function(){return p|(v&&d)<<1}}}function i(u,c,h){var d=bm(u),v=bm(c),p=[1,0,0],m=wx(d,v),y=HT(m,m),b=m[0],g=y-b*b;if(!g)return!h&&u;var T=t*y/g,S=-t*b/g,A=wx(p,m),M=GT(p,T),w=GT(m,S);nN(M,w);var C=A,x=HT(M,C),_=HT(C,C),k=x*x-_*(HT(M,M)-1);if(!(k<0)){var E=Xu(k),I=GT(C,(-x-E)/_);if(nN(I,M),I=aA(I),!h)return I;var F=u[0],D=c[0],z=u[1],N=c[1],q;D0^I[1]<(Go(I[0]-F)Mo^(F<=I[0]&&I[0]<=D)){var Q=GT(C,(-x+E)/_);return nN(Q,M),[I,aA(Q)]}}}function l(u,c){var h=n?e:Mo-e,d=0;return u<-h?d|=1:u>h&&(d|=2),c<-h?d|=4:c>h&&(d|=8),d}return GEe(a,f,s,n?[0,-e]:[-Mo,e-Mo])}function QUe(e,t,r,n,o,s){var a=e[0],f=e[1],i=t[0],l=t[1],u=0,c=1,h=i-a,d=l-f,v;if(v=r-a,!(!h&&v>0)){if(v/=h,h<0){if(v0){if(v>c)return;v>u&&(u=v)}if(v=o-a,!(!h&&v<0)){if(v/=h,h<0){if(v>c)return;v>u&&(u=v)}else if(h>0){if(v0)){if(v/=d,d<0){if(v0){if(v>c)return;v>u&&(u=v)}if(v=s-f,!(!d&&v<0)){if(v/=d,d<0){if(v>c)return;v>u&&(u=v)}else if(d>0){if(v0&&(e[0]=a+u*h,e[1]=f+u*d),c<1&&(t[0]=a+c*h,t[1]=f+c*d),!0}}}}}var I_=1e9,YT=-I_;function wM(e,t,r,n){function o(l,u){return e<=l&&l<=r&&t<=u&&u<=n}function s(l,u,c,h){var d=0,v=0;if(l==null||(d=a(l,c))!==(v=a(u,c))||i(l,u)<0^c>0)do h.point(d===0||d===3?e:r,d>1?n:t);while((d=(d+c+4)%4)!==v);else h.point(u[0],u[1])}function a(l,u){return Go(l[0]-e)0?0:3:Go(l[0]-r)0?2:1:Go(l[1]-t)0?1:0:u>0?3:2}function f(l,u){return i(l.x,u.x)}function i(l,u){var c=a(l,1),h=a(u,1);return c!==h?c-h:c===0?u[1]-l[1]:c===1?l[0]-u[0]:c===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,c=jEe(),h,d,v,p,m,y,b,g,T,S,A,M={point:w,lineStart:k,lineEnd:E,polygonStart:x,polygonEnd:_};function w(F,D){o(F,D)&&u.point(F,D)}function C(){for(var F=0,D=0,z=d.length;Dn&&(J-$)*(n-Q)>(ne-Q)*(e-$)&&++F:ne<=n&&(J-$)*(n-Q)<(ne-Q)*(e-$)&&--F;return F}function x(){u=c,h=[],d=[],A=!0}function _(){var F=C(),D=A&&F,z=(h=AW(h)).length;(D||z)&&(l.polygonStart(),D&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),z&&UEe(h,f,F,s,l),l.polygonEnd()),u=l,h=d=v=null}function k(){M.point=I,d&&d.push(v=[]),S=!0,T=!1,b=g=NaN}function E(){h&&(I(p,m),y&&T&&c.rejoin(),h.push(c.result())),M.point=w,T&&u.lineEnd()}function I(F,D){var z=o(F,D);if(d&&v.push([F,D]),S)p=F,m=D,y=z,S=!1,z&&(u.lineStart(),u.point(F,D));else if(z&&T)u.point(F,D);else{var N=[b=Math.max(YT,Math.min(I_,b)),g=Math.max(YT,Math.min(I_,g))],q=[F=Math.max(YT,Math.min(I_,F)),D=Math.max(YT,Math.min(I_,D))];QUe(N,q,e,t,r,n)?(T||(u.lineStart(),u.point(N[0],N[1])),u.point(q[0],q[1]),z||u.lineEnd(),A=!1):z&&(u.lineStart(),u.point(F,D),A=!1)}b=F,g=D,T=z}return M}}function eHe(){var e=0,t=0,r=960,n=500,o,s,a;return a={stream:function(f){return o&&s===f?o:o=wM(e,t,r,n)(s=f)},extent:function(f){return arguments.length?(e=+f[0][0],t=+f[0][1],r=+f[1][0],n=+f[1][1],o=s=null,a):[[e,t],[r,n]]}}}var TV=vy(),AV,A3,S3,Ax={sphere:Gl,point:Gl,lineStart:tHe,lineEnd:Gl,polygonStart:Gl,polygonEnd:Gl};function tHe(){Ax.point=nHe,Ax.lineEnd=rHe}function rHe(){Ax.point=Ax.lineEnd=Gl}function nHe(e,t){e*=ki,t*=ki,AV=e,A3=$a(t),S3=li(t),Ax.point=aHe}function aHe(e,t){e*=ki,t*=ki;var r=$a(t),n=li(t),o=Go(e-AV),s=li(o),a=$a(o),f=n*a,i=S3*r-A3*n*s,l=A3*r+S3*n*s;TV.add(jh(Xu(f*f+i*i),l)),AV=e,A3=r,S3=n}function YEe(e){return TV.reset(),dd(e,Ax),+TV}var SV=[null,null],iHe={type:"LineString",coordinates:SV};function vA(e,t){return SV[0]=e,SV[1]=t,YEe(iHe)}var Vde={Feature:function(e,t){return pA(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,o=r.length;++n0&&(o=vA(e[s],e[s-1]),o>0&&r<=o&&n<=o&&(r+n-o)*(1-Math.pow((r-n)/o,2))xi}).map(h)).concat(Zg(UT(s/l)*l,o,l).filter(function(g){return Go(g%c)>xi}).map(d))}return y.lines=function(){return b().map(function(g){return{type:"LineString",coordinates:g}})},y.outline=function(){return{type:"Polygon",coordinates:[v(n).concat(p(a).slice(1),v(r).reverse().slice(1),p(f).reverse().slice(1))]}},y.extent=function(g){return arguments.length?y.extentMajor(g).extentMinor(g):y.extentMinor()},y.extentMajor=function(g){return arguments.length?(n=+g[0][0],r=+g[1][0],f=+g[0][1],a=+g[1][1],n>r&&(g=n,n=r,r=g),f>a&&(g=f,f=a,a=g),y.precision(m)):[[n,f],[r,a]]},y.extentMinor=function(g){return arguments.length?(t=+g[0][0],e=+g[1][0],s=+g[0][1],o=+g[1][1],t>e&&(g=t,t=e,e=g),s>o&&(g=s,s=o,o=g),y.precision(m)):[[t,s],[e,o]]},y.step=function(g){return arguments.length?y.stepMajor(g).stepMinor(g):y.stepMinor()},y.stepMajor=function(g){return arguments.length?(u=+g[0],c=+g[1],y):[u,c]},y.stepMinor=function(g){return arguments.length?(i=+g[0],l=+g[1],y):[i,l]},y.precision=function(g){return arguments.length?(m=+g,h=Zde(s,o,90),d=Kde(t,e,m),v=Zde(f,a,90),p=Kde(n,r,m),y):m},y.extentMajor([[-180,-90+xi],[180,90-xi]]).extentMinor([[-180,-80-xi],[180,80+xi]])}function lHe(){return WEe()()}function gA(e,t){var r=e[0]*ki,n=e[1]*ki,o=t[0]*ki,s=t[1]*ki,a=li(n),f=$a(n),i=li(s),l=$a(s),u=a*li(r),c=a*$a(r),h=i*li(o),d=i*$a(o),v=2*Uh(Xu(Cde(s-n)+a*i*Cde(o-r))),p=$a(v),m=v?function(y){var b=$a(y*=v)/p,g=$a(v-y)/p,T=g*u+b*h,S=g*c+b*d,A=g*f+b*l;return[jh(S,T)*el,jh(A,Xu(T*T+S*S))*el]}:function(){return[r*el,n*el]};return m.distance=v,m}function l2(e){return e}var oN=vy(),MV=vy(),XEe,ZEe,EV,kV,j0={point:Gl,lineStart:Gl,lineEnd:Gl,polygonStart:function(){j0.lineStart=uHe,j0.lineEnd=cHe},polygonEnd:function(){j0.lineStart=j0.lineEnd=j0.point=Gl,oN.add(Go(MV)),MV.reset()},result:function(){var e=oN/2;return oN.reset(),e}};function uHe(){j0.point=fHe}function fHe(e,t){j0.point=KEe,XEe=EV=e,ZEe=kV=t}function KEe(e,t){MV.add(kV*e-EV*t),EV=e,kV=t}function cHe(){KEe(XEe,ZEe)}var Sx=1/0,yA=Sx,u2=-Sx,mA=u2,xA={point:hHe,lineStart:Gl,lineEnd:Gl,polygonStart:Gl,polygonEnd:Gl,result:function(){var e=[[Sx,yA],[u2,mA]];return u2=mA=-(yA=Sx=1/0),e}};function hHe(e,t){eu2&&(u2=e),tmA&&(mA=t)}var CV=0,RV=0,O_=0,bA=0,_A=0,ox=0,LV=0,PV=0,z_=0,JEe,QEe,t0,r0,Av={point:_m,lineStart:Jde,lineEnd:Qde,polygonStart:function(){Av.lineStart=pHe,Av.lineEnd=gHe},polygonEnd:function(){Av.point=_m,Av.lineStart=Jde,Av.lineEnd=Qde},result:function(){var e=z_?[LV/z_,PV/z_]:ox?[bA/ox,_A/ox]:O_?[CV/O_,RV/O_]:[NaN,NaN];return CV=RV=O_=bA=_A=ox=LV=PV=z_=0,e}};function _m(e,t){CV+=e,RV+=t,++O_}function Jde(){Av.point=dHe}function dHe(e,t){Av.point=vHe,_m(t0=e,r0=t)}function vHe(e,t){var r=e-t0,n=t-r0,o=Xu(r*r+n*n);bA+=o*(t0+e)/2,_A+=o*(r0+t)/2,ox+=o,_m(t0=e,r0=t)}function Qde(){Av.point=_m}function pHe(){Av.point=yHe}function gHe(){eke(JEe,QEe)}function yHe(e,t){Av.point=eke,_m(JEe=t0=e,QEe=r0=t)}function eke(e,t){var r=e-t0,n=t-r0,o=Xu(r*r+n*n);bA+=o*(t0+e)/2,_A+=o*(r0+t)/2,ox+=o,o=r0*e-t0*t,LV+=o*(t0+e),PV+=o*(r0+t),z_+=o*3,_m(t0=e,r0=t)}function tke(e){this._context=e}tke.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,qh);break}}},result:Gl};var DV=vy(),sN,rke,nke,F_,N_,f2={point:Gl,lineStart:function(){f2.point=mHe},lineEnd:function(){sN&&ake(rke,nke),f2.point=Gl},polygonStart:function(){sN=!0},polygonEnd:function(){sN=null},result:function(){var e=+DV;return DV.reset(),e}};function mHe(e,t){f2.point=ake,rke=F_=e,nke=N_=t}function ake(e,t){F_-=e,N_-=t,DV.add(Xu(F_*F_+N_*N_)),F_=e,N_=t}function ike(){this._string=[]}ike.prototype={_radius:4.5,_circle:eve(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=eve(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function eve(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function xHe(e,t){var r=4.5,n,o;function s(a){return a&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),dd(a,n(o))),o.result()}return s.area=function(a){return dd(a,n(j0)),j0.result()},s.measure=function(a){return dd(a,n(f2)),f2.result()},s.bounds=function(a){return dd(a,n(xA)),xA.result()},s.centroid=function(a){return dd(a,n(Av)),Av.result()},s.projection=function(a){return arguments.length?(n=a==null?(e=null,l2):(e=a).stream,s):e},s.context=function(a){return arguments.length?(o=a==null?(t=null,new ike):new tke(t=a),typeof r!="function"&&o.pointRadius(r),s):t},s.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(o.pointRadius(+a),+a),s):r},s.projection(e).context(t)}function bHe(e){return{stream:Q2(e)}}function Q2(e){return function(t){var r=new IV;for(var n in e)r[n]=e[n];return r.stream=t,r}}function IV(){}IV.prototype={constructor:IV,point:function(e,t){this.stream.point(e,t)},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 SW(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),dd(r,e.stream(xA)),t(xA.result()),n!=null&&e.clipExtent(n),e}function TM(e,t,r){return SW(e,function(n){var o=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(o/(n[1][0]-n[0][0]),s/(n[1][1]-n[0][1])),f=+t[0][0]+(o-a*(n[1][0]+n[0][0]))/2,i=+t[0][1]+(s-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([f,i])},r)}function MW(e,t,r){return TM(e,[[0,0],t],r)}function EW(e,t,r){return SW(e,function(n){var o=+t,s=o/(n[1][0]-n[0][0]),a=(o-s*(n[1][0]+n[0][0]))/2,f=-s*n[0][1];e.scale(150*s).translate([a,f])},r)}function kW(e,t,r){return SW(e,function(n){var o=+t,s=o/(n[1][1]-n[0][1]),a=-s*n[0][0],f=(o-s*(n[1][1]+n[0][1]))/2;e.scale(150*s).translate([a,f])},r)}var tve=16,_He=li(30*ki);function rve(e,t){return+t?THe(e,t):wHe(e)}function wHe(e){return Q2({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function THe(e,t){function r(n,o,s,a,f,i,l,u,c,h,d,v,p,m){var y=l-n,b=u-o,g=y*y+b*b;if(g>4*t&&p--){var T=a+h,S=f+d,A=i+v,M=Xu(T*T+S*S+A*A),w=Uh(A/=M),C=Go(Go(A)-1)t||Go((y*E+b*I)/g-.5)>.3||a*h+f*d+i*v<_He)&&(r(n,o,s,a,f,i,_,k,C,T/=M,S/=M,A,p,m),m.point(_,k),r(_,k,C,T,S,A,l,u,c,h,d,v,p,m))}}return function(n){var o,s,a,f,i,l,u,c,h,d,v,p,m={point:y,lineStart:b,lineEnd:T,polygonStart:function(){n.polygonStart(),m.lineStart=S},polygonEnd:function(){n.polygonEnd(),m.lineStart=b}};function y(w,C){w=e(w,C),n.point(w[0],w[1])}function b(){c=NaN,m.point=g,n.lineStart()}function g(w,C){var x=bm([w,C]),_=e(w,C);r(c,h,u,d,v,p,c=_[0],h=_[1],u=w,d=x[0],v=x[1],p=x[2],tve,n),n.point(c,h)}function T(){m.point=y,n.lineEnd()}function S(){b(),m.point=A,m.lineEnd=M}function A(w,C){g(o=w,C),s=c,a=h,f=d,i=v,l=p,m.point=g}function M(){r(c,h,u,d,v,p,s,a,o,f,i,l,tve,n),m.lineEnd=T,T()}return m}}var AHe=Q2({point:function(e,t){this.stream.point(e*ki,t*ki)}});function SHe(e){return Q2({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function MHe(e,t,r,n,o){function s(a,f){return a*=n,f*=o,[t+e*a,r-e*f]}return s.invert=function(a,f){return[(a-t)/e*n,(r-f)/e*o]},s}function nve(e,t,r,n,o,s){var a=li(s),f=$a(s),i=a*e,l=f*e,u=a/e,c=f/e,h=(f*r-a*t)/e,d=(f*t+a*r)/e;function v(p,m){return p*=n,m*=o,[i*p-l*m+t,r-l*p-i*m]}return v.invert=function(p,m){return[n*(u*p-c*m+h),o*(d-c*p-u*m)]},v}function Ha(e){return Af(function(){return e})()}function Af(e){var t,r=150,n=480,o=250,s=0,a=0,f=0,i=0,l=0,u,c=0,h=1,d=1,v=null,p=wV,m=null,y,b,g,T=l2,S=.5,A,M,w,C,x;function _(F){return w(F[0]*ki,F[1]*ki)}function k(F){return F=w.invert(F[0],F[1]),F&&[F[0]*el,F[1]*el]}_.stream=function(F){return C&&x===F?C:C=AHe(SHe(u)(p(A(T(x=F)))))},_.preclip=function(F){return arguments.length?(p=F,v=void 0,I()):p},_.postclip=function(F){return arguments.length?(T=F,m=y=b=g=null,I()):T},_.clipAngle=function(F){return arguments.length?(p=+F?VEe(v=F*ki):(v=null,wV),I()):v*el},_.clipExtent=function(F){return arguments.length?(T=F==null?(m=y=b=g=null,l2):wM(m=+F[0][0],y=+F[0][1],b=+F[1][0],g=+F[1][1]),I()):m==null?null:[[m,y],[b,g]]},_.scale=function(F){return arguments.length?(r=+F,E()):r},_.translate=function(F){return arguments.length?(n=+F[0],o=+F[1],E()):[n,o]},_.center=function(F){return arguments.length?(s=F[0]%360*ki,a=F[1]%360*ki,E()):[s*el,a*el]},_.rotate=function(F){return arguments.length?(f=F[0]%360*ki,i=F[1]%360*ki,l=F.length>2?F[2]%360*ki:0,E()):[f*el,i*el,l*el]},_.angle=function(F){return arguments.length?(c=F%360*ki,E()):c*el},_.reflectX=function(F){return arguments.length?(h=F?-1:1,E()):h<0},_.reflectY=function(F){return arguments.length?(d=F?-1:1,E()):d<0},_.precision=function(F){return arguments.length?(A=rve(M,S=F*F),I()):Xu(S)},_.fitExtent=function(F,D){return TM(_,F,D)},_.fitSize=function(F,D){return MW(_,F,D)},_.fitWidth=function(F,D){return EW(_,F,D)},_.fitHeight=function(F,D){return kW(_,F,D)};function E(){var F=nve(r,0,0,h,d,c).apply(null,t(s,a)),D=(c?nve:MHe)(r,n-F[0],o-F[1],h,d,c);return u=TW(f,i,l),M=bV(t,D),w=bV(u,M),A=rve(M,S),I()}function I(){return C=x=null,_}return function(){return t=e.apply(this,arguments),_.invert=t.invert&&k,E()}}function CW(e){var t=0,r=Mo/3,n=Af(e),o=n(t,r);return o.parallels=function(s){return arguments.length?n(t=s[0]*ki,r=s[1]*ki):[t*el,r*el]},o}function EHe(e){var t=li(e);function r(n,o){return[n*t,$a(o)/t]}return r.invert=function(n,o){return[n/t,Uh(o*t)]},r}function oke(e,t){var r=$a(e),n=(r+$a(t))/2;if(Go(n)=.12&&m<.234&&p>=-.425&&p<-.214?o:m>=.166&&m<.234&&p>=-.214&&p<-.115?a:r).invert(h)},u.stream=function(h){return e&&t===h?e:e=kHe([r.stream(t=h),o.stream(h),a.stream(h)])},u.precision=function(h){return arguments.length?(r.precision(h),o.precision(h),a.precision(h),c()):r.precision()},u.scale=function(h){return arguments.length?(r.scale(h),o.scale(h*.35),a.scale(h),u.translate(r.translate())):r.scale()},u.translate=function(h){if(!arguments.length)return r.translate();var d=r.scale(),v=+h[0],p=+h[1];return n=r.translate(h).clipExtent([[v-.455*d,p-.238*d],[v+.455*d,p+.238*d]]).stream(l),s=o.translate([v-.307*d,p+.201*d]).clipExtent([[v-.425*d+xi,p+.12*d+xi],[v-.214*d-xi,p+.234*d-xi]]).stream(l),f=a.translate([v-.205*d,p+.212*d]).clipExtent([[v-.214*d+xi,p+.166*d+xi],[v-.115*d-xi,p+.234*d-xi]]).stream(l),c()},u.fitExtent=function(h,d){return TM(u,h,d)},u.fitSize=function(h,d){return MW(u,h,d)},u.fitWidth=function(h,d){return EW(u,h,d)},u.fitHeight=function(h,d){return kW(u,h,d)};function c(){return e=t=null,u}return u.scale(1070)}function lke(e){return function(t,r){var n=li(t),o=li(r),s=e(n*o);return[s*o*$a(t),s*$a(r)]}}function ew(e){return function(t,r){var n=Xu(t*t+r*r),o=e(n),s=$a(o),a=li(o);return[jh(t*s,n*a),Uh(n&&r*s/n)]}}var dx=lke(function(e){return Xu(2/(1+e))});dx.invert=ew(function(e){return 2*Uh(e/2)});function RHe(){return Ha(dx).scale(124.75).clipAngle(180-.001)}var iy=lke(function(e){return(e=EEe(e))&&e/$a(e)});iy.invert=ew(function(e){return e});function LHe(){return Ha(iy).scale(79.4188).clipAngle(180-.001)}function tw(e,t){return[e,eA(_W((fu+t)/2))]}tw.invert=function(e,t){return[e,2*ib(MEe(t))-fu]};function PHe(){return uke(tw).scale(961/qh)}function uke(e){var t=Ha(e),r=t.center,n=t.scale,o=t.translate,s=t.clipExtent,a=null,f,i,l;t.scale=function(c){return arguments.length?(n(c),u()):n()},t.translate=function(c){return arguments.length?(o(c),u()):o()},t.center=function(c){return arguments.length?(r(c),u()):r()},t.clipExtent=function(c){return arguments.length?(c==null?a=f=i=l=null:(a=+c[0][0],f=+c[0][1],i=+c[1][0],l=+c[1][1]),u()):a==null?null:[[a,f],[i,l]]};function u(){var c=Mo*n(),h=t(Tx(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-c,h[1]-c],[h[0]+c,h[1]+c]]:e===tw?[[Math.max(h[0]-c,a),f],[Math.min(h[0]+c,i),l]]:[[a,Math.max(h[1]-c,f)],[i,Math.min(h[1]+c,l)]])}return u()}function $T(e){return _W((fu+e)/2)}function fke(e,t){var r=li(e),n=e===t?$a(e):eA(r/li(t))/eA($T(t)/$T(e)),o=r*rN($T(e),n)/n;if(!n)return tw;function s(a,f){o>0?f<-fu+xi&&(f=-fu+xi):f>fu-xi&&(f=fu-xi);var i=o/rN($T(f),n);return[i*$a(n*a),o-i*li(n*a)]}return s.invert=function(a,f){var i=o-f,l=Sv(n)*Xu(a*a+i*i),u=jh(a,Go(i))*Sv(i);return i*n<0&&(u-=Mo*Sv(a)*Sv(i)),[u/n,2*ib(rN(o/l,1/n))-fu]},s}function DHe(){return CW(fke).scale(109.5).parallels([30,30])}function c2(e,t){return[e,t]}c2.invert=c2;function cke(){return Ha(c2).scale(152.63)}function hke(e,t){var r=li(e),n=e===t?$a(e):(r-li(t))/(t-e),o=r/n+e;if(Go(n)xi&&--n>0);return[e/(.8707+(s=r*r)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),r]};function dke(){return Ha(AM).scale(175.295)}function PW(e,t){return[li(t)*$a(e),$a(t)]}PW.invert=ew(Uh);function vke(){return Ha(PW).scale(249.5).clipAngle(90+xi)}function DW(e,t){var r=li(t),n=1+li(e)*r;return[r*$a(e)/n,$a(t)/n]}DW.invert=ew(function(e){return 2*ib(e)});function NHe(){return Ha(DW).scale(250).clipAngle(142)}function IW(e,t){return[eA(_W((fu+t)/2)),-e]}IW.invert=function(e,t){return[-t,2*ib(MEe(e))-fu]};function BHe(){var e=uke(IW),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}const qHe=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:ske,geoAlbersUsa:CHe,geoArea:FUe,geoAzimuthalEqualArea:RHe,geoAzimuthalEqualAreaRaw:dx,geoAzimuthalEquidistant:LHe,geoAzimuthalEquidistantRaw:iy,geoBounds:OEe,geoCentroid:ob,geoCircle:qEe,geoClipAntimeridian:wV,geoClipCircle:VEe,geoClipExtent:eHe,geoClipRectangle:wM,geoConicConformal:DHe,geoConicConformalRaw:fke,geoConicEqualArea:wA,geoConicEqualAreaRaw:oke,geoConicEquidistant:IHe,geoConicEquidistantRaw:hke,geoContains:sHe,geoDistance:vA,geoEqualEarth:zHe,geoEqualEarthRaw:RW,geoEquirectangular:cke,geoEquirectangularRaw:c2,geoGnomonic:LW,geoGnomonicRaw:h2,geoGraticule:WEe,geoGraticule10:lHe,geoIdentity:FHe,geoInterpolate:gA,geoLength:YEe,geoMercator:PHe,geoMercatorRaw:tw,geoNaturalEarth1:dke,geoNaturalEarth1Raw:AM,geoOrthographic:vke,geoOrthographicRaw:PW,geoPath:xHe,geoProjection:Ha,geoProjectionMutator:Af,geoRotation:Tx,geoStereographic:NHe,geoStereographicRaw:DW,geoStream:dd,geoTransform:bHe,geoTransverseMercator:BHe,geoTransverseMercatorRaw:IW},Symbol.toStringTag,{value:"Module"})),jHe=$d(qHe);var En=Math.abs,Vl=Math.atan,zo=Math.atan2,Yr=Math.cos,f0=Math.exp,Mx=Math.floor,bf=Math.log,V0=Math.max,vd=Math.min,d2=Math.pow,AA=Math.round,uo=Math.sign||function(e){return e>0?1:e<0?-1:0},Vr=Math.sin,ro=Math.tan,fa=1e-6,Ym=1e-12,Xr=Math.PI,da=Xr/2,gd=Xr/4,Tv=Math.SQRT1_2,ds=mn(2),kv=mn(Xr),ip=Xr*2,Oo=180/Xr,bo=Xr/180;function UHe(e){return e?e/Math.sin(e):1}function fi(e){return e>1?da:e<-1?-da:Math.asin(e)}function sc(e){return e>1?0:e<-1?Xr:Math.acos(e)}function mn(e){return e>0?Math.sqrt(e):0}function HHe(e){return e=f0(2*e),(e-1)/(e+1)}function OW(e){return(f0(e)-f0(-e))/2}function pke(e){return(f0(e)+f0(-e))/2}function GHe(e){return bf(e+mn(e*e+1))}function VHe(e){return bf(e+mn(e*e-1))}function gke(e){var t=ro(e/2),r=2*bf(Yr(e/2))/(t*t);function n(o,s){var a=Yr(o),f=Yr(s),i=Vr(s),l=f*a,u=-((1-l?bf((1+l)/2)/(1-l):-.5)+r/(1+l));return[u*f*Vr(o),u*i]}return n.invert=function(o,s){var a=mn(o*o+s*s),f=-e/2,i=50,l;if(!a)return[0,0];do{var u=f/2,c=Yr(u),h=Vr(u),d=h/c,v=-bf(En(c));f-=l=(2/d*v-r*d-a)/(-v/(h*h)+1-r/(2*c*c))*(c<0?.7:1)}while(En(l)>fa&&--i>0);var p=Vr(f);return[zo(o*p,a*Yr(f)),fi(s*p/a)]},n}function YHe(){var e=da,t=Af(gke),r=t(e);return r.radius=function(n){return arguments.length?t(e=n*bo):e*Oo},r.scale(179.976).clipAngle(147)}function SM(e,t){var r=Yr(t),n=UHe(sc(r*Yr(e/=2)));return[2*r*Vr(e)*n,Vr(t)*n]}SM.invert=function(e,t){if(!(e*e+4*t*t>Xr*Xr+fa)){var r=e,n=t,o=25;do{var s=Vr(r),a=Vr(r/2),f=Yr(r/2),i=Vr(n),l=Yr(n),u=Vr(2*n),c=i*i,h=l*l,d=a*a,v=1-h*f*f,p=v?sc(l*f)*mn(m=1/v):m=0,m,y=2*p*l*a-e,b=p*i-t,g=m*(h*d+p*l*f*c),T=m*(.5*s*u-p*2*i*a),S=m*.25*(u*a-p*i*h*s),A=m*(c*f+p*d*l),M=T*S-A*g;if(!M)break;var w=(b*T-y*A)/M,C=(y*S-b*g)/M;r-=w,n-=C}while((En(w)>fa||En(C)>fa)&&--o>0);return[r,n]}};function $He(){return Ha(SM).scale(152.63)}function yke(e){var t=Vr(e),r=Yr(e),n=e>=0?1:-1,o=ro(n*e),s=(1+t-r)/2;function a(f,i){var l=Yr(i),u=Yr(f/=2);return[(1+l)*Vr(f),(n*i>-zo(u,o)-.001?0:-n*10)+s+Vr(i)*r-(1+l)*t*u]}return a.invert=function(f,i){var l=0,u=0,c=50;do{var h=Yr(l),d=Vr(l),v=Yr(u),p=Vr(u),m=1+v,y=m*d-f,b=s+p*r-m*t*h-i,g=m*h/2,T=-d*p,S=t*m*d/2,A=r*v+t*h*p,M=T*S-A*g,w=(b*T-y*A)/M/2,C=(y*S-b*g)/M;En(C)>2&&(C/=2),l-=w,u-=C}while((En(w)>fa||En(C)>fa)&&--c>0);return n*u>-zo(Yr(l),o)-.001?[l*2,u]:null},a}function WHe(){var e=20*bo,t=e>=0?1:-1,r=ro(t*e),n=Af(yke),o=n(e),s=o.stream;return o.parallel=function(a){return arguments.length?(r=ro((t=(e=a*bo)>=0?1:-1)*e),n(e)):e*Oo},o.stream=function(a){var f=o.rotate(),i=s(a),l=(o.rotate([0,0]),s(a)),u=o.precision();return o.rotate(f),i.sphere=function(){l.polygonStart(),l.lineStart();for(var c=t*-180;t*c<180;c+=t*90)l.point(c,t*90);if(e)for(;t*(c-=3*t*u)>=-180;)l.point(c,t*-zo(Yr(c*bo/2),r)*Oo);l.lineEnd(),l.polygonEnd()},i},o.scale(218.695).center([0,28.0974])}function MM(e,t){var r=ro(t/2),n=mn(1-r*r),o=1+n*Yr(e/=2),s=Vr(e)*n/o,a=r/o,f=s*s,i=a*a;return[4/3*s*(3+f-3*i),4/3*a*(3+3*f-i)]}MM.invert=function(e,t){if(e*=3/8,t*=3/8,!e&&En(t)>1)return null;var r=e*e,n=t*t,o=1+r+n,s=mn((o-mn(o*o-4*t*t))/2),a=fi(s)/3,f=s?VHe(En(t/s))/3:GHe(En(e))/3,i=Yr(a),l=pke(f),u=l*l-i*i;return[uo(e)*2*zo(OW(f)*i,.25-u),uo(t)*2*zo(l*Vr(a),.25+u)]};function XHe(){return Ha(MM).scale(66.1603)}var lN=mn(8),ZHe=bf(1+ds);function zW(e,t){var r=En(t);return rYm&&--n>0);return[e/(Yr(r)*(lN-1/Vr(r))),uo(t)*r]};function KHe(){return Ha(zW).scale(112.314)}function mke(e){var t=2*Xr/e;function r(n,o){var s=iy(n,o);if(En(n)>da){var a=zo(s[1],s[0]),f=mn(s[0]*s[0]+s[1]*s[1]),i=t*AA((a-da)/t)+da,l=zo(Vr(a-=i),2-Yr(a));a=i+fi(Xr/f*Vr(l))-l,s[0]=f*Yr(a),s[1]=f*Vr(a)}return s}return r.invert=function(n,o){var s=mn(n*n+o*o);if(s>da){var a=zo(o,n),f=t*AA((a-da)/t)+da,i=a>f?-1:1,l=s*Yr(f-a),u=1/ro(i*sc((l-Xr)/mn(Xr*(Xr-2*l)+s*s)));a=f+2*Vl((u+i*mn(u*u-3))/3),n=s*Yr(a),o=s*Vr(a)}return iy.invert(n,o)},r}function JHe(){var e=5,t=Af(mke),r=t(e),n=r.stream,o=.01,s=-Yr(o*bo),a=Vr(o*bo);return r.lobes=function(f){return arguments.length?t(e=+f):e},r.stream=function(f){var i=r.rotate(),l=n(f),u=(r.rotate([0,0]),n(f));return r.rotate(i),l.sphere=function(){u.polygonStart(),u.lineStart();for(var c=0,h=360/e,d=2*Xr/e,v=90-180/e,p=da;c0&&En(o)>fa);return n<0?NaN:r}function FW(e,t,r){return t===void 0&&(t=40),r===void 0&&(r=Ym),function(n,o,s,a){var f,i,l;s=s===void 0?0:+s,a=a===void 0?0:+a;for(var u=0;uf){s-=i/=2,a-=l/=2;continue}f=v;var p=(s>0?-1:1)*r,m=(a>0?-1:1)*r,y=e(s+p,a),b=e(s,a+m),g=(y[0]-c[0])/p,T=(y[1]-c[1])/p,S=(b[0]-c[0])/m,A=(b[1]-c[1])/m,M=A*g-T*S,w=(En(M)<.5?.5:1)/M;if(i=(d*S-h*A)*w,l=(h*T-d*g)*w,s+=i,a+=l,En(i)0&&(f[1]*=1+i/1.5*f[0]*f[0]),f}return n.invert=FW(n),n}function eGe(){return Ha(bke()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function _ke(e,t){var r=e*Vr(t),n=30,o;do t-=o=(t+Vr(t)-r)/(1+Yr(t));while(En(o)>fa&&--n>0);return t/2}function NW(e,t,r){function n(o,s){return[e*o*Yr(s=_ke(r,s)),t*Vr(s)]}return n.invert=function(o,s){return s=fi(s/t),[o/(e*Yr(s)),fi((2*s+Vr(2*s))/r)]},n}var py=NW(ds/da,ds,Xr);function tGe(){return Ha(py).scale(169.529)}var MA=2.00276,wke=1.11072;function kM(e,t){var r=_ke(Xr,t);return[MA*e/(1/Yr(t)+wke/Yr(r)),(t+ds*Vr(r))/MA]}kM.invert=function(e,t){var r=MA*t,n=t<0?-gd:gd,o=25,s,a;do a=r-ds*Vr(n),n-=s=(Vr(2*n)+2*n-Xr*Vr(a))/(2*Yr(2*n)+2+Xr*Yr(a)*ds*Yr(n));while(En(s)>fa&&--o>0);return a=r-ds*Vr(n),[e*(1/Yr(a)+wke/Yr(n))/MA,a]};function rGe(){return Ha(kM).scale(160.857)}function lb(e){var t=0,r=Af(e),n=r(t);return n.parallel=function(o){return arguments.length?r(t=o*bo):t*Oo},n}function fg(e,t){return[e*Yr(t),t]}fg.invert=function(e,t){return[e/Yr(t),t]};function nGe(){return Ha(fg).scale(152.63)}function Tke(e){if(!e)return fg;var t=1/ro(e);function r(n,o){var s=t+e-o,a=s&&n*Yr(o)/s;return[s*Vr(a),t-s*Yr(a)]}return r.invert=function(n,o){var s=mn(n*n+(o=t-o)*o),a=t+e-s;return[s/Yr(a)*zo(n,o),a]},r}function aGe(){return lb(Tke).scale(123.082).center([0,26.1441]).parallel(45)}function Ake(e){function t(r,n){var o=da-n,s=o&&r*e*Vr(o)/o;return[o*Vr(s)/e,da-o*Yr(s)]}return t.invert=function(r,n){var o=r*e,s=da-n,a=mn(o*o+s*s),f=zo(o,s);return[(a?a/Vr(a):1)*f/e,da-a]},t}function iGe(){var e=.5,t=Af(Ake),r=t(e);return r.fraction=function(n){return arguments.length?t(e=+n):e},r.scale(158.837)}var Ske=NW(1,4/Xr,Xr);function oGe(){return Ha(Ske).scale(152.63)}function ave(e,t,r,n,o,s){var a=Yr(s),f;if(En(e)>1||En(s)>1)f=sc(r*o+t*n*a);else{var i=Vr(e/2),l=Vr(s/2);f=2*fi(mn(i*i+t*n*l*l))}return En(f)>fa?[f,zo(n*Vr(s),t*o-r*n*a)]:[0,0]}function uN(e,t,r){return sc((e*e+t*t-r*r)/(2*e*t))}function sGe(e){return e-2*Xr*Mx((e+Xr)/(2*Xr))}function Mke(e,t,r){for(var n=[[e[0],e[1],Vr(e[1]),Yr(e[1])],[t[0],t[1],Vr(t[1]),Yr(t[1])],[r[0],r[1],Vr(r[1]),Yr(r[1])]],o=n[2],s,a=0;a<3;++a,o=s)s=n[a],o.v=ave(s[1]-o[1],o[3],o[2],s[3],s[2],s[0]-o[0]),o.point=[0,0];var f=uN(n[0].v[0],n[2].v[0],n[1].v[0]),i=uN(n[0].v[0],n[1].v[0],n[2].v[0]),l=Xr-f;n[2].point[1]=0,n[0].point[0]=-(n[1].point[0]=n[0].v[0]/2);var u=[n[2].point[0]=n[0].point[0]+n[2].v[0]*Yr(f),2*(n[0].point[1]=n[1].point[1]=n[2].v[0]*Vr(f))];function c(h,d){var v=Vr(d),p=Yr(d),m=new Array(3),y;for(y=0;y<3;++y){var b=n[y];if(m[y]=ave(d-b[1],b[3],b[2],p,v,h-b[0]),!m[y][0])return b.point;m[y][1]=sGe(m[y][1]-b.v[1])}var g=u.slice();for(y=0;y<3;++y){var T=y==2?0:y+1,S=uN(n[y].v[0],m[y][0],m[T][0]);m[y][1]<0&&(S=-S),y?y==1?(S=i-S,g[0]-=m[y][0]*Yr(S),g[1]-=m[y][0]*Vr(S)):(S=l-S,g[0]+=m[y][0]*Yr(S),g[1]+=m[y][0]*Vr(S)):(g[0]+=m[y][0]*Yr(S),g[1]-=m[y][0]*Vr(S))}return g[0]/=3,g[1]/=3,g}return c}function fN(e){return e[0]*=bo,e[1]*=bo,e}function lGe(){return Eke([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Eke(e,t,r){var n=ob({type:"MultiPoint",coordinates:[e,t,r]}),o=[-n[0],-n[1]],s=Tx(o),a=Mke(fN(s(e)),fN(s(t)),fN(s(r)));a.invert=FW(a);var f=Ha(a).rotate(o),i=f.center;return delete f.rotate,f.center=function(l){return arguments.length?i(s(l)):s.invert(i())},f.clipAngle(90)}function n0(e,t){var r=mn(1-Vr(t));return[2/kv*e*r,kv*(1-r)]}n0.invert=function(e,t){var r=(r=t/kv-1)*r;return[r>0?e*mn(Xr/r)/2:0,fi(1-r)]};function uGe(){return Ha(n0).scale(95.6464).center([0,30])}function kke(e){var t=ro(e);function r(n,o){return[n,(n?n/Vr(n):1)*(Vr(o)*Yr(n)-t*Yr(o))]}return r.invert=t?function(n,o){n&&(o*=Vr(n)/n);var s=Yr(n);return[n,2*zo(mn(s*s+t*t-o*o)-s,t-o)]}:function(n,o){return[n,fi(n?o*ro(n)/n:o)]},r}function fGe(){return lb(kke).scale(249.828).clipAngle(90)}var EA=mn(3);function BW(e,t){return[EA*e*(2*Yr(2*t/3)-1)/kv,EA*kv*Vr(t/3)]}BW.invert=function(e,t){var r=3*fi(t/(EA*kv));return[kv*e/(EA*(2*Yr(2*r/3)-1)),r]};function cGe(){return Ha(BW).scale(156.19)}function qW(e){var t=Yr(e);function r(n,o){return[n*t,Vr(o)/t]}return r.invert=function(n,o){return[n/t,fi(o*t)]},r}function hGe(){return lb(qW).parallel(38.58).scale(195.044)}function Cke(e){var t=Yr(e);function r(n,o){return[n*t,(1+t)*ro(o/2)]}return r.invert=function(n,o){return[n/t,Vl(o/(1+t))*2]},r}function dGe(){return lb(Cke).scale(124.75)}function jW(e,t){var r=mn(8/(3*Xr));return[r*e*(1-En(t)/Xr),r*t]}jW.invert=function(e,t){var r=mn(8/(3*Xr)),n=t/r;return[e/(r*(1-En(n)/Xr)),n]};function vGe(){return Ha(jW).scale(165.664)}function UW(e,t){var r=mn(4-3*Vr(En(t)));return[2/mn(6*Xr)*e*r,uo(t)*mn(2*Xr/3)*(2-r)]}UW.invert=function(e,t){var r=2-En(t)/mn(2*Xr/3);return[e*mn(6*Xr)/(2*r),uo(t)*fi((4-r*r)/3)]};function pGe(){return Ha(UW).scale(165.664)}function HW(e,t){var r=mn(Xr*(4+Xr));return[2/r*e*(1+mn(1-4*t*t/(Xr*Xr))),4/r*t]}HW.invert=function(e,t){var r=mn(Xr*(4+Xr))/2;return[e*r/(1+mn(1-t*t*(4+Xr)/(4*Xr))),t*r/2]};function gGe(){return Ha(HW).scale(180.739)}function GW(e,t){var r=(2+da)*Vr(t);t/=2;for(var n=0,o=1/0;n<10&&En(o)>fa;n++){var s=Yr(t);t-=o=(t+Vr(t)*(s+2)-r)/(2*s*(1+s))}return[2/mn(Xr*(4+Xr))*e*(1+Yr(t)),2*mn(Xr/(4+Xr))*Vr(t)]}GW.invert=function(e,t){var r=t*mn((4+Xr)/Xr)/2,n=fi(r),o=Yr(n);return[e/(2/mn(Xr*(4+Xr))*(1+o)),fi((n+r*(o+2))/(2+da))]};function yGe(){return Ha(GW).scale(180.739)}function VW(e,t){return[e*(1+Yr(t))/mn(2+Xr),2*t/mn(2+Xr)]}VW.invert=function(e,t){var r=mn(2+Xr),n=t*r/2;return[r*e/(1+Yr(n)),n]};function mGe(){return Ha(VW).scale(173.044)}function YW(e,t){for(var r=(1+da)*Vr(t),n=0,o=1/0;n<10&&En(o)>fa;n++)t-=o=(t+Vr(t)-r)/(1+Yr(t));return r=mn(2+Xr),[e*(1+Yr(t))/r,2*t/r]}YW.invert=function(e,t){var r=1+da,n=mn(r/2);return[e*2*n/(1+Yr(t*=n)),fi((t+Vr(t))/r)]};function xGe(){return Ha(YW).scale(173.044)}var kA=3+2*ds;function $W(e,t){var r=Vr(e/=2),n=Yr(e),o=mn(Yr(t)),s=Yr(t/=2),a=Vr(t)/(s+ds*n*o),f=mn(2/(1+a*a)),i=mn((ds*s+(n+r)*o)/(ds*s+(n-r)*o));return[kA*(f*(i-1/i)-2*bf(i)),kA*(f*a*(i+1/i)-2*Vl(a))]}$W.invert=function(e,t){if(!(s=MM.invert(e/1.2,t*1.065)))return null;var r=s[0],n=s[1],o=20,s;e/=kA,t/=kA;do{var a=r/2,f=n/2,i=Vr(a),l=Yr(a),u=Vr(f),c=Yr(f),h=Yr(n),d=mn(h),v=u/(c+ds*l*d),p=v*v,m=mn(2/(1+p)),y=ds*c+(l+i)*d,b=ds*c+(l-i)*d,g=y/b,T=mn(g),S=T-1/T,A=T+1/T,M=m*S-2*bf(T)-e,w=m*v*A-2*Vl(v)-t,C=u&&Tv*d*i*p/u,x=(ds*l*c+d)/(2*(c+ds*l*d)*(c+ds*l*d)*d),_=-.5*v*m*m*m,k=_*C,E=_*x,I=(I=2*c+ds*d*(l-i))*I*T,F=(ds*l*c*d+h)/I,D=-(ds*i*u)/(d*I),z=S*k-2*F/T+m*(F+F/g),N=S*E-2*D/T+m*(D+D/g),q=v*A*k-2*C/(1+p)+m*A*C+m*v*(F-F/g),P=v*A*E-2*x/(1+p)+m*A*x+m*v*(D-D/g),B=N*q-P*z;if(!B)break;var $=(w*N-M*P)/B,Q=(M*q-w*z)/B;r-=$,n=V0(-da,vd(da,n-Q))}while((En($)>fa||En(Q)>fa)&&--o>0);return En(En(n)-da)n){var c=mn(u),h=zo(l,i),d=r*AA(h/r),v=h-d,p=e*Yr(v),m=(e*Vr(v)-v*Vr(p))/(da-p),y=sve(v,m),b=(Xr-e)/WT(y,p,Xr);i=c;var g=50,T;do i-=T=(e+WT(y,p,i)*b-c)/(y(i)*b);while(En(T)>fa&&--g>0);l=v*Vr(i),in){var i=mn(f),l=zo(a,s),u=r*AA(l/r),c=l-u;s=i*Yr(c),a=i*Vr(c);for(var h=s-da,d=Vr(s),v=a/d,p=sfa||En(v)>fa)&&--p>0);return[c,h]},i}var Pke=CM(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function MGe(){return Ha(Pke).scale(149.995)}var Dke=CM(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function EGe(){return Ha(Dke).scale(153.93)}var Ike=CM(5/6*Xr,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kGe(){return Ha(Ike).scale(130.945)}function ZW(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}ZW.invert=function(e,t){var r=e,n=t,o=50,s;do{var a=n*n;n-=s=(n*(1+a/12)-t)/(1+a/4)}while(En(s)>fa&&--o>0);o=50,e/=1-.162388*a;do{var f=(f=r*r)*f;r-=s=(r*(.87-952426e-9*f)-e)/(.87-.00476213*f)}while(En(s)>fa&&--o>0);return[r,n]};function CGe(){return Ha(ZW).scale(131.747)}var Oke=CM(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function RGe(){return Ha(Oke).scale(131.087)}function zke(e){var t=e(da,0)[0]-e(-da,0)[0];function r(n,o){var s=n>0?-.5:.5,a=e(n+s*Xr,o);return a[0]-=s*t,a}return e.invert&&(r.invert=function(n,o){var s=n>0?-.5:.5,a=e.invert(n+s*t,o),f=a[0]-s*Xr;return f<-Xr?f+=2*Xr:f>Xr&&(f-=2*Xr),a[0]=f,a}),r}function RM(e,t){var r=uo(e),n=uo(t),o=Yr(t),s=Yr(e)*o,a=Vr(e)*o,f=Vr(n*t);e=En(zo(a,f)),t=fi(s),En(e-da)>fa&&(e%=da);var i=LGe(e>Xr/4?da-e:e,t);return e>Xr/4&&(f=i[0],i[0]=-i[1],i[1]=-f),i[0]*=r,i[1]*=-n,i}RM.invert=function(e,t){En(e)>1&&(e=uo(e)*2-e),En(t)>1&&(t=uo(t)*2-t);var r=uo(e),n=uo(t),o=-r*e,s=-n*t,a=s/o<1,f=PGe(a?s:o,a?o:s),i=f[0],l=f[1],u=Yr(l);return a&&(i=-da-i),[r*(zo(Vr(i)*u,-Vr(l))+Xr),n*fi(Yr(i)*u)]};function LGe(e,t){if(t===da)return[0,0];var r=Vr(t),n=r*r,o=n*n,s=1+o,a=1+3*o,f=1-o,i=fi(1/mn(s)),l=f+n*s*i,u=(1-r)/l,c=mn(u),h=u*s,d=mn(h),v=c*f,p,m;if(e===0)return[0,-(v+n*d)];var y=Yr(t),b=1/y,g=2*r*y,T=(-3*n+i*a)*g,S=(-l*y-(1-r)*T)/(l*l),A=.5*S/c,M=f*A-2*n*c*g,w=n*s*S+u*a*g,C=-b*g,x=-b*w,_=-2*b*M,k=4*e/Xr,E;if(e>.222*Xr||t.175*Xr){if(p=(v+n*mn(h*(1+o)-v*v))/(1+o),e>Xr/4)return[p,p];var I=p,F=.5*p;p=.5*(F+I),m=50;do{var D=mn(h-p*p),z=p*(_+C*D)+x*fi(p/d)-k;if(!z)break;z<0?F=p:I=p,p=.5*(F+I)}while(En(I-F)>fa&&--m>0)}else{p=fa,m=25;do{var N=p*p,q=mn(h-N),P=_+C*q,B=p*P+x*fi(p/d)-k,$=P+(x-C*N)/q;p-=E=q?B/$:0}while(En(E)>fa&&--m>0)}return[p,-v-n*mn(h-p*p)]}function PGe(e,t){for(var r=0,n=1,o=.5,s=50;;){var a=o*o,f=mn(o),i=fi(1/mn(1+a)),l=1-a+o*(1+a)*i,u=(1-f)/l,c=mn(u),h=u*(1+a),d=c*(1-a),v=h-e*e,p=mn(v),m=t+d+o*p;if(En(n-r)0?r=o:n=o,o=.5*(r+n)}if(!s)return null;var y=fi(f),b=Yr(y),g=1/b,T=2*f*b,S=(-3*o+i*(1+3*a))*T,A=(-l*b-(1-f)*S)/(l*l),M=.5*A/c,w=(1-a)*M-2*o*c*T,C=-2*g*w,x=-g*T,_=-g*(o*(1+a)*A+u*(1+3*a)*T);return[Xr/4*(e*(C+x*p)+_*fi(e/mn(h))),y]}function DGe(){return Ha(zke(RM)).scale(239.75)}function IGe(e,t,r){var n,o,s;return e?(n=cN(e,r),t?(o=cN(t,1-r),s=o[1]*o[1]+r*n[0]*n[0]*o[0]*o[0],[[n[0]*o[2]/s,n[1]*n[2]*o[0]*o[1]/s],[n[1]*o[1]/s,-n[0]*n[2]*o[0]*o[2]/s],[n[2]*o[1]*o[2]/s,-r*n[0]*n[1]*o[0]/s]]):[[n[0],0],[n[1],0],[n[2],0]]):(o=cN(t,1-r),[[0,o[0]/o[1]],[1/o[1],0],[o[2]/o[1],0]])}function cN(e,t){var r,n,o,s,a;if(t=1-fa)return r=(1-t)/4,n=pke(e),s=HHe(e),o=1/n,a=n*OW(e),[s+r*(a-e)/(n*n),o-r*s*o*(a-e),o+r*s*o*(a+e),2*Vl(f0(e))-da+r*(a-e)/n];var f=[1,0,0,0,0,0,0,0,0],i=[mn(t),0,0,0,0,0,0,0,0],l=0;for(n=mn(1-t),a=1;En(i[l]/f[l])>fa&&l<8;)r=f[l++],i[l]=(r-n)/2,f[l]=(r+n)/2,n=mn(r*n),a*=2;o=a*f[l]*e;do s=i[l]*Vr(n=o)/f[l],o=(fi(s)+o)/2;while(--l);return[Vr(o),s=Yr(o),s/Yr(o-n),o]}function OGe(e,t,r){var n=En(e),o=En(t),s=OW(o);if(n){var a=1/Vr(n),f=1/(ro(n)*ro(n)),i=-(f+r*(s*s*a*a)-1+r),l=(r-1)*f,u=(-i+mn(i*i-4*l))/2;return[Z_(Vl(1/mn(u)),r)*uo(e),Z_(Vl(mn((u/f-1)/r)),1-r)*uo(t)]}return[0,Z_(Vl(s),1-r)*uo(t)]}function Z_(e,t){if(!t)return e;if(t===1)return bf(ro(e/2+gd));for(var r=1,n=mn(1-t),o=mn(t),s=0;En(o)>fa;s++){if(e%Xr){var a=Vl(n*ro(e)/r);a<0&&(a+=Xr),e+=a+~~(e/Xr)*Xr}else e+=e;o=(r+n)/2,n=mn(r*n),o=((r=o)-n)/2}return e/(d2(2,s)*r)}function LM(e,t){var r=(ds-1)/(ds+1),n=mn(1-r*r),o=Z_(da,n*n),s=-1,a=bf(ro(Xr/4+En(t)/2)),f=f0(s*a)/mn(r),i=zGe(f*Yr(s*e),f*Vr(s*e)),l=OGe(i[0],i[1],n*n);return[-l[1],(t>=0?1:-1)*(.5*o-l[0])]}function zGe(e,t){var r=e*e,n=t+1,o=1-r-t*t;return[.5*((e>=0?da:-da)-zo(o,2*e)),-.25*bf(o*o+4*r)+.5*bf(n*n+r)]}function FGe(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}LM.invert=function(e,t){var r=(ds-1)/(ds+1),n=mn(1-r*r),o=Z_(da,n*n),s=-1,a=IGe(.5*o-t,-e,n*n),f=FGe(a[0],a[1]),i=zo(f[1],f[0])/s;return[i,2*Vl(f0(.5/s*bf(r*f[0]*f[0]+r*f[1]*f[1])))-da]};function NGe(){return Ha(zke(LM)).scale(151.496)}function Fke(e){var t=Vr(e),r=Yr(e),n=lve(e);n.invert=lve(-e);function o(s,a){var f=n(s,a);s=f[0],a=f[1];var i=Vr(a),l=Yr(a),u=Yr(s),c=sc(t*i+r*l*u),h=Vr(c),d=En(h)>fa?c/h:1;return[d*r*Vr(s),(En(s)>da?d:-d)*(t*l-r*i*u)]}return o.invert=function(s,a){var f=mn(s*s+a*a),i=-Vr(f),l=Yr(f),u=f*l,c=-a*i,h=f*t,d=mn(u*u+c*c-h*h),v=zo(u*h+c*d,c*h-u*d),p=(f>da?-1:1)*zo(s*i,f*Yr(v)*l+a*Vr(v)*i);return n.invert(p,v)},o}function lve(e){var t=Vr(e),r=Yr(e);return function(n,o){var s=Yr(o),a=Yr(n)*s,f=Vr(n)*s,i=Vr(o);return[zo(f,a*r-i*t),fi(i*r+a*t)]}}function BGe(){var e=0,t=Af(Fke),r=t(e),n=r.rotate,o=r.stream,s=qEe();return r.parallel=function(a){if(!arguments.length)return e*Oo;var f=r.rotate();return t(e=a*bo).rotate(f)},r.rotate=function(a){return arguments.length?(n.call(r,[a[0],a[1]-e*Oo]),s.center([-a[0],-a[1]]),r):(a=n.call(r),a[1]+=e*Oo,a)},r.stream=function(a){return a=o(a),a.sphere=function(){a.polygonStart();var f=.01,i=s.radius(90-f)().coordinates[0],l=i.length-1,u=-1,c;for(a.lineStart();++u=0;)a.point((c=i[u])[0],c[1]);a.lineEnd(),a.polygonEnd()},a},r.scale(79.4187).parallel(45).clipAngle(180-.001)}var qGe=3,KW=fi(1-1/qGe)*Oo,hN=qW(0);function Nke(e){var t=KW*bo,r=n0(Xr,t)[0]-n0(-Xr,t)[0],n=hN(0,t)[1],o=n0(0,t)[1],s=kv-o,a=ip/e,f=4/ip,i=n+s*s*4/ip;function l(u,c){var h,d=En(c);if(d>t){var v=vd(e-1,V0(0,Mx((u+Xr)/a)));u+=Xr*(e-1)/e-v*a,h=n0(u,d),h[0]=h[0]*ip/r-ip*(e-1)/(2*e)+v*ip/e,h[1]=n+(h[1]-o)*4*s/ip,c<0&&(h[1]=-h[1])}else h=hN(u,c);return h[0]*=f,h[1]/=i,h}return l.invert=function(u,c){u/=f,c*=i;var h=En(c);if(h>n){var d=vd(e-1,V0(0,Mx((u+Xr)/a)));u=(u+Xr*(e-1)/e-d*a)*r/ip;var v=n0.invert(u,.25*(h-n)*ip/s+o);return v[0]-=Xr*(e-1)/e-d*a,c<0&&(v[1]=-v[1]),v}return hN.invert(u,c)},l}function jGe(e,t){return[e,t&1?90-fa:KW]}function UGe(e,t){return[e,t&1?-90+fa:-KW]}function HGe(e){return[e[0]*(1-fa),e[1]]}function GGe(e){var t=[].concat(Zg(-180,180+e/2,e).map(jGe),Zg(180,-180-e/2,-e).map(UGe));return{type:"Polygon",coordinates:[e===180?t.map(HGe):t]}}function VGe(){var e=4,t=Af(Nke),r=t(e),n=r.stream;return r.lobes=function(o){return arguments.length?t(e=+o):e},r.stream=function(o){var s=r.rotate(),a=n(o),f=(r.rotate([0,0]),n(o));return r.rotate(s),a.sphere=function(){dd(GGe(180/e),f)},a},r.scale(239.75)}function Bke(e){var t=1+e,r=Vr(1/t),n=fi(r),o=2*mn(Xr/(s=Xr+4*n*t)),s,a=.5*o*(t+mn(e*(2+e))),f=e*e,i=t*t;function l(u,c){var h=1-Vr(c),d,v;if(h&&h<2){var p=da-c,m=25,y;do{var b=Vr(p),g=Yr(p),T=n+zo(b,t-g),S=1+i-2*t*g;p-=y=(p-f*n-t*b+S*T-.5*h*s)/(2*t*b*T)}while(En(y)>Ym&&--m>0);d=o*mn(S),v=u*T/Xr}else d=o*(e+h),v=u*n/Xr;return[d*Vr(v),a-d*Yr(v)]}return l.invert=function(u,c){var h=u*u+(c-=a)*c,d=(1+i-h/(o*o))/(2*t),v=sc(d),p=Vr(v),m=n+zo(p,t-d);return[fi(u/mn(h))*Xr/m,fi(1-2*(v-f*n-t*p+(1+i-2*t*d)*m)/s)]},l}function YGe(){var e=1,t=Af(Bke),r=t(e);return r.ratio=function(n){return arguments.length?t(e=+n):e},r.scale(167.774).center([0,18.67])}var PM=.7109889596207567,Ex=.0528035274542;function DM(e,t){return t>-PM?(e=py(e,t),e[1]+=Ex,e):fg(e,t)}DM.invert=function(e,t){return t>-PM?py.invert(e,t-Ex):fg.invert(e,t)};function $Ge(){return Ha(DM).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function IM(e,t){return En(t)>PM?(e=py(e,t),e[1]-=t>0?Ex:-Ex,e):fg(e,t)}IM.invert=function(e,t){return En(t)>PM?py.invert(e,t+(t>0?Ex:-Ex)):fg.invert(e,t)};function WGe(){return Ha(IM).scale(152.63)}function qke(e,t,r,n){var o=mn(4*Xr/(2*r+(1+e-t/2)*Vr(2*r)+(e+t)/2*Vr(4*r)+t/2*Vr(6*r))),s=mn(n*Vr(r)*mn((1+e*Yr(2*r)+t*Yr(4*r))/(1+e+t))),a=r*i(1);function f(c){return mn(1+e*Yr(2*c)+t*Yr(4*c))}function i(c){var h=c*r;return(2*h+(1+e-t/2)*Vr(2*h)+(e+t)/2*Vr(4*h)+t/2*Vr(6*h))/r}function l(c){return f(c)*Vr(c)}var u=function(c,h){var d=r*SA(i,a*Vr(h)/r,h/Xr);isNaN(d)&&(d=r*uo(h));var v=o*f(d);return[v*s*c/Xr*Yr(d),v/s*Vr(d)]};return u.invert=function(c,h){var d=SA(l,h*s/o);return[c*Xr/(Yr(d)*o*s*f(d)),fi(r*i(d/r)/a)]},r===0&&(o=mn(n/Xr),u=function(c,h){return[c*o,Vr(h)/o]},u.invert=function(c,h){return[c/o,fi(h*o)]}),u}function XGe(){var e=1,t=0,r=45*bo,n=2,o=Af(qke),s=o(e,t,r,n);return s.a=function(a){return arguments.length?o(e=+a,t,r,n):e},s.b=function(a){return arguments.length?o(e,t=+a,r,n):t},s.psiMax=function(a){return arguments.length?o(e,t,r=+a*bo,n):r*Oo},s.ratio=function(a){return arguments.length?o(e,t,r,n=+a):n},s.scale(180.739)}function OV(e,t,r,n,o,s,a,f,i,l,u){if(u.nanEncountered)return NaN;var c,h,d,v,p,m,y,b,g,T;if(c=r-t,h=e(t+c*.25),d=e(r-c*.25),isNaN(h)){u.nanEncountered=!0;return}if(isNaN(d)){u.nanEncountered=!0;return}return v=c*(n+4*h+o)/12,p=c*(o+4*d+s)/12,m=v+p,T=(m-a)/15,l>i?(u.maxDepthCount++,m+T):Math.abs(T)>1;do i[m]>d?p=m:v=m,m=v+p>>1;while(m>v);var y=i[m+1]-i[m];return y&&(y=(d-i[m+1])/y),(m+1+y)/a}var c=2*u(1)/Xr*s/r,h=function(d,v){var p=u(En(Vr(v))),m=n(p)*d;return p/=c,[m,v>=0?p:-p]};return h.invert=function(d,v){var p;return v*=c,En(v)<1&&(p=uo(v)*fi(o(En(v))*s)),[d/n(En(v)),p]},h}function KGe(){var e=0,t=2.5,r=1.183136,n=Af(jke),o=n(e,t,r);return o.alpha=function(s){return arguments.length?n(e=+s,t,r):e},o.k=function(s){return arguments.length?n(e,t=+s,r):t},o.gamma=function(s){return arguments.length?n(e,t,r=+s):r},o.scale(152.63)}function JGe(e,t){return En(e[0]-t[0])=0;--i)r=e[1][i],n=r[0][0],o=r[0][1],s=r[1][1],a=r[2][0],f=r[2][1],t.push(uve([[a-fa,f-fa],[a-fa,s+fa],[n+fa,s+fa],[n+fa,o-fa]],30));return{type:"Polygon",coordinates:[AW(t)]}}function gy(e,t,r){var n,o;function s(i,l){for(var u=l<0?-1:1,c=t[+(l<0)],h=0,d=c.length-1;hc[h][2][0];++h);var v=e(i-c[h][1][0],l);return v[0]+=e(c[h][1][0],u*l>u*c[h][0][1]?c[h][0][1]:l)[0],v}r?s.invert=r(s):e.invert&&(s.invert=function(i,l){for(var u=o[+(l<0)],c=t[+(l<0)],h=0,d=u.length;hv&&(p=d,d=v,v=p),[[c,d],[h,v]]})}),a):t.map(function(l){return l.map(function(u){return[[u[0][0]*Oo,u[0][1]*Oo],[u[1][0]*Oo,u[1][1]*Oo],[u[2][0]*Oo,u[2][1]*Oo]]})})},t!=null&&a.lobes(t),a}var eVe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function tVe(){return gy(kM,eVe).scale(160.857)}var rVe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function nVe(){return gy(IM,rVe).scale(152.63)}var aVe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function iVe(){return gy(py,aVe).scale(169.529)}var oVe=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function sVe(){return gy(py,oVe).scale(169.529).rotate([20,0])}var lVe=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function uVe(){return gy(DM,lVe,FW).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var fVe=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function cVe(){return gy(fg,fVe).scale(152.63).rotate([-20,0])}function JW(e,t){return[3/ip*e*mn(Xr*Xr/3-t*t),t]}JW.invert=function(e,t){return[ip/3*e/mn(Xr*Xr/3-t*t),t]};function hVe(){return Ha(JW).scale(158.837)}function Uke(e){function t(r,n){if(En(En(n)-da)2)return null;r/=2,n/=2;var s=r*r,a=n*n,f=2*n/(1+s+a);return f=d2((1+f)/(1-f),1/e),[zo(2*r,1-s-a)/e,fi((f-1)/(f+1))]},t}function dVe(){var e=.5,t=Af(Uke),r=t(e);return r.spacing=function(n){return arguments.length?t(e=+n):e},r.scale(124.75)}var dN=Xr/ds;function QW(e,t){return[e*(1+mn(Yr(t)))/2,t/(Yr(t/2)*Yr(e/6))]}QW.invert=function(e,t){var r=En(e),n=En(t),o=fa,s=da;nfa||En(m)>fa)&&--o>0);return o&&[r,n]};function pVe(){return Ha(eX).scale(139.98)}function tX(e,t){return[Vr(e)/Yr(t),ro(t)*Yr(e)]}tX.invert=function(e,t){var r=e*e,n=t*t,o=n+1,s=r+o,a=e?Tv*mn((s-mn(s*s-4*r))/r):1/mn(o);return[fi(e*a),uo(t)*sc(a)]};function gVe(){return Ha(tX).scale(144.049).clipAngle(90-.001)}function Hke(e){var t=Yr(e),r=ro(gd+e/2);function n(o,s){var a=s-e,f=En(a)=0;)u=e[l],c=u[0]+f*(d=c)-i*h,h=u[1]+f*h+i*d;return c=f*(d=c)-i*h,h=f*h+i*d,[c,h]}return r.invert=function(n,o){var s=20,a=n,f=o;do{for(var i=t,l=e[i],u=l[0],c=l[1],h=0,d=0,v;--i>=0;)l=e[i],h=u+a*(v=h)-f*d,d=c+a*d+f*v,u=l[0]+a*(v=u)-f*c,c=l[1]+a*c+f*v;h=u+a*(v=h)-f*d,d=c+a*d+f*v,u=a*(v=u)-f*c-n,c=a*c+f*v-o;var p=h*h+d*d,m,y;a-=m=(u*h+c*d)/p,f-=y=(c*h-u*d)/p}while(En(m)+En(y)>fa*fa&&--s>0);if(s){var b=mn(a*a+f*f),g=2*Vl(b*.5),T=Vr(g);return[zo(a*T,b*Yr(g)),b?fi(f*T/b):0]}},r}var xVe=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bVe=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],_Ve=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],wVe=[[.9245,0],[0,0],[.01943,0]],TVe=[[.721316,0],[0,0],[-.00881625,-.00617325]];function AVe(){return ub(xVe,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function SVe(){return ub(bVe,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function MVe(){return ub(_Ve,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function EVe(){return ub(wVe,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function kVe(){return ub(TVe,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ub(e,t){var r=Ha(Gke(e)).rotate(t).clipAngle(90),n=Tx(t),o=r.center;return delete r.rotate,r.center=function(s){return arguments.length?o(n(s)):n.invert(o())},r}var RA=mn(6),LA=mn(7);function nX(e,t){var r=fi(7*Vr(t)/(3*RA));return[RA*e*(2*Yr(2*r/3)-1)/LA,9*Vr(r/3)/LA]}nX.invert=function(e,t){var r=3*fi(t*LA/9);return[e*LA/(RA*(2*Yr(2*r/3)-1)),fi(Vr(r)*3*RA/7)]};function CVe(){return Ha(nX).scale(164.859)}function aX(e,t){for(var r=(1+Tv)*Vr(t),n=t,o=0,s;o<25&&(n-=s=(Vr(n/2)+Vr(n)-r)/(.5*Yr(n/2)+Yr(n)),!(En(s)Ym&&--n>0);return s=r*r,a=s*s,f=s*a,[e/(.84719-.13063*s+f*f*(-.04515+.05494*s-.02326*a+.00331*f)),r]};function PVe(){return Ha(oX).scale(175.295)}function sX(e,t){return[e*(1+Yr(t))/2,2*(t-ro(t/2))]}sX.invert=function(e,t){for(var r=t/2,n=0,o=1/0;n<10&&En(o)>fa;++n){var s=Yr(t/2);t-=o=(t-ro(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+Yr(t)),t]};function DVe(){return Ha(sX).scale(152.63)}var IVe=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function OVe(){return gy(EM(1/0),IVe).rotate([20,0]).scale(152.63)}function lX(e,t){var r=Vr(t),n=Yr(t),o=uo(e);if(e===0||En(t)===da)return[0,t];if(t===0)return[e,0];if(En(e)===da)return[e*n,da*r];var s=Xr/(2*e)-2*e/Xr,a=2*t/Xr,f=(1-a*a)/(r-a),i=s*s,l=f*f,u=1+i/l,c=1+l/i,h=(s*r/f-s/2)/u,d=(l*r/i+f/2)/c,v=h*h+n*n/u,p=d*d-(l*r*r/i+f*r-1)/c;return[da*(h+mn(v)*o),da*(d+mn(p<0?0:p)*uo(-t*s)*o)]}lX.invert=function(e,t){e/=da,t/=da;var r=e*e,n=t*t,o=r+n,s=Xr*Xr;return[e?(o-1+mn((1-o)*(1-o)+4*r))/(2*e)*da:0,SA(function(a){return o*(Xr*Vr(a)-2*a)*Xr+4*a*a*(t-Vr(a))+2*Xr*a-s*t},0)]};function zVe(){return Ha(lX).scale(127.267)}var uX=1.0148,fX=.23185,cX=-.14499,hX=.02406,FVe=uX,NVe=5*fX,BVe=7*cX,qVe=9*hX,XT=1.790857183;function dX(e,t){var r=t*t;return[e,t*(uX+r*r*(fX+r*(cX+hX*r)))]}dX.invert=function(e,t){t>XT?t=XT:t<-XT&&(t=-XT);var r=t,n;do{var o=r*r;r-=n=(r*(uX+o*o*(fX+o*(cX+hX*o)))-t)/(FVe+o*o*(NVe+o*(BVe+qVe*o)))}while(En(n)>fa);return[e,r]};function jVe(){return Ha(dX).scale(139.319)}function vX(e,t){if(En(t)fa&&--o>0);return a=ro(n),[(En(t)=0;)if(n=t[f],r[0]===n[0]&&r[1]===n[1]){if(s)return[s,r];s=r}}}function $Ve(e){for(var t=e.length,r=[],n=e[t-1],o=0;o0?[-n[0],0]:[180-n[0],180])};var t=PA.map(function(r){return{face:r,project:e(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(r,n){var o=t[r];o&&(o.children||(o.children=[])).push(t[n])}),OM(t[0],function(r,n){return t[r<-Xr/2?n<0?6:4:r<0?n<0?2:0:rn^d>n&&r<(h-l)*(n-u)/(d-u)+l&&(o=!o)}return o}function tYe(e,t){var r=t.stream,n;if(!r)throw new Error("invalid projection");switch(e&&e.type){case"Feature":n=Xke;break;case"FeatureCollection":n=rYe;break;default:n=pX;break}return n(e,r)}function rYe(e,t){return{type:"FeatureCollection",features:e.features.map(function(r){return Xke(r,t)})}}function Xke(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:pX(e.geometry,t)}}function nYe(e,t){return{type:"GeometryCollection",geometries:e.geometries.map(function(r){return pX(r,t)})}}function pX(e,t){if(!e)return null;if(e.type==="GeometryCollection")return nYe(e,t);var r;switch(e.type){case"Point":r=dve;break;case"MultiPoint":r=dve;break;case"LineString":r=vve;break;case"MultiLineString":r=vve;break;case"Polygon":r=gN;break;case"MultiPolygon":r=gN;break;case"Sphere":r=gN;break;default:return null}return dd(e,t(r)),r.result()}var ih=[],Qp=[],dve={point:function(e,t){ih.push([e,t])},result:function(){var e=ih.length?ih.length<2?{type:"Point",coordinates:ih[0]}:{type:"MultiPoint",coordinates:ih}:null;return ih=[],e}},vve={lineStart:E3,point:function(e,t){ih.push([e,t])},lineEnd:function(){ih.length&&(Qp.push(ih),ih=[])},result:function(){var e=Qp.length?Qp.length<2?{type:"LineString",coordinates:Qp[0]}:{type:"MultiLineString",coordinates:Qp}:null;return Qp=[],e}},gN={polygonStart:E3,lineStart:E3,point:function(e,t){ih.push([e,t])},lineEnd:function(){var e=ih.length;if(e){do ih.push(ih[0].slice());while(++e<4);Qp.push(ih),ih=[]}},polygonEnd:E3,result:function(){if(!Qp.length)return null;var e=[],t=[];return Qp.forEach(function(r){QVe(r)?e.push([r]):t.push(r)}),t.forEach(function(r){var n=r[0];e.some(function(o){if(eYe(o[0],n))return o.push(r),!0})||e.push([r])}),Qp=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function gX(e){var t=e(da,0)[0]-e(-da,0)[0];function r(n,o){var s=En(n)0?n-Xr:n+Xr,o),f=(a[0]-a[1])*Tv,i=(a[0]+a[1])*Tv;if(s)return[f,i];var l=t*Tv,u=f>0^i>0?-1:1;return[u*f-uo(i)*l,u*i-uo(f)*l]}return e.invert&&(r.invert=function(n,o){var s=(n+o)*Tv,a=(o-n)*Tv,f=En(s)<.5*t&&En(a)<.5*t;if(!f){var i=t*Tv,l=s>0^a>0?-1:1,u=-l*n+(a>0?1:-1)*i,c=-l*o+(s>0?1:-1)*i;s=(-u-c)*Tv,a=(u-c)*Tv}var h=e.invert(s,a);return f||(h[0]+=s>0?Xr:-Xr),h}),Ha(r).rotate([-90,-90,45]).clipAngle(180-.001)}function aYe(){return gX(RM).scale(176.423)}function pve(){return gX(LM).scale(111.48)}function iYe(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function r(l){var u=l.length,c=2,h=new Array(u);for(h[0]=+l[0].toFixed(t),h[1]=+l[1].toFixed(t);c2||d[0]!=u[0]||d[1]!=u[1])&&(c.push(d),u=d)}return c.length===1&&l.length>1&&c.push(r(l[l.length-1])),c}function s(l){return l.map(o)}function a(l){if(l==null)return l;var u;switch(l.type){case"GeometryCollection":u={type:"GeometryCollection",geometries:l.geometries.map(a)};break;case"Point":u={type:"Point",coordinates:r(l.coordinates)};break;case"MultiPoint":u={type:l.type,coordinates:n(l.coordinates)};break;case"LineString":u={type:l.type,coordinates:o(l.coordinates)};break;case"MultiLineString":case"Polygon":u={type:l.type,coordinates:s(l.coordinates)};break;case"MultiPolygon":u={type:"MultiPolygon",coordinates:l.coordinates.map(s)};break;default:return l}return l.bbox!=null&&(u.bbox=l.bbox),u}function f(l){var u={type:"Feature",properties:l.properties,geometry:a(l.geometry)};return l.id!=null&&(u.id=l.id),l.bbox!=null&&(u.bbox=l.bbox),u}if(e!=null)switch(e.type){case"Feature":return f(e);case"FeatureCollection":{var i={type:"FeatureCollection",features:e.features.map(f)};return e.bbox!=null&&(i.bbox=e.bbox),i}default:return a(e)}return e}function Zke(e){var t=Vr(e);function r(n,o){var s=t?ro(n*t/2)/t:n/2;if(!o)return[2*s,-e];var a=2*Vl(s*Vr(o)),f=1/ro(o);return[Vr(a)*f,o+(1-Yr(a))*f-e]}return r.invert=function(n,o){if(En(o+=e)fa&&--f>0);var h=n*(l=ro(a)),d=ro(En(o)0?da:-da)*(i+o*(u-a)/2+o*o*(u-2*i+a)/2)]}yX.invert=function(e,t){var r=t/da,n=r*90,o=vd(18,En(n/5)),s=V0(0,Mx(o));do{var a=Nd[s][1],f=Nd[s+1][1],i=Nd[vd(19,s+2)][1],l=i-a,u=i-2*f+a,c=2*(En(r)-f)/l,h=u/l,d=c*(1-h*c*(1-2*h*c));if(d>=0||s===1){n=(t>=0?5:-5)*(d+o);var v=50,p;do o=vd(18,En(n)/5),s=Mx(o),d=o-s,a=Nd[s][1],f=Nd[s+1][1],i=Nd[vd(19,s+2)][1],n-=(p=(t>=0?da:-da)*(f+d*(i-a)/2+d*d*(i-2*f+a)/2)-t)*Oo;while(En(p)>Ym&&--v>0);break}}while(--s>=0);var m=Nd[s][0],y=Nd[s+1][0],b=Nd[vd(19,s+2)][0];return[e/(y+d*(b-m)/2+d*d*(b-2*y+m)/2),n*bo]};function sYe(){return Ha(yX).scale(152.63)}function lYe(e){function t(r,n){var o=Yr(n),s=(e-1)/(e-o*Yr(r));return[s*o*Vr(r),s*Vr(n)]}return t.invert=function(r,n){var o=r*r+n*n,s=mn(o),a=(e-mn(1-o*(e+1)/(e-1)))/((e-1)/s+s/(e-1));return[zo(r*a,s*mn(1-a*a)),s?fi(n*a/s):0]},t}function Kke(e,t){var r=lYe(e);if(!t)return r;var n=Yr(t),o=Vr(t);function s(a,f){var i=r(a,f),l=i[1],u=l*o/(e-1)+n;return[i[0]*n/u,l/u]}return s.invert=function(a,f){var i=(e-1)/(e-1-f*o);return r.invert(i*a,i*f*n)},s}function uYe(){var e=2,t=0,r=Af(Kke),n=r(e,t);return n.distance=function(o){return arguments.length?r(e=+o,t):e},n.tilt=function(o){return arguments.length?r(e,t=o*bo):t*Oo},n.scale(432.147).clipAngle(sc(1/e)*Oo-1e-6)}var zM=1e-4,gve=1e4,mX=-180,zV=mX+zM,Jke=180,FV=Jke-zM,xX=-90,NV=xX+zM,bX=90,BV=bX-zM;function fYe(e){return e.length>0}function cYe(e){return Math.floor(e*gve)/gve}function yve(e){return e===xX||e===bX?[0,e]:[mX,cYe(e)]}function _X(e){var t=e[0],r=e[1],n=!1;return t<=zV?(t=mX,n=!0):t>=FV&&(t=Jke,n=!0),r<=NV?(r=xX,n=!0):r>=BV&&(r=bX,n=!0),n?[t,r]:e}function mve(e){return e.map(_X)}function xve(e,t,r){for(var n=0,o=e.length;n=FV||u<=NV||u>=BV){s[a]=_X(i);for(var c=a+1;czV&&dNV&&v=f)break;r.push({index:-1,polygon:t,ring:s=s.slice(c-1)}),s[0]=yve(s[0][1]),a=-1,f=s.length}}}}function bve(e){var t,r=e.length,n={},o={},s,a,f,i,l;for(t=0;t0?Xr-f:f)*Oo],l=Ha(e(a)).rotate(i),u=Tx(i),c=l.center;return delete l.rotate,l.center=function(h){return arguments.length?c(u(h)):u.invert(c())},l.clipAngle(90)}function eCe(e){var t=Yr(e);function r(n,o){var s=h2(n,o);return s[0]*=t,s}return r.invert=function(n,o){return h2.invert(n/t,o)},r}function vYe(){return tCe([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function tCe(e,t){return Qke(eCe,e,t)}function rCe(e){if(!(e*=2))return iy;var t=-e/2,r=-t,n=e*e,o=ro(r),s=.5/Vr(r);function a(f,i){var l=sc(Yr(i)*Yr(f-t)),u=sc(Yr(i)*Yr(f-r)),c=i<0?-1:1;return l*=l,u*=u,[(l-u)/(2*e),c*mn(4*n*u-(n-l+u)*(n-l+u))/(2*e)]}return a.invert=function(f,i){var l=i*i,u=Yr(mn(l+(h=f+t)*h)),c=Yr(mn(l+(h=f+r)*h)),h,d;return[zo(d=u-c,h=(u+c)*o),(i<0?-1:1)*sc(mn(h*h+d*d)*s)]},a}function pYe(){return nCe([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function nCe(e,t){return Qke(rCe,e,t)}function AX(e,t){if(En(t)fa&&--f>0);return[uo(e)*(mn(o*o+4)+o)*Xr/4,da*a]};function xYe(){return Ha(EX).scale(127.16)}function bYe(e,t,r,n,o){function s(a,f){var i=r*Vr(n*f),l=mn(1-i*i),u=mn(2/(1+l*Yr(a*=o)));return[e*l*u*Vr(a),t*i*u]}return s.invert=function(a,f){var i=a/e,l=f/t,u=mn(i*i+l*l),c=2*fi(u/2);return[zo(a*ro(c),e*u)/o,u&&fi(f*Vr(c)/(t*r*u))/n]},s}function aCe(e,t,r,n){var o=Xr/3;e=V0(e,fa),t=V0(t,fa),e=vd(e,da),t=vd(t,Xr-fa),r=V0(r,0),r=vd(r,100-fa),n=V0(n,fa);var s=r/100+1,a=n/100,f=sc(s*Yr(o))/o,i=Vr(e)/Vr(f*da),l=t/Xr,u=mn(a*Vr(e/2)/Vr(t/2)),c=u/mn(l*i*f),h=1/(u*mn(l*i*f));return bYe(c,h,i,f,l)}function iCe(){var e=65*bo,t=60*bo,r=20,n=200,o=Af(aCe),s=o(e,t,r,n);return s.poleline=function(a){return arguments.length?o(e=+a*bo,t,r,n):e*Oo},s.parallels=function(a){return arguments.length?o(e,t=+a*bo,r,n):t*Oo},s.inflation=function(a){return arguments.length?o(e,t,r=+a,n):r},s.ratio=function(a){return arguments.length?o(e,t,r,n=+a):n},s.scale(163.775)}function _Ye(){return iCe().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var oCe=4*Xr+3*mn(3),wve=2*mn(2*Xr*mn(3)/oCe),sCe=NW(wve*mn(3)/Xr,wve,oCe/6);function wYe(){return Ha(sCe).scale(176.84)}function kX(e,t){return[e*mn(1-3*t*t/(Xr*Xr)),t]}kX.invert=function(e,t){return[e/mn(1-3*t*t/(Xr*Xr)),t]};function TYe(){return Ha(kX).scale(152.63)}function CX(e,t){var r=Yr(t),n=Yr(e)*r,o=1-n,s=Yr(e=zo(Vr(e)*r,-Vr(t))),a=Vr(e);return r=mn(1-n*n),[a*r-s*o,-s*r-a*o]}CX.invert=function(e,t){var r=(e*e+t*t)/-2,n=mn(-r*(2+r)),o=t*r+e*n,s=e*r-t*n,a=mn(s*s+o*o);return[zo(n*o,a*(1+r)),a?-fi(n*s/a):0]};function AYe(){return Ha(CX).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function RX(e,t){var r=SM(e,t);return[(r[0]+e/da)/2,(r[1]+t)/2]}RX.invert=function(e,t){var r=e,n=t,o=25;do{var s=Yr(n),a=Vr(n),f=Vr(2*n),i=a*a,l=s*s,u=Vr(r),c=Yr(r/2),h=Vr(r/2),d=h*h,v=1-l*c*c,p=v?sc(s*c)*mn(m=1/v):m=0,m,y=.5*(2*p*s*h+r/da)-e,b=.5*(p*a+n)-t,g=.5*m*(l*d+p*s*c*i)+.5/da,T=m*(u*f/4-p*a*h),S=.125*m*(f*h-p*a*l*u),A=.5*m*(i*c+p*d*s)+.5,M=T*S-A*g,w=(b*T-y*A)/M,C=(y*S-b*g)/M;r-=w,n-=C}while((En(w)>fa||En(C)>fa)&&--o>0);return[r,n]};function SYe(){return Ha(RX).scale(158.837)}const MYe=Object.freeze(Object.defineProperty({__proto__:null,geoAiry:YHe,geoAiryRaw:gke,geoAitoff:$He,geoAitoffRaw:SM,geoArmadillo:WHe,geoArmadilloRaw:yke,geoAugust:XHe,geoAugustRaw:MM,geoBaker:KHe,geoBakerRaw:zW,geoBerghaus:JHe,geoBerghausRaw:mke,geoBertin1953:eGe,geoBertin1953Raw:bke,geoBoggs:rGe,geoBoggsRaw:kM,geoBonne:aGe,geoBonneRaw:Tke,geoBottomley:iGe,geoBottomleyRaw:Ake,geoBromley:oGe,geoBromleyRaw:Ske,geoChamberlin:Eke,geoChamberlinAfrica:lGe,geoChamberlinRaw:Mke,geoCollignon:uGe,geoCollignonRaw:n0,geoCraig:fGe,geoCraigRaw:kke,geoCraster:cGe,geoCrasterRaw:BW,geoCylindricalEqualArea:hGe,geoCylindricalEqualAreaRaw:qW,geoCylindricalStereographic:dGe,geoCylindricalStereographicRaw:Cke,geoEckert1:vGe,geoEckert1Raw:jW,geoEckert2:pGe,geoEckert2Raw:UW,geoEckert3:gGe,geoEckert3Raw:HW,geoEckert4:yGe,geoEckert4Raw:GW,geoEckert5:mGe,geoEckert5Raw:VW,geoEckert6:xGe,geoEckert6Raw:YW,geoEisenlohr:bGe,geoEisenlohrRaw:$W,geoFahey:_Ge,geoFaheyRaw:WW,geoFoucaut:wGe,geoFoucautRaw:XW,geoFoucautSinusoidal:TGe,geoFoucautSinusoidalRaw:Rke,geoGilbert:AGe,geoGingery:SGe,geoGingeryRaw:Lke,geoGinzburg4:MGe,geoGinzburg4Raw:Pke,geoGinzburg5:EGe,geoGinzburg5Raw:Dke,geoGinzburg6:kGe,geoGinzburg6Raw:Ike,geoGinzburg8:CGe,geoGinzburg8Raw:ZW,geoGinzburg9:RGe,geoGinzburg9Raw:Oke,geoGringorten:DGe,geoGringortenQuincuncial:aYe,geoGringortenRaw:RM,geoGuyou:NGe,geoGuyouRaw:LM,geoHammer:QHe,geoHammerRaw:EM,geoHammerRetroazimuthal:BGe,geoHammerRetroazimuthalRaw:Fke,geoHealpix:VGe,geoHealpixRaw:Nke,geoHill:YGe,geoHillRaw:Bke,geoHomolosine:WGe,geoHomolosineRaw:IM,geoHufnagel:XGe,geoHufnagelRaw:qke,geoHyperelliptical:KGe,geoHyperellipticalRaw:jke,geoInterrupt:gy,geoInterruptedBoggs:tVe,geoInterruptedHomolosine:nVe,geoInterruptedMollweide:iVe,geoInterruptedMollweideHemispheres:sVe,geoInterruptedQuarticAuthalic:OVe,geoInterruptedSinuMollweide:uVe,geoInterruptedSinusoidal:cVe,geoKavrayskiy7:hVe,geoKavrayskiy7Raw:JW,geoLagrange:dVe,geoLagrangeRaw:Uke,geoLarrivee:vVe,geoLarriveeRaw:QW,geoLaskowski:pVe,geoLaskowskiRaw:eX,geoLittrow:gVe,geoLittrowRaw:tX,geoLoximuthal:yVe,geoLoximuthalRaw:Hke,geoMiller:mVe,geoMillerRaw:rX,geoModifiedStereographic:ub,geoModifiedStereographicAlaska:AVe,geoModifiedStereographicGs48:SVe,geoModifiedStereographicGs50:MVe,geoModifiedStereographicLee:kVe,geoModifiedStereographicMiller:EVe,geoModifiedStereographicRaw:Gke,geoMollweide:tGe,geoMollweideRaw:py,geoMtFlatPolarParabolic:CVe,geoMtFlatPolarParabolicRaw:nX,geoMtFlatPolarQuartic:RVe,geoMtFlatPolarQuarticRaw:aX,geoMtFlatPolarSinusoidal:LVe,geoMtFlatPolarSinusoidalRaw:iX,geoNaturalEarth:dke,geoNaturalEarth2:PVe,geoNaturalEarth2Raw:oX,geoNaturalEarthRaw:AM,geoNellHammer:DVe,geoNellHammerRaw:sX,geoNicolosi:zVe,geoNicolosiRaw:lX,geoPatterson:jVe,geoPattersonRaw:dX,geoPeirceQuincuncial:pve,geoPierceQuincuncial:pve,geoPolyconic:UVe,geoPolyconicRaw:vX,geoPolyhedral:OM,geoPolyhedralButterfly:XVe,geoPolyhedralCollignon:ZVe,geoPolyhedralWaterman:KVe,geoProject:tYe,geoQuantize:iYe,geoQuincuncial:gX,geoRectangularPolyconic:oYe,geoRectangularPolyconicRaw:Zke,geoRobinson:sYe,geoRobinsonRaw:yX,geoSatellite:uYe,geoSatelliteRaw:Kke,geoSinuMollweide:$Ge,geoSinuMollweideRaw:DM,geoSinusoidal:nGe,geoSinusoidalRaw:fg,geoStitch:hYe,geoTimes:dYe,geoTimesRaw:TX,geoTwoPointAzimuthal:tCe,geoTwoPointAzimuthalRaw:eCe,geoTwoPointAzimuthalUsa:vYe,geoTwoPointEquidistant:nCe,geoTwoPointEquidistantRaw:rCe,geoTwoPointEquidistantUsa:pYe,geoVanDerGrinten:gYe,geoVanDerGrinten2:yYe,geoVanDerGrinten2Raw:SX,geoVanDerGrinten3:mYe,geoVanDerGrinten3Raw:MX,geoVanDerGrinten4:xYe,geoVanDerGrinten4Raw:EX,geoVanDerGrintenRaw:AX,geoWagner:iCe,geoWagner4:wYe,geoWagner4Raw:sCe,geoWagner6:TYe,geoWagner6Raw:kX,geoWagner7:_Ye,geoWagnerRaw:aCe,geoWiechel:AYe,geoWiechelRaw:CX,geoWinkel3:SYe,geoWinkel3Raw:RX},Symbol.toStringTag,{value:"Module"})),EYe=$d(MYe);var yN,Tve;function kYe(){if(Tve)return yN;Tve=1;var e=ya(),t=rr(),r=ga(),n=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},a={cursor:"auto"};function f(x,_){var k=x.projection,E;return _._isScoped?E=u:_._isClipped?E=h:E=c,E(x,k)}yN=f;function i(x,_){return e.behavior.zoom().translate(_.translate()).scale(_.scale())}function l(x,_,k){var E=x.id,I=x.graphDiv,F=I.layout,D=F[E],z=I._fullLayout,N=z[E],q={},P={};function B($,Q){q[E+"."+$]=t.nestedProperty(D,$).get(),r.call("_storeDirectGUIEdit",F,z._preGUI,q);var J=t.nestedProperty(N,$);J.get()!==Q&&(J.set(Q),t.nestedProperty(D,$).set(Q),P[E+"."+$]=Q)}k(B),B("projection.scale",_.scale()/x.fitScale),B("fitbounds",!1),I.emit("plotly_relayout",P)}function u(x,_){var k=i(x,_);function E(){e.select(this).style(s)}function I(){_.scale(e.event.scale).translate(e.event.translate),x.render(!0);var z=_.invert(x.midPt);x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.center.lon":z[0],"geo.center.lat":z[1]})}function F(z){var N=_.invert(x.midPt);z("center.lon",N[0]),z("center.lat",N[1])}function D(){e.select(this).style(a),l(x,_,F)}return k.on("zoomstart",E).on("zoom",I).on("zoomend",D),k}function c(x,_){var k=i(x,_),E=2,I,F,D,z,N,q,P,B,$;function Q(j){return _.invert(j)}function J(j){var Y=Q(j);if(!Y)return!0;var K=_(Y);return Math.abs(K[0]-j[0])>E||Math.abs(K[1]-j[1])>E}function ne(){e.select(this).style(s),I=e.mouse(this),F=_.rotate(),D=_.translate(),z=F,N=Q(I)}function te(){if(q=e.mouse(this),J(I)){k.scale(_.scale()),k.translate(_.translate());return}_.scale(e.event.scale),_.translate([D[0],e.event.translate[1]]),N?Q(q)&&(B=Q(q),P=[z[0]+(B[0]-N[0]),F[1],F[2]],_.rotate(P),z=P):(I=q,N=Q(I)),$=!0,x.render(!0);var j=_.rotate(),Y=_.invert(x.midPt);x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.center.lon":Y[0],"geo.center.lat":Y[1],"geo.projection.rotation.lon":-j[0]})}function Z(){e.select(this).style(a),$&&l(x,_,G)}function G(j){var Y=_.rotate(),K=_.invert(x.midPt);j("projection.rotation.lon",-Y[0]),j("center.lon",K[0]),j("center.lat",K[1])}return k.on("zoomstart",ne).on("zoom",te).on("zoomend",Z),k}function h(x,_){_.rotate(),_.scale();var k=i(x,_),E=C(k,"zoomstart","zoom","zoomend"),I=0,F=k.on,D;k.on("zoomstart",function(){e.select(this).style(s);var B=e.mouse(this),$=_.rotate(),Q=$,J=_.translate(),ne=v($);D=d(_,B),F.call(k,"zoom",function(){var te=e.mouse(this);if(_.scale(e.event.scale),!D)B=te,D=d(_,B);else if(d(_,te)){_.rotate($).translate(J);var Z=d(_,te),G=m(D,Z),j=S(p(ne,G)),Y=y(j,D,Q);(!isFinite(Y[0])||!isFinite(Y[1])||!isFinite(Y[2]))&&(Y=Q),_.rotate(Y),Q=Y}N(E.of(this,arguments))}),z(E.of(this,arguments))}).on("zoomend",function(){e.select(this).style(a),F.call(k,"zoom",null),q(E.of(this,arguments)),l(x,_,P)}).on("zoom.redraw",function(){x.render(!0);var B=_.rotate();x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.projection.rotation.lon":-B[0],"geo.projection.rotation.lat":-B[1]})});function z(B){I++||B({type:"zoomstart"})}function N(B){B({type:"zoom"})}function q(B){--I||B({type:"zoomend"})}function P(B){var $=_.rotate();B("projection.rotation.lon",-$[0]),B("projection.rotation.lat",-$[1])}return e.rebind(k,E,"on")}function d(x,_){var k=x.invert(_);return k&&isFinite(k[0])&&isFinite(k[1])&&A(k)}function v(x){var _=.5*x[0]*n,k=.5*x[1]*n,E=.5*x[2]*n,I=Math.sin(_),F=Math.cos(_),D=Math.sin(k),z=Math.cos(k),N=Math.sin(E),q=Math.cos(E);return[F*z*q+I*D*N,I*z*q-F*D*N,F*D*q+I*z*N,F*z*N-I*D*q]}function p(x,_){var k=x[0],E=x[1],I=x[2],F=x[3],D=_[0],z=_[1],N=_[2],q=_[3];return[k*D-E*z-I*N-F*q,k*z+E*D+I*q-F*N,k*N-E*q+I*D+F*z,k*q+E*N-I*z+F*D]}function m(x,_){if(!(!x||!_)){var k=w(x,_),E=Math.sqrt(M(k,k)),I=.5*Math.acos(Math.max(-1,Math.min(1,M(x,_)))),F=Math.sin(I)/E;return E&&[Math.cos(I),k[2]*F,-k[1]*F,k[0]*F]}}function y(x,_,k){var E=T(_,2,x[0]);E=T(E,1,x[1]),E=T(E,0,x[2]-k[2]);var I=_[0],F=_[1],D=_[2],z=E[0],N=E[1],q=E[2],P=Math.atan2(F,I)*o,B=Math.sqrt(I*I+F*F),$,Q;Math.abs(N)>B?(Q=(N>0?90:-90)-P,$=0):(Q=Math.asin(N/B)*o-P,$=Math.sqrt(B*B-N*N));var J=180-Q-2*P,ne=(Math.atan2(q,z)-Math.atan2(D,$))*o,te=(Math.atan2(q,z)-Math.atan2(D,-$))*o,Z=b(k[0],k[1],Q,ne),G=b(k[0],k[1],J,te);return Z<=G?[Q,ne,k[2]]:[J,te,k[2]]}function b(x,_,k,E){var I=g(k-x),F=g(E-_);return Math.sqrt(I*I+F*F)}function g(x){return(x%360+540)%360-180}function T(x,_,k){var E=k*n,I=x.slice(),F=_===0?1:0,D=_===2?1:2,z=Math.cos(E),N=Math.sin(E);return I[F]=x[F]*z-x[D]*N,I[D]=x[D]*z+x[F]*N,I}function S(x){return[Math.atan2(2*(x[0]*x[1]+x[2]*x[3]),1-2*(x[1]*x[1]+x[2]*x[2]))*o,Math.asin(Math.max(-1,Math.min(1,2*(x[0]*x[2]-x[3]*x[1]))))*o,Math.atan2(2*(x[0]*x[3]+x[1]*x[2]),1-2*(x[2]*x[2]+x[3]*x[3]))*o]}function A(x){var _=x[0]*n,k=x[1]*n,E=Math.cos(k);return[E*Math.cos(_),E*Math.sin(_),Math.sin(k)]}function M(x,_){for(var k=0,E=0,I=x.length;E0&&N._module.calcGeoJSON(z,E)}if(!I){var q=this.updateProjection(k,E);if(q)return;(!this.viewInitial||this.scope!==F.scope)&&this.saveViewInitial(F)}this.scope=F.scope,this.updateBaseLayers(E,F),this.updateDims(E,F),this.updateFx(E,F),c.generalUpdatePerTraceModule(this.graphDiv,this,k,F);var P=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=P.selectAll(".point"),this.dataPoints.text=P.selectAll("text"),this.dataPaths.line=P.selectAll(".js-line");var B=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=B.selectAll("path"),this._render()},w.updateProjection=function(k,E){var I=this.graphDiv,F=E[this.id],D=E._size,z=F.domain,N=F.projection,q=F.lonaxis,P=F.lataxis,B=q._ax,$=P._ax,Q=this.projection=C(F),J=[[D.l+D.w*z.x[0],D.t+D.h*(1-z.y[1])],[D.l+D.w*z.x[1],D.t+D.h*(1-z.y[0])]],ne=F.center||{},te=N.rotation||{},Z=q.range||[],G=P.range||[];if(F.fitbounds){B._length=J[1][0]-J[0][0],$._length=J[1][1]-J[0][1],B.range=d(I,B),$.range=d(I,$);var j=(B.range[0]+B.range[1])/2,Y=($.range[0]+$.range[1])/2;if(F._isScoped)ne={lon:j,lat:Y};else if(F._isClipped){ne={lon:j,lat:Y},te={lon:j,lat:Y,roll:te.roll};var K=N.type,X=g.lonaxisSpan[K]/2||180,ee=g.lataxisSpan[K]/2||90;Z=[j-X,j+X],G=[Y-ee,Y+ee]}else ne={lon:j,lat:Y},te={lon:j,lat:te.lat,roll:te.roll}}Q.center([ne.lon-te.lon,ne.lat-te.lat]).rotate([-te.lon,-te.lat,te.roll]).parallels(N.parallels);var le=_(Z,G);Q.fitExtent(J,le);var oe=this.bounds=Q.getBounds(le),fe=this.fitScale=Q.scale(),de=Q.translate();if(F.fitbounds){var _e=Q.getBounds(_(B.range,$.range)),we=Math.min((oe[1][0]-oe[0][0])/(_e[1][0]-_e[0][0]),(oe[1][1]-oe[0][1])/(_e[1][1]-_e[0][1]));isFinite(we)?Q.scale(we*fe):a.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Q.scale(N.scale*fe);var Oe=this.midPt=[(oe[0][0]+oe[1][0])/2,(oe[0][1]+oe[1][1])/2];if(Q.translate([de[0]+(Oe[0]-de[0]),de[1]+(Oe[1]-de[1])]).clipExtent(oe),F._isAlbersUsa){var be=Q([ne.lon,ne.lat]),Te=Q.translate();Q.translate([Te[0]-(be[0]-Te[0]),Te[1]-(be[1]-Te[1])])}},w.updateBaseLayers=function(k,E){var I=this,F=I.topojson,D=I.layers,z=I.basePaths;function N(J){return J==="lonaxis"||J==="lataxis"}function q(J){return!!g.lineLayers[J]}function P(J){return!!g.fillLayers[J]}var B=this.hasChoropleth?g.layersForChoropleth:g.layers,$=B.filter(function(J){return q(J)||P(J)?E["show"+J]:N(J)?E[J].showgrid:!0}),Q=I.framework.selectAll(".layer").data($,String);Q.exit().each(function(J){delete D[J],delete z[J],e.select(this).remove()}),Q.enter().append("g").attr("class",function(J){return"layer "+J}).each(function(J){var ne=D[J]=e.select(this);J==="bg"?I.bgRect=ne.append("rect").style("pointer-events","all"):N(J)?z[J]=ne.append("path").style("fill","none"):J==="backplot"?ne.append("g").classed("choroplethlayer",!0):J==="frontplot"?ne.append("g").classed("scatterlayer",!0):q(J)?z[J]=ne.append("path").style("fill","none").style("stroke-miterlimit",2):P(J)&&(z[J]=ne.append("path").style("stroke","none"))}),Q.order(),Q.each(function(J){var ne=z[J],te=g.layerNameToAdjective[J];J==="frame"?ne.datum(g.sphereSVG):q(J)||P(J)?ne.datum(A(F,F.objects[J])):N(J)&&ne.datum(x(J,E,k)).call(i.stroke,E[J].gridcolor).call(l.dashLine,E[J].griddash,E[J].gridwidth),q(J)?ne.call(i.stroke,E[te+"color"]).call(l.dashLine,"",E[te+"width"]):P(J)&&ne.call(i.fill,E[te+"color"])})},w.updateDims=function(k,E){var I=this.bounds,F=(E.framewidth||0)/2,D=I[0][0]-F,z=I[0][1]-F,N=I[1][0]-D+F,q=I[1][1]-z+F;l.setRect(this.clipRect,D,z,N,q),this.bgRect.call(l.setRect,D,z,N,q).call(i.fill,E.bgcolor),this.xaxis._offset=D,this.xaxis._length=N,this.yaxis._offset=z,this.yaxis._length=q},w.updateFx=function(k,E){var I=this,F=I.graphDiv,D=I.bgRect,z=k.dragmode,N=k.clickmode;if(I.isStatic)return;function q(){var Q=I.viewInitial,J={};for(var ne in Q)J[I.id+"."+ne]=Q[ne];s.call("_guiRelayout",F,J),F.emit("plotly_doubleclick",null)}function P(Q){return I.projection.invert([Q[0]+I.xaxis._offset,Q[1]+I.yaxis._offset])}var B=function(Q,J){if(J.isRect){var ne=Q.range={};ne[I.id]=[P([J.xmin,J.ymin]),P([J.xmax,J.ymax])]}else{var te=Q.lassoPoints={};te[I.id]=J.map(P)}},$={element:I.bgRect.node(),gd:F,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:B},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function(Q){Q===2&&m(F)}};z==="pan"?(D.node().onmousedown=null,D.call(b(I,E)),D.on("dblclick.zoom",q),F._context._scrollZoom.geo||D.on("wheel.zoom",null)):(z==="select"||z==="lasso")&&(D.on(".zoom",null),$.prepFn=function(Q,J,ne){p(Q,J,ne,$,z)},v.init($)),D.on("mousemove",function(){var Q=I.projection.invert(a.getPositionFromD3Event());if(!Q)return v.unhover(F,e.event);I.xaxis.p2c=function(){return Q[0]},I.yaxis.p2c=function(){return Q[1]},u.hover(F,e.event,I.id)}),D.on("mouseout",function(){F._dragging||v.unhover(F,e.event)}),D.on("click",function(){z!=="select"&&z!=="lasso"&&(N.indexOf("select")>-1&&y(e.event,F,[I.xaxis],[I.yaxis],I.id,$),N.indexOf("event")>-1&&u.click(F,e.event))})},w.makeFramework=function(){var k=this,E=k.graphDiv,I=E._fullLayout,F="clip"+I._uid+k.id;k.clipDef=I._clips.append("clipPath").attr("id",F),k.clipRect=k.clipDef.append("rect"),k.framework=e.select(k.container).append("g").attr("class","geo "+k.id).call(l.setClipUrl,F,E),k.project=function(D){var z=k.projection(D);return z?[z[0]-k.xaxis._offset,z[1]-k.yaxis._offset]:[null,null]},k.xaxis={_id:"x",c2p:function(D){return k.project(D)[0]}},k.yaxis={_id:"y",c2p:function(D){return k.project(D)[1]}},k.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(k.mockAxis,I)},w.saveViewInitial=function(k){var E=k.center||{},I=k.projection,F=I.rotation||{};this.viewInitial={fitbounds:k.fitbounds,"projection.scale":I.scale};var D;k._isScoped?D={"center.lon":E.lon,"center.lat":E.lat}:k._isClipped?D={"projection.rotation.lon":F.lon,"projection.rotation.lat":F.lat}:D={"center.lon":E.lon,"center.lat":E.lat,"projection.rotation.lon":F.lon},a.extendFlat(this.viewInitial,D)},w.render=function(k){this._hasMarkerAngles&&k?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},w._render=function(){var k=this.projection,E=k.getPath(),I;function F(z){var N=k(z.lonlat);return N?f(N[0],N[1]):null}function D(z){return k.isLonLatOverEdges(z.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",E);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(z){return E(z.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",D).attr("transform",F)};function C(k){var E=k.projection,I=E.type,F=g.projNames[I];F="geo"+a.titleCase(F);for(var D=t[F]||o[F],z=D(),N=k._isSatellite?Math.acos(1/E.distance)*180/Math.PI:k._isClipped?g.lonaxisSpan[I]/2:null,q=["center","rotate","parallels","clipExtent"],P=function(Q){return Q?z:[]},B=0;Bte}else return!1},z.getPath=function(){return r().projection(z)},z.getBounds=function(Q){return z.getPath().bounds(Q)},z.precision(g.precision),k._isSatellite&&z.tilt(E.tilt).distance(E.distance),N&&z.clipAngle(N-g.clipPad),z}function x(k,E,I){var F=1e-6,D=2.5,z=E[k],N=g.scopeDefaults[E.scope],q,P,B;k==="lonaxis"?(q=N.lonaxisRange,P=N.lataxisRange,B=function(Y,K){return[Y,K]}):k==="lataxis"&&(q=N.lataxisRange,P=N.lonaxisRange,B=function(Y,K){return[K,Y]});var $={type:"linear",range:[q[0],q[1]-F],tick0:z.tick0,dtick:z.dtick};h.setConvert($,I);var Q=h.calcTicks($);!E.isScoped&&k==="lonaxis"&&Q.pop();for(var J=Q.length,ne=new Array(J),te=0;te0&&D<0&&(D+=360);var q=(D-F)/4;return{type:"Polygon",coordinates:[[[F,z],[F,N],[F+q,N],[F+2*q,N],[F+3*q,N],[D,N],[D,z],[D-q,z],[D-2*q,z],[D-3*q,z],[F,z]]]}}return mN}var xN={exports:{}},Sve;function lCe(){if(Sve)return xN.exports;Sve=1;var e=Cu(),t=Vs().attributes,r=lc().dash,n=mM(),o=ws().overrideAll,s=qx(),a={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["Sets the range of this axis (in degrees),","sets the map's clipped coordinates."].join(" ")},showgrid:{valType:"boolean",dflt:!1,description:"Sets whether or not graticule are shown on the map."},tick0:{valType:"number",dflt:0,description:["Sets the graticule's starting tick longitude/latitude."].join(" ")},dtick:{valType:"number",description:["Sets the graticule's longitude/latitude tick step."].join(" ")},gridcolor:{valType:"color",dflt:e.lightLine,description:["Sets the graticule's stroke color."].join(" ")},gridwidth:{valType:"number",min:0,dflt:1,description:["Sets the graticule's stroke width (in px)."].join(" ")},griddash:r},f=xN.exports=o({domain:t({name:"geo"},{description:["Note that geo subplots are constrained by domain.","In general, when `projection.scale` is set to 1.","a map will fit either its x or y domain, but not both."].join(" ")}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot",description:["Determines if this subplot's view settings are auto-computed to fit trace data.","On scoped maps, setting `fitbounds` leads to `center.lon` and `center.lat` getting auto-filled.","On maps with a non-clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","and `projection.rotation.lon` getting auto-filled.","On maps with a clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","`projection.rotation.lon`, `projection.rotation.lat`, `lonaxis.range` and `lonaxis.range`","getting auto-filled.","If *locations*, only the trace's visible locations are considered in the `fitbounds` computations.","If *geojson*, the entire trace input `geojson` (if provided) is considered in the `fitbounds` computations,","Defaults to *false*."].join(" ")},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0,description:["Sets the resolution of the base layers.","The values have units of km/mm","e.g. 110 corresponds to a scale ratio of 1:110,000,000."].join(" ")},scope:{valType:"enumerated",values:s(n.scopeDefaults),dflt:"world",description:"Set the scope of the map."},projection:{type:{valType:"enumerated",values:s(n.projNames),description:"Sets the projection type."},rotation:{lon:{valType:"number",description:["Rotates the map along parallels","(in degrees East).","Defaults to the center of the `lonaxis.range` values."].join(" ")},lat:{valType:"number",description:["Rotates the map along meridians","(in degrees North)."].join(" ")},roll:{valType:"number",description:["Roll the map (in degrees)","For example, a roll of *180* makes the map appear upside down."].join(" ")}},tilt:{valType:"number",dflt:0,description:["For satellite projection type only.","Sets the tilt angle of perspective projection."].join(" ")},distance:{valType:"number",min:1.001,dflt:2,description:["For satellite projection type only.","Sets the distance from the center of the sphere to the point of view","as a proportion of the sphere’s radius."].join(" ")},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["For conic projection types only.","Sets the parallels (tangent, secant)","where the cone intersects the sphere."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Zooms in or out on the map view.","A scale of *1* corresponds to the largest zoom level","that fits the map's lon and lat ranges. "].join(" ")}},center:{lon:{valType:"number",description:["Sets the longitude of the map's center.","By default, the map's longitude center lies at the middle of the longitude range","for scoped projection and above `projection.rotation.lon` otherwise."].join(" ")},lat:{valType:"number",description:["Sets the latitude of the map's center.","For all projection types, the map's latitude center lies","at the middle of the latitude range by default."].join(" ")}},visible:{valType:"boolean",dflt:!0,description:"Sets the default visibility of the base layers."},showcoastlines:{valType:"boolean",description:"Sets whether or not the coastlines are drawn."},coastlinecolor:{valType:"color",dflt:e.defaultLine,description:"Sets the coastline color."},coastlinewidth:{valType:"number",min:0,dflt:1,description:"Sets the coastline stroke width (in px)."},showland:{valType:"boolean",dflt:!1,description:"Sets whether or not land masses are filled in color."},landcolor:{valType:"color",dflt:n.landColor,description:"Sets the land mass color."},showocean:{valType:"boolean",dflt:!1,description:"Sets whether or not oceans are filled in color."},oceancolor:{valType:"color",dflt:n.waterColor,description:"Sets the ocean color"},showlakes:{valType:"boolean",dflt:!1,description:"Sets whether or not lakes are drawn."},lakecolor:{valType:"color",dflt:n.waterColor,description:"Sets the color of the lakes."},showrivers:{valType:"boolean",dflt:!1,description:"Sets whether or not rivers are drawn."},rivercolor:{valType:"color",dflt:n.waterColor,description:"Sets color of the rivers."},riverwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the rivers."},showcountries:{valType:"boolean",description:"Sets whether or not country boundaries are drawn."},countrycolor:{valType:"color",dflt:e.defaultLine,description:"Sets line color of the country boundaries."},countrywidth:{valType:"number",min:0,dflt:1,description:"Sets line width (in px) of the country boundaries."},showsubunits:{valType:"boolean",description:["Sets whether or not boundaries of subunits within countries","(e.g. states, provinces) are drawn."].join(" ")},subunitcolor:{valType:"color",dflt:e.defaultLine,description:"Sets the color of the subunits boundaries."},subunitwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the subunits boundaries."},showframe:{valType:"boolean",description:"Sets whether or not a frame is drawn around the map."},framecolor:{valType:"color",dflt:e.defaultLine,description:"Sets the color the frame."},framewidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the frame."},bgcolor:{valType:"color",dflt:e.background,description:"Set the background color of the map"},lonaxis:a,lataxis:a},"plot","from-root");return f.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view","(projection and center). Defaults to `layout.uirevision`."].join(" ")},xN.exports}var bN,Mve;function RYe(){if(Mve)return bN;Mve=1;var e=rr(),t=Kx(),r=cc().getSubplotData,n=mM(),o=lCe(),s=n.axesNames;bN=function(i,l,u){t(i,l,u,{type:"geo",attributes:o,handleDefaults:a,fullData:u,partition:"y"})};function a(f,i,l,u){var c=r(u.fullData,"geo",u.id),h=c.map(function(G){return G._expandedIndex}),d=l("resolution"),v=l("scope"),p=n.scopeDefaults[v],m=l("projection.type",p.projType),y=i._isAlbersUsa=m==="albers usa";y&&(v=i.scope="usa");var b=i._isScoped=v!=="world",g=i._isSatellite=m==="satellite",T=i._isConic=m.indexOf("conic")!==-1||m==="albers",S=i._isClipped=!!n.lonaxisSpan[m];if(f.visible===!1){var A=e.extendDeep({},i._template);A.showcoastlines=!1,A.showcountries=!1,A.showframe=!1,A.showlakes=!1,A.showland=!1,A.showocean=!1,A.showrivers=!1,A.showsubunits=!1,A.lonaxis&&(A.lonaxis.showgrid=!1),A.lataxis&&(A.lataxis.showgrid=!1),i._template=A}for(var M=l("visible"),w,C=0;C0&&P<0&&(P+=360);var B=(q+P)/2,$;if(!y){var Q=b?p.projRotate:[B,0,0];$=l("projection.rotation.lon",Q[0]),l("projection.rotation.lat",Q[1]),l("projection.rotation.roll",Q[2]),w=l("showcoastlines",!b&&M),w&&(l("coastlinecolor"),l("coastlinewidth")),w=l("showocean",M?void 0:!1),w&&l("oceancolor")}var J,ne;if(y?(J=-96.6,ne=38.7):(J=b?B:$,ne=(N[0]+N[1])/2),l("center.lon",J),l("center.lat",ne),g&&(l("projection.tilt"),l("projection.distance")),T){var te=p.projParallels||[0,60];l("projection.parallels",te)}l("projection.scale"),w=l("showland",M?void 0:!1),w&&l("landcolor"),w=l("showlakes",M?void 0:!1),w&&l("lakecolor"),w=l("showrivers",M?void 0:!1),w&&(l("rivercolor"),l("riverwidth")),w=l("showcountries",b&&v!=="usa"&&M),w&&(l("countrycolor"),l("countrywidth")),(v==="usa"||v==="north america"&&d===50)&&(l("showsubunits",M),l("subunitcolor"),l("subunitwidth")),b||(w=l("showframe",M),w&&(l("framecolor"),l("framewidth"))),l("bgcolor");var Z=l("fitbounds");Z&&(delete i.projection.scale,b?(delete i.center.lon,delete i.center.lat):S?(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon,delete i.projection.rotation.lat,delete i.lonaxis.range,delete i.lataxis.range):(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon))}return bN}var _N,Eve;function uCe(){if(Eve)return _N;Eve=1;var e=cc().getSubplotCalcData,t=rr().counterRegex,r=CYe(),n="geo",o=t(n),s={};s[n]={valType:"subplotid",dflt:n,editType:"calc",description:["Sets a reference between this trace's geospatial coordinates and","a geographic map.","If *geo* (the default value), the geospatial coordinates refer to","`layout.geo`.","If *geo2*, the geospatial coordinates refer to `layout.geo2`,","and so on."].join(" ")};function a(l){for(var u=l._fullLayout,c=l.calcdata,h=u._subplots[n],d=0;d")}}return CN}var RN,Fve;function hCe(){return Fve||(Fve=1,RN=function(t,r,n,o,s){t.location=r.location,t.z=r.z;var a=o[s];return a.fIn&&a.fIn.properties&&(t.properties=a.fIn.properties),t.ct=a.ct,t}),RN}var LN,Nve;function dCe(){return Nve||(Nve=1,LN=function(t,r){var n=t.cd,o=t.xaxis,s=t.yaxis,a=[],f,i,l,u,c;if(r===!1)for(f=0;f=Math.min(P,B)&&m<=Math.max(P,B)?0:1/0}if(E=Math.min($,Q)&&y<=Math.max($,Q)?0:1/0}D=Math.sqrt(E*E+I*I),C=g[k]}}}else for(k=g.length-1;k>-1;k--)w=g[k],x=v[w],_=p[w],E=h.c2p(x)-m,I=d.c2p(_)-y,F=Math.sqrt(E*E+I*I),F100},ZT.isDotSymbol=function(t){return typeof t=="string"?e.DOT_RE.test(t):t>200},ZT}var FN,Vve;function zYe(){if(Vve)return FN;Vve=1;var e=rr(),t=ga(),r=PX(),n=NM(),o=ig(),s=As(),a=I2(),f=g0(),i=gp(),l=y0(),u=sg(),c=m0();return FN=function(d,v,p,m){function y(C,x){return e.coerce(d,v,n,C,x)}var b=d.marker?r.isOpenSymbol(d.marker.symbol):!1,g=s.isBubble(d),T=a(d,v,m,y);if(!T){v.visible=!1;return}f(d,v,m,y),y("xhoverformat"),y("yhoverformat");var S=T>>1,d=a[h],v=i!==void 0?i(d,f):d-f;v>=0?(c=h,u=h-1):l=h+1}return c}function t(a,f,i,l,u){for(var c=u+1;l<=u;){var h=l+u>>>1,d=a[h],v=i!==void 0?i(d,f):d-f;v>0?(c=h,u=h-1):l=h+1}return c}function r(a,f,i,l,u){for(var c=l-1;l<=u;){var h=l+u>>>1,d=a[h],v=i!==void 0?i(d,f):d-f;v<0?(c=h,l=h+1):u=h-1}return c}function n(a,f,i,l,u){for(var c=l-1;l<=u;){var h=l+u>>>1,d=a[h],v=i!==void 0?i(d,f):d-f;v<=0?(c=h,l=h+1):u=h-1}return c}function o(a,f,i,l,u){for(;l<=u;){var c=l+u>>>1,h=a[c],d=i!==void 0?i(h,f):h-f;if(d===0)return c;d<=0?l=c+1:u=c-1}return-1}function s(a,f,i,l,u,c){return typeof i=="function"?c(a,f,i,l===void 0?0:l|0,u===void 0?a.length-1:u|0):c(a,f,void 0,i===void 0?0:i|0,l===void 0?a.length-1:l|0)}return BN={ge:function(a,f,i,l,u){return s(a,f,i,l,u,e)},gt:function(a,f,i,l,u){return s(a,f,i,l,u,t)},lt:function(a,f,i,l,u){return s(a,f,i,l,u,r)},le:function(a,f,i,l,u){return s(a,f,i,l,u,n)},eq:function(a,f,i,l,u){return s(a,f,i,l,u,o)}},BN}var qN,Wve;function cg(){if(Wve)return qN;Wve=1,qN=function(n,o,s){var a={},f,i;if(typeof o=="string"&&(o=t(o)),Array.isArray(o)){var l={};for(i=0;i1&&(r=arguments),typeof r=="string"?r=r.split(/\s/).map(parseFloat):typeof r=="number"&&(r=[r]),r.length&&typeof r[0]=="number"?r.length===1?n={width:r[0],height:r[0],x:0,y:0}:r.length===2?n={width:r[0],height:r[1],x:0,y:0}:n={x:r[0],y:r[1],width:r[2]-r[0]||0,height:r[3]-r[1]||0}:r&&(r=e(r,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),n={x:r.left||0,y:r.top||0},r.width==null?r.right?n.width=r.right-n.x:n.width=0:n.width=r.width,r.height==null?r.bottom?n.height=r.bottom-n.y:n.height=0:n.height=r.height),n}return jN}var UN,Zve;function fb(){if(Zve)return UN;Zve=1,UN=e;function e(t,r){if(!t||t.length==null)throw Error("Argument should be an array");r==null?r=1:r=Math.floor(r);for(var n=Array(r*2),o=0;os&&(s=t[f]),t[f]>>1,g;v.dtype||(v.dtype="array"),typeof v.dtype=="string"?g=new(i(v.dtype))(b):v.dtype&&(g=v.dtype,Array.isArray(g)&&(g.length=b));for(let E=0;Ep||N>u){for(let Y=0;Yle||B>oe||$=J||X===ee)return;let fe=T[K];ee===void 0&&(ee=fe.length);for(let Le=X;Le=D&&qe<=N&&We>=z&&We<=q&&ne.push(Fe)}let de=S[K],_e=de[X*4+0],we=de[X*4+1],Oe=de[X*4+2],be=de[X*4+3],Te=Z(de,X+1),ke=Y*.5,Ee=K+1;te(G,j,ke,Ee,_e,we||Oe||be||Te),te(G,j+ke,ke,Ee,we,Oe||be||Te),te(G+ke,j,ke,Ee,Oe,be||Te),te(G+ke,j+ke,ke,Ee,be,Te)}function Z(G,j){let Y=null,K=0;for(;Y===null;)if(Y=G[j*4+K],K++,K>G.length)return null;return Y}return ne}function _(E,I,F,D,z){let N=[];for(let q=0;q1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)},GYe=function(t,r,n,o,s,a,f,i,l,u,c,h){var d=Math.pow(s,2),v=Math.pow(a,2),p=Math.pow(c,2),m=Math.pow(h,2),y=d*v-d*m-v*p;y<0&&(y=0),y/=d*m+v*p,y=Math.sqrt(y)*(f===i?-1:1);var b=y*s/a*h,g=y*-a/s*c,T=u*b-l*g+(t+n)/2,S=l*b+u*g+(r+o)/2,A=(c-b)/s,M=(h-g)/a,w=(-c-b)/s,C=(-h-g)/a,x=npe(1,0,A,M),_=npe(A,M,w,C);return i===0&&_>0&&(_-=K_),i===1&&_<0&&(_+=K_),[T,S,x,_]},VYe=function(t){var r=t.px,n=t.py,o=t.cx,s=t.cy,a=t.rx,f=t.ry,i=t.xAxisRotation,l=i===void 0?0:i,u=t.largeArcFlag,c=u===void 0?0:u,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(a===0||f===0)return[];var p=Math.sin(l*K_/360),m=Math.cos(l*K_/360),y=m*(r-o)/2+p*(n-s)/2,b=-p*(r-o)/2+m*(n-s)/2;if(y===0&&b===0)return[];a=Math.abs(a),f=Math.abs(f);var g=Math.pow(y,2)/Math.pow(a,2)+Math.pow(b,2)/Math.pow(f,2);g>1&&(a*=Math.sqrt(g),f*=Math.sqrt(g));var T=GYe(r,n,o,s,a,f,c,d,p,m,y,b),S=UYe(T,4),A=S[0],M=S[1],w=S[2],C=S[3],x=Math.abs(C)/(K_/4);Math.abs(1-x)<1e-7&&(x=1);var _=Math.max(Math.ceil(x),1);C/=_;for(var k=0;k<_;k++)v.push(HYe(w,C)),w+=C;return v.map(function(E){var I=XN(E[0],a,f,m,p,A,M),F=I.x,D=I.y,z=XN(E[1],a,f,m,p,A,M),N=z.x,q=z.y,P=XN(E[2],a,f,m,p,A,M),B=P.x,$=P.y;return{x1:F,y1:D,x2:N,y2:q,x:B,y:$}})};const YYe=Object.freeze(Object.defineProperty({__proto__:null,default:VYe},Symbol.toStringTag,{value:"Module"})),$Ye=$d(YYe);var ZN,ape;function WYe(){if(ape)return ZN;ape=1,ZN=t;var e=$Ye;function t(o){for(var s,a=[],f=0,i=0,l=0,u=0,c=null,h=null,d=0,v=0,p=0,m=o.length;p4?(f=y[y.length-4],i=y[y.length-3]):(f=d,i=v),a.push(y)}return a}function r(o,s,a,f){return["C",o,s,a,f,a,f]}function n(o,s,a,f,i,l){return["C",o/3+2/3*a,s/3+2/3*f,i/3+2/3*a,l/3+2/3*f,i,l]}return ZN}var KN,ipe;function pCe(){return ipe||(ipe=1,KN=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}),KN}var JN,ope;function XYe(){if(ope)return JN;ope=1;var e=OS(),t=vCe(),r=WYe(),n=pCe();JN=o;function o(s){if(Array.isArray(s)&&s.length===1&&typeof s[0]=="string"&&(s=s[0]),typeof s=="string"){if(!n(s))throw Error("String is not an SVG path.");s=e(s)}if(!Array.isArray(s))throw Error("Argument should be a string or an array of path segments.");if(s=t(s),s=r(s),!s.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],f=0,i=s.length;fa[2]&&(a[2]=l[u+0]),l[u+1]>a[3]&&(a[3]=l[u+1]);return a}return JN}var QN,spe;function ZYe(){if(spe)return QN;spe=1;var e=Math.PI,t=f(120);QN=r;function r(i){for(var l,u=[],c=0,h=0,d=0,v=0,p=null,m=null,y=0,b=0,g=0,T=i.length;g7&&(u.push(S.splice(0,7)),S.unshift("C"));break;case"S":var M=y,w=b;(l=="C"||l=="S")&&(M+=M-c,w+=w-h),S=["C",M,w,S[1],S[2],S[3],S[4]];break;case"T":l=="Q"||l=="T"?(p=y*2-p,m=b*2-m):(p=y,m=b),S=o(y,b,p,m,S[1],S[2]);break;case"Q":p=S[1],m=S[2],S=o(y,b,S[1],S[2],S[3],S[4]);break;case"L":S=n(y,b,S[1],S[2]);break;case"H":S=n(y,b,S[1],b);break;case"V":S=n(y,b,y,S[1]);break;case"Z":S=n(y,b,d,v);break}l=A,y=S[S.length-2],b=S[S.length-1],S.length>4?(c=S[S.length-4],h=S[S.length-3]):(c=y,h=b),u.push(S)}return u}function n(i,l,u,c){return["C",i,l,u,c,u,c]}function o(i,l,u,c,h,d){return["C",i/3+2/3*u,l/3+2/3*c,h/3+2/3*u,d/3+2/3*c,h,d]}function s(i,l,u,c,h,d,v,p,m,y){if(y)_=y[0],k=y[1],C=y[2],x=y[3];else{var b=a(i,l,-h);i=b.x,l=b.y,b=a(p,m,-h),p=b.x,m=b.y;var g=(i-p)/2,T=(l-m)/2,S=g*g/(u*u)+T*T/(c*c);S>1&&(S=Math.sqrt(S),u=S*u,c=S*c);var A=u*u,M=c*c,w=(d==v?-1:1)*Math.sqrt(Math.abs((A*M-A*T*T-M*g*g)/(A*T*T+M*g*g)));w==1/0&&(w=1);var C=w*u*T/c+(i+p)/2,x=w*-c*g/u+(l+m)/2,_=Math.asin(((l-x)/c).toFixed(9)),k=Math.asin(((m-x)/c).toFixed(9));_=ik&&(_=_-e*2),!v&&k>_&&(k=k-e*2)}if(Math.abs(k-_)>t){var E=k,I=p,F=m;k=_+t*(v&&k>_?1:-1),p=C+u*Math.cos(k),m=x+c*Math.sin(k);var D=s(p,m,u,c,h,0,v,I,F,[k,E,C,x])}var z=Math.tan((k-_)/4),N=4/3*u*z,q=4/3*c*z,P=[2*i-(i+N*Math.sin(_)),2*l-(l-q*Math.cos(_)),p+N*Math.sin(k),m-q*Math.cos(k),p,m];if(y)return P;D&&(P=P.concat(D));for(var B=0;B0?a.strokeStyle="white":a.strokeStyle="black",a.lineWidth=Math.abs(p)),a.translate(h*.5,d*.5),a.scale(b,b),l()){var g=new Path2D(u);a.fill(g),p&&a.stroke(g)}else{var T=t(u);r(a,T),a.fill(),p&&a.stroke()}a.setTransform(1,0,0,1,0,0);var S=o(a,{cutoff:c.cutoff!=null?c.cutoff:.5,radius:c.radius!=null?c.radius:v*.5});return S}var i;function l(){if(i!=null)return i;var u=document.createElement("canvas").getContext("2d");if(u.canvas.width=u.canvas.height=1,!window.Path2D)return i=!1;var c=new Path2D("M0,0h1v1h-1v-1Z");u.fillStyle="black",u.fill(c);var h=u.getImageData(0,0,1,1);return i=h&&h.data&&h.data[3]===255}return rB}var nB,cpe;function kx(){if(cpe)return nB;cpe=1;var e=Ua(),t=QYe(),r=Gm(),n=ga(),o=rr(),s=o.isArrayOrTypedArray,a=Ba(),f=xl(),i=dy().formatColor,l=As(),u=IS(),c=PX(),h=$m(),d=Pm().DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=Wd().appendArrayPointValue;function m(F,D){var z,N={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},q=F._context.plotGlPixelRatio;if(D.visible!==!0)return N;if(l.hasText(D)&&(N.text=y(F,D),N.textSel=T(F,D,D.selected),N.textUnsel=T(F,D,D.unselected)),l.hasMarkers(D)&&(N.marker=b(F,D),N.markerSel=g(F,D,D.selected),N.markerUnsel=g(F,D,D.unselected),!D.unselected&&s(D.marker.opacity))){var P=D.marker.opacity;for(N.markerUnsel.opacity=new Array(P.length),z=0;zh.TOO_MANY_POINTS||l.hasMarkers(D)?"rect":"round";if(J&&D.connectgaps){var te=P[0],Z=P[1];for(B=0;B1?Q[B]:Q[0]:Q,G=s(J)?J.length>1?J[B]:J[0]:J,j=v[Z],Y=v[G],K=ne?ne/.8+1:0,X=-Y*K-Y*.5;P.offset[B]=[j*K/te,X/te]}}return P}return nB={style:m,markerStyle:b,markerSelection:g,linePositions:k,errorBarPositions:E,textPosition:I},nB}var aB,hpe;function gCe(){if(hpe)return aB;hpe=1;var e=rr();return aB=function(r,n){var o=n._scene,s={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return n._scene||(o=n._scene={},o.init=function(){e.extendFlat(o,a,s)},o.init(),o.update=function(i){var l=e.repeat(i,o.count);if(o.fill2d&&o.fill2d.update(l),o.scatter2d&&o.scatter2d.update(l),o.line2d&&o.line2d.update(l),o.error2d&&o.error2d.update(l.concat(l)),o.select2d&&o.select2d.update(l),o.glText)for(var u=0;u=d,C=M*2,x={},_,k=T.makeCalcdata(b,"x"),E=S.makeCalcdata(b,"y"),I=o(b,T,"x",k),F=o(b,S,"y",E),D=I.vals,z=F.vals;b._x=D,b._y=z,b.xperiodalignment&&(b._origX=k,b._xStarts=I.starts,b._xEnds=I.ends),b.yperiodalignment&&(b._origY=E,b._yStarts=F.starts,b._yEnds=F.ends);var N=new Array(C),q=new Array(M);for(_=0;_1&&t.extendFlat(A.line,u.linePositions(m,b,g)),A.errorX||A.errorY){var M=u.errorBarPositions(m,b,g,T,S);A.errorX&&t.extendFlat(A.errorX,M.x),A.errorY&&t.extendFlat(A.errorY,M.y)}return A.text&&(t.extendFlat(A.text,{positions:g},u.textPosition(m,b,A.text,A.marker)),t.extendFlat(A.textSel,{positions:g},u.textPosition(m,b,A.text,A.markerSel)),t.extendFlat(A.textUnsel,{positions:g},u.textPosition(m,b,A.text,A.markerUnsel))),A}return iB}var oB,vpe;function yCe(){if(vpe)return oB;vpe=1;var e=rr(),t=va(),r=Pm().DESELECTDIM;function n(o){var s=o[0],a=s.trace,f=s.t,i=f._scene,l=f.index,u=i.selectBatch[l],c=i.unselectBatch[l],h=i.textOptions[l],d=i.textSelectedOptions[l]||{},v=i.textUnselectedOptions[l]||{},p=e.extendFlat({},h),m,y;if(u.length||c.length){var b=d.color,g=v.color,T=h.color,S=e.isArrayOrTypedArray(T);for(p.color=new Array(a._length),m=0;m>>24,a=(n&16711680)>>>16,f=(n&65280)>>>8,i=n&255;return o===!1?[s,a,f,i]:[s/255,a/255,f/255,i/255]}return g_.exports}/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var fB,mpe;function Eu(){if(mpe)return fB;mpe=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},f=0;f<10;f++)a["_"+String.fromCharCode(f)]=f;var i=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(i.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return fB=o()?Object.assign:function(s,a){for(var f,i=n(s),l,u=1;ux.length)&&(_=x.length);for(var k=0,E=new Array(_);k<_;k++)E[k]=x[k];return E}function i(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=Gm(),c=fb(),h=r$e(),d=DX(),v=Eu(),p=n$e(),m=cg(),y=xCe(),b=cb(),g=a$e(),T=IX(),S=rw(),A=M;function M(x,_){var k=this;if(!(this instanceof M))return new M(x,_);typeof x=="function"?(_||(_={}),_.regl=x):(_=x,x=null),_&&_.length&&(_.positions=_),x=_.regl;var E=x._gl,I,F=[],D={},z=[],N=[null],q=[null],P=255,B=100;this.tooManyColors=g,I=x.texture({data:new Uint8Array(P*4),width:P,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),v(this,{regl:x,gl:E,groups:z,markerCache:q,markerTextures:N,palette:F,paletteIds:D,paletteTexture:I,maxColors:P,maxSize:B,canvas:E.canvas}),this.update(_);var $={uniforms:{constPointSize:!!_.constPointSize,opacity:x.prop("opacity"),paletteSize:function(te,Z){return[k.tooManyColors?0:P,I.height]},pixelRatio:x.context("pixelRatio"),scale:x.prop("scale"),scaleFract:x.prop("scaleFract"),translate:x.prop("translate"),translateFract:x.prop("translateFract"),markerTexture:x.prop("markerTexture"),paletteTexture:I},attributes:{x:function(te,Z){return Z.xAttr||{buffer:Z.positionBuffer,stride:8,offset:0}},y:function(te,Z){return Z.yAttr||{buffer:Z.positionBuffer,stride:8,offset:4}},xFract:function(te,Z){return Z.xAttr?{constant:[0,0]}:{buffer:Z.positionFractBuffer,stride:8,offset:0}},yFract:function(te,Z){return Z.yAttr?{constant:[0,0]}:{buffer:Z.positionFractBuffer,stride:8,offset:4}},size:function(te,Z){return Z.size.length?{buffer:Z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(Z.size*255/k.maxSize)]}},borderSize:function(te,Z){return Z.borderSize.length?{buffer:Z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(Z.borderSize*255/k.maxSize)]}},colorId:function(te,Z){return Z.color.length?{buffer:Z.colorBuffer,stride:k.tooManyColors?8:4,offset:0}:{constant:k.tooManyColors?F.slice(Z.color*4,Z.color*4+4):[Z.color]}},borderColorId:function(te,Z){return Z.borderColor.length?{buffer:Z.colorBuffer,stride:k.tooManyColors?8:4,offset:k.tooManyColors?4:2}:{constant:k.tooManyColors?F.slice(Z.borderColor*4,Z.borderColor*4+4):[Z.borderColor]}},isActive:function(te,Z){return Z.activation===!0?{constant:[1]}:Z.activation?Z.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:x.prop("viewport")},viewport:x.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:x.prop("elements"),count:x.prop("count"),offset:x.prop("offset"),primitive:"points"},Q=v({},$);Q.frag=p([`precision highp float; +#define GLSLIFY 1 + +uniform float opacity; +uniform sampler2D markerTexture; + +varying vec4 fragColor, fragBorderColor; +varying float fragWidth, fragBorderColorLevel, fragColorLevel; + +float smoothStep(float x, float y) { + return 1.0 / (1.0 + exp(50.0*(x - y))); +} + +void main() { + float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth; + + // max-distance alpha + if (dist < 0.003) discard; + + // null-border case + if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) { + float colorAmt = smoothstep(.5 - delta, .5 + delta, dist); + gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity); + } + else { + float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist); + float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist); + + vec4 color = fragBorderColor; + color.a *= borderColorAmt; + color = mix(color, fragColor, colorAmt); + color.a *= opacity; + + gl_FragColor = color; + } + +} +`]),Q.vert=p([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 scale, scaleFract, translate, translateFract, paletteSize; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; +const float borderLevel = .5; + +varying vec4 fragColor, fragBorderColor; +varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = 2. * size * pointSizeScale; + fragPointSize = size * pixelRatio; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragColor = color; + fragBorderColor = borderColor; + fragWidth = 1. / gl_PointSize; + + fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); + fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); +} +`]),this.drawMarker=x(Q);var J=v({},$);J.frag=p([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +uniform float opacity; + +float smoothStep(float edge0, float edge1, float x) { + float t; + t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); +} + +void main() { + float radius, alpha = 1.0, delta = fragWidth; + + radius = length(2.0 * gl_PointCoord.xy - 1.0); + + if (radius > 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),J.vert=p([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),g&&(J.frag=J.frag.replace("smoothstep","smoothStep"),Q.frag=Q.frag.replace("smoothstep","smoothStep")),this.drawCircle=x(J)}M.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},M.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},M.prototype.draw=function(){for(var x=this,_=arguments.length,k=new Array(_),E=0;E<_;E++)k[E]=arguments[E];var I=this.groups;if(k.length===1&&Array.isArray(k[0])&&(k[0][0]===null||Array.isArray(k[0][0]))&&(k=k[0]),this.regl._refresh(),k.length)for(var F=0;FFe)?Ee.tree=d(ke,{bounds:me}):Fe&&Fe.length&&(Ee.tree=Fe),Ee.tree){var Ce={primitive:"points",usage:"static",data:Ee.tree,type:"uint32"};Ee.elements?Ee.elements(Ce):Ee.elements=D.elements(Ce)}var et=T.float32(ke);qe({data:et,usage:"dynamic"});var st=T.fract32(ke,et);return We({data:st,usage:"dynamic"}),Qe({data:new Uint8Array(De),type:"uint8",usage:"stream"}),ke}},{marker:function(ke,Ee,Le){var Fe=Ee.activation;if(Fe.forEach(function(st){return st&&st.destroy&&st.destroy()}),Fe.length=0,!ke||typeof ke[0]=="number"){var qe=x.addMarker(ke);Fe[qe]=!0}else{for(var We=[],Qe=0,De=Math.min(ke.length,Ee.count);Qe=0)return I;var F;if(x instanceof Uint8Array||x instanceof Uint8ClampedArray)F=x;else{F=new Uint8Array(x.length);for(var D=0,z=x.length;DE*4&&(this.tooManyColors=!0),this.updatePalette(k),I.length===1?I[0]:I},M.prototype.updatePalette=function(x){if(!this.tooManyColors){var _=this.maxColors,k=this.paletteTexture,E=Math.ceil(x.length*.25/_);if(E>1){x=x.slice();for(var I=x.length*.25%_;I80*N){Q=ne=D[0],J=te=D[1];for(var Y=N;Yne&&(ne=Z),G>te&&(te=G);j=Math.max(ne-Q,te-J),j=j!==0?32767/j:0}return n(B,$,N,Q,J,j,0),$}function t(D,z,N,q,P){var B,$;if(P===F(D,z,N,q)>0)for(B=z;B=z;B-=q)$=k(B,D[B],D[B+1],$);return $&&T($,$.next)&&(E($),$=$.next),$}function r(D,z){if(!D)return D;z||(z=D);var N=D,q;do if(q=!1,!N.steiner&&(T(N,N.next)||g(N.prev,N,N.next)===0)){if(E(N),N=z=N.prev,N===N.next)break;q=!0}else N=N.next;while(q||N!==z);return z}function n(D,z,N,q,P,B,$){if(D){!$&&B&&d(D,q,P,B);for(var Q=D,J,ne;D.prev!==D.next;){if(J=D.prev,ne=D.next,B?s(D,q,P,B):o(D)){z.push(J.i/N|0),z.push(D.i/N|0),z.push(ne.i/N|0),E(D),D=ne.next,Q=ne.next;continue}if(D=ne,D===Q){$?$===1?(D=a(r(D),z,N),n(D,z,N,q,P,B,2)):$===2&&f(D,z,N,q,P,B):n(r(D),z,N,q,P,B,1);break}}}}function o(D){var z=D.prev,N=D,q=D.next;if(g(z,N,q)>=0)return!1;for(var P=z.x,B=N.x,$=q.x,Q=z.y,J=N.y,ne=q.y,te=PB?P>$?P:$:B>$?B:$,j=Q>J?Q>ne?Q:ne:J>ne?J:ne,Y=q.next;Y!==z;){if(Y.x>=te&&Y.x<=G&&Y.y>=Z&&Y.y<=j&&y(P,Q,B,J,$,ne,Y.x,Y.y)&&g(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function s(D,z,N,q){var P=D.prev,B=D,$=D.next;if(g(P,B,$)>=0)return!1;for(var Q=P.x,J=B.x,ne=$.x,te=P.y,Z=B.y,G=$.y,j=QJ?Q>ne?Q:ne:J>ne?J:ne,X=te>Z?te>G?te:G:Z>G?Z:G,ee=p(j,Y,z,N,q),le=p(K,X,z,N,q),oe=D.prevZ,fe=D.nextZ;oe&&oe.z>=ee&&fe&&fe.z<=le;){if(oe.x>=j&&oe.x<=K&&oe.y>=Y&&oe.y<=X&&oe!==P&&oe!==$&&y(Q,te,J,Z,ne,G,oe.x,oe.y)&&g(oe.prev,oe,oe.next)>=0||(oe=oe.prevZ,fe.x>=j&&fe.x<=K&&fe.y>=Y&&fe.y<=X&&fe!==P&&fe!==$&&y(Q,te,J,Z,ne,G,fe.x,fe.y)&&g(fe.prev,fe,fe.next)>=0))return!1;fe=fe.nextZ}for(;oe&&oe.z>=ee;){if(oe.x>=j&&oe.x<=K&&oe.y>=Y&&oe.y<=X&&oe!==P&&oe!==$&&y(Q,te,J,Z,ne,G,oe.x,oe.y)&&g(oe.prev,oe,oe.next)>=0)return!1;oe=oe.prevZ}for(;fe&&fe.z<=le;){if(fe.x>=j&&fe.x<=K&&fe.y>=Y&&fe.y<=X&&fe!==P&&fe!==$&&y(Q,te,J,Z,ne,G,fe.x,fe.y)&&g(fe.prev,fe,fe.next)>=0)return!1;fe=fe.nextZ}return!0}function a(D,z,N){var q=D;do{var P=q.prev,B=q.next.next;!T(P,B)&&S(P,q,q.next,B)&&C(P,B)&&C(B,P)&&(z.push(P.i/N|0),z.push(q.i/N|0),z.push(B.i/N|0),E(q),E(q.next),q=D=B),q=q.next}while(q!==D);return r(q)}function f(D,z,N,q,P,B){var $=D;do{for(var Q=$.next.next;Q!==$.prev;){if($.i!==Q.i&&b($,Q)){var J=_($,Q);$=r($,$.next),J=r(J,J.next),n($,z,N,q,P,B,0),n(J,z,N,q,P,B,0);return}Q=Q.next}$=$.next}while($!==D)}function i(D,z,N,q){var P=[],B,$,Q,J,ne;for(B=0,$=z.length;B<$;B++)Q=z[B]*q,J=B<$-1?z[B+1]*q:D.length,ne=t(D,Q,J,q,!1),ne===ne.next&&(ne.steiner=!0),P.push(m(ne));for(P.sort(l),B=0;B=N.next.y&&N.next.y!==N.y){var Q=N.x+(P-N.y)*(N.next.x-N.x)/(N.next.y-N.y);if(Q<=q&&Q>B&&(B=Q,$=N.x=N.x&&N.x>=ne&&q!==N.x&&y(P$.x||N.x===$.x&&h($,N)))&&($=N,Z=G)),N=N.next;while(N!==J);return $}function h(D,z){return g(D.prev,D,z.prev)<0&&g(z.next,D,D.next)<0}function d(D,z,N,q){var P=D;do P.z===0&&(P.z=p(P.x,P.y,z,N,q)),P.prevZ=P.prev,P.nextZ=P.next,P=P.next;while(P!==D);P.prevZ.nextZ=null,P.prevZ=null,v(P)}function v(D){var z,N,q,P,B,$,Q,J,ne=1;do{for(N=D,D=null,B=null,$=0;N;){for($++,q=N,Q=0,z=0;z0||J>0&&q;)Q!==0&&(J===0||!q||N.z<=q.z)?(P=N,N=N.nextZ,Q--):(P=q,q=q.nextZ,J--),B?B.nextZ=P:D=P,P.prevZ=B,B=P;N=q}B.nextZ=null,ne*=2}while($>1);return D}function p(D,z,N,q,P){return D=(D-N)*P|0,z=(z-q)*P|0,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,D|z<<1}function m(D){var z=D,N=D;do(z.x=(D-$)*(B-Q)&&(D-$)*(q-Q)>=(N-$)*(z-Q)&&(N-$)*(B-Q)>=(P-$)*(q-Q)}function b(D,z){return D.next.i!==z.i&&D.prev.i!==z.i&&!w(D,z)&&(C(D,z)&&C(z,D)&&x(D,z)&&(g(D.prev,D,z.prev)||g(D,z.prev,z))||T(D,z)&&g(D.prev,D,D.next)>0&&g(z.prev,z,z.next)>0)}function g(D,z,N){return(z.y-D.y)*(N.x-z.x)-(z.x-D.x)*(N.y-z.y)}function T(D,z){return D.x===z.x&&D.y===z.y}function S(D,z,N,q){var P=M(g(D,z,N)),B=M(g(D,z,q)),$=M(g(N,q,D)),Q=M(g(N,q,z));return!!(P!==B&&$!==Q||P===0&&A(D,N,z)||B===0&&A(D,q,z)||$===0&&A(N,D,q)||Q===0&&A(N,z,q))}function A(D,z,N){return z.x<=Math.max(D.x,N.x)&&z.x>=Math.min(D.x,N.x)&&z.y<=Math.max(D.y,N.y)&&z.y>=Math.min(D.y,N.y)}function M(D){return D>0?1:D<0?-1:0}function w(D,z){var N=D;do{if(N.i!==D.i&&N.next.i!==D.i&&N.i!==z.i&&N.next.i!==z.i&&S(N,N.next,D,z))return!0;N=N.next}while(N!==D);return!1}function C(D,z){return g(D.prev,D,D.next)<0?g(D,z,D.next)>=0&&g(D,D.prev,z)>=0:g(D,z,D.prev)<0||g(D,D.next,z)<0}function x(D,z){var N=D,q=!1,P=(D.x+z.x)/2,B=(D.y+z.y)/2;do N.y>B!=N.next.y>B&&N.next.y!==N.y&&P<(N.next.x-N.x)*(B-N.y)/(N.next.y-N.y)+N.x&&(q=!q),N=N.next;while(N!==D);return q}function _(D,z){var N=new I(D.i,D.x,D.y),q=new I(z.i,z.x,z.y),P=D.next,B=z.prev;return D.next=z,z.prev=D,N.next=P,P.prev=N,q.next=N,N.prev=q,B.next=q,q.prev=B,q}function k(D,z,N,q){var P=new I(D,z,N);return q?(P.next=q.next,P.prev=q,q.next.prev=P,q.next=P):(P.prev=P,P.next=P),P}function E(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function I(D,z,N){this.i=D,this.x=z,this.y=N,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}e.deviation=function(D,z,N,q){var P=z&&z.length,B=P?z[0]*N:D.length,$=Math.abs(F(D,0,B,N));if(P)for(var Q=0,J=z.length;Q0&&(q+=D[P-1].length,N.holes.push(q))}return N},KT.exports}var pB,Spe;function o$e(){if(Spe)return pB;Spe=1;var e=fb();pB=t;function t(r,n,o){if(!r||r.length==null)throw Error("Argument should be an array");n==null&&(n=1),o==null&&(o=e(r,n));for(var s=0;s-1},jB}var UB,Kpe;function ECe(){return Kpe||(Kpe=1,UB=x$e()()?String.prototype.contains:b$e()),UB}var Jpe;function my(){if(Jpe)return EB.exports;Jpe=1;var e=hb(),t=SCe(),r=zX(),n=MCe(),o=ECe(),s=EB.exports=function(a,f){var i,l,u,c,h;return arguments.length<2||typeof a!="string"?(c=f,f=a,a=null):c=arguments[2],e(a)?(i=o.call(a,"c"),l=o.call(a,"e"),u=o.call(a,"w")):(i=u=!0,l=!1),h={value:f,configurable:i,enumerable:l,writable:u},c?r(n(c),h):h};return s.gs=function(a,f,i){var l,u,c,h;return typeof a!="string"?(c=i,i=f,f=a,a=null):c=arguments[3],e(f)?t(f)?e(i)?t(i)||(c=i,i=void 0):i=void 0:(c=f,f=i=void 0):f=void 0,e(a)?(l=o.call(a,"c"),u=o.call(a,"e")):(l=!0,u=!1),h={get:f,set:i,configurable:l,enumerable:u},c?r(n(c),h):h},EB.exports}var HB,Qpe;function BM(){if(Qpe)return HB;Qpe=1;var e=Object.prototype.toString,t=e.call((function(){return arguments})());return HB=function(r){return e.call(r)===t},HB}var GB,e0e;function qM(){if(e0e)return GB;e0e=1;var e=Object.prototype.toString,t=e.call("");return GB=function(r){return typeof r=="string"||r&&typeof r=="object"&&(r instanceof String||e.call(r)===t)||!1},GB}var VB={exports:{}},YB,t0e;function _$e(){return t0e||(t0e=1,YB=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}),YB}var $B,r0e;function w$e(){if(r0e)return $B;r0e=1;var e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};return $B=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}})(),$B}var WB,n0e;function jM(){return n0e||(n0e=1,WB=_$e()()?globalThis:w$e()),WB}var XB,a0e;function T$e(){if(a0e)return XB;a0e=1;var e=jM(),t={object:!0,symbol:!0};return XB=function(){var r=e.Symbol,n;if(typeof r!="function")return!1;n=r("test symbol");try{String(n)}catch{return!1}return!(!t[typeof r.iterator]||!t[typeof r.toPrimitive]||!t[typeof r.toStringTag])},XB}var ZB,i0e;function A$e(){return i0e||(i0e=1,ZB=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}),ZB}var KB,o0e;function kCe(){if(o0e)return KB;o0e=1;var e=A$e();return KB=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t},KB}var JB,s0e;function S$e(){if(s0e)return JB;s0e=1;var e=my(),t=Object.create,r=Object.defineProperty,n=Object.prototype,o=t(null);return JB=function(s){for(var a=0,f,i;o[s+(a||"")];)++a;return s+=a||"",o[s]=!0,f="@@"+s,r(n,f,e.gs(null,function(l){i||(i=!0,r(this,f,e(l)),i=!1)})),f},JB}var QB,l0e;function M$e(){if(l0e)return QB;l0e=1;var e=my(),t=jM().Symbol;return QB=function(r){return Object.defineProperties(r,{hasInstance:e("",t&&t.hasInstance||r("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||r("isConcatSpreadable")),iterator:e("",t&&t.iterator||r("iterator")),match:e("",t&&t.match||r("match")),replace:e("",t&&t.replace||r("replace")),search:e("",t&&t.search||r("search")),species:e("",t&&t.species||r("species")),split:e("",t&&t.split||r("split")),toPrimitive:e("",t&&t.toPrimitive||r("toPrimitive")),toStringTag:e("",t&&t.toStringTag||r("toStringTag")),unscopables:e("",t&&t.unscopables||r("unscopables"))})},QB}var e7,u0e;function E$e(){if(u0e)return e7;u0e=1;var e=my(),t=kCe(),r=Object.create(null);return e7=function(n){return Object.defineProperties(n,{for:e(function(o){return r[o]?r[o]:r[o]=n(String(o))}),keyFor:e(function(o){var s;t(o);for(s in r)if(r[s]===o)return s})})},e7}var t7,f0e;function k$e(){if(f0e)return t7;f0e=1;var e=my(),t=kCe(),r=jM().Symbol,n=S$e(),o=M$e(),s=E$e(),a=Object.create,f=Object.defineProperties,i=Object.defineProperty,l,u,c;if(typeof r=="function")try{String(r()),c=!0}catch{}else r=null;return u=function(d){if(this instanceof u)throw new TypeError("Symbol is not a constructor");return l(d)},t7=l=function h(d){var v;if(this instanceof h)throw new TypeError("Symbol is not a constructor");return c?r(d):(v=a(u.prototype),d=d===void 0?"":String(d),f(v,{__description__:e("",d),__name__:e("",n(d))}))},o(l),s(l),f(u.prototype,{constructor:e(l),toString:e("",function(){return this.__name__})}),f(l.prototype,{toString:e(function(){return"Symbol ("+t(this).__description__+")"}),valueOf:e(function(){return t(this)})}),i(l.prototype,l.toPrimitive,e("",function(){var h=t(this);return typeof h=="symbol"?h:h.toString()})),i(l.prototype,l.toStringTag,e("c","Symbol")),i(u.prototype,l.toStringTag,e("c",l.prototype[l.toStringTag])),i(u.prototype,l.toPrimitive,e("c",l.prototype[l.toPrimitive])),t7}var r7,c0e;function Xm(){return c0e||(c0e=1,r7=T$e()()?jM().Symbol:k$e()),r7}var n7,h0e;function C$e(){if(h0e)return n7;h0e=1;var e=yy();return n7=function(){return e(this).length=0,this},n7}var a7,d0e;function nw(){return d0e||(d0e=1,a7=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}),a7}var i7,v0e;function R$e(){if(v0e)return i7;v0e=1;var e=hb(),t=ACe(),r=Object.prototype.toString;return i7=function(n){if(!e(n))return null;if(t(n)){var o=n.toString;if(typeof o!="function"||o===r)return null}try{return""+n}catch{return null}},i7}var o7,p0e;function L$e(){return p0e||(p0e=1,o7=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}),o7}var s7,g0e;function P$e(){if(g0e)return s7;g0e=1;var e=L$e(),t=/[\n\r\u2028\u2029]/g;return s7=function(r){var n=e(r);return n===null?"":(n.length>100&&(n=n.slice(0,99)+"…"),n=n.replace(t,function(o){switch(o){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),n)},s7}var l7,y0e;function D$e(){if(y0e)return l7;y0e=1;var e=R$e(),t=P$e();return l7=function(r,n,o){o&&o.errorMessage&&(r=e(o.errorMessage));var s=r.indexOf("%v"),a=s>-1?t(n):null;if(o&&o.name){var f=r.indexOf("%n");if(f>-1){if(s>-1){var i,l,u,c;return f>s?(i=a,u=s,l=o.name,c=f):(i=o.name,u=f,l=a,c=s),r.slice(0,u)+i+r.slice(u+2,c)+l+r.slice(c+2)}return r.slice(0,f)+o.name+r.slice(f+2)}}return s>-1?r.slice(0,s)+a+r.slice(s+2):r},l7}var u7,m0e;function CCe(){if(m0e)return u7;m0e=1;var e=hb(),t=D$e();return u7=function(r,n,o){if(o&&!e(r)){if("default"in o)return o.default;if(o.isOptional)return null}var s=o&&o.Error||TypeError,a=new s(t(n,r,o));throw o&&o.errorCode&&(a.code=o.errorCode),a},u7}var f7,x0e;function I$e(){if(x0e)return f7;x0e=1;var e=CCe(),t=hb();return f7=function(r){if(t(r))return r;var n=arguments[1],o=n&&n.name?"Expected a value for %n, received %v":"Cannot use %v";return e(r,o,n)},f7}var c7,b0e;function O$e(){if(b0e)return c7;b0e=1;var e=CCe(),t=SCe();return c7=function(r){if(t(r))return r;var n=arguments[1],o=n&&n.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return e(r,o,n)},c7}var h7,_0e;function z$e(){return _0e||(_0e=1,h7=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}),h7}var d7,w0e;function F$e(){if(w0e)return d7;w0e=1;var e=Object.prototype.toString,t=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);return d7=function(r){return typeof r=="function"&&t(e.call(r))},d7}var v7,T0e;function N$e(){return T0e||(T0e=1,v7=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}),v7}var p7,A0e;function B$e(){return A0e||(A0e=1,p7=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}),p7}var g7,S0e;function q$e(){return S0e||(S0e=1,g7=N$e()()?Math.sign:B$e()),g7}var y7,M0e;function j$e(){if(M0e)return y7;M0e=1;var e=q$e(),t=Math.abs,r=Math.floor;return y7=function(n){return isNaN(n)?0:(n=Number(n),n===0||!isFinite(n)?n:e(n)*r(t(n)))},y7}var m7,E0e;function U$e(){if(E0e)return m7;E0e=1;var e=j$e(),t=Math.max;return m7=function(r){return t(0,e(r))},m7}var x7,k0e;function H$e(){if(k0e)return x7;k0e=1;var e=Xm().iterator,t=BM(),r=F$e(),n=U$e(),o=nw(),s=yy(),a=Wm(),f=qM(),i=Array.isArray,l=Function.prototype.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},c=Object.defineProperty;return x7=function(h){var d=arguments[1],v=arguments[2],p,m,y,b,g,T,S,A,M,w;if(h=Object(s(h)),a(d)&&o(d),!this||this===Array||!r(this)){if(!d){if(t(h))return g=h.length,g!==1?Array.apply(null,h):(b=new Array(1),b[0]=h[0],b);if(i(h)){for(b=new Array(g=h.length),m=0;m=55296&&T<=56319&&(w+=h[++m])),w=d?l.call(d,v,w,y):w,p?(u.value=w,c(b,y,u)):b[y]=w,++y;g=y}}if(g===void 0)for(g=n(h.length),p&&(b=new p(g)),m=0;m=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){f(this,"__redo__",o("c",[u]));return}this.__redo__.forEach(function(c,h){c>=u&&(this.__redo__[h]=++c)},this),this.__redo__.push(u)}}),_onDelete:o(function(u){var c;u>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(c=this.__redo__.indexOf(u),c!==-1&&this.__redo__.splice(c,1),this.__redo__.forEach(function(h,d){h>u&&(this.__redo__[d]=--h)},this)))}),_onClear:o(function(){this.__redo__&&e.call(this.__redo__),this.__nextIndex__=0})}))),f(l.prototype,a.iterator,o(function(){return this})),M7}var z0e;function Z$e(){if(z0e)return VB.exports;z0e=1;var e=OX(),t=ECe(),r=my(),n=Xm(),o=RCe(),s=Object.defineProperty,a;return a=VB.exports=function(f,i){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");o.call(this,f),i?t.call(i,"key+value")?i="key+value":t.call(i,"key")?i="key":i="value":i="value",s(this,"__kind__",r("",i))},e&&e(a,o),delete a.prototype.constructor,a.prototype=Object.create(o.prototype,{_resolve:r(function(f){return this.__kind__==="value"?this.__list__[f]:this.__kind__==="key+value"?[f,this.__list__[f]]:f})}),s(a.prototype,n.toStringTag,r("c","Array Iterator")),VB.exports}var E7={exports:{}},F0e;function K$e(){if(F0e)return E7.exports;F0e=1;var e=OX(),t=my(),r=Xm(),n=RCe(),o=Object.defineProperty,s;return s=E7.exports=function(a){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");a=String(a),n.call(this,a),o(this,"__length__",t("",a.length))},e&&e(s,n),delete s.prototype.constructor,s.prototype=Object.create(n.prototype,{_next:t(function(){if(this.__list__){if(this.__nextIndex__=55296&&i<=56319?f+this.__list__[this.__nextIndex__++]:f)})}),o(s.prototype,r.toStringTag,t("c","String Iterator")),E7.exports}var k7,N0e;function J$e(){if(N0e)return k7;N0e=1;var e=BM(),t=Wm(),r=qM(),n=Xm().iterator,o=Array.isArray;return k7=function(s){return t(s)?o(s)||r(s)||e(s)?!0:typeof s[n]=="function":!1},k7}var C7,B0e;function Q$e(){if(B0e)return C7;B0e=1;var e=J$e();return C7=function(t){if(!e(t))throw new TypeError(t+" is not iterable");return t},C7}var R7,q0e;function LCe(){if(q0e)return R7;q0e=1;var e=BM(),t=qM(),r=Z$e(),n=K$e(),o=Q$e(),s=Xm().iterator;return R7=function(a){return typeof o(a)[s]=="function"?a[s]():e(a)?new r(a):t(a)?new n(a):new r(a)},R7}var L7,j0e;function eWe(){if(j0e)return L7;j0e=1;var e=BM(),t=nw(),r=qM(),n=LCe(),o=Array.isArray,s=Function.prototype.call,a=Array.prototype.some;return L7=function(f,i){var l,u=arguments[2],c,h,d,v,p,m,y;if(o(f)||e(f)?l="array":r(f)?l="string":f=n(f),t(i),h=function(){d=!0},l==="array"){a.call(f,function(b){return s.call(i,u,b,h),d});return}if(l==="string"){for(p=f.length,v=0;v=55296&&y<=56319&&(m+=f[++v])),s.call(i,u,m,h),!d);++v);return}for(c=f.next();!c.done;){if(s.call(i,u,c.value,h),d)return;c=f.next()}},L7}var P7,U0e;function tWe(){return U0e||(U0e=1,P7=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()),P7}var D7,H0e;function rWe(){if(H0e)return D7;H0e=1;var e=Wm(),t=OX(),r=f$e(),n=yy(),o=c$e(),s=my(),a=LCe(),f=eWe(),i=Xm().toStringTag,l=tWe(),u=Array.isArray,c=Object.defineProperty,h=Object.prototype.hasOwnProperty,d=Object.getPrototypeOf,v;return D7=v=function(){var p=arguments[0],m;if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");return m=l&&t&&WeakMap!==v?t(new WeakMap,d(this)):this,e(p)&&(u(p)||(p=a(p))),c(m,"__weakMapData__",s("c","$weakMap$"+o())),p&&f(p,function(y){n(y),m.set(y[0],y[1])}),m},l&&(t&&t(v,WeakMap),v.prototype=Object.create(WeakMap.prototype,{constructor:s(v)})),Object.defineProperties(v.prototype,{delete:s(function(p){return h.call(r(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:s(function(p){if(h.call(r(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:s(function(p){return h.call(r(p),this.__weakMapData__)}),set:s(function(p,m){return c(r(p),this.__weakMapData__,s("c",m)),this}),toString:s(function(){return"[object WeakMap]"})}),c(v.prototype,i,s("c","WeakMap")),D7}var I7,G0e;function PCe(){return G0e||(G0e=1,I7=s$e()()?WeakMap:rWe()),I7}var O7,V0e;function nWe(){return V0e||(V0e=1,O7=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),o=n.length;if(o===0)return-1;for(var s=0;s 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`,y=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`;z7=b;function b(g,T){if(!(this instanceof b))return new b(g,T);if(typeof g=="function"?(T||(T={}),T.regl=g):T=g,T.length&&(T.positions=T),g=T.regl,!g.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=g._gl,this.regl=g,this.passes=[],this.shaders=b.shaders.has(g)?b.shaders.get(g):b.shaders.set(g,b.createShaders(g)).get(g),this.update(T)}return b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new l,b.createShaders=function(g){let T=g.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),S={primitive:"triangle strip",instances:g.prop("count"),count:4,offset:0,uniforms:{miterMode:(C,x)=>x.join==="round"?2:1,miterLimit:g.prop("miterLimit"),scale:g.prop("scale"),scaleFract:g.prop("scaleFract"),translateFract:g.prop("translateFract"),translate:g.prop("translate"),thickness:g.prop("thickness"),dashTexture:g.prop("dashTexture"),opacity:g.prop("opacity"),pixelRatio:g.context("pixelRatio"),id:g.prop("id"),dashLength:g.prop("dashLength"),viewport:(C,x)=>[x.viewport.x,x.viewport.y,C.viewportWidth,C.viewportHeight],depth:g.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(C,x)=>!x.overlay},stencil:{enable:!1},scissor:{enable:!0,box:g.prop("viewport")},viewport:g.prop("viewport")},A=g(r({vert:h,frag:d,attributes:{lineEnd:{buffer:T,divisor:0,stride:8,offset:0},lineTop:{buffer:T,divisor:0,stride:8,offset:4},aCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:g.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:g.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:g.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},S)),M;try{M=g(r({cull:{enable:!0,face:"back"},vert:m,frag:y,attributes:{lineEnd:{buffer:T,divisor:0,stride:8,offset:0},lineTop:{buffer:T,divisor:0,stride:8,offset:4},aColor:{buffer:g.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:g.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:g.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},S))}catch{M=A}return{fill:g({primitive:"triangle",elements:(C,x)=>x.triangles,offset:0,vert:v,frag:p,uniforms:{scale:g.prop("scale"),color:g.prop("fill"),scaleFract:g.prop("scaleFract"),translateFract:g.prop("translateFract"),translate:g.prop("translate"),opacity:g.prop("opacity"),pixelRatio:g.context("pixelRatio"),id:g.prop("id"),viewport:(C,x)=>[x.viewport.x,x.viewport.y,C.viewportWidth,C.viewportHeight]},attributes:{position:{buffer:g.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:g.prop("positionFractBuffer"),stride:8,offset:8}},blend:S.blend,depth:{enable:!1},scissor:S.scissor,stencil:S.stencil,viewport:S.viewport}),rect:A,miter:M}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(...g){g.length&&this.update(...g),this.draw()},b.prototype.draw=function(...g){return(g.length?g:this.passes).forEach((T,S)=>{if(T&&Array.isArray(T))return this.draw(...T);typeof T=="number"&&(T=this.passes[T]),T&&T.count>1&&T.opacity&&(this.regl._refresh(),T.fill&&T.triangles&&T.triangles.length>2&&this.shaders.fill(T),T.thickness&&(T.scale[0]*T.viewport.width>b.precisionThreshold||T.scale[1]*T.viewport.height>b.precisionThreshold?this.shaders.rect(T):T.join==="rect"||!T.join&&(T.thickness<=2||T.count>=b.maxPoints)?this.shaders.rect(T):this.shaders.miter(T)))}),this},b.prototype.update=function(g){if(!g)return;g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);let{regl:T,gl:S}=this;if(g.forEach((M,w)=>{let C=this.passes[w];if(M!==void 0){if(M===null){this.passes[w]=null;return}if(typeof M[0]=="number"&&(M={positions:M}),M=n(M,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),C||(this.passes[w]=C={id:w,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:T.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:T.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:T.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:T.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},M=r({},b.defaults,M)),M.thickness!=null&&(C.thickness=parseFloat(M.thickness)),M.opacity!=null&&(C.opacity=parseFloat(M.opacity)),M.miterLimit!=null&&(C.miterLimit=parseFloat(M.miterLimit)),M.overlay!=null&&(C.overlay=!!M.overlay,wJ-ne),B=[],$=0,Q=C.hole!=null?C.hole[0]:null;if(Q!=null){let J=c(P,ne=>ne>=Q);P=P.slice(0,J),P.push(Q)}for(let J=0;JG-Q+(P[J]-$)),Z=s(ne,te);Z=Z.map(G=>G+$+(G+${g.colorBuffer.destroy(),g.positionBuffer.destroy(),g.dashTexture.destroy()}),this.passes.length=0,this},z7}var F7,$0e;function aWe(){if($0e)return F7;$0e=1;const e=fb(),t=Gm(),r=xCe(),n=cg(),o=Eu(),s=cb(),{float32:a,fract32:f}=IX();F7=l;const i=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function l(u,c){if(typeof u=="function"?(c||(c={}),c.regl=u):c=u,c.length&&(c.positions=c),u=c.regl,!u.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=u._gl,d,v,p,m,y,b,g={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},T=[];return m=u.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),v=u.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=u.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=u.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=u.buffer({usage:"static",type:"float",data:i}),w(c),d=u({vert:` + precision highp float; + + attribute vec2 position, positionFract; + attribute vec4 error; + attribute vec4 color; + + attribute vec2 direction, lineOffset, capOffset; + + uniform vec4 viewport; + uniform float lineWidth, capSize; + uniform vec2 scale, scaleFract, translate, translateFract; + + varying vec4 fragColor; + + void main() { + fragColor = color / 255.; + + vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; + + vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; + + vec2 position = position + dxy; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + pos += pixelOffset / viewport.zw; + + gl_Position = vec4(pos * 2. - 1., 0, 1); + } + `,frag:` + precision highp float; + + varying vec4 fragColor; + + uniform float opacity; + + void main() { + gl_FragColor = fragColor; + gl_FragColor.a *= opacity; + } + `,uniforms:{range:u.prop("range"),lineWidth:u.prop("lineWidth"),capSize:u.prop("capSize"),opacity:u.prop("opacity"),scale:u.prop("scale"),translate:u.prop("translate"),scaleFract:u.prop("scaleFract"),translateFract:u.prop("translateFract"),viewport:(x,_)=>[_.viewport.x,_.viewport.y,x.viewportWidth,x.viewportHeight]},attributes:{color:{buffer:m,offset:(x,_)=>_.offset*4,divisor:1},position:{buffer:v,offset:(x,_)=>_.offset*8,divisor:1},positionFract:{buffer:p,offset:(x,_)=>_.offset*8,divisor:1},error:{buffer:y,offset:(x,_)=>_.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:u.prop("viewport")},viewport:u.prop("viewport"),stencil:!1,instances:u.prop("count"),count:i.length}),o(S,{update:w,draw:A,destroy:C,regl:u,gl:h,canvas:h.canvas,groups:T}),S;function S(x){x?w(x):x===null&&C(),A()}function A(x){if(typeof x=="number")return M(x);x&&!Array.isArray(x)&&(x=[x]),u._refresh(),T.forEach((_,k)=>{if(_){if(x&&(x[k]?_.draw=!0:_.draw=!1),!_.draw){_.draw=!0;return}M(k)}})}function M(x){typeof x=="number"&&(x=T[x]),x!=null&&x&&x.count&&x.color&&x.opacity&&x.positions&&x.positions.length>1&&(x.scaleRatio=[x.scale[0]*x.viewport.width,x.scale[1]*x.viewport.height],d(x),x.after&&x.after(x))}function w(x){if(!x)return;x.length!=null?typeof x[0]=="number"&&(x=[{positions:x}]):Array.isArray(x)||(x=[x]);let _=0,k=0;if(S.groups=T=x.map((F,D)=>{let z=T[D];if(F)typeof F=="function"?F={after:F}:typeof F[0]=="number"&&(F={positions:F});else return z;return F=n(F,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),z||(T[D]=z={id:D,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=o({},g,F)),r(z,F,[{lineWidth:N=>+N*.5,capSize:N=>+N*.5,opacity:parseFloat,errors:N=>(N=s(N),k+=N.length,N),positions:(N,q)=>(N=s(N,"float64"),q.count=Math.floor(N.length/2),q.bounds=e(N,2),q.offset=_,_+=q.count,N)},{color:(N,q)=>{let P=q.count;if(N||(N="transparent"),!Array.isArray(N)||typeof N[0]=="number"){let $=N;N=Array(P);for(let Q=0;Q{let B=q.bounds;return N||(N=B),q.scale=[1/(N[2]-N[0]),1/(N[3]-N[1])],q.translate=[-N[0],-N[1]],q.scaleFract=f(q.scale),q.translateFract=f(q.translate),N},viewport:N=>{let q;return Array.isArray(N)?q={x:N[0],y:N[1],width:N[2]-N[0],height:N[3]-N[1]}:N?(q={x:N.x||N.left||0,y:N.y||N.top||0},N.right?q.width=N.right-q.x:q.width=N.w||N.width||0,N.bottom?q.height=N.bottom-q.y:q.height=N.h||N.height||0):q={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},q}}]),z}),_||k){let F=T.reduce((q,P,B)=>q+(P?P.count:0),0),D=new Float64Array(F*2),z=new Uint8Array(F*4),N=new Float32Array(F*4);T.forEach((q,P)=>{if(!q)return;let{positions:B,count:$,offset:Q,color:J,errors:ne}=q;$&&(z.set(J,Q*4),N.set(ne,Q*4),D.set(B,Q*2))});var E=a(D);v(E);var I=f(D,E);p(I),m(z),y(N)}}function C(){v.destroy(),p.destroy(),m.destroy(),y.destroy(),b.destroy()}}return F7}var N7,W0e;function iWe(){if(W0e)return N7;W0e=1;var e=/[\'\"]/;return N7=function(r){return r?(e.test(r.charAt(0))&&(r=r.substr(1)),e.test(r.charAt(r.length-1))&&(r=r.substr(0,r.length-1)),r):""},N7}const ICe=["inherit","initial","unset"],OCe=["caption","icon","menu","message-box","small-caption","status-bar"],zCe=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],FCe=["normal","italic","oblique"],NCe=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"];var B7,X0e;function oWe(){if(X0e)return B7;X0e=1;function e(n,o){if(typeof n!="string")return[n];var s=[n];typeof o=="string"||Array.isArray(o)?o={brackets:o}:o||(o={});var a=o.brackets?Array.isArray(o.brackets)?o.brackets:[o.brackets]:["{}","[]","()"],f=o.escape||"___",i=!!o.flat;a.forEach(function(c){var h=new RegExp(["\\",c[0],"[^\\",c[0],"\\",c[1],"]*\\",c[1]].join("")),d=[];function v(p,m,y){var b=s.push(p.slice(c[0].length,-c[1].length))-1;return d.push(b),f+b+f}s.forEach(function(p,m){for(var y,b=0;p!=y;)if(y=p,p=p.replace(h,v),b++>1e4)throw Error("References have circular dependency. Please, check them.");s[m]=p}),d=d.reverse(),s=s.map(function(p){return d.forEach(function(m){p=p.replace(new RegExp("(\\"+f+m+"\\"+f+")","g"),c[0]+"$1"+c[1])}),p})});var l=new RegExp("\\"+f+"([0-9]+)\\"+f);function u(c,h,d){for(var v=[],p,m=0;p=l.exec(c);){if(m++>1e4)throw Error("Circular references in parenthesis");v.push(c.slice(0,p.index)),v.push(u(h[p[1]],h)),c=c.slice(p.index+p[0].length)}return v.push(c),v}return i?s:u(s[0],s)}function t(n,o){if(o&&o.flat){var s=o&&o.escape||"___",a=n[0],f;if(!a)return"";for(var i=new RegExp("\\"+s+"([0-9]+)\\"+s),l=0;a!=f;){if(l++>1e4)throw Error("Circular references in "+n);f=a,a=a.replace(i,u)}return a}return n.reduce(function c(h,d){return Array.isArray(d)&&(d=d.reduce(c,"")),h+d},"");function u(c,h){if(n[h]==null)throw Error("Reference "+h+"is undefined");return n[h]}}function r(n,o){return Array.isArray(n)?t(n,o):e(n,o)}return r.parse=e,r.stringify=t,B7=r,B7}var q7,Z0e;function sWe(){if(Z0e)return q7;Z0e=1;var e=oWe();return q7=function(r,n,o){if(r==null)throw Error("First argument should be a string");if(n==null)throw Error("Separator should be a string or a RegExp");o?(typeof o=="string"||Array.isArray(o))&&(o={ignore:o}):o={},o.escape==null&&(o.escape=!0),o.ignore==null?o.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof o.ignore=="string"&&(o.ignore=[o.ignore]),o.ignore=o.ignore.map(function(h){return h.length===1&&(h=h+h),h}));var s=e.parse(r,{flat:!0,brackets:o.ignore}),a=s[0],f=a.split(n);if(o.escape){for(var i=[],l=0;l1&&vr===xr&&(vr==='"'||vr==="'"))return['"'+i(Lt.substr(1,Lt.length-2))+'"'];var tn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Lt);if(tn)return l(Lt.substr(0,tn.index)).concat(l(tn[1])).concat(l(Lt.substr(tn.index+tn[0].length)));var _n=Lt.split(".");if(_n.length===1)return['"'+i(Lt)+'"'];for(var Mr=[],Lr=0;Lr<_n.length;++Lr)Mr=Mr.concat(l(_n[Lr]));return Mr}function u(Lt){return"["+l(Lt).join("][")+"]"}function c(Lt,vr){return new f(Lt,u(vr+""))}function h(Lt){return typeof Lt=="function"&&!Lt._reglType||Lt instanceof f}function d(Lt,vr){if(typeof Lt=="function")return new f(o,Lt);if(typeof Lt=="number"||typeof Lt=="boolean")return new f(s,Lt);if(Array.isArray(Lt))return new f(a,Lt.map(function(xr,tn){return d(xr)}));if(Lt instanceof f)return Lt}var v={DynamicVariable:f,define:c,isDynamic:h,unbox:d,accessor:u},p={next:typeof requestAnimationFrame=="function"?function(Lt){return requestAnimationFrame(Lt)}:function(Lt){return setTimeout(Lt,16)},cancel:typeof cancelAnimationFrame=="function"?function(Lt){return cancelAnimationFrame(Lt)}:clearTimeout},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function y(){var Lt={"":0},vr=[""];return{id:function(xr){var tn=Lt[xr];return tn||(tn=Lt[xr]=vr.length,vr.push(xr),tn)},str:function(xr){return vr[xr]}}}function b(Lt,vr,xr){var tn=document.createElement("canvas");r(tn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Lt.appendChild(tn),Lt===document.body&&(tn.style.position="absolute",r(Lt.style,{margin:0,padding:0}));function _n(){var qn=window.innerWidth,Nn=window.innerHeight;if(Lt!==document.body){var Gn=tn.getBoundingClientRect();qn=Gn.right-Gn.left,Nn=Gn.bottom-Gn.top}tn.width=xr*qn,tn.height=xr*Nn}var Mr;Lt!==document.body&&typeof ResizeObserver=="function"?(Mr=new ResizeObserver(function(){setTimeout(_n)}),Mr.observe(Lt)):window.addEventListener("resize",_n,!1);function Lr(){Mr?Mr.disconnect():window.removeEventListener("resize",_n),Lt.removeChild(tn)}return _n(),{canvas:tn,onDestroy:Lr}}function g(Lt,vr){function xr(tn){try{return Lt.getContext(tn,vr)}catch{return null}}return xr("webgl")||xr("experimental-webgl")||xr("webgl-experimental")}function T(Lt){return typeof Lt.nodeName=="string"&&typeof Lt.appendChild=="function"&&typeof Lt.getBoundingClientRect=="function"}function S(Lt){return typeof Lt.drawArrays=="function"||typeof Lt.drawElements=="function"}function A(Lt){return typeof Lt=="string"?Lt.split():Lt}function M(Lt){return typeof Lt=="string"?document.querySelector(Lt):Lt}function w(Lt){var vr=Lt||{},xr,tn,_n,Mr,Lr={},qn=[],Nn=[],Gn=typeof window>"u"?1:window.devicePixelRatio,Wn=!1,Aa={},ca=function(Ir){},aa=function(){};if(typeof vr=="string"?xr=document.querySelector(vr):typeof vr=="object"&&(T(vr)?xr=vr:S(vr)?(Mr=vr,_n=Mr.canvas):("gl"in vr?Mr=vr.gl:"canvas"in vr?_n=M(vr.canvas):"container"in vr&&(tn=M(vr.container)),"attributes"in vr&&(Lr=vr.attributes),"extensions"in vr&&(qn=A(vr.extensions)),"optionalExtensions"in vr&&(Nn=A(vr.optionalExtensions)),"onDone"in vr&&(ca=vr.onDone),"profile"in vr&&(Wn=!!vr.profile),"pixelRatio"in vr&&(Gn=+vr.pixelRatio),"cachedCode"in vr&&(Aa=vr.cachedCode))),xr&&(xr.nodeName.toLowerCase()==="canvas"?_n=xr:tn=xr),!Mr){if(!_n){var zn=b(tn||document.body,ca,Gn);if(!zn)return null;_n=zn.canvas,aa=zn.onDestroy}Lr.premultipliedAlpha===void 0&&(Lr.premultipliedAlpha=!0),Mr=g(_n,Lr)}return Mr?{gl:Mr,canvas:_n,container:tn,extensions:qn,optionalExtensions:Nn,pixelRatio:Gn,profile:Wn,cachedCode:Aa,onDone:ca,onDestroy:aa}:(aa(),ca("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function C(Lt,vr){var xr={};function tn(Lr){var qn=Lr.toLowerCase(),Nn;try{Nn=xr[qn]=Lt.getExtension(qn)}catch{}return!!Nn}for(var _n=0;_n65535)<<4,Lt>>>=vr,xr=(Lt>255)<<3,Lt>>>=xr,vr|=xr,xr=(Lt>15)<<2,Lt>>>=xr,vr|=xr,xr=(Lt>3)<<1,Lt>>>=xr,vr|=xr,vr|Lt>>1}function P(){var Lt=x(8,function(){return[]});function vr(Mr){var Lr=N(Mr),qn=Lt[q(Lr)>>2];return qn.length>0?qn.pop():new ArrayBuffer(Lr)}function xr(Mr){Lt[q(Mr.byteLength)>>2].push(Mr)}function tn(Mr,Lr){var qn=null;switch(Mr){case _:qn=new Int8Array(vr(Lr),0,Lr);break;case k:qn=new Uint8Array(vr(Lr),0,Lr);break;case E:qn=new Int16Array(vr(2*Lr),0,Lr);break;case I:qn=new Uint16Array(vr(2*Lr),0,Lr);break;case F:qn=new Int32Array(vr(4*Lr),0,Lr);break;case D:qn=new Uint32Array(vr(4*Lr),0,Lr);break;case z:qn=new Float32Array(vr(4*Lr),0,Lr);break;default:return null}return qn.length!==Lr?qn.subarray(0,Lr):qn}function _n(Mr){xr(Mr.buffer)}return{alloc:vr,free:xr,allocType:tn,freeType:_n}}var B=P();B.zero=P();var $=3408,Q=3410,J=3411,ne=3412,te=3413,Z=3414,G=3415,j=33901,Y=33902,K=3379,X=3386,ee=34921,le=36347,oe=36348,fe=35661,de=35660,_e=34930,we=36349,Oe=34076,be=34024,Te=7936,ke=7937,Ee=7938,Le=35724,Fe=34047,qe=36063,We=34852,Qe=3553,De=34067,me=34069,Ce=33984,et=6408,st=5126,ot=5121,ut=36160,ht=36053,Ht=36064,Et=16384,Jt=function(Lt,vr){var xr=1;vr.ext_texture_filter_anisotropic&&(xr=Lt.getParameter(Fe));var tn=1,_n=1;vr.webgl_draw_buffers&&(tn=Lt.getParameter(We),_n=Lt.getParameter(qe));var Mr=!!vr.oes_texture_float;if(Mr){var Lr=Lt.createTexture();Lt.bindTexture(Qe,Lr),Lt.texImage2D(Qe,0,et,1,1,0,et,st,null);var qn=Lt.createFramebuffer();if(Lt.bindFramebuffer(ut,qn),Lt.framebufferTexture2D(ut,Ht,Qe,Lr,0),Lt.bindTexture(Qe,null),Lt.checkFramebufferStatus(ut)!==ht)Mr=!1;else{Lt.viewport(0,0,1,1),Lt.clearColor(1,0,0,1),Lt.clear(Et);var Nn=B.allocType(st,4);Lt.readPixels(0,0,1,1,et,st,Nn),Lt.getError()?Mr=!1:(Lt.deleteFramebuffer(qn),Lt.deleteTexture(Lr),Mr=Nn[0]===1),B.freeType(Nn)}}var Gn=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Wn=!0;if(!Gn){var Aa=Lt.createTexture(),ca=B.allocType(ot,36);Lt.activeTexture(Ce),Lt.bindTexture(De,Aa),Lt.texImage2D(me,0,et,3,3,0,et,ot,ca),B.freeType(ca),Lt.bindTexture(De,null),Lt.deleteTexture(Aa),Wn=!Lt.getError()}return{colorBits:[Lt.getParameter(Q),Lt.getParameter(J),Lt.getParameter(ne),Lt.getParameter(te)],depthBits:Lt.getParameter(Z),stencilBits:Lt.getParameter(G),subpixelBits:Lt.getParameter($),extensions:Object.keys(vr).filter(function(aa){return!!vr[aa]}),maxAnisotropic:xr,maxDrawbuffers:tn,maxColorAttachments:_n,pointSizeDims:Lt.getParameter(j),lineWidthDims:Lt.getParameter(Y),maxViewportDims:Lt.getParameter(X),maxCombinedTextureUnits:Lt.getParameter(fe),maxCubeMapSize:Lt.getParameter(Oe),maxRenderbufferSize:Lt.getParameter(be),maxTextureUnits:Lt.getParameter(_e),maxTextureSize:Lt.getParameter(K),maxAttributes:Lt.getParameter(ee),maxVertexUniforms:Lt.getParameter(le),maxVertexTextureUnits:Lt.getParameter(de),maxVaryingVectors:Lt.getParameter(oe),maxFragmentUniforms:Lt.getParameter(we),glsl:Lt.getParameter(Le),renderer:Lt.getParameter(ke),vendor:Lt.getParameter(Te),version:Lt.getParameter(Ee),readFloat:Mr,npotTextureCube:Wn}},Tt=function(Lt){return Lt instanceof Uint8Array||Lt instanceof Uint16Array||Lt instanceof Uint32Array||Lt instanceof Int8Array||Lt instanceof Int16Array||Lt instanceof Int32Array||Lt instanceof Float32Array||Lt instanceof Float64Array||Lt instanceof Uint8ClampedArray};function rt(Lt){return!!Lt&&typeof Lt=="object"&&Array.isArray(Lt.shape)&&Array.isArray(Lt.stride)&&typeof Lt.offset=="number"&&Lt.shape.length===Lt.stride.length&&(Array.isArray(Lt.data)||Tt(Lt.data))}var gt=function(Lt){return Object.keys(Lt).map(function(vr){return Lt[vr]})},mt={shape:Se,flatten:ye};function He(Lt,vr,xr){for(var tn=0;tn0){var Ra;if(Array.isArray(pn[0])){ra=cn(pn);for(var Cn=1,bn=1;bn0){if(typeof Cn[0]=="number"){var la=B.allocType(Rn.dtype,Cn.length);Ft(la,Cn),ra(la,ha),B.freeType(la)}else if(Array.isArray(Cn[0])||Tt(Cn[0])){on=cn(Cn);var Xn=en(Cn,on,Rn.dtype);ra(Xn,ha),B.freeType(Xn)}}}else if(rt(Cn)){on=Cn.shape;var La=Cn.stride,vi=0,_a=0,Pa=0,Qn=0;on.length===1?(vi=on[0],_a=1,Pa=La[0],Qn=0):on.length===2&&(vi=on[0],_a=on[1],Pa=La[0],Qn=La[1]);var si=Array.isArray(Cn.data)?Rn.dtype:wt(Cn.data),Fi=B.allocType(si,vi*_a);er(Fi,Cn.data,vi,_a,Pa,Qn,Cn.offset),ra(Fi,ha),B.freeType(Fi)}return ma}return vn||ma(Ir),ma._reglType="buffer",ma._buffer=Rn,ma.subdata=Ra,xr.profile&&(ma.stats=Rn.stats),ma.destroy=function(){ca(Rn)},ma}function zn(){gt(Mr).forEach(function(Ir){Ir.buffer=Lt.createBuffer(),Lt.bindBuffer(Ir.type,Ir.buffer),Lt.bufferData(Ir.type,Ir.persistentData||Ir.byteLength,Ir.usage)})}return xr.profile&&(vr.getTotalBufferSize=function(){var Ir=0;return Object.keys(Mr).forEach(function(pn){Ir+=Mr[pn].stats.size}),Ir}),{create:aa,createStream:Nn,destroyStream:Gn,clear:function(){gt(Mr).forEach(ca),qn.forEach(ca)},getBuffer:function(Ir){return Ir&&Ir._buffer instanceof Lr?Ir._buffer:null},restore:zn,_initBuffer:Aa}}var lr=0,Ue=0,Ne=1,At=1,Rt=4,Ct=4,Wt={points:lr,point:Ue,lines:Ne,line:At,triangles:Rt,triangle:Ct,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Qt=0,Xt=1,$t=4,ur=5120,fr=5121,mr=5122,br=5123,Pr=5124,Cr=5125,Zr=34963,jr=35040,Sn=35044;function Fn(Lt,vr,xr,tn){var _n={},Mr=0,Lr={uint8:fr,uint16:br};vr.oes_element_index_uint&&(Lr.uint32=Cr);function qn(zn){this.id=Mr++,_n[this.id]=this,this.buffer=zn,this.primType=$t,this.vertCount=0,this.type=0}qn.prototype.bind=function(){this.buffer.bind()};var Nn=[];function Gn(zn){var Ir=Nn.pop();return Ir||(Ir=new qn(xr.create(null,Zr,!0,!1)._buffer)),Aa(Ir,zn,jr,-1,-1,0,0),Ir}function Wn(zn){Nn.push(zn)}function Aa(zn,Ir,pn,vn,kn,Rn,ma){zn.buffer.bind();var ra;if(Ir){var Ra=ma;!ma&&(!Tt(Ir)||rt(Ir)&&!Tt(Ir.data))&&(Ra=vr.oes_element_index_uint?Cr:br),xr._initBuffer(zn.buffer,Ir,pn,Ra,3)}else Lt.bufferData(Zr,Rn,pn),zn.buffer.dtype=ra||fr,zn.buffer.usage=pn,zn.buffer.dimension=3,zn.buffer.byteLength=Rn;if(ra=ma,!ma){switch(zn.buffer.dtype){case fr:case ur:ra=fr;break;case br:case mr:ra=br;break;case Cr:case Pr:ra=Cr;break}zn.buffer.dtype=ra}zn.type=ra;var Cn=kn;Cn<0&&(Cn=zn.buffer.byteLength,ra===br?Cn>>=1:ra===Cr&&(Cn>>=2)),zn.vertCount=Cn;var bn=vn;if(vn<0){bn=$t;var ha=zn.buffer.dimension;ha===1&&(bn=Qt),ha===2&&(bn=Xt),ha===3&&(bn=$t)}zn.primType=bn}function ca(zn){tn.elementsCount--,delete _n[zn.id],zn.buffer.destroy(),zn.buffer=null}function aa(zn,Ir){var pn=xr.create(null,Zr,!0),vn=new qn(pn._buffer);tn.elementsCount++;function kn(Rn){if(!Rn)pn(),vn.primType=$t,vn.vertCount=0,vn.type=fr;else if(typeof Rn=="number")pn(Rn),vn.primType=$t,vn.vertCount=Rn|0,vn.type=fr;else{var ma=null,ra=Sn,Ra=-1,Cn=-1,bn=0,ha=0;Array.isArray(Rn)||Tt(Rn)||rt(Rn)?ma=Rn:("data"in Rn&&(ma=Rn.data),"usage"in Rn&&(ra=Gr[Rn.usage]),"primitive"in Rn&&(Ra=Wt[Rn.primitive]),"count"in Rn&&(Cn=Rn.count|0),"type"in Rn&&(ha=Lr[Rn.type]),"length"in Rn?bn=Rn.length|0:(bn=Cn,ha===br||ha===mr?bn*=2:(ha===Cr||ha===Pr)&&(bn*=4))),Aa(vn,ma,ra,Ra,Cn,bn,ha)}return kn}return kn(zn),kn._reglType="elements",kn._elements=vn,kn.subdata=function(Rn,ma){return pn.subdata(Rn,ma),kn},kn.destroy=function(){ca(vn)},kn}return{create:aa,createStream:Gn,destroyStream:Wn,getElements:function(zn){return typeof zn=="function"&&zn._elements instanceof qn?zn._elements:null},clear:function(){gt(_n).forEach(ca)}}}var ea=new Float32Array(1),An=new Uint32Array(ea.buffer),Hn=5123;function In(Lt){for(var vr=B.allocType(Hn,Lt.length),xr=0;xr>>31<<15,Mr=(tn<<1>>>24)-127,Lr=tn>>13&1023;if(Mr<-24)vr[xr]=_n;else if(Mr<-14){var qn=-14-Mr;vr[xr]=_n+(Lr+1024>>qn)}else Mr>15?vr[xr]=_n+31744:vr[xr]=_n+(Mr+15<<10)+Lr}return vr}function ua(Lt){return Array.isArray(Lt)||Tt(Lt)}var Ln=34467,oa=3553,Ta=34067,ba=34069,Da=6408,_i=6406,ci=6407,Bi=6409,yo=6410,es=32854,Qa=32855,Ii=36194,Ci=32819,Hi=32820,qi=33635,Ga=34042,Wa=6402,Ai=34041,fo=35904,Vi=35906,Yi=36193,Ps=33776,ts=33777,Eo=33778,gs=33779,jo=35986,no=35987,dn=34798,ia=35840,Ef=35841,bl=35842,gi=35843,_o=36196,mo=5121,Uo=5123,ao=5125,$n=5126,ai=10242,ri=10243,cu=10497,ul=33071,oi=33648,kf=10240,hu=10241,nl=9728,Lu=9729,al=9984,Ho=9985,dh=9986,Wl=9987,Fv=33170,Bc=4352,b0=4353,Zd=4354,Zi=34046,bd=3317,_d=37440,Ys=37441,ys=37443,Kd=37444,Cf=33984,ms=[al,dh,Ho,Wl],Xl=[0,Bi,yo,ci,Da],Vo={};Vo[Bi]=Vo[_i]=Vo[Wa]=1,Vo[Ai]=Vo[yo]=2,Vo[ci]=Vo[fo]=3,Vo[Da]=Vo[Vi]=4;function Fo(Lt){return"[object "+Lt+"]"}var Jd=Fo("HTMLCanvasElement"),fl=Fo("OffscreenCanvas"),Ku=Fo("CanvasRenderingContext2D"),Ju=Fo("ImageBitmap"),Qd=Fo("HTMLImageElement"),Zl=Fo("HTMLVideoElement"),$h=Object.keys(Pe).concat([Jd,fl,Ku,Ju,Qd,Zl]),du=[];du[mo]=1,du[$n]=4,du[Yi]=2,du[Uo]=2,du[ao]=4;var io=[];io[es]=2,io[Qa]=2,io[Ii]=2,io[Ai]=4,io[Ps]=.5,io[ts]=.5,io[Eo]=1,io[gs]=1,io[jo]=.5,io[no]=1,io[dn]=1,io[ia]=.5,io[Ef]=.25,io[bl]=.5,io[gi]=.25,io[_o]=.5;function _p(Lt){return Array.isArray(Lt)&&(Lt.length===0||typeof Lt[0]=="number")}function Rf(Lt){if(!Array.isArray(Lt))return!1;var vr=Lt.length;return!(vr===0||!ua(Lt[0]))}function Ll(Lt){return Object.prototype.toString.call(Lt)}function qc(Lt){return Ll(Lt)===Jd}function Wh(Lt){return Ll(Lt)===fl}function _0(Lt){return Ll(Lt)===Ku}function vh(Lt){return Ll(Lt)===Ju}function wp(Lt){return Ll(Lt)===Qd}function Tp(Lt){return Ll(Lt)===Zl}function Xh(Lt){if(!Lt)return!1;var vr=Ll(Lt);return $h.indexOf(vr)>=0?!0:_p(Lt)||Rf(Lt)||rt(Lt)}function ph(Lt){return Pe[Object.prototype.toString.call(Lt)]|0}function Nv(Lt,vr){var xr=vr.length;switch(Lt.type){case mo:case Uo:case ao:case $n:var tn=B.allocType(Lt.type,xr);tn.set(vr),Lt.data=tn;break;case Yi:Lt.data=In(vr);break}}function ev(Lt,vr){return B.allocType(Lt.type===Yi?$n:Lt.type,vr)}function tv(Lt,vr){Lt.type===Yi?(Lt.data=In(vr),B.freeType(vr)):Lt.data=vr}function w0(Lt,vr,xr,tn,_n,Mr){for(var Lr=Lt.width,qn=Lt.height,Nn=Lt.channels,Gn=Lr*qn*Nn,Wn=ev(Lt,Gn),Aa=0,ca=0;ca=1;)qn+=Lr*Nn*Nn,Nn/=2;return qn}else return Lr*xr*tn}function Ap(Lt,vr,xr,tn,_n,Mr,Lr){var qn={"don't care":Bc,"dont care":Bc,nice:Zd,fast:b0},Nn={repeat:cu,clamp:ul,mirror:oi},Gn={nearest:nl,linear:Lu},Wn=r({mipmap:Wl,"nearest mipmap nearest":al,"linear mipmap nearest":Ho,"nearest mipmap linear":dh,"linear mipmap linear":Wl},Gn),Aa={none:0,browser:Kd},ca={uint8:mo,rgba4:Ci,rgb565:qi,"rgb5 a1":Hi},aa={alpha:_i,luminance:Bi,"luminance alpha":yo,rgb:ci,rgba:Da,rgba4:es,"rgb5 a1":Qa,rgb565:Ii},zn={};vr.ext_srgb&&(aa.srgb=fo,aa.srgba=Vi),vr.oes_texture_float&&(ca.float32=ca.float=$n),vr.oes_texture_half_float&&(ca.float16=ca["half float"]=Yi),vr.webgl_depth_texture&&(r(aa,{depth:Wa,"depth stencil":Ai}),r(ca,{uint16:Uo,uint32:ao,"depth stencil":Ga})),vr.webgl_compressed_texture_s3tc&&r(zn,{"rgb s3tc dxt1":Ps,"rgba s3tc dxt1":ts,"rgba s3tc dxt3":Eo,"rgba s3tc dxt5":gs}),vr.webgl_compressed_texture_atc&&r(zn,{"rgb atc":jo,"rgba atc explicit alpha":no,"rgba atc interpolated alpha":dn}),vr.webgl_compressed_texture_pvrtc&&r(zn,{"rgb pvrtc 4bppv1":ia,"rgb pvrtc 2bppv1":Ef,"rgba pvrtc 4bppv1":bl,"rgba pvrtc 2bppv1":gi}),vr.webgl_compressed_texture_etc1&&(zn["rgb etc1"]=_o);var Ir=Array.prototype.slice.call(Lt.getParameter(Ln));Object.keys(zn).forEach(function(H){var ie=zn[H];Ir.indexOf(ie)>=0&&(aa[H]=ie)});var pn=Object.keys(aa);xr.textureFormats=pn;var vn=[];Object.keys(aa).forEach(function(H){var ie=aa[H];vn[ie]=H});var kn=[];Object.keys(ca).forEach(function(H){var ie=ca[H];kn[ie]=H});var Rn=[];Object.keys(Gn).forEach(function(H){var ie=Gn[H];Rn[ie]=H});var ma=[];Object.keys(Wn).forEach(function(H){var ie=Wn[H];ma[ie]=H});var ra=[];Object.keys(Nn).forEach(function(H){var ie=Nn[H];ra[ie]=H});var Ra=pn.reduce(function(H,ie){var W=aa[ie];return W===Bi||W===_i||W===Bi||W===yo||W===Wa||W===Ai||vr.ext_srgb&&(W===fo||W===Vi)?H[W]=W:W===Qa||ie.indexOf("rgba")>=0?H[W]=Da:H[W]=ci,H},{});function Cn(){this.internalformat=Da,this.format=Da,this.type=mo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Kd,this.width=0,this.height=0,this.channels=0}function bn(H,ie){H.internalformat=ie.internalformat,H.format=ie.format,H.type=ie.type,H.compressed=ie.compressed,H.premultiplyAlpha=ie.premultiplyAlpha,H.flipY=ie.flipY,H.unpackAlignment=ie.unpackAlignment,H.colorSpace=ie.colorSpace,H.width=ie.width,H.height=ie.height,H.channels=ie.channels}function ha(H,ie){if(!(typeof ie!="object"||!ie)){if("premultiplyAlpha"in ie&&(H.premultiplyAlpha=ie.premultiplyAlpha),"flipY"in ie&&(H.flipY=ie.flipY),"alignment"in ie&&(H.unpackAlignment=ie.alignment),"colorSpace"in ie&&(H.colorSpace=Aa[ie.colorSpace]),"type"in ie){var W=ie.type;H.type=ca[W]}var ce=H.width,Me=H.height,ze=H.channels,$e=!1;"shape"in ie?(ce=ie.shape[0],Me=ie.shape[1],ie.shape.length===3&&(ze=ie.shape[2],$e=!0)):("radius"in ie&&(ce=Me=ie.radius),"width"in ie&&(ce=ie.width),"height"in ie&&(Me=ie.height),"channels"in ie&&(ze=ie.channels,$e=!0)),H.width=ce|0,H.height=Me|0,H.channels=ze|0;var Ye=!1;if("format"in ie){var Je=ie.format,lt=H.internalformat=aa[Je];H.format=Ra[lt],Je in ca&&("type"in ie||(H.type=ca[Je])),Je in zn&&(H.compressed=!0),Ye=!0}!$e&&Ye?H.channels=Vo[H.format]:$e&&!Ye&&H.channels!==Xl[H.format]&&(H.format=H.internalformat=Xl[H.channels])}}function on(H){Lt.pixelStorei(_d,H.flipY),Lt.pixelStorei(Ys,H.premultiplyAlpha),Lt.pixelStorei(ys,H.colorSpace),Lt.pixelStorei(bd,H.unpackAlignment)}function la(){Cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Xn(H,ie){var W=null;if(Xh(ie)?W=ie:ie&&(ha(H,ie),"x"in ie&&(H.xOffset=ie.x|0),"y"in ie&&(H.yOffset=ie.y|0),Xh(ie.data)&&(W=ie.data)),ie.copy){var ce=_n.viewportWidth,Me=_n.viewportHeight;H.width=H.width||ce-H.xOffset,H.height=H.height||Me-H.yOffset,H.needsCopy=!0}else if(!W)H.width=H.width||1,H.height=H.height||1,H.channels=H.channels||4;else if(Tt(W))H.channels=H.channels||4,H.data=W,!("type"in ie)&&H.type===mo&&(H.type=ph(W));else if(_p(W))H.channels=H.channels||4,Nv(H,W),H.alignment=1,H.needsFree=!0;else if(rt(W)){var ze=W.data;!Array.isArray(ze)&&H.type===mo&&(H.type=ph(ze));var $e=W.shape,Ye=W.stride,Je,lt,_t,xt,Ot,Ut;$e.length===3?(_t=$e[2],Ut=Ye[2]):(_t=1,Ut=1),Je=$e[0],lt=$e[1],xt=Ye[0],Ot=Ye[1],H.alignment=1,H.width=Je,H.height=lt,H.channels=_t,H.format=H.internalformat=Xl[_t],H.needsFree=!0,w0(H,ze,xt,Ot,Ut,W.offset)}else if(qc(W)||Wh(W)||_0(W))qc(W)||Wh(W)?H.element=W:H.element=W.canvas,H.width=H.element.width,H.height=H.element.height,H.channels=4;else if(vh(W))H.element=W,H.width=W.width,H.height=W.height,H.channels=4;else if(wp(W))H.element=W,H.width=W.naturalWidth,H.height=W.naturalHeight,H.channels=4;else if(Tp(W))H.element=W,H.width=W.videoWidth,H.height=W.videoHeight,H.channels=4;else if(Rf(W)){var jt=H.width||W[0].length,Mt=H.height||W.length,zt=H.channels;ua(W[0][0])?zt=zt||W[0][0].length:zt=zt||1;for(var Nt=mt.shape(W),or=1,dr=0;dr>=Me,W.height>>=Me,Xn(W,ce[Me]),H.mipmask|=1<=0&&!("faces"in ie)&&(H.genMipmaps=!0)}if("mag"in ie){var ce=ie.mag;H.magFilter=Gn[ce]}var Me=H.wrapS,ze=H.wrapT;if("wrap"in ie){var $e=ie.wrap;typeof $e=="string"?Me=ze=Nn[$e]:Array.isArray($e)&&(Me=Nn[$e[0]],ze=Nn[$e[1]])}else{if("wrapS"in ie){var Ye=ie.wrapS;Me=Nn[Ye]}if("wrapT"in ie){var Je=ie.wrapT;ze=Nn[Je]}}if(H.wrapS=Me,H.wrapT=ze,"anisotropic"in ie&&(ie.anisotropic,H.anisotropic=ie.anisotropic),"mipmap"in ie){var lt=!1;switch(typeof ie.mipmap){case"string":H.mipmapHint=qn[ie.mipmap],H.genMipmaps=!0,lt=!0;break;case"boolean":lt=H.genMipmaps=ie.mipmap;break;case"object":H.genMipmaps=!1,lt=!0;break}lt&&!("min"in ie)&&(H.minFilter=al)}}function Qs(H,ie){Lt.texParameteri(ie,hu,H.minFilter),Lt.texParameteri(ie,kf,H.magFilter),Lt.texParameteri(ie,ai,H.wrapS),Lt.texParameteri(ie,ri,H.wrapT),vr.ext_texture_filter_anisotropic&&Lt.texParameteri(ie,Zi,H.anisotropic),H.genMipmaps&&(Lt.hint(Fv,H.mipmapHint),Lt.generateMipmap(ie))}var qu=0,rs={},Fs=xr.maxTextureUnits,Ka=Array(Fs).map(function(){return null});function nu(H){Cn.call(this),this.mipmask=0,this.internalformat=Da,this.id=qu++,this.refCount=1,this.target=H,this.texture=Lt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ks,Lr.profile&&(this.stats={size:0})}function Po(H){Lt.activeTexture(Cf),Lt.bindTexture(H.target,H.texture)}function Bo(){var H=Ka[0];H?Lt.bindTexture(H.target,H.texture):Lt.bindTexture(oa,null)}function Ns(H){var ie=H.texture,W=H.unit,ce=H.target;W>=0&&(Lt.activeTexture(Cf+W),Lt.bindTexture(ce,null),Ka[W]=null),Lt.deleteTexture(ie),H.texture=null,H.params=null,H.pixels=null,H.refCount=0,delete rs[H.id],Mr.textureCount--}r(nu.prototype,{bind:function(){var H=this;H.bindCount+=1;var ie=H.unit;if(ie<0){for(var W=0;W0)continue;ce.unit=-1}Ka[W]=H,ie=W;break}Lr.profile&&Mr.maxTextureUnits>Ot)-_t,Ut.height=Ut.height||(W.height>>Ot)-xt,Po(W),vi(Ut,oa,_t,xt,Ot),Bo(),Qn(Ut),ce}function ze($e,Ye){var Je=$e|0,lt=Ye|0||Je;if(Je===W.width&<===W.height)return ce;ce.width=W.width=Je,ce.height=W.height=lt,Po(W);for(var _t=0;W.mipmask>>_t;++_t){var xt=Je>>_t,Ot=lt>>_t;if(!xt||!Ot)break;Lt.texImage2D(oa,_t,W.format,xt,Ot,0,W.format,W.type,null)}return Bo(),Lr.profile&&(W.stats.size=gc(W.internalformat,W.type,Je,lt,!1,!1)),ce}return ce(H,ie),ce.subimage=Me,ce.resize=ze,ce._reglType="texture2d",ce._texture=W,Lr.profile&&(ce.stats=W.stats),ce.destroy=function(){W.decRef()},ce}function mi(H,ie,W,ce,Me,ze){var $e=new nu(Ta);rs[$e.id]=$e,Mr.cubeCount++;var Ye=new Array(6);function Je(xt,Ot,Ut,jt,Mt,zt){var Nt,or=$e.texInfo;for(ks.call(or),Nt=0;Nt<6;++Nt)Ye[Nt]=Es();if(typeof xt=="number"||!xt){var dr=xt|0||1;for(Nt=0;Nt<6;++Nt)Fi(Ye[Nt],dr,dr)}else if(typeof xt=="object")if(Ot)Wi(Ye[0],xt),Wi(Ye[1],Ot),Wi(Ye[2],Ut),Wi(Ye[3],jt),Wi(Ye[4],Mt),Wi(Ye[5],zt);else if(Js(or,xt),ha($e,xt),"faces"in xt){var wr=xt.faces;for(Nt=0;Nt<6;++Nt)bn(Ye[Nt],$e),Wi(Ye[Nt],wr[Nt])}else for(Nt=0;Nt<6;++Nt)Wi(Ye[Nt],xt);for(bn($e,Ye[0]),or.genMipmaps?$e.mipmask=(Ye[0].width<<1)-1:$e.mipmask=Ye[0].mipmask,$e.internalformat=Ye[0].internalformat,Je.width=Ye[0].width,Je.height=Ye[0].height,Po($e),Nt=0;Nt<6;++Nt)ss(Ye[Nt],ba+Nt);for(Qs(or,Ta),Bo(),Lr.profile&&($e.stats.size=gc($e.internalformat,$e.type,Je.width,Je.height,or.genMipmaps,!0)),Je.format=vn[$e.internalformat],Je.type=kn[$e.type],Je.mag=Rn[or.magFilter],Je.min=ma[or.minFilter],Je.wrapS=ra[or.wrapS],Je.wrapT=ra[or.wrapT],Nt=0;Nt<6;++Nt)co(Ye[Nt]);return Je}function lt(xt,Ot,Ut,jt,Mt){var zt=Ut|0,Nt=jt|0,or=Mt|0,dr=Pa();return bn(dr,$e),dr.width=0,dr.height=0,Xn(dr,Ot),dr.width=dr.width||($e.width>>or)-zt,dr.height=dr.height||($e.height>>or)-Nt,Po($e),vi(dr,ba+xt,zt,Nt,or),Bo(),Qn(dr),Je}function _t(xt){var Ot=xt|0;if(Ot!==$e.width){Je.width=$e.width=Ot,Je.height=$e.height=Ot,Po($e);for(var Ut=0;Ut<6;++Ut)for(var jt=0;$e.mipmask>>jt;++jt)Lt.texImage2D(ba+Ut,jt,$e.format,Ot>>jt,Ot>>jt,0,$e.format,$e.type,null);return Bo(),Lr.profile&&($e.stats.size=gc($e.internalformat,$e.type,Je.width,Je.height,!1,!0)),Je}}return Je(H,ie,W,ce,Me,ze),Je.subimage=lt,Je.resize=_t,Je._reglType="textureCube",Je._texture=$e,Lr.profile&&(Je.stats=$e.stats),Je.destroy=function(){$e.decRef()},Je}function Xi(){for(var H=0;H>ce,W.height>>ce,0,W.internalformat,W.type,null);else for(var Me=0;Me<6;++Me)Lt.texImage2D(ba+Me,ce,W.internalformat,W.width>>ce,W.height>>ce,0,W.internalformat,W.type,null);Qs(W.texInfo,W.target)})}function ue(){for(var H=0;H=0?Es=!0:Nn.indexOf(co)>=0&&(Es=!1))),("depthTexture"in Ka||"depthStencilTexture"in Ka)&&(Fs=!!(Ka.depthTexture||Ka.depthStencilTexture)),"depth"in Ka&&(typeof Ka.depth=="boolean"?Wi=Ka.depth:(Qs=Ka.depth,ss=!1)),"stencil"in Ka&&(typeof Ka.stencil=="boolean"?ss=Ka.stencil:(qu=Ka.stencil,Wi=!1)),"depthStencil"in Ka&&(typeof Ka.depthStencil=="boolean"?Wi=ss=Ka.depthStencil:(rs=Ka.depthStencil,Wi=!1,ss=!1))}var Po=null,Bo=null,Ns=null,Ol=null;if(Array.isArray(Ri))Po=Ri.map(aa);else if(Ri)Po=[aa(Ri)];else for(Po=new Array(Js),Qn=0;Qn0&&(Pa.depth=la[0].depth,Pa.stencil=la[0].stencil,Pa.depthStencil=la[0].depthStencil),la[_a]?la[_a](Pa):la[_a]=Cn(Pa)}return r(Xn,{width:Qn,height:Qn,color:co})}function La(vi){var _a,Pa=vi|0;if(Pa===Xn.width)return Xn;var Qn=Xn.color;for(_a=0;_a=si.byteLength?Fi.subdata(si):(Fi.destroy(),bn.buffers[_a]=null)),bn.buffers[_a]||(Fi=bn.buffers[_a]=_n.create(Pa,mc,!1,!0)),Qn.buffer=_n.getBuffer(Fi),Qn.size=Qn.buffer.dimension|0,Qn.normalized=!1,Qn.type=Qn.buffer.dtype,Qn.offset=0,Qn.stride=0,Qn.divisor=0,Qn.state=1,La[_a]=1}else _n.getBuffer(Pa)?(Qn.buffer=_n.getBuffer(Pa),Qn.size=Qn.buffer.dimension|0,Qn.normalized=!1,Qn.type=Qn.buffer.dtype,Qn.offset=0,Qn.stride=0,Qn.divisor=0,Qn.state=1):_n.getBuffer(Pa.buffer)?(Qn.buffer=_n.getBuffer(Pa.buffer),Qn.size=(+Pa.size||Qn.buffer.dimension)|0,Qn.normalized=!!Pa.normalized||!1,"type"in Pa?Qn.type=Rr[Pa.type]:Qn.type=Qn.buffer.dtype,Qn.offset=(Pa.offset||0)|0,Qn.stride=(Pa.stride||0)|0,Qn.divisor=(Pa.divisor||0)|0,Qn.state=1):"x"in Pa&&(Qn.x=+Pa.x||0,Qn.y=+Pa.y||0,Qn.z=+Pa.z||0,Qn.w=+Pa.w||0,Qn.state=2)}for(var Wi=0;Wi1)for(var on=0;onIr&&(Ir=pn.stats.uniformsCount)}),Ir},xr.getMaxAttributesCount=function(){var Ir=0;return Wn.forEach(function(pn){pn.stats.attributesCount>Ir&&(Ir=pn.stats.attributesCount)}),Ir});function zn(){_n={},Mr={};for(var Ir=0;Ir>>4&15)+vr.charAt(tn&15);return xr}function Df(Lt){for(var vr="",xr=-1,tn,_n;++xr>>6&31,128|tn&63):tn<=65535?vr+=String.fromCharCode(224|tn>>>12&15,128|tn>>>6&63,128|tn&63):tn<=2097151&&(vr+=String.fromCharCode(240|tn>>>18&7,128|tn>>>12&63,128|tn>>>6&63,128|tn&63));return vr}function bc(Lt){for(var vr=Array(Lt.length>>2),xr=0;xr>5]|=(Lt.charCodeAt(xr/8)&255)<<24-xr%32;return vr}function _c(Lt){for(var vr="",xr=0;xr>5]>>>24-xr%32&255);return vr}function No(Lt,vr){return Lt>>>vr|Lt<<32-vr}function Ql(Lt,vr){return Lt>>>vr}function vu(Lt,vr,xr){return Lt&vr^~Lt&xr}function ed(Lt,vr,xr){return Lt&vr^Lt&xr^vr&xr}function td(Lt){return No(Lt,2)^No(Lt,13)^No(Lt,22)}function eu(Lt){return No(Lt,6)^No(Lt,11)^No(Lt,25)}function pu(Lt){return No(Lt,7)^No(Lt,18)^Ql(Lt,3)}function tf(Lt){return No(Lt,17)^No(Lt,19)^Ql(Lt,10)}var gu=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function If(Lt,vr){var xr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),tn=new Array(64),_n,Mr,Lr,qn,Nn,Gn,Wn,Aa,ca,aa,zn,Ir;for(Lt[vr>>5]|=128<<24-vr%32,Lt[(vr+64>>9<<4)+15]=vr,ca=0;ca>16)+(vr>>16)+(xr>>16);return tn<<16|xr&65535}function wc(Lt){return Array.prototype.slice.call(Lt)}function $c(Lt){return wc(Lt).join("")}function ov(Lt){var vr=Lt&&Lt.cache,xr=0,tn=[],_n=[],Mr=[];function Lr(zn,Ir){var pn=Ir&&Ir.stable;if(!pn){for(var vn=0;vn<_n.length;++vn)if(_n[vn]===zn&&!Mr[vn])return tn[vn]}var kn="g"+xr++;return tn.push(kn),_n.push(zn),Mr.push(pn),kn}function qn(){var zn=[];function Ir(){zn.push.apply(zn,wc(arguments))}var pn=[];function vn(){var kn="v"+xr++;return pn.push(kn),arguments.length>0&&(zn.push(kn,"="),zn.push.apply(zn,wc(arguments)),zn.push(";")),kn}return r(Ir,{def:vn,toString:function(){return $c([pn.length>0?"var "+pn.join(",")+";":"",$c(zn)])}})}function Nn(){var zn=qn(),Ir=qn(),pn=zn.toString,vn=Ir.toString;function kn(Rn,ma){Ir(Rn,ma,"=",zn.def(Rn,ma),";")}return r(function(){zn.apply(zn,wc(arguments))},{def:zn.def,entry:zn,exit:Ir,save:kn,set:function(Rn,ma,ra){kn(Rn,ma),zn(Rn,ma,"=",ra,";")},toString:function(){return pn()+vn()}})}function Gn(){var zn=$c(arguments),Ir=Nn(),pn=Nn(),vn=Ir.toString,kn=pn.toString;return r(Ir,{then:function(){return Ir.apply(Ir,wc(arguments)),this},else:function(){return pn.apply(pn,wc(arguments)),this},toString:function(){var Rn=kn();return Rn&&(Rn="else{"+Rn+"}"),$c(["if(",zn,"){",vn(),"}",Rn])}})}var Wn=qn(),Aa={};function ca(zn,Ir){var pn=[];function vn(){var Ra="a"+pn.length;return pn.push(Ra),Ra}Ir=Ir||0;for(var kn=0;kn":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Dr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Or={cw:Xe,ccw:Ke};function Sr(Lt){return Array.isArray(Lt)||Tt(Lt)||rt(Lt)}function yn(Lt){return Lt.sort(function(vr,xr){return vr===Ff?-1:xr===Ff?1:vr=1,tn>=2,vr)}else if(xr===Xc){var _n=Lt.data;return new On(_n.thisDep,_n.contextDep,_n.propDep,vr)}else{if(xr===Of)return new On(!1,!1,!1,vr);if(xr===yu){for(var Mr=!1,Lr=!1,qn=!1,Nn=0;Nn=1&&(Lr=!0),Wn>=2&&(qn=!0)}else Gn.type===Xc&&(Mr=Mr||Gn.data.thisDep,Lr=Lr||Gn.data.contextDep,qn=qn||Gn.data.propDep)}return new On(Mr,Lr,qn,vr)}else return new On(xr===rf,xr===Ad,xr===Dl,vr)}}var sa=new On(!1,!1,!1,function(){});function Oa(Lt,vr,xr,tn,_n,Mr,Lr,qn,Nn,Gn,Wn,Aa,ca,aa,zn,Ir){var pn=Gn.Record,vn={add:32774,subtract:32778,"reverse subtract":32779};xr.ext_blend_minmax&&(vn.min=dt,vn.max=at);var kn=xr.angle_instanced_arrays,Rn=xr.webgl_draw_buffers,ma=xr.oes_vertex_array_object,ra={dirty:!0,profile:Ir.profile},Ra={},Cn=[],bn={},ha={};function on(Ye){return Ye.replace(".","_")}function la(Ye,Je,lt){var _t=on(Ye);Cn.push(Ye),Ra[_t]=ra[_t]=!!lt,bn[_t]=Je}function Xn(Ye,Je,lt){var _t=on(Ye);Cn.push(Ye),Array.isArray(lt)?(ra[_t]=lt.slice(),Ra[_t]=lt.slice()):ra[_t]=Ra[_t]=lt,ha[_t]=Je}function La(Ye){return!!isNaN(Ye)}la(mu,Ed),la(Sd,jf),Xn(Tc,"blendColor",[0,0,0,0]),Xn(Zc,"blendEquationSeparate",[ir,ir]),Xn(zf,"blendFuncSeparate",[ar,Zt,ar,Zt]),la(dl,wh,!0),Xn(xu,"depthFunc",Tr),Xn(Al,"depthRange",[0,1]),Xn(Ou,"depthMask",!0),Xn(rd,rd,[!0,!0,!0,!0]),la(Ac,Vv),Xn(oo,"cullFace",Ve),Xn(bu,bu,Ke),Xn(Xs,Xs,1),la(Sc,Bu),Xn(nf,"polygonOffset",[0,0]),la(sv,Hf),la(lv,ru),Xn(nd,"sampleCoverage",[1,!1]),la(wo,Uf),Xn(Md,"stencilMask",-1),Xn(af,"stencilFunc",[St,0,-1]),Xn(zu,"stencilOpSeparate",[Re,Gt,Gt,Gt]),Xn(Fu,"stencilOpSeparate",[Ve,Gt,Gt,Gt]),la(Il,kd),Xn(Sl,"scissor",[0,0,Lt.drawingBufferWidth,Lt.drawingBufferHeight]),Xn(Ff,Ff,[0,0,Lt.drawingBufferWidth,Lt.drawingBufferHeight]);var vi={gl:Lt,context:ca,strings:vr,next:Ra,current:ra,draw:Aa,elements:Mr,buffer:_n,shader:Wn,attributes:Gn.state,vao:Gn,uniforms:Nn,framebuffer:qn,extensions:xr,timer:aa,isBufferArgs:Sr},_a={primTypes:Wt,compareFuncs:Ar,blendFuncs:yr,blendEquations:vn,stencilOps:Dr,glTypes:Rr,orientationType:Or};Rn&&(_a.backBuffer=[Ve],_a.drawBuffer=x(tn.maxDrawbuffers,function(Ye){return Ye===0?[0]:x(Ye,function(Je){return sr+Je})}));var Pa=0;function Qn(){var Ye=ov({cache:zn}),Je=Ye.link,lt=Ye.global;Ye.id=Pa++,Ye.batchId="0";var _t=Je(vi),xt=Ye.shared={props:"a0"};Object.keys(vi).forEach(function(zt){xt[zt]=lt.def(_t,".",zt)});var Ot=Ye.next={},Ut=Ye.current={};Object.keys(ha).forEach(function(zt){Array.isArray(ra[zt])&&(Ot[zt]=lt.def(xt.next,".",zt),Ut[zt]=lt.def(xt.current,".",zt))});var jt=Ye.constants={};Object.keys(_a).forEach(function(zt){jt[zt]=lt.def(JSON.stringify(_a[zt]))}),Ye.invoke=function(zt,Nt){switch(Nt.type){case Iu:var or=["this",xt.context,xt.props,Ye.batchId];return zt.def(Je(Nt.data),".call(",or.slice(0,Math.max(Nt.data.length+1,4)),")");case Dl:return zt.def(xt.props,Nt.data);case Ad:return zt.def(xt.context,Nt.data);case rf:return zt.def("this",Nt.data);case Xc:return Nt.data.append(Ye,zt),Nt.data.ref;case Of:return Nt.data.toString();case yu:return Nt.data.map(function(dr){return Ye.invoke(zt,dr)})}},Ye.attribCache={};var Mt={};return Ye.scopeAttrib=function(zt){var Nt=vr.id(zt);if(Nt in Mt)return Mt[Nt];var or=Gn.scope[Nt];or||(or=Gn.scope[Nt]=new pn);var dr=Mt[Nt]=Je(or);return dr},Ye}function si(Ye){var Je=Ye.static,lt=Ye.dynamic,_t;if(Nu in Je){var xt=!!Je[Nu];_t=Mn(function(Ut,jt){return xt}),_t.enable=xt}else if(Nu in lt){var Ot=lt[Nu];_t=Un(Ot,function(Ut,jt){return Ut.invoke(jt,Ot)})}return _t}function Fi(Ye,Je){var lt=Ye.static,_t=Ye.dynamic;if(Kc in lt){var xt=lt[Kc];return xt?(xt=qn.getFramebuffer(xt),Mn(function(Ut,jt){var Mt=Ut.link(xt),zt=Ut.shared;jt.set(zt.framebuffer,".next",Mt);var Nt=zt.context;return jt.set(Nt,"."+Bf,Mt+".width"),jt.set(Nt,"."+tu,Mt+".height"),Mt})):Mn(function(Ut,jt){var Mt=Ut.shared;jt.set(Mt.framebuffer,".next","null");var zt=Mt.context;return jt.set(zt,"."+Bf,zt+"."+sf),jt.set(zt,"."+tu,zt+"."+qf),"null"})}else if(Kc in _t){var Ot=_t[Kc];return Un(Ot,function(Ut,jt){var Mt=Ut.invoke(jt,Ot),zt=Ut.shared,Nt=zt.framebuffer,or=jt.def(Nt,".getFramebuffer(",Mt,")");jt.set(Nt,".next",or);var dr=zt.context;return jt.set(dr,"."+Bf,or+"?"+or+".width:"+dr+"."+sf),jt.set(dr,"."+tu,or+"?"+or+".height:"+dr+"."+qf),or})}else return null}function Wi(Ye,Je,lt){var _t=Ye.static,xt=Ye.dynamic;function Ot(Mt){if(Mt in _t){var zt=_t[Mt],Nt=!0,or=zt.x|0,dr=zt.y|0,wr,Ur;return"width"in zt?wr=zt.width|0:Nt=!1,"height"in zt?Ur=zt.height|0:Nt=!1,new On(!Nt&&Je&&Je.thisDep,!Nt&&Je&&Je.contextDep,!Nt&&Je&&Je.propDep,function($r,Kr){var ln=$r.shared.context,Qr=wr;"width"in zt||(Qr=Kr.def(ln,".",Bf,"-",or));var wn=Ur;return"height"in zt||(wn=Kr.def(ln,".",tu,"-",dr)),[or,dr,Qr,wn]})}else if(Mt in xt){var Fr=xt[Mt],Nr=Un(Fr,function($r,Kr){var ln=$r.invoke(Kr,Fr),Qr=$r.shared.context,wn=Kr.def(ln,".x|0"),jn=Kr.def(ln,".y|0"),na=Kr.def('"width" in ',ln,"?",ln,".width|0:","(",Qr,".",Bf,"-",wn,")"),Vn=Kr.def('"height" in ',ln,"?",ln,".height|0:","(",Qr,".",tu,"-",jn,")");return[wn,jn,na,Vn]});return Je&&(Nr.thisDep=Nr.thisDep||Je.thisDep,Nr.contextDep=Nr.contextDep||Je.contextDep,Nr.propDep=Nr.propDep||Je.propDep),Nr}else return Je?new On(Je.thisDep,Je.contextDep,Je.propDep,function($r,Kr){var ln=$r.shared.context;return[0,0,Kr.def(ln,".",Bf),Kr.def(ln,".",tu)]}):null}var Ut=Ot(Ff);if(Ut){var jt=Ut;Ut=new On(Ut.thisDep,Ut.contextDep,Ut.propDep,function(Mt,zt){var Nt=jt.append(Mt,zt),or=Mt.shared.context;return zt.set(or,"."+xh,Nt[2]),zt.set(or,"."+bh,Nt[3]),Nt})}return{viewport:Ut,scissor_box:Ot(Sl)}}function ss(Ye,Je){var lt=Ye.static,_t=typeof lt[Nf]=="string"&&typeof lt[Mc]=="string";if(_t){if(Object.keys(Je.dynamic).length>0)return null;var xt=Je.static,Ot=Object.keys(xt);if(Ot.length>0&&typeof xt[Ot[0]]=="number"){for(var Ut=[],jt=0;jt"+wn+"?"+Nt+".constant["+wn+"]:0;"}).join(""),"}}else{","if(",wr,"(",Nt,".buffer)){",$r,"=",Ur,".createStream(",lf,",",Nt,".buffer);","}else{",$r,"=",Ur,".getBuffer(",Nt,".buffer);","}",Kr,'="type" in ',Nt,"?",dr.glTypes,"[",Nt,".type]:",$r,".dtype;",Fr.normalized,"=!!",Nt,".normalized;");function ln(Qr){zt(Fr[Qr],"=",Nt,".",Qr,"|0;")}return ln("size"),ln("offset"),ln("stride"),ln("divisor"),zt("}}"),zt.exit("if(",Fr.isStream,"){",Ur,".destroyStream(",$r,");","}"),Fr}xt[Ot]=Un(Ut,jt)}),xt}function Qs(Ye){var Je=Ye.static,lt=Ye.dynamic,_t={};return Object.keys(Je).forEach(function(xt){var Ot=Je[xt];_t[xt]=Mn(function(Ut,jt){return typeof Ot=="number"||typeof Ot=="boolean"?""+Ot:Ut.link(Ot)})}),Object.keys(lt).forEach(function(xt){var Ot=lt[xt];_t[xt]=Un(Ot,function(Ut,jt){return Ut.invoke(jt,Ot)})}),_t}function qu(Ye,Je,lt,_t,xt){Ye.static,Ye.dynamic;var Ot=ss(Ye,Je),Ut=Fi(Ye),jt=Wi(Ye,Ut),Mt=Es(Ye),zt=co(Ye),Nt=Ri(Ye,xt,Ot);function or($r){var Kr=jt[$r];Kr&&(zt[$r]=Kr)}or(Ff),or(on(Sl));var dr=Object.keys(zt).length>0,wr={framebuffer:Ut,draw:Mt,shader:Nt,state:zt,dirty:dr,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(wr.profile=si(Ye),wr.uniforms=ks(lt),wr.drawVAO=wr.scopeVAO=Mt.vao,!wr.drawVAO&&Nt.program&&!Ot&&xr.angle_instanced_arrays&&Mt.static.elements){var Ur=!0,Fr=Nt.program.attributes.map(function($r){var Kr=Je.static[$r];return Ur=Ur&&!!Kr,Kr});if(Ur&&Fr.length>0){var Nr=Gn.getVAO(Gn.createVAO({attributes:Fr,elements:Mt.static.elements}));wr.drawVAO=new On(null,null,null,function($r,Kr){return $r.link(Nr)}),wr.useVAO=!0}}return Ot?wr.useVAO=!0:wr.attributes=Js(Je),wr.context=Qs(_t),wr}function rs(Ye,Je,lt){var _t=Ye.shared,xt=_t.context,Ot=Ye.scope();Object.keys(lt).forEach(function(Ut){Je.save(xt,"."+Ut);var jt=lt[Ut],Mt=jt.append(Ye,Je);Array.isArray(Mt)?Ot(xt,".",Ut,"=[",Mt.join(),"];"):Ot(xt,".",Ut,"=",Mt,";")}),Je(Ot)}function Fs(Ye,Je,lt,_t){var xt=Ye.shared,Ot=xt.gl,Ut=xt.framebuffer,jt;Rn&&(jt=Je.def(xt.extensions,".webgl_draw_buffers"));var Mt=Ye.constants,zt=Mt.drawBuffer,Nt=Mt.backBuffer,or;lt?or=lt.append(Ye,Je):or=Je.def(Ut,".next"),_t||Je("if(",or,"!==",Ut,".cur){"),Je("if(",or,"){",Ot,".bindFramebuffer(",hr,",",or,".framebuffer);"),Rn&&Je(jt,".drawBuffersWEBGL(",zt,"[",or,".colorAttachments.length]);"),Je("}else{",Ot,".bindFramebuffer(",hr,",null);"),Rn&&Je(jt,".drawBuffersWEBGL(",Nt,");"),Je("}",Ut,".cur=",or,";"),_t||Je("}")}function Ka(Ye,Je,lt){var _t=Ye.shared,xt=_t.gl,Ot=Ye.current,Ut=Ye.next,jt=_t.current,Mt=_t.next,zt=Ye.cond(jt,".dirty");Cn.forEach(function(Nt){var or=on(Nt);if(!(or in lt.state)){var dr,wr;if(or in Ut){dr=Ut[or],wr=Ot[or];var Ur=x(ra[or].length,function(Nr){return zt.def(dr,"[",Nr,"]")});zt(Ye.cond(Ur.map(function(Nr,$r){return Nr+"!=="+wr+"["+$r+"]"}).join("||")).then(xt,".",ha[or],"(",Ur,");",Ur.map(function(Nr,$r){return wr+"["+$r+"]="+Nr}).join(";"),";"))}else{dr=zt.def(Mt,".",or);var Fr=Ye.cond(dr,"!==",jt,".",or);zt(Fr),or in bn?Fr(Ye.cond(dr).then(xt,".enable(",bn[or],");").else(xt,".disable(",bn[or],");"),jt,".",or,"=",dr,";"):Fr(xt,".",ha[or],"(",dr,");",jt,".",or,"=",dr,";")}}}),Object.keys(lt.state).length===0&&zt(jt,".dirty=false;"),Je(zt)}function nu(Ye,Je,lt,_t){var xt=Ye.shared,Ot=Ye.current,Ut=xt.current,jt=xt.gl,Mt;yn(Object.keys(lt)).forEach(function(zt){var Nt=lt[zt];if(!(_t&&!_t(Nt))){var or=Nt.append(Ye,Je);if(bn[zt]){var dr=bn[zt];Zn(Nt)?(Mt=Ye.link(or,{stable:!0}),Je(Ye.cond(Mt).then(jt,".enable(",dr,");").else(jt,".disable(",dr,");")),Je(Ut,".",zt,"=",Mt,";")):(Je(Ye.cond(or).then(jt,".enable(",dr,");").else(jt,".disable(",dr,");")),Je(Ut,".",zt,"=",or,";"))}else if(ua(or)){var wr=Ot[zt];Je(jt,".",ha[zt],"(",or,");",or.map(function(Ur,Fr){return wr+"["+Fr+"]="+Ur}).join(";"),";")}else Zn(Nt)?(Mt=Ye.link(or,{stable:!0}),Je(jt,".",ha[zt],"(",Mt,");",Ut,".",zt,"=",Mt,";")):Je(jt,".",ha[zt],"(",or,");",Ut,".",zt,"=",or,";")}})}function Po(Ye,Je){kn&&(Ye.instancing=Je.def(Ye.shared.extensions,".angle_instanced_arrays"))}function Bo(Ye,Je,lt,_t,xt){var Ot=Ye.shared,Ut=Ye.stats,jt=Ot.current,Mt=Ot.timer,zt=lt.profile;function Nt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var or,dr;function wr(ln){or=Je.def(),ln(or,"=",Nt(),";"),typeof xt=="string"?ln(Ut,".count+=",xt,";"):ln(Ut,".count++;"),aa&&(_t?(dr=Je.def(),ln(dr,"=",Mt,".getNumPendingQueries();")):ln(Mt,".beginQuery(",Ut,");"))}function Ur(ln){ln(Ut,".cpuTime+=",Nt(),"-",or,";"),aa&&(_t?ln(Mt,".pushScopeStats(",dr,",",Mt,".getNumPendingQueries(),",Ut,");"):ln(Mt,".endQuery();"))}function Fr(ln){var Qr=Je.def(jt,".profile");Je(jt,".profile=",ln,";"),Je.exit(jt,".profile=",Qr,";")}var Nr;if(zt){if(Zn(zt)){zt.enable?(wr(Je),Ur(Je.exit),Fr("true")):Fr("false");return}Nr=zt.append(Ye,Je),Fr(Nr)}else Nr=Je.def(jt,".profile");var $r=Ye.block();wr($r),Je("if(",Nr,"){",$r,"}");var Kr=Ye.block();Ur(Kr),Je.exit("if(",Nr,"){",Kr,"}")}function Ns(Ye,Je,lt,_t,xt){var Ot=Ye.shared;function Ut(Mt){switch(Mt){case eh:case fv:case _u:return 2;case Ml:case ff:case cf:return 3;case uf:case zs:case Wo:return 4;default:return 1}}function jt(Mt,zt,Nt){var or=Ot.gl,dr=Je.def(Mt,".location"),wr=Je.def(Ot.attributes,"[",dr,"]"),Ur=Nt.state,Fr=Nt.buffer,Nr=[Nt.x,Nt.y,Nt.z,Nt.w],$r=["buffer","normalized","offset","stride"];function Kr(){Je("if(!",wr,".buffer){",or,".enableVertexAttribArray(",dr,");}");var Qr=Nt.type,wn;if(Nt.size?wn=Je.def(Nt.size,"||",zt):wn=zt,Je("if(",wr,".type!==",Qr,"||",wr,".size!==",wn,"||",$r.map(function(na){return wr+"."+na+"!=="+Nt[na]}).join("||"),"){",or,".bindBuffer(",lf,",",Fr,".buffer);",or,".vertexAttribPointer(",[dr,wn,Qr,Nt.normalized,Nt.stride,Nt.offset],");",wr,".type=",Qr,";",wr,".size=",wn,";",$r.map(function(na){return wr+"."+na+"="+Nt[na]+";"}).join(""),"}"),kn){var jn=Nt.divisor;Je("if(",wr,".divisor!==",jn,"){",Ye.instancing,".vertexAttribDivisorANGLE(",[dr,jn],");",wr,".divisor=",jn,";}")}}function ln(){Je("if(",wr,".buffer){",or,".disableVertexAttribArray(",dr,");",wr,".buffer=null;","}if(",Wc.map(function(Qr,wn){return wr+"."+Qr+"!=="+Nr[wn]}).join("||"),"){",or,".vertexAttrib4f(",dr,",",Nr,");",Wc.map(function(Qr,wn){return wr+"."+Qr+"="+Nr[wn]+";"}).join(""),"}")}Ur===Ji?Kr():Ur===Gi?ln():(Je("if(",Ur,"===",Ji,"){"),Kr(),Je("}else{"),ln(),Je("}"))}_t.forEach(function(Mt){var zt=Mt.name,Nt=lt.attributes[zt],or;if(Nt){if(!xt(Nt))return;or=Nt.append(Ye,Je)}else{if(!xt(sa))return;var dr=Ye.scopeAttrib(zt);or={},Object.keys(new pn).forEach(function(wr){or[wr]=Je.def(dr,".",wr)})}jt(Ye.link(Mt),Ut(Mt.info.type),or)})}function Ol(Ye,Je,lt,_t,xt,Ot){for(var Ut=Ye.shared,jt=Ut.gl,Mt,zt=0;zt<_t.length;++zt){var Nt=_t[zt],or=Nt.name,dr=Nt.info.type,wr=lt.uniforms[or],Ur=Ye.link(Nt),Fr=Ur+".location",Nr;if(wr){if(!xt(wr))continue;if(Zn(wr)){var $r=wr.value;if(dr===Gf||dr===se){var Kr=Ye.link($r._texture||$r.color[0]._texture);Je(jt,".uniform1i(",Fr,",",Kr+".bind());"),Je.exit(Kr,".unbind();")}else if(dr===di||dr===ji||dr===Rd){var ln=Ye.global.def("new Float32Array(["+Array.prototype.slice.call($r)+"])"),Qr=2;dr===ji?Qr=3:dr===Rd&&(Qr=4),Je(jt,".uniformMatrix",Qr,"fv(",Fr,",false,",ln,");")}else{switch(dr){case $o:Mt="1f";break;case eh:Mt="2f";break;case Ml:Mt="3f";break;case uf:Mt="4f";break;case Ro:Mt="1i";break;case Cd:Mt="1i";break;case _u:Mt="2i";break;case fv:Mt="2i";break;case cf:Mt="3i";break;case ff:Mt="3i";break;case Wo:Mt="4i";break;case zs:Mt="4i";break}Je(jt,".uniform",Mt,"(",Fr,",",ua($r)?Array.prototype.slice.call($r):$r,");")}continue}else Nr=wr.append(Ye,Je)}else{if(!xt(sa))continue;Nr=Je.def(Ut.uniforms,"[",vr.id(or),"]")}dr===Gf?Je("if(",Nr,"&&",Nr,'._reglType==="framebuffer"){',Nr,"=",Nr,".color[0];","}"):dr===se&&Je("if(",Nr,"&&",Nr,'._reglType==="framebufferCube"){',Nr,"=",Nr,".color[0];","}");var wn=1;switch(dr){case Gf:case se:var jn=Je.def(Nr,"._texture");Je(jt,".uniform1i(",Fr,",",jn,".bind());"),Je.exit(jn,".unbind();");continue;case Cd:case Ro:Mt="1i";break;case fv:case _u:Mt="2i",wn=2;break;case ff:case cf:Mt="3i",wn=3;break;case zs:case Wo:Mt="4i",wn=4;break;case $o:Mt="1f";break;case eh:Mt="2f",wn=2;break;case Ml:Mt="3f",wn=3;break;case uf:Mt="4f",wn=4;break;case di:Mt="Matrix2fv";break;case ji:Mt="Matrix3fv";break;case Rd:Mt="Matrix4fv";break}if(Mt.charAt(0)==="M"){Je(jt,".uniform",Mt,"(",Fr,",");var na=Math.pow(dr-di+2,2),Vn=Ye.global.def("new Float32Array(",na,")");Array.isArray(Nr)?Je("false,(",x(na,function(Ni){return Vn+"["+Ni+"]="+Nr[Ni]}),",",Vn,")"):Je("false,(Array.isArray(",Nr,")||",Nr," instanceof Float32Array)?",Nr,":(",x(na,function(Ni){return Vn+"["+Ni+"]="+Nr+"["+Ni+"]"}),",",Vn,")"),Je(");")}else if(wn>1){for(var Va=[],za=[],Si=0;Si>1)",Fr],");")}function jn(){lt(Nr,".drawArraysInstancedANGLE(",[dr,wr,Ur,Fr],");")}Nt&&Nt!=="null"?Kr?wn():(lt("if(",Nt,"){"),wn(),lt("}else{"),jn(),lt("}")):jn()}function Qr(){function wn(){lt(Ot+".drawElements("+[dr,Ur,$r,wr+"<<(("+$r+"-"+Ws+")>>1)"]+");")}function jn(){lt(Ot+".drawArrays("+[dr,wr,Ur]+");")}Nt&&Nt!=="null"?Kr?wn():(lt("if(",Nt,"){"),wn(),lt("}else{"),jn(),lt("}")):jn()}kn&&(typeof Fr!="number"||Fr>=0)?typeof Fr=="string"?(lt("if(",Fr,">0){"),ln(),lt("}else if(",Fr,"<0){"),Qr(),lt("}")):ln():Qr()}function Xi(Ye,Je,lt,_t,xt){var Ot=Qn(),Ut=Ot.proc("body",xt);return kn&&(Ot.instancing=Ut.def(Ot.shared.extensions,".angle_instanced_arrays")),Ye(Ot,Ut,lt,_t),Ot.compile().body}function pi(Ye,Je,lt,_t){Po(Ye,Je),lt.useVAO?lt.drawVAO?Je(Ye.shared.vao,".setVAO(",lt.drawVAO.append(Ye,Je),");"):Je(Ye.shared.vao,".setVAO(",Ye.shared.vao,".targetVAO);"):(Je(Ye.shared.vao,".setVAO(null);"),Ns(Ye,Je,lt,_t.attributes,function(){return!0})),Ol(Ye,Je,lt,_t.uniforms,function(){return!0},!1),mi(Ye,Je,Je,lt)}function ue(Ye,Je){var lt=Ye.proc("draw",1);Po(Ye,lt),rs(Ye,lt,Je.context),Fs(Ye,lt,Je.framebuffer),Ka(Ye,lt,Je),nu(Ye,lt,Je.state),Bo(Ye,lt,Je,!1,!0);var _t=Je.shader.progVar.append(Ye,lt);if(lt(Ye.shared.gl,".useProgram(",_t,".program);"),Je.shader.program)pi(Ye,lt,Je,Je.shader.program);else{lt(Ye.shared.vao,".setVAO(null);");var xt=Ye.global.def("{}"),Ot=lt.def(_t,".id"),Ut=lt.def(xt,"[",Ot,"]");lt(Ye.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",xt,"[",Ot,"]=",Ye.link(function(jt){return Xi(pi,Ye,Je,jt,1)}),"(",_t,");",Ut,".call(this,a0);"))}Object.keys(Je.state).length>0&<(Ye.shared.current,".dirty=true;"),Ye.shared.vao&<(Ye.shared.vao,".setVAO(null);")}function H(Ye,Je,lt,_t){Ye.batchId="a1",Po(Ye,Je);function xt(){return!0}Ns(Ye,Je,lt,_t.attributes,xt),Ol(Ye,Je,lt,_t.uniforms,xt,!1),mi(Ye,Je,Je,lt)}function ie(Ye,Je,lt,_t){Po(Ye,Je);var xt=lt.contextDep,Ot=Je.def(),Ut="a0",jt="a1",Mt=Je.def();Ye.shared.props=Mt,Ye.batchId=Ot;var zt=Ye.scope(),Nt=Ye.scope();Je(zt.entry,"for(",Ot,"=0;",Ot,"<",jt,";++",Ot,"){",Mt,"=",Ut,"[",Ot,"];",Nt,"}",zt.exit);function or($r){return $r.contextDep&&xt||$r.propDep}function dr($r){return!or($r)}if(lt.needsContext&&rs(Ye,Nt,lt.context),lt.needsFramebuffer&&Fs(Ye,Nt,lt.framebuffer),nu(Ye,Nt,lt.state,or),lt.profile&&or(lt.profile)&&Bo(Ye,Nt,lt,!1,!0),_t)lt.useVAO?lt.drawVAO?or(lt.drawVAO)?Nt(Ye.shared.vao,".setVAO(",lt.drawVAO.append(Ye,Nt),");"):zt(Ye.shared.vao,".setVAO(",lt.drawVAO.append(Ye,zt),");"):zt(Ye.shared.vao,".setVAO(",Ye.shared.vao,".targetVAO);"):(zt(Ye.shared.vao,".setVAO(null);"),Ns(Ye,zt,lt,_t.attributes,dr),Ns(Ye,Nt,lt,_t.attributes,or)),Ol(Ye,zt,lt,_t.uniforms,dr,!1),Ol(Ye,Nt,lt,_t.uniforms,or,!0),mi(Ye,zt,Nt,lt);else{var wr=Ye.global.def("{}"),Ur=lt.shader.progVar.append(Ye,Nt),Fr=Nt.def(Ur,".id"),Nr=Nt.def(wr,"[",Fr,"]");Nt(Ye.shared.gl,".useProgram(",Ur,".program);","if(!",Nr,"){",Nr,"=",wr,"[",Fr,"]=",Ye.link(function($r){return Xi(H,Ye,lt,$r,2)}),"(",Ur,");}",Nr,".call(this,a0[",Ot,"],",Ot,");")}}function W(Ye,Je){var lt=Ye.proc("batch",2);Ye.batchId="0",Po(Ye,lt);var _t=!1,xt=!0;Object.keys(Je.context).forEach(function(wr){_t=_t||Je.context[wr].propDep}),_t||(rs(Ye,lt,Je.context),xt=!1);var Ot=Je.framebuffer,Ut=!1;Ot?(Ot.propDep?_t=Ut=!0:Ot.contextDep&&_t&&(Ut=!0),Ut||Fs(Ye,lt,Ot)):Fs(Ye,lt,null),Je.state.viewport&&Je.state.viewport.propDep&&(_t=!0);function jt(wr){return wr.contextDep&&_t||wr.propDep}Ka(Ye,lt,Je),nu(Ye,lt,Je.state,function(wr){return!jt(wr)}),(!Je.profile||!jt(Je.profile))&&Bo(Ye,lt,Je,!1,"a1"),Je.contextDep=_t,Je.needsContext=xt,Je.needsFramebuffer=Ut;var Mt=Je.shader.progVar;if(Mt.contextDep&&_t||Mt.propDep)ie(Ye,lt,Je,null);else{var zt=Mt.append(Ye,lt);if(lt(Ye.shared.gl,".useProgram(",zt,".program);"),Je.shader.program)ie(Ye,lt,Je,Je.shader.program);else{lt(Ye.shared.vao,".setVAO(null);");var Nt=Ye.global.def("{}"),or=lt.def(zt,".id"),dr=lt.def(Nt,"[",or,"]");lt(Ye.cond(dr).then(dr,".call(this,a0,a1);").else(dr,"=",Nt,"[",or,"]=",Ye.link(function(wr){return Xi(ie,Ye,Je,wr,2)}),"(",zt,");",dr,".call(this,a0,a1);"))}}Object.keys(Je.state).length>0&<(Ye.shared.current,".dirty=true;"),Ye.shared.vao&<(Ye.shared.vao,".setVAO(null);")}function ce(Ye,Je){var lt=Ye.proc("scope",3);Ye.batchId="a2";var _t=Ye.shared,xt=_t.current;if(rs(Ye,lt,Je.context),Je.framebuffer&&Je.framebuffer.append(Ye,lt),yn(Object.keys(Je.state)).forEach(function(jt){var Mt=Je.state[jt],zt=Mt.append(Ye,lt);ua(zt)?zt.forEach(function(Nt,or){La(Nt)?lt.set(Ye.next[jt],"["+or+"]",Nt):lt.set(Ye.next[jt],"["+or+"]",Ye.link(Nt,{stable:!0}))}):Zn(Mt)?lt.set(_t.next,"."+jt,Ye.link(zt,{stable:!0})):lt.set(_t.next,"."+jt,zt)}),Bo(Ye,lt,Je,!0,!0),[Jc,of,Os,mh,Zs].forEach(function(jt){var Mt=Je.draw[jt];if(Mt){var zt=Mt.append(Ye,lt);La(zt)?lt.set(_t.draw,"."+jt,zt):lt.set(_t.draw,"."+jt,Ye.link(zt),{stable:!0})}}),Object.keys(Je.uniforms).forEach(function(jt){var Mt=Je.uniforms[jt].append(Ye,lt);Array.isArray(Mt)&&(Mt="["+Mt.map(function(zt){return La(zt)?zt:Ye.link(zt,{stable:!0})})+"]"),lt.set(_t.uniforms,"["+Ye.link(vr.id(jt),{stable:!0})+"]",Mt)}),Object.keys(Je.attributes).forEach(function(jt){var Mt=Je.attributes[jt].append(Ye,lt),zt=Ye.scopeAttrib(jt);Object.keys(new pn).forEach(function(Nt){lt.set(zt,"."+Nt,Mt[Nt])})}),Je.scopeVAO){var Ot=Je.scopeVAO.append(Ye,lt);La(Ot)?lt.set(_t.vao,".targetVAO",Ot):lt.set(_t.vao,".targetVAO",Ye.link(Ot,{stable:!0}))}function Ut(jt){var Mt=Je.shader[jt];if(Mt){var zt=Mt.append(Ye,lt);La(zt)?lt.set(_t.shader,"."+jt,zt):lt.set(_t.shader,"."+jt,Ye.link(zt,{stable:!0}))}}Ut(Mc),Ut(Nf),Object.keys(Je.state).length>0&&(lt(xt,".dirty=true;"),lt.exit(xt,".dirty=true;")),lt("a1(",Ye.shared.context,",a0,",Ye.batchId,");")}function Me(Ye){if(!(typeof Ye!="object"||ua(Ye))){for(var Je=Object.keys(Ye),lt=0;lt=0;--mi){var Xi=La[mi];Xi&&Xi(aa,null,0)}xr.flush(),Gn&&Gn.update()}function Fi(){!Qn&&La.length>0&&(Qn=p.next(si))}function Wi(){Qn&&(p.cancel(si),Qn=null)}function ss(mi){mi.preventDefault(),Wi(),vi.forEach(function(Xi){Xi()})}function Ri(mi){xr.getError(),_n.restore(),ra.restore(),vn.restore(),Ra.restore(),Cn.restore(),bn.restore(),Rn.restore(),Gn&&Gn.restore(),ha.procs.refresh(),Fi(),_a.forEach(function(Xi){Xi()})}Xn&&(Xn.addEventListener(Lo,ss,!1),Xn.addEventListener(eo,Ri,!1));function Es(){La.length=0,Wi(),Xn&&(Xn.removeEventListener(Lo,ss),Xn.removeEventListener(eo,Ri)),ra.clear(),bn.clear(),Cn.clear(),Rn.clear(),Ra.clear(),kn.clear(),vn.clear(),Gn&&Gn.clear(),Pa.forEach(function(mi){mi()})}function co(mi){function Xi(xt){var Ot=r({},xt);delete Ot.uniforms,delete Ot.attributes,delete Ot.context,delete Ot.vao,"stencil"in Ot&&Ot.stencil.op&&(Ot.stencil.opBack=Ot.stencil.opFront=Ot.stencil.op,delete Ot.stencil.op);function Ut(jt){if(jt in Ot){var Mt=Ot[jt];delete Ot[jt],Object.keys(Mt).forEach(function(zt){Ot[jt+"."+zt]=Mt[zt]})}}return Ut("blend"),Ut("depth"),Ut("cull"),Ut("stencil"),Ut("polygonOffset"),Ut("scissor"),Ut("sample"),"vao"in xt&&(Ot.vao=xt.vao),Ot}function pi(xt,Ot){var Ut={},jt={};return Object.keys(xt).forEach(function(Mt){var zt=xt[Mt];if(v.isDynamic(zt)){jt[Mt]=v.unbox(zt,Mt);return}else if(Ot&&Array.isArray(zt)){for(var Nt=0;Nt0)return $e.call(this,lt(xt|0),xt|0)}else if(Array.isArray(xt)){if(xt.length)return $e.call(this,xt,xt.length)}else return ze.call(this,xt)}return r(_t,{stats:ce,destroy:function(){Me.destroy()}})}var ks=bn.setFBO=co({framebuffer:v.define.call(null,xs,"framebuffer")});function Js(mi,Xi){var pi=0;ha.procs.poll();var ue=Xi.color;ue&&(xr.clearColor(+ue[0]||0,+ue[1]||0,+ue[2]||0,+ue[3]||0),pi|=Jn),"depth"in Xi&&(xr.clearDepth(+Xi.depth),pi|=Xa),"stencil"in Xi&&(xr.clearStencil(Xi.stencil|0),pi|=ui),xr.clear(pi)}function Qs(mi){if("framebuffer"in mi)if(mi.framebuffer&&mi.framebuffer_reglType==="framebufferCube")for(var Xi=0;Xi<6;++Xi)ks(r({framebuffer:mi.framebuffer.faces[Xi]},mi),Js);else ks(mi,Js);else Js(null,mi)}function qu(mi){La.push(mi);function Xi(){var pi=Ms(La,mi);function ue(){var H=Ms(La,ue);La[H]=La[La.length-1],La.length-=1,La.length<=0&&Wi()}La[pi]=ue}return Fi(),{cancel:Xi}}function rs(){var mi=la.viewport,Xi=la.scissor_box;mi[0]=mi[1]=Xi[0]=Xi[1]=0,aa.viewportWidth=aa.framebufferWidth=aa.drawingBufferWidth=mi[2]=Xi[2]=xr.drawingBufferWidth,aa.viewportHeight=aa.framebufferHeight=aa.drawingBufferHeight=mi[3]=Xi[3]=xr.drawingBufferHeight}function Fs(){aa.tick+=1,aa.time=nu(),rs(),ha.procs.poll()}function Ka(){Ra.refresh(),rs(),ha.procs.refresh(),Gn&&Gn.update()}function nu(){return(m()-Wn)/1e3}Ka();function Po(mi,Xi){var pi;switch(mi){case"frame":return qu(Xi);case"lost":pi=vi;break;case"restore":pi=_a;break;case"destroy":pi=Pa;break}return pi.push(Xi),{cancel:function(){for(var ue=0;ue=0},read:on,destroy:Es,_gl:xr,_refresh:Ka,poll:function(){Fs(),Gn&&Gn.update()},now:nu,stats:Lr,getCachedCode:Bo,preloadCachedCode:Ns});return vr.onDone(null,Ol),Ol}return To}))})(k3)),k3.exports}var V7,rge;function hWe(){if(rge)return V7;rge=1;var e=cg();V7=function(f){if(f?typeof f=="string"&&(f={container:f}):f={},r(f)?f={container:f}:n(f)?f={container:f}:o(f)?f={gl:f}:f=e(f,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),f.pixelRatio||(f.pixelRatio=Mu.pixelRatio||1),f.gl)return f.gl;if(f.canvas&&(f.container=f.canvas.parentNode),f.container){if(typeof f.container=="string"){var i=document.querySelector(f.container);if(!i)throw Error("Element "+f.container+" is not found");f.container=i}r(f.container)?(f.canvas=f.container,f.container=f.canvas.parentNode):f.canvas||(f.canvas=s(),f.container.appendChild(f.canvas),t(f))}else if(!f.canvas)if(typeof document<"u")f.container=document.body||document.documentElement,f.canvas=s(),f.container.appendChild(f.canvas),t(f);else throw Error("Not DOM environment. Use headless-gl.");return f.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(l){try{f.gl=f.canvas.getContext(l,f.attrs)}catch{}return f.gl}),f.gl};function t(a){if(a.container)if(a.container==document.body)document.body.style.width||(a.canvas.width=a.width||a.pixelRatio*Mu.innerWidth),document.body.style.height||(a.canvas.height=a.height||a.pixelRatio*Mu.innerHeight);else{var f=a.container.getBoundingClientRect();a.canvas.width=a.width||f.right-f.left,a.canvas.height=a.height||f.bottom-f.top}}function r(a){return typeof a.getContext=="function"&&"width"in a&&"height"in a}function n(a){return typeof a.nodeName=="string"&&typeof a.appendChild=="function"&&typeof a.getBoundingClientRect=="function"}function o(a){return typeof a.drawArrays=="function"||typeof a.drawElements=="function"}function s(){var a=document.createElement("canvas");return a.style.position="absolute",a.style.top=0,a.style.left=0,a}return V7}var Y7,nge;function dWe(){if(nge)return Y7;nge=1;var e=qCe(),t=[32,126];Y7=r;function r(n){n=n||{};var o=n.shape?n.shape:n.canvas?[n.canvas.width,n.canvas.height]:[512,512],s=n.canvas||document.createElement("canvas"),a=n.font,f=typeof n.step=="number"?[n.step,n.step]:n.step||[32,32],i=n.chars||t;if(a&&typeof a!="string"&&(a=e(a)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var l=[],u=i[0],c=0;u<=i[1];u++)l[c++]=String.fromCharCode(u);i=l}o=o.slice(),s.width=o[0],s.height=o[1];var h=s.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,s.width,s.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var d=f[0]/2,v=f[1]/2,u=0;uo[0]-f[0]/2&&(d=f[0]/2,v+=f[1]);return s}return Y7}var Io={},jl={},age;function UCe(){if(age)return jl;age=1;var e=32;jl.INT_BITS=e,jl.INT_MAX=2147483647,jl.INT_MIN=-1<0)-(n<0)},jl.abs=function(n){var o=n>>e-1;return(n^o)-o},jl.min=function(n,o){return o^(n^o)&-(n65535)<<4,n>>>=o,s=(n>255)<<3,n>>>=s,o|=s,s=(n>15)<<2,n>>>=s,o|=s,s=(n>3)<<1,n>>>=s,o|=s,o|n>>1},jl.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},jl.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function t(n){var o=32;return n&=-n,n&&o--,n&65535&&(o-=16),n&16711935&&(o-=8),n&252645135&&(o-=4),n&858993459&&(o-=2),n&1431655765&&(o-=1),o}jl.countTrailingZeros=t,jl.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},jl.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},jl.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);return(function(n){for(var o=0;o<256;++o){var s=o,a=o,f=7;for(s>>>=1;s;s>>>=1)a<<=1,a|=s&1,--f;n[o]=a<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},jl.interleave2=function(n,o){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1},jl.deinterleave2=function(n,o){return n=n>>>o&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},jl.interleave3=function(n,o,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,n|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},jl.deinterleave3=function(n,o){return n=n>>>o&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},jl.nextCombination=function(n){var o=n|n-1;return o+1|(~o&-~o)-1>>>t(n)+1},jl}var $7,ige;function vWe(){if(ige)return $7;ige=1;function e(n,o,s){var a=n[s]|0;if(a<=0)return[];var f=new Array(a),i;if(s===n.length-1)for(i=0;i"u"&&(o=0),typeof n){case"number":if(n>0)return t(n|0,o);break;case"object":if(typeof n.length=="number")return e(n,o,0);break}return[]}return $7=r,$7}var oge;function pWe(){if(oge)return Io;oge=1;var e=UCe(),t=vWe(),r=Jx().Buffer;Mu.__TYPEDARRAY_POOL||(Mu.__TYPEDARRAY_POOL={UINT8:t([32,0]),UINT16:t([32,0]),UINT32:t([32,0]),BIGUINT64:t([32,0]),INT8:t([32,0]),INT16:t([32,0]),INT32:t([32,0]),BIGINT64:t([32,0]),FLOAT:t([32,0]),DOUBLE:t([32,0]),DATA:t([32,0]),UINT8C:t([32,0]),BUFFER:t([32,0])});var n=typeof Uint8ClampedArray<"u",o=typeof BigUint64Array<"u",s=typeof BigInt64Array<"u",a=Mu.__TYPEDARRAY_POOL;a.UINT8C||(a.UINT8C=t([32,0])),a.BIGUINT64||(a.BIGUINT64=t([32,0])),a.BIGINT64||(a.BIGINT64=t([32,0])),a.BUFFER||(a.BUFFER=t([32,0]));var f=a.DATA,i=a.BUFFER;Io.free=function(x){if(r.isBuffer(x))i[e.log2(x.length)].push(x);else{if(Object.prototype.toString.call(x)!=="[object ArrayBuffer]"&&(x=x.buffer),!x)return;var _=x.length||x.byteLength,k=e.log2(_)|0;f[k].push(x)}};function l(C){if(C){var x=C.length||C.byteLength,_=e.log2(x);f[_].push(C)}}function u(C){l(C.buffer)}Io.freeUint8=Io.freeUint16=Io.freeUint32=Io.freeBigUint64=Io.freeInt8=Io.freeInt16=Io.freeInt32=Io.freeBigInt64=Io.freeFloat32=Io.freeFloat=Io.freeFloat64=Io.freeDouble=Io.freeUint8Clamped=Io.freeDataView=u,Io.freeArrayBuffer=l,Io.freeBuffer=function(x){i[e.log2(x.length)].push(x)},Io.malloc=function(x,_){if(_===void 0||_==="arraybuffer")return c(x);switch(_){case"uint8":return h(x);case"uint16":return d(x);case"uint32":return v(x);case"int8":return p(x);case"int16":return m(x);case"int32":return y(x);case"float":case"float32":return b(x);case"double":case"float64":return g(x);case"uint8_clamped":return T(x);case"bigint64":return A(x);case"biguint64":return S(x);case"buffer":return w(x);case"data":case"dataview":return M(x);default:return null}return null};function c(x){var x=e.nextPow2(x),_=e.log2(x),k=f[_];return k.length>0?k.pop():new ArrayBuffer(x)}Io.mallocArrayBuffer=c;function h(C){return new Uint8Array(c(C),0,C)}Io.mallocUint8=h;function d(C){return new Uint16Array(c(2*C),0,C)}Io.mallocUint16=d;function v(C){return new Uint32Array(c(4*C),0,C)}Io.mallocUint32=v;function p(C){return new Int8Array(c(C),0,C)}Io.mallocInt8=p;function m(C){return new Int16Array(c(2*C),0,C)}Io.mallocInt16=m;function y(C){return new Int32Array(c(4*C),0,C)}Io.mallocInt32=y;function b(C){return new Float32Array(c(4*C),0,C)}Io.mallocFloat32=Io.mallocFloat=b;function g(C){return new Float64Array(c(8*C),0,C)}Io.mallocFloat64=Io.mallocDouble=g;function T(C){return n?new Uint8ClampedArray(c(C),0,C):h(C)}Io.mallocUint8Clamped=T;function S(C){return o?new BigUint64Array(c(8*C),0,C):null}Io.mallocBigUint64=S;function A(C){return s?new BigInt64Array(c(8*C),0,C):null}Io.mallocBigInt64=A;function M(C){return new DataView(c(C),0,C)}Io.mallocDataView=M;function w(C){C=e.nextPow2(C);var x=e.log2(C),_=i[x];return _.length>0?_.pop():new r(C)}return Io.mallocBuffer=w,Io.clearCache=function(){for(var x=0;x<32;++x)a.UINT8[x].length=0,a.UINT16[x].length=0,a.UINT32[x].length=0,a.INT8[x].length=0,a.INT16[x].length=0,a.INT32[x].length=0,a.FLOAT[x].length=0,a.DOUBLE[x].length=0,a.BIGUINT64[x].length=0,a.BIGINT64[x].length=0,a.UINT8C[x].length=0,f[x].length=0,i[x].length=0},Io}var W7,sge;function HCe(){return sge||(sge=1,W7=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}),W7}var X7,lge;function GCe(){if(lge)return X7;lge=1;var e=HCe();X7=o;var t=96;function r(s,a){var f=e(getComputedStyle(s).getPropertyValue(a));return f[0]*o(f[1],s)}function n(s,a){var f=document.createElement("div");f.style["font-size"]="128"+s,a.appendChild(f);var i=r(f,"font-size")/128;return a.removeChild(f),i}function o(s,a){switch(a=a||document.body,s=(s||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),s){case"%":return a.clientHeight/100;case"ch":case"ex":return n(s,a);case"em":return r(a,"font-size");case"rem":return r(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return t;case"cm":return t/2.54;case"mm":return t/25.4;case"pt":return t/72;case"pc":return t/6}return 1}return X7}var Z7,uge;function gWe(){if(uge)return Z7;uge=1,Z7=n;var e=n.canvas=document.createElement("canvas"),t=e.getContext("2d"),r=o([32,126]);n.createPairs=o,n.ascii=r;function n(s,a){Array.isArray(s)&&(s=s.join(", "));var f={},i,l=16,u=.05;a&&(a.length===2&&typeof a[0]=="number"?i=o(a):Array.isArray(a)?i=a:(a.o?i=o(a.o):a.pairs&&(i=a.pairs),a.fontSize&&(l=a.fontSize),a.threshold!=null&&(u=a.threshold))),i||(i=r),t.font=l+"px "+s;for(var c=0;cl*u){var p=(v-d)/l;f[h]=p*1e3}}return f}function o(s){for(var a=[],f=s[0];f<=s[1];f++)for(var i=String.fromCharCode(f),l=s[0];l0;f-=4)if(a[f]!==0)return Math.floor((f-3)*.25/s)}return K7}var J7,cge;function mWe(){if(cge)return J7;cge=1;var e=fWe(),t=cg(),r=jCe(),n=hWe(),o=PCe(),s=Gm(),a=dWe(),f=pWe(),i=rw(),l=tEe(),u=HCe(),c=GCe(),h=gWe(),d=Eu(),v=yWe(),p=cb(),m=UCe(),y=m.nextPow2,b=new o,g=!1;if(document.body){var T=document.body.appendChild(document.createElement("div"));T.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(T).fontStretch&&(g=!0),document.body.removeChild(T)}var S=function(w){A(w)?(w={regl:w},this.gl=w.regl._gl):this.gl=n(w),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=w.regl||r({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(l(w)?w:{})};S.prototype.createShader=function(){var w=this.regl,C=w({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:w.prop("count"),offset:w.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:w.this("sizeBuffer")},width:{offset:0,stride:8,buffer:w.this("sizeBuffer")},char:w.this("charBuffer"),position:w.this("position")},uniforms:{atlasSize:function(_,k){return[k.atlas.width,k.atlas.height]},atlasDim:function(_,k){return[k.atlas.cols,k.atlas.rows]},atlas:function(_,k){return k.atlas.texture},charStep:function(_,k){return k.atlas.step},em:function(_,k){return k.atlas.em},color:w.prop("color"),opacity:w.prop("opacity"),viewport:w.this("viewportArray"),scale:w.this("scale"),align:w.prop("align"),baseline:w.prop("baseline"),translate:w.this("translate"),positionOffset:w.prop("positionOffset")},primitive:"points",viewport:w.this("viewport"),vert:` + precision highp float; + attribute float width, charOffset, char; + attribute vec2 position; + uniform float fontSize, charStep, em, align, baseline; + uniform vec4 viewport; + uniform vec4 color; + uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; + varying vec2 charCoord, charId; + varying float charWidth; + varying vec4 fontColor; + void main () { + vec2 offset = floor(em * (vec2(align + charOffset, baseline) + + vec2(positionOffset.x, -positionOffset.y))) + / (viewport.zw * scale.xy); + + vec2 position = (position + translate) * scale; + position += offset * scale; + + charCoord = position * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2. - 1., 0, 1); + + gl_PointSize = charStep; + + charId.x = mod(char, atlasDim.x); + charId.y = floor(char / atlasDim.x); + + charWidth = width * em; + + fontColor = color / 255.; + }`,frag:` + precision highp float; + uniform float fontSize, charStep, opacity; + uniform vec2 atlasSize; + uniform vec4 viewport; + uniform sampler2D atlas; + varying vec4 fontColor; + varying vec2 charCoord, charId; + varying float charWidth; + + float lightness(vec4 color) { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + void main () { + vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; + float halfCharStep = floor(charStep * .5 + .5); + + // invert y and shift by 1px (FF expecially needs that) + uv.y = charStep - uv.y; + + // ignore points outside of character bounding box + float halfCharWidth = ceil(charWidth * .5); + if (floor(uv.x) > halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`}),x={};return{regl:w,draw:C,atlas:x}},S.prototype.update=function(w){var C=this;if(typeof w=="string")w={text:w};else if(!w)return;w=t(w,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),w.opacity!=null&&(Array.isArray(w.opacity)?this.opacity=w.opacity.map(function(qe){return parseFloat(qe)}):this.opacity=parseFloat(w.opacity)),w.viewport!=null&&(this.viewport=i(w.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),w.kerning!=null&&(this.kerning=w.kerning),w.offset!=null&&(typeof w.offset=="number"&&(w.offset=[w.offset,0]),this.positionOffset=p(w.offset)),w.direction&&(this.direction=w.direction),w.range&&(this.range=w.range,this.scale=[1/(w.range[2]-w.range[0]),1/(w.range[3]-w.range[1])],this.translate=[-w.range[0],-w.range[1]]),w.scale&&(this.scale=w.scale),w.translate&&(this.translate=w.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!w.font&&(w.font=S.baseFontSize+"px sans-serif");var x=!1,_=!1;if(w.font&&(Array.isArray(w.font)?w.font:[w.font]).forEach(function(qe,We){if(typeof qe=="string")try{qe=e.parse(qe)}catch{qe=e.parse(S.baseFontSize+"px "+qe)}else{var Qe=qe.style,De=qe.weight,me=qe.stretch,Ce=qe.variant;qe=e.parse(e.stringify(qe)),Qe&&(qe.style=Qe),De&&(qe.weight=De),me&&(qe.stretch=me),Ce&&(qe.variant=Ce)}var et=e.stringify({size:S.baseFontSize,family:qe.family,stretch:g?qe.stretch:void 0,variant:qe.variant,weight:qe.weight,style:qe.style}),st=u(qe.size),ot=Math.round(st[0]*c(st[1]));if(ot!==C.fontSize[We]&&(_=!0,C.fontSize[We]=ot),(!C.font[We]||et!=C.font[We].baseString)&&(x=!0,C.font[We]=S.fonts[et],!C.font[We])){var ut=qe.family.join(", "),ht=[qe.style];qe.style!=qe.variant&&ht.push(qe.variant),qe.variant!=qe.weight&&ht.push(qe.weight),g&&qe.weight!=qe.stretch&&ht.push(qe.stretch),C.font[We]={baseString:et,family:ut,weight:qe.weight,stretch:qe.stretch,style:qe.style,variant:qe.variant,width:{},kerning:{},metrics:v(ut,{origin:"top",fontSize:S.baseFontSize,fontStyle:ht.join(" ")})},S.fonts[et]=C.font[We]}}),(x||_)&&this.font.forEach(function(qe,We){var Qe=e.stringify({size:C.fontSize[We],family:qe.family,stretch:g?qe.stretch:void 0,variant:qe.variant,weight:qe.weight,style:qe.style});if(C.fontAtlas[We]=C.shader.atlas[Qe],!C.fontAtlas[We]){var De=qe.metrics;C.shader.atlas[Qe]=C.fontAtlas[We]={fontString:Qe,step:Math.ceil(C.fontSize[We]*De.bottom*.5)*2,em:C.fontSize[We],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:C.regl.texture()}}w.text==null&&(w.text=C.text)}),typeof w.text=="string"&&w.position&&w.position.length>2){for(var k=Array(w.position.length*.5),E=0;E2){for(var D=!w.position[0].length,z=f.mallocFloat(this.count*2),N=0,q=0;N1?C.align[We]:C.align[0]:C.align;if(typeof Qe=="number")return Qe;switch(Qe){case"right":case"end":return-qe;case"center":case"centre":case"middle":return-qe*.5}return 0})),this.baseline==null&&w.baseline==null&&(w.baseline=0),w.baseline!=null&&(this.baseline=w.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(qe,We){var Qe=(C.font[We]||C.font[0]).metrics,De=0;return De+=Qe.bottom*.5,typeof qe=="number"?De+=qe-Qe.baseline:De+=-Qe[qe],De*=-1,De})),w.color!=null)if(w.color||(w.color="transparent"),typeof w.color=="string"||!isNaN(w.color))this.color=s(w.color,"uint8");else{var _e;if(typeof w.color[0]=="number"&&w.color.length>this.counts.length){var we=w.color.length;_e=f.mallocUint8(we);for(var Oe=(w.color.subarray||w.color.slice).bind(w.color),be=0;be4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ee){var Le=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Le);for(var Fe=0;Fe1?this.counts[Fe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Fe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Fe*4,Fe*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Fe]:this.opacity,baseline:this.baselineOffset[Fe]!=null?this.baselineOffset[Fe]:this.baselineOffset[0],align:this.align?this.alignOffset[Fe]!=null?this.alignOffset[Fe]:this.alignOffset[0]:0,atlas:this.fontAtlas[Fe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Fe*2,Fe*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},S.prototype.destroy=function(){},S.prototype.kerning=!0,S.prototype.position={constant:new Float32Array(2)},S.prototype.translate=null,S.prototype.scale=null,S.prototype.font=null,S.prototype.text="",S.prototype.positionOffset=[0,0],S.prototype.opacity=1,S.prototype.color=new Uint8Array([0,0,0,255]),S.prototype.alignOffset=[0,0],S.maxAtlasSize=1024,S.atlasCanvas=document.createElement("canvas"),S.atlasContext=S.atlasCanvas.getContext("2d",{alpha:!1}),S.baseFontSize=64,S.fonts={};function A(M){return typeof M=="function"&&M._gl&&M.prop&&M.texture&&M.buffer}return J7=S,J7}var Q7,hge;function FX(){if(hge)return Q7;hge=1;var e=gW(),t=jCe();return Q7=function(n,o,s){var a=n._fullLayout,f=!0;return a._glcanvas.each(function(i){if(i.regl){i.regl.preloadCachedCode(s);return}if(!(i.pick&&!a._has("parcoords"))){try{i.regl=t({canvas:this,attributes:{antialias:!i.pick,preserveDrawingBuffer:!0},pixelRatio:n._context.plotGlPixelRatio||Mu.devicePixelRatio,extensions:o||[],cachedCode:s||{}})}catch{f=!1}i.regl||(f=!1),f&&this.addEventListener("webglcontextlost",function(l){n&&n.emit&&n.emit("plotly_webglcontextlost",{event:l,layer:i.key})},!1)}}),f||e({container:a._glcontainer.node()}),f},Q7}var dge;function VCe(){if(dge)return uB.exports;dge=1;var e=bCe(),t=DCe(),r=aWe(),n=mWe(),o=rr(),s=p0().selectMode,a=FX(),f=As(),i=UAe(),l=yCe().styleTextSelection,u={};function c(d,v,p,m){var y=d._size,b=d.width*m,g=d.height*m,T=y.l*m,S=y.b*m,A=y.r*m,M=y.t*m,w=y.w*m,C=y.h*m;return[T+v.domain[0]*w,S+p.domain[0]*C,b-A-(1-v.domain[1])*w,g-M-(1-p.domain[1])*C]}var h=uB.exports=function(v,p,m){if(m.length){var y=v._fullLayout,b=p._scene,g=p.xaxis,T=p.yaxis,S,A;if(b){var M=a(v,["ANGLE_instanced_arrays","OES_element_index_uint"],u);if(!M){b.init();return}var w=b.count,C=y._glcanvas.data()[0].regl;if(i(v,p,m),b.dirty){if((b.line2d||b.error2d)&&!(b.scatter2d||b.fill2d||b.glText)&&C.clear({}),b.error2d===!0&&(b.error2d=r(C)),b.line2d===!0&&(b.line2d=t(C)),b.scatter2d===!0&&(b.scatter2d=e(C)),b.fill2d===!0&&(b.fill2d=t(C)),b.glText===!0)for(b.glText=new Array(w),S=0;Sb.glText.length){var x=w-b.glText.length;for(S=0;Sle&&(isNaN(ee[oe])||isNaN(ee[oe+1]));)oe-=2;X.positions=ee.slice(le,oe+2)}return X}),b.line2d.update(b.lineOptions)),b.error2d){var E=(b.errorXOptions||[]).concat(b.errorYOptions||[]);b.error2d.update(E)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=o.repeat(null,w),b.fill2d&&(b.fillOptions=b.fillOptions.map(function(X,ee){var le=m[ee];if(!(!X||!le||!le[0]||!le[0].trace)){var oe=le[0],fe=oe.trace,de=oe.t,_e=b.lineOptions[ee],we,Oe,be=[];fe._ownfill&&be.push(ee),fe._nexttrace&&be.push(ee+1),be.length&&(b.fillOrder[ee]=be);var Te=[],ke=_e&&_e.positions||de.positions,Ee,Le;if(fe.fill==="tozeroy"){for(Ee=0;EeEe&&isNaN(ke[Le+1]);)Le-=2;ke[Ee+1]!==0&&(Te=[ke[Ee],0]),Te=Te.concat(ke.slice(Ee,Le+2)),ke[Le+1]!==0&&(Te=Te.concat([ke[Le],0]))}else if(fe.fill==="tozerox"){for(Ee=0;EeEe&&isNaN(ke[Le]);)Le-=2;ke[Ee]!==0&&(Te=[0,ke[Ee+1]]),Te=Te.concat(ke.slice(Ee,Le+2)),ke[Le]!==0&&(Te=Te.concat([0,ke[Le+1]]))}else if(fe.fill==="toself"||fe.fill==="tonext"){for(Te=[],we=0,X.splitNull=!0,Oe=0;Oe-1;for(S=0;Sg&&p||bl,_;for(x?_=p.sizeAvg||Math.max(p.size,3):_=r(h,v),T=0;T"u"?Mu:window,r=["moz","webkit"],n="AnimationFrame",o=t["request"+n],s=t["cancel"+n]||t["cancelRequest"+n],a=0;!o&&a{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,n(()=>{this.dirty=!1})),this)},f.prototype.update=function(...c){if(!c.length)return;for(let v=0;v_||!p.lower&&x<_)continue;let k=i(p.id,x,_),E=this.passes[k]||(this.passes[k]={});if(v.data&&(v.transpose?E.positions={x:{buffer:p.buffer,offset:_,count:g,stride:b},y:{buffer:p.buffer,offset:x,count:g,stride:b}}:E.positions={x:{buffer:p.buffer,offset:_*g,count:g},y:{buffer:p.buffer,offset:x*g,count:g}},E.bounds=l(p.bounds,x,_)),v.domain||v.viewport||v.data){let I=y?l(p.padding,x,_):p.padding;if(p.domain){let[F,D,z,N]=l(p.domain,x,_);E.viewport=[A+F*T+I[0],M+D*S+I[1],A+z*T-I[2],M+N*S-I[3]]}else E.viewport=[A+_*w+w*I[0],M+x*C+C*I[1],A+(_+1)*w-w*I[2],M+(x+1)*C-C*I[3]]}v.color&&(E.color=p.color),v.size&&(E.size=p.size),v.marker&&(E.marker=p.marker),v.borderSize&&(E.borderSize=p.borderSize),v.borderColor&&(E.borderColor=p.borderColor),v.opacity&&(E.opacity=p.opacity),v.range&&(E.range=m?l(p.range,x,_):p.range||E.bounds),p.passes.push(k)}return this},f.prototype.draw=function(...c){if(!c.length)this.scatter.draw();else{let h=[];for(let d=0;d{h[m+b]=v})}this.scatter.draw(...h)}return this},f.prototype.destroy=function(){return this.traces.forEach(c=>{c.buffer&&c.buffer.destroy&&c.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function i(c,h,d){let v=c.id!=null?c.id:c,p=h,m=d;return v<<16|(p&255)<<8|m&255}function l(c,h,d){let v,p,m,y,b=c[h],g=c[d];return b.length>2?(b[0],b[2],v=b[1],p=b[3]):b.length?(v=b[0],p=b[1]):(b.x,v=b.y,b.x+b.width,p=b.y+b.height),g.length>2?(m=g[0],y=g[2],g[1],g[3]):g.length?(m=g[0],y=g[1]):(m=g.x,g.y,y=g.x+g.width,g.y+g.height),[m,v,y,p]}function u(c){if(typeof c=="number")return[c,c,c,c];if(c.length===2)return[c[0],c[1],c[0],c[1]];{let h=s(c);return[h.x,h.y,h.x+h.width,h.y+h.height]}}return u9}var f9,Sge;function CWe(){if(Sge)return f9;Sge=1;var e=kWe(),t=rr(),r=xl(),n=p0().selectMode;f9=function(a,f,i){if(i.length)for(var l=0;l-1,D=n(p)||!!l.selectedpoints||F,z=!0;if(D){var N=l._length;if(l.selectedpoints){c.selectBatch=l.selectedpoints;var q=l.selectedpoints,P={};for(b=0;b>>1,h)y[0]=i.xbounds[0],y[2]=i.xbounds[1],y[1]=i.ybounds[0],y[3]=i.ybounds[1];else for(T=0;Ty[2]&&(y[2]=b),gy[3]&&(y[3]=g);if(d)p=d;else for(p=new Int32Array(v),T=0;Ty[2]&&(y[2]=b),gy[3]&&(y[3]=g);this.idToIndex=p,this.pointcloudOptions.idToIndex=p,this.pointcloudOptions.positions=m;var S=r(i.marker.color),A=r(i.marker.border.color),M=i.opacity*i.marker.opacity;S[3]*=M,this.pointcloudOptions.color=S;var w=i.marker.blend;if(w===null){var C=100;w=l.length0)return 1<=0)return 1<Math.abs(w)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(M)*I*(w>=0?1:-1),u.boxEnd[1]y[3]&&(u.boxEnd[1]=y[3],u.boxEnd[0]=u.boxStart[0]+(y[3]-u.boxStart[1])/Math.abs(I))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(w)/I*(M>=0?1:-1),u.boxEnd[0]y[2]&&(u.boxEnd[0]=y[2],u.boxEnd[1]=u.boxStart[1]+(y[2]-u.boxStart[0])*Math.abs(I)))}else k&&(u.boxEnd[0]=u.boxStart[0]),E&&(u.boxEnd[1]=u.boxStart[1])}else u.boxEnabled?(M=u.boxStart[0]!==u.boxEnd[0],w=u.boxStart[1]!==u.boxEnd[1],M||w?(M&&(C(0,u.boxStart[0],u.boxEnd[0]),f.xaxis.autorange=!1),w&&(C(1,u.boxStart[1],u.boxEnd[1]),f.yaxis.autorange=!1),f.relayoutCallback()):f.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,v?(u.panning||(u.dragStart[0]=p,u.dragStart[1]=m),Math.abs(u.dragStart[0]-p)=B[$][0]&&P<=B[$][1])return!0;return!1}function h(P){P.attr("x",-e.bar.captureWidth/2).attr("width",e.bar.captureWidth)}function d(P){P.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function v(P){if(!P.brush.filterSpecified)return"0,"+P.height;for(var B=p(P.brush.filter.getConsolidated(),P.height),$=[0],Q,J,ne,te=B.length?B[0][0]:null,Z=0;ZP[1]+$||B=.9*P[1]+.1*P[0]?"n":B<=.9*P[0]+.1*P[1]?"s":"ns"}function y(){t.select(document.body).style("cursor",null)}function b(P){P.attr("stroke-dasharray",v)}function g(P,B){var $=t.select(P).selectAll(".highlight, .highlight-shadow"),Q=B?$.transition().duration(e.bar.snapDuration).each("end",B):$;b(Q)}function T(P,B){var $=P.brush,Q=$.filterSpecified,J=NaN,ne={},te;if(Q){var Z=P.height,G=$.filter.getConsolidated(),j=p(G,Z),Y=NaN,K=NaN,X=NaN;for(te=0;te<=j.length;te++){var ee=j[te];if(ee&&ee[0]<=B&&B<=ee[1]){Y=te;break}else if(K=te?te-1:NaN,ee&&ee[0]>B){X=te;break}}if(J=Y,isNaN(J)&&(isNaN(K)||isNaN(X)?J=isNaN(K)?X:K:J=B-j[K][1]=_e[0]&&de<=_e[1]){ne.clickableOrdinalRange=_e;break}}}return ne}function S(P,B){t.event.sourceEvent.stopPropagation();var $=B.height-t.mouse(P)[1]-2*e.verticalPadding,Q=B.unitToPaddedPx.invert($),J=B.brush,ne=T(B,$),te=ne.interval,Z=J.svgBrush;if(Z.wasDragged=!1,Z.grabbingBar=ne.region==="ns",Z.grabbingBar){var G=te.map(B.unitToPaddedPx);Z.grabPoint=$-G[0]-e.verticalPadding,Z.barLength=G[1]-G[0]}Z.clickableOrdinalRange=ne.clickableOrdinalRange,Z.stayingIntervals=B.multiselect&&J.filterSpecified?J.filter.getConsolidated():[],te&&(Z.stayingIntervals=Z.stayingIntervals.filter(function(j){return j[0]!==te[0]&&j[1]!==te[1]})),Z.startExtent=ne.region?te[ne.region==="s"?1:0]:Q,B.parent.inBrushDrag=!0,Z.brushStartCallback()}function A(P,B){t.event.sourceEvent.stopPropagation();var $=B.height-t.mouse(P)[1]-2*e.verticalPadding,Q=B.brush.svgBrush;Q.wasDragged=!0,Q._dragging=!0,Q.grabbingBar?Q.newExtent=[$-Q.grabPoint,$+Q.barLength-Q.grabPoint].map(B.unitToPaddedPx.invert):Q.newExtent=[Q.startExtent,B.unitToPaddedPx.invert($)].sort(o),B.brush.filterSpecified=!0,Q.extent=Q.stayingIntervals.concat([Q.newExtent]),Q.brushCallback(B),g(P.parentNode)}function M(P,B){var $=B.brush,Q=$.filter,J=$.svgBrush;J._dragging||(w(P,B),A(P,B),B.brush.svgBrush.wasDragged=!1),J._dragging=!1;var ne=t.event;ne.sourceEvent.stopPropagation();var te=J.grabbingBar;if(J.grabbingBar=!1,J.grabLocation=void 0,B.parent.inBrushDrag=!1,y(),!J.wasDragged){J.wasDragged=void 0,J.clickableOrdinalRange?$.filterSpecified&&B.multiselect?J.extent.push(J.clickableOrdinalRange):(J.extent=[J.clickableOrdinalRange],$.filterSpecified=!0):te?(J.extent=J.stayingIntervals,J.extent.length===0&&I($)):I($),J.brushCallback(B),g(P.parentNode),J.brushEndCallback($.filterSpecified?Q.getConsolidated():[]);return}var Z=function(){Q.set(Q.getConsolidated())};if(B.ordinal){var G=B.unitTickvals;G[G.length-1]J.newExtent[0];J.extent=J.stayingIntervals.concat(j?[J.newExtent]:[]),J.extent.length||I($),J.brushCallback(B),j?g(P.parentNode,Z):(Z(),g(P.parentNode))}else Z();J.brushEndCallback($.filterSpecified?Q.getConsolidated():[])}function w(P,B){var $=B.height-t.mouse(P)[1]-2*e.verticalPadding,Q=T(B,$),J="crosshair";Q.clickableOrdinalRange?J="pointer":Q.region&&(J=Q.region+"-resize"),t.select(document.body).style("cursor",J)}function C(P){P.on("mousemove",function(B){t.event.preventDefault(),B.parent.inBrushDrag||w(this,B)}).on("mouseleave",function(B){B.parent.inBrushDrag||y()}).call(t.behavior.drag().on("dragstart",function(B){S(this,B)}).on("drag",function(B){A(this,B)}).on("dragend",function(B){M(this,B)}))}function x(P,B){return P[0]-B[0]}function _(P,B,$){var Q=$._context.staticPlot,J=P.selectAll(".background").data(n);J.enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events",Q?"none":"auto").attr("transform",s(0,e.verticalPadding)),J.call(C).attr("height",function(Z){return Z.height-e.verticalPadding});var ne=P.selectAll(".highlight-shadow").data(n);ne.enter().append("line").classed("highlight-shadow",!0).attr("x",-e.bar.width/2).attr("stroke-width",e.bar.width+e.bar.strokeWidth).attr("stroke",B).attr("opacity",e.bar.strokeOpacity).attr("stroke-linecap","butt"),ne.attr("y1",function(Z){return Z.height}).call(b);var te=P.selectAll(".highlight").data(n);te.enter().append("line").classed("highlight",!0).attr("x",-e.bar.width/2).attr("stroke-width",e.bar.width-e.bar.strokeWidth).attr("stroke",e.bar.fillColor).attr("opacity",e.bar.fillOpacity).attr("stroke-linecap","butt"),te.attr("y1",function(Z){return Z.height}).call(b)}function k(P,B,$){var Q=P.selectAll("."+e.cn.axisBrush).data(n,r);Q.enter().append("g").classed(e.cn.axisBrush,!0),_(Q,B,$)}function E(P){return P.svgBrush.extent.map(function(B){return B.slice()})}function I(P){P.filterSpecified=!1,P.svgBrush.extent=[[-1/0,1/0]]}function F(P){return function($){var Q=$.brush,J=E(Q),ne=J.slice();Q.filter.set(ne),P()}}function D(P){for(var B=P.slice(),$=[],Q,J=B.shift();J;){for(Q=J.slice();(J=B.shift())&&J[0]<=Q[1];)Q[1]=Math.max(Q[1],J[1]);$.push(Q)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function z(){var P=[],B,$;return{set:function(Q){P=Q.map(function(J){return J.slice().sort(o)}).sort(x),P.length===1&&P[0][0]===-1/0&&P[0][1]===1/0&&(P=[[0,-1]]),B=D(P),$=P.reduce(function(J,ne){return[Math.min(J[0],ne[0]),Math.max(J[1],ne[1])]},[1/0,-1/0])},get:function(){return P.slice()},getConsolidated:function(){return B},getBounds:function(){return $}}}function N(P,B,$,Q,J,ne){var te=z();return te.set($),{filter:te,filterSpecified:B,svgBrush:{extent:[],brushStartCallback:Q,brushCallback:F(J),brushEndCallback:ne}}}function q(P,B){if(Array.isArray(P[0])?(P=P.map(function(Q){return Q.sort(o)}),B.multiselect?P=D(P.sort(x)):P=[P[0]]):P=[P.sort(o)],B.tickvals){var $=B.tickvals.slice().sort(o);if(P=P.map(function(Q){var J=[u(0,$,Q[0],[]),u(1,$,Q[1],[])];if(J[1]>J[0])return J}).filter(function(Q){return Q}),!P.length)return}return P.length>1?P:P[0]}return z9={makeBrush:N,ensureAxisBrush:k,cleanRanges:q},z9}var F9,tye;function KWe(){if(tye)return F9;tye=1;var e=rr(),t=Bh().hasColorscale,r=Tf(),n=Vs().defaults,o=uh(),s=Ia(),a=KCe(),f=JCe(),i=UM().maxDimensionCount,l=NX();function u(h,d,v,p,m){var y=m("line.color",v);if(t(h,"line")&&e.isArrayOrTypedArray(y)){if(y.length)return m("line.colorscale"),r(h,d,p,m,{prefix:"line.",cLetter:"c"}),y.length;d.line.color=v}return 1/0}function c(h,d,v,p){function m(S,A){return e.coerce(h,d,a.dimensions,S,A)}var y=m("values"),b=m("visible");if(y&&y.length||(b=d.visible=!1),b){m("label"),m("tickvals"),m("ticktext"),m("tickformat");var g=m("range");d._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:g},s.setConvert(d._ax,p.layout),m("multiselect");var T=m("constraintrange");T&&(d.constraintrange=f.cleanRanges(T,d))}}return F9=function(d,v,p,m){function y(A,M){return e.coerce(d,v,a,A,M)}var b=d.dimensions;Array.isArray(b)&&b.length>i&&(e.log("parcoords traces support up to "+i+" dimensions at the moment"),b.splice(i));var g=o(d,v,{name:"dimensions",layout:m,handleItemDefaults:c}),T=u(d,v,p,m,y);n(v,m,y),(!Array.isArray(g)||!g.length)&&(v.visible=!1),l(v,g,"values",T);var S={family:m.font.family,size:Math.round(m.font.size/1.2),color:m.font.color};e.coerceFont(y,"labelfont",S),e.coerceFont(y,"tickfont",S),e.coerceFont(y,"rangefont",S),y("labelangle"),y("labelside"),y("unselected.line.color"),y("unselected.line.opacity")},F9}var N9,rye;function JWe(){if(rye)return N9;rye=1;var e=rr().isArrayOrTypedArray,t=Hs(),r=Z0().wrap;N9=function(s,a){var f,i;return t.hasColorscale(a,"line")&&e(a.line.color)?(f=a.line.color,i=t.extractOpts(a.line).colorscale,t.calc(s,a,{vals:f,containerStr:"line",cLetter:"c"})):(f=n(a._length),i=[[0,a.line.color],[1,a.line.color]]),r({lineColor:f,cscale:i})};function n(o){for(var s=new Array(o),a=0;a 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),t=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),r=UM().maxDimensionCount,n=rr(),o=1e-6,s=2048,a=new Uint8Array(4),f=new Uint8Array(4),i={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function l(M){M.read({x:0,y:0,width:1,height:1,data:a})}function u(M,w,C,x,_){var k=M._gl;k.enable(k.SCISSOR_TEST),k.scissor(w,C,x,_),M.clear({color:[0,0,0,0],depth:1})}function c(M,w,C,x,_,k){var E=k.key;function I(F){var D=Math.min(x,_-F*x);F===0&&(window.cancelAnimationFrame(C.currentRafs[E]),delete C.currentRafs[E],u(M,k.scissorX,k.scissorY,k.scissorWidth,k.viewBoxSize[1])),!C.clearOnly&&(k.count=2*D,k.offset=2*F*x,w(k),F*x+D<_&&(C.currentRafs[E]=window.requestAnimationFrame(function(){I(F+1)})),C.drawCompleted=!1)}C.drawCompleted||(l(M),C.drawCompleted=!0),I(0)}function h(M){return Math.max(o,Math.min(1-o,M))}function d(M,w){for(var C=new Array(256),x=0;x<256;x++)C[x]=M(x/255).concat(w);return C}function v(M,w){return(M>>>8*w)%256/255}function p(M,w,C){for(var x=new Array(M*(r+4)),_=0,k=0;kwe&&(we=K[oe].dim1.canvasX,de=oe);le===0&&u(_,0,0,D.canvasWidth,D.canvasHeight);var Oe=te(C);for(oe=0;oeoe._length&&(Ee=Ee.slice(0,oe._length));var Le=oe.tickvals,Fe;function qe(Ce,et){return{val:Ce,text:Fe[et]}}function We(Ce,et){return Ce.val-et.val}if(r(Le)&&Le.length){t.isTypedArray(Le)&&(Le=Array.from(Le)),Fe=oe.ticktext,!r(Fe)||!Fe.length?Fe=Le.map(n(oe.tickformat)):Fe.length>Le.length?Fe=Fe.slice(0,Le.length):Le.length>Fe.length&&(Le=Le.slice(0,Fe.length));for(var Qe=1;Qe=et||ht>=st)return;var Ht=me.lineLayer.readPixel(ut,st-1-ht),Et=Ht[3]!==0,Jt=Et?Ht[2]+256*(Ht[1]+256*Ht[0]):null,Tt={x:ut,y:ht,clientX:Ce.clientX,clientY:Ce.clientY,dataIndex:me.model.key,curveNumber:Jt};Jt!==de&&(Et?Z.hover(Tt):Z.unhover&&Z.unhover(Tt),de=Jt)}}),fe.style("opacity",function(me){return me.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var we=Y.selectAll("."+m.cn.parcoords).data(oe,h);we.exit().remove(),we.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),we.attr("transform",function(me){return f(me.model.translateX,me.model.translateY)});var Oe=we.selectAll("."+m.cn.parcoordsControlView).data(d,h);Oe.enter().append("g").classed(m.cn.parcoordsControlView,!0),Oe.attr("transform",function(me){return f(me.model.pad.l,me.model.pad.t)});var be=Oe.selectAll("."+m.cn.yAxis).data(function(me){return me.dimensions},h);be.enter().append("g").classed(m.cn.yAxis,!0),Oe.each(function(me){q(be,me,X)}),fe.each(function(me){if(me.viewModel){!me.lineLayer||Z?me.lineLayer=b(this,me):me.lineLayer.update(me),(me.key||me.key===0)&&(me.viewModel[me.key]=me.lineLayer);var Ce=!me.context||Z;me.lineLayer.render(me.viewModel.panels,Ce)}}),be.attr("transform",function(me){return f(me.xScale(me.xIndex),0)}),be.call(e.behavior.drag().origin(function(me){return me}).on("drag",function(me){var Ce=me.parent;le.linePickActive(!1),me.x=Math.max(-m.overdrag,Math.min(me.model.width+m.overdrag,e.event.x)),me.canvasX=me.x*me.model.canvasPixelRatio,be.sort(function(et,st){return et.x-st.x}).each(function(et,st){et.xIndex=st,et.x=me===et?et.x:et.xScale(et.xIndex),et.canvasX=et.x*et.model.canvasPixelRatio}),q(be,Ce,X),be.filter(function(et){return Math.abs(me.xIndex-et.xIndex)!==0}).attr("transform",function(et){return f(et.xScale(et.xIndex),0)}),e.select(this).attr("transform",f(me.x,0)),be.each(function(et,st,ot){ot===me.parent.key&&(Ce.dimensions[st]=et)}),Ce.contextLayer&&Ce.contextLayer.render(Ce.panels,!1,!E(Ce)),Ce.focusLayer.render&&Ce.focusLayer.render(Ce.panels)}).on("dragend",function(me){var Ce=me.parent;me.x=me.xScale(me.xIndex),me.canvasX=me.x*me.model.canvasPixelRatio,q(be,Ce,X),e.select(this).attr("transform",function(et){return f(et.x,0)}),Ce.contextLayer&&Ce.contextLayer.render(Ce.panels,!1,!E(Ce)),Ce.focusLayer&&Ce.focusLayer.render(Ce.panels),Ce.pickLayer&&Ce.pickLayer.render(Ce.panels,!0),le.linePickActive(!0),Z&&Z.axesMoved&&Z.axesMoved(Ce.key,Ce.dimensions.map(function(et){return et.crossfilterDimensionIndex}))})),be.exit().remove();var Te=be.selectAll("."+m.cn.axisOverlays).data(d,h);Te.enter().append("g").classed(m.cn.axisOverlays,!0),Te.selectAll("."+m.cn.axis).remove();var ke=Te.selectAll("."+m.cn.axis).data(d,h);ke.enter().append("g").classed(m.cn.axis,!0),ke.each(function(me){var Ce=me.model.height/me.model.tickDistance,et=me.domainScale,st=et.domain();e.select(this).call(e.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ce,me.tickFormat).tickValues(me.ordinal?st:null).tickFormat(function(ot){return p.isOrdinal(me)?ot:B(me.model.dimensions[me.visibleIndex],ot)}).scale(et)),l.font(ke.selectAll("text"),me.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("text-shadow",i.makeTextShadow(ee)).style("cursor","default");var Ee=Te.selectAll("."+m.cn.axisHeading).data(d,h);Ee.enter().append("g").classed(m.cn.axisHeading,!0);var Le=Ee.selectAll("."+m.cn.axisTitle).data(d,h);Le.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",G?"none":"auto"),Le.text(function(me){return me.label}).each(function(me){var Ce=e.select(this);l.font(Ce,me.model.labelFont),i.convertToTspans(Ce,J)}).attr("transform",function(me){var Ce=N(me.model.labelAngle,me.model.labelSide),et=m.axisTitleOffset;return(Ce.dir>0?"":f(0,2*et+me.model.height))+a(Ce.degrees)+f(-et*Ce.dx,-et*Ce.dy)}).attr("text-anchor",function(me){var Ce=N(me.model.labelAngle,me.model.labelSide),et=Math.abs(Ce.dx),st=Math.abs(Ce.dy);return 2*et>st?Ce.dir*Ce.dx<0?"start":"end":"middle"});var Fe=Te.selectAll("."+m.cn.axisExtent).data(d,h);Fe.enter().append("g").classed(m.cn.axisExtent,!0);var qe=Fe.selectAll("."+m.cn.axisExtentTop).data(d,h);qe.enter().append("g").classed(m.cn.axisExtentTop,!0),qe.attr("transform",f(0,-m.axisExtentOffset));var We=qe.selectAll("."+m.cn.axisExtentTopText).data(d,h);We.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(D),We.text(function(me){return $(me,!0)}).each(function(me){l.font(e.select(this),me.model.rangeFont)});var Qe=Fe.selectAll("."+m.cn.axisExtentBottom).data(d,h);Qe.enter().append("g").classed(m.cn.axisExtentBottom,!0),Qe.attr("transform",function(me){return f(0,me.model.height+m.axisExtentOffset)});var De=Qe.selectAll("."+m.cn.axisExtentBottomText).data(d,h);De.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(D),De.text(function(me){return $(me,!1)}).each(function(me){l.font(e.select(this),me.model.rangeFont)}),y.ensureAxisBrush(Te,ee,J)},j9}var oye;function e5e(){if(oye)return B9.exports;oye=1;var e=eXe(),t=FX(),r=QCe().isVisible,n={};function o(f,i,l){var u=i.indexOf(l),c=f.indexOf(u);return c===-1&&(c+=i.length),c}function s(f,i){return function(u,c){return o(f,i,u)-o(f,i,c)}}var a=B9.exports=function(i,l){var u=i._fullLayout,c=t(i,[],n);if(c){var h={},d={},v={},p={},m=u._size;l.forEach(function(S,A){var M=S[0].trace;v[A]=M.index;var w=p[A]=M._fullInput.index;h[A]=i.data[w].dimensions,d[A]=i.data[w].dimensions.slice()});var y=function(S,A,M){var w=d[S][A],C=M.map(function(F){return F.slice()}),x="dimensions["+A+"].constraintrange",_=u._tracePreGUI[i._fullData[v[S]]._fullInput.uid];if(_[x]===void 0){var k=w.constraintrange;_[x]=k||null}var E=i._fullData[v[S]].dimensions[A];C.length?(C.length===1&&(C=C[0]),w.constraintrange=C,E.constraintrange=C.slice(),C=[C]):(delete w.constraintrange,delete E.constraintrange,C=null);var I={};I[x]=C,i.emit("plotly_restyle",[I,[p[S]]])},b=function(S){i.emit("plotly_hover",S)},g=function(S){i.emit("plotly_unhover",S)},T=function(S,A){var M=s(A,d[S].filter(r));h[S].sort(M),d[S].filter(function(w){return!r(w)}).sort(function(w){return d[S].indexOf(w)}).forEach(function(w){h[S].splice(h[S].indexOf(w),1),h[S].splice(d[S].indexOf(w),0,w)}),i.emit("plotly_restyle",[{dimensions:[h[S]]},[p[S]]])};e(i,l,{width:m.w,height:m.h,margin:{t:m.t,r:m.r,b:m.b,l:m.l}},{filterChanged:y,hover:b,unhover:g,axesMoved:T})}};return a.reglPrecompiled=n,B9.exports}var sye;function tXe(){if(sye)return J1;sye=1;var e=ya(),t=cc().getModuleCalcData,r=e5e(),n=Dv();return J1.name="parcoords",J1.plot=function(o){var s=t(o.calcdata,"parcoords")[0];s.length&&r(o,s)},J1.clean=function(o,s,a,f){var i=f._has&&f._has("parcoords"),l=s._has&&s._has("parcoords");i&&!l&&(f._paperdiv.selectAll(".parcoords").remove(),f._glimages.selectAll("*").remove())},J1.toSVG=function(o){var s=o._fullLayout._glimages,a=e.select(o).selectAll(".svg-container"),f=a.filter(function(l,u){return u===a.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var l=this,u=l.toDataURL("image/png"),c=s.append("svg:image");c.attr({xmlns:n.svg,"xlink:href":u,preserveAspectRatio:"none",x:0,y:0,width:l.style.width,height:l.style.height})}f.each(i),window.setTimeout(function(){e.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)},J1}var U9,lye;function rXe(){return lye||(lye=1,U9={attributes:KCe(),supplyDefaults:KWe(),calc:JWe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:tXe(),categories:["gl","regl","noOpacity","noHover"],meta:{description:["Parallel coordinates for multidimensional exploratory data analysis.","The samples are specified in `dimensions`.","The colors are set in `line.color`."].join(" ")}}),U9}var H9,uye;function nXe(){if(uye)return H9;uye=1;var e=rXe();return e.plot=e5e(),H9=e,H9}var G9,fye;function aXe(){return fye||(fye=1,G9=nXe()),G9}var V9,cye;function t5e(){if(cye)return V9;cye=1;var e=ja().extendFlat,t=qo(),r=Gs(),n=os(),o=bi().hovertemplateAttrs,s=Vs().attributes,a=e({editType:"calc"},n("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot",description:["Sets the shape of the paths.","If `linear`, paths are composed of straight lines.","If `hspline`, paths are composed of horizontal curved splines"].join(" ")},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"],description:["This value here applies when hovering over lines."].join(" ")})});return V9={domain:s({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:e({},t.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot",description:["Sets the hover interaction mode for the parcats diagram.","If `category`, hover interaction take place per category.","If `color`, hover interactions take place per color per category.","If `dimension`, hover interactions take place across all categories per dimension."].join(" ")},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"],description:["This value here applies when hovering over dimensions.","Note that `*categorycount`, *colorcount* and *bandcolorcount*","are only available when `hoveron` contains the *color* flag"].join(" ")}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot",description:["Sets the drag interaction mode for categories and dimensions.","If `perpendicular`, the categories can only move along a line perpendicular to the paths.","If `freeform`, the categories can freely move on the plane.","If `fixed`, the categories and dimensions are stationary."].join(" ")},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot",description:"Sort paths so that like colors are bundled together within each category."},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot",description:["Sets the path sorting algorithm.","If `forward`, sort paths based on dimension categories from left to right.","If `backward`, sort paths based on dimensions categories from right to left."].join(" ")},labelfont:r({editType:"calc",description:"Sets the font for the `dimension` labels."}),tickfont:r({editType:"calc",description:"Sets the font for the `category` labels."}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc",description:"The shown name of the dimension."},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the categories in the dimension.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories in this dimension appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},ticktext:{valType:"data_array",editType:"calc",description:["Sets alternative tick labels for the categories in this dimension.","Only has an effect if `categoryorder` is set to *array*.","Should be an array the same length as `categoryarray`","Used with `categoryorder`."].join(" ")},values:{valType:"data_array",dflt:[],editType:"calc",description:["Dimension values. `values[n]` represents the category value of the `n`th point in the dataset,","therefore the `values` vector for all dimensions must be the same (longer vectors","will be truncated)."].join(" ")},displayindex:{valType:"integer",editType:"calc",description:["The display index of dimension, from left to right, zero indexed, defaults to dimension","index."].join(" ")},editType:"calc",description:"The dimensions (variables) of the parallel categories diagram.",visible:{valType:"boolean",dflt:!0,editType:"calc",description:"Shows the dimension when set to `true` (the default). Hides the dimension for `false`."}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc",description:["The number of observations represented by each state. Defaults to 1 so that each state represents","one observation"].join(" ")},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0},V9}var Y9,hye;function iXe(){if(hye)return Y9;hye=1;var e=rr(),t=Bh().hasColorscale,r=Tf(),n=Vs().defaults,o=uh(),s=t5e(),a=NX(),f=lh().isTypedArraySpec;function i(u,c,h,d,v){v("line.shape"),v("line.hovertemplate");var p=v("line.color",d.colorway[0]);if(t(u,"line")&&e.isArrayOrTypedArray(p)){if(p.length)return v("line.colorscale"),r(u,c,d,v,{prefix:"line.",cLetter:"c"}),p.length;c.line.color=h}return 1/0}function l(u,c){function h(g,T){return e.coerce(u,c,s.dimensions,g,T)}var d=h("values"),v=h("visible");if(d&&d.length||(v=c.visible=!1),v){h("label"),h("displayindex",c._index);var p=u.categoryarray,m=e.isArrayOrTypedArray(p)&&p.length>0||f(p),y;m&&(y="array");var b=h("categoryorder",y);b==="array"?(h("categoryarray"),h("ticktext")):(delete u.categoryarray,delete u.ticktext),!m&&b==="array"&&(c.categoryorder="trace")}}return Y9=function(c,h,d,v){function p(T,S){return e.coerce(c,h,s,T,S)}var m=o(c,h,{name:"dimensions",handleItemDefaults:l}),y=i(c,h,d,v,p);n(h,v,p),(!Array.isArray(m)||!m.length)&&(h.visible=!1),a(h,m,"values",y),p("hoveron"),p("hovertemplate"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var b={family:v.font.family,size:Math.round(v.font.size),color:v.font.color};e.coerceFont(p,"labelfont",b);var g={family:v.font.family,size:Math.round(v.font.size/1.2),color:v.font.color};e.coerceFont(p,"tickfont",g)},Y9}var $9,dye;function oXe(){if(dye)return $9;dye=1;var e=Z0().wrap,t=Bh().hasColorscale,r=md(),n=sAe(),o=Ba(),s=rr(),a=Ua();$9=function(b,g){var T=s.filterVisible(g.dimensions);if(T.length===0)return[];var S=T.map(function(te){var Z;if(te.categoryorder==="trace")Z=null;else if(te.categoryorder==="array")Z=te.categoryarray;else{Z=n(te.values);for(var G=!0,j=0;j=y.length||b[y[g]]!==void 0)return!1;b[y[g]]=!0}return!0}return $9}var W9,vye;function sXe(){if(vye)return W9;vye=1;var e=ya(),t=_x.interpolateNumber,r=v$(),n=yl(),o=rr(),s=o.strTranslate,a=Ba(),f=wf(),i=ns();function l(j,Y,K,X){var ee=Y._context.staticPlot,le=j.map(J.bind(0,Y,K)),oe=X.selectAll("g.parcatslayer").data([null]);oe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ee?"none":"all");var fe=oe.selectAll("g.trace.parcats").data(le,u),de=fe.enter().append("g").attr("class","trace parcats");fe.attr("transform",function(We){return s(We.x,We.y)}),de.append("g").attr("class","paths");var _e=fe.select("g.paths"),we=_e.selectAll("path.path").data(function(We){return We.paths},u);we.attr("fill",function(We){return We.model.color});var Oe=we.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(We){return We.model.color}).attr("fill-opacity",0);b(Oe),we.attr("d",function(We){return We.svgD}),Oe.empty()||we.sort(h),we.exit().remove(),we.on("mouseover",d).on("mouseout",v).on("click",y),de.append("g").attr("class","dimensions");var be=fe.select("g.dimensions"),Te=be.selectAll("g.dimension").data(function(We){return We.dimensions},u);Te.enter().append("g").attr("class","dimension"),Te.attr("transform",function(We){return s(We.x,0)}),Te.exit().remove();var ke=Te.selectAll("g.category").data(function(We){return We.categories},u),Ee=ke.enter().append("g").attr("class","category");ke.attr("transform",function(We){return s(0,We.y)}),Ee.append("rect").attr("class","catrect").attr("pointer-events","none"),ke.select("rect.catrect").attr("fill","none").attr("width",function(We){return We.width}).attr("height",function(We){return We.height}),S(Ee);var Le=ke.selectAll("rect.bandrect").data(function(We){return We.bands},u);Le.each(function(){o.raiseToTop(this)}),Le.attr("fill",function(We){return We.color});var Fe=Le.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(We){return We.color}).attr("fill-opacity",0);Le.attr("fill",function(We){return We.color}).attr("width",function(We){return We.width}).attr("height",function(We){return We.height}).attr("y",function(We){return We.y}).attr("cursor",function(We){return We.parcatsViewModel.arrangement==="fixed"?"default":We.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),M(Fe),Le.exit().remove(),Ee.append("text").attr("class","catlabel").attr("pointer-events","none");var qe=Y._fullLayout.paper_bgcolor;ke.select("text.catlabel").attr("text-anchor",function(We){return c(We)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",i.makeTextShadow(qe)).style("fill","rgb(0, 0, 0)").attr("x",function(We){return c(We)?We.width+5:-5}).attr("y",function(We){return We.height/2}).text(function(We){return We.model.categoryLabel}).each(function(We){a.font(e.select(this),We.parcatsViewModel.categorylabelfont),i.convertToTspans(e.select(this),Y)}),Ee.append("text").attr("class","dimlabel"),ke.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(We){return We.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(We){return We.width/2}).attr("y",-5).text(function(We,Qe){return Qe===0?We.parcatsViewModel.model.dimensions[We.model.dimensionInd].dimensionLabel:null}).each(function(We){a.font(e.select(this),We.parcatsViewModel.labelfont)}),ke.selectAll("rect.bandrect").on("mouseover",D).on("mouseout",z),ke.exit().remove(),Te.call(e.behavior.drag().origin(function(We){return{x:We.x,y:0}}).on("dragstart",N).on("drag",q).on("dragend",P)),fe.each(function(We){We.traceSelection=e.select(this),We.pathSelection=e.select(this).selectAll("g.paths").selectAll("path.path"),We.dimensionSelection=e.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),fe.exit().remove()}W9=function(j,Y,K,X){l(K,j,X,Y)};function u(j){return j.key}function c(j){var Y=j.parcatsViewModel.dimensions.length,K=j.parcatsViewModel.dimensions[Y-1].model.dimensionInd;return j.model.dimensionInd===K}function h(j,Y){return j.model.rawColor>Y.model.rawColor?1:j.model.rawColor"),me=e.mouse(ee)[0];n.loneHover({trace:le,x:ke-fe.left+de.left,y:Ee-fe.top+de.top,text:De,color:j.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Le,idealAlign:me1&&_e.displayInd===de.dimensions.length-1?(be=oe.left,Te="left"):(be=oe.left+oe.width,Te="right");var ke=fe.model.count,Ee=fe.model.categoryLabel,Le=ke/fe.parcatsViewModel.model.count,Fe={countLabel:ke,categoryLabel:Ee,probabilityLabel:Le.toFixed(3)},qe=[];fe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&qe.push(["Count:",Fe.countLabel].join(" ")),fe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&qe.push(["P("+Fe.categoryLabel+"):",Fe.probabilityLabel].join(" "));var We=qe.join("
");return{trace:we,x:X*(be-Y.left),y:ee*(Oe-Y.top),text:We,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Te,hovertemplate:we.hovertemplate,hovertemplateLabels:Fe,eventData:[{data:we._input,fullData:we,count:ke,category:Ee,probability:Le}]}}function I(j,Y,K){var X=[];return e.select(K.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ee=this;X.push(E(j,Y,ee))}),X}function F(j,Y,K){j._fullLayout._calcInverseTransform(j);var X=j._fullLayout._invScaleX,ee=j._fullLayout._invScaleY,le=K.getBoundingClientRect(),oe=e.select(K).datum(),fe=oe.categoryViewModel,de=fe.parcatsViewModel,_e=de.model.dimensions[fe.model.dimensionInd],we=de.trace,Oe=le.y+le.height/2,be,Te;de.dimensions.length>1&&_e.displayInd===de.dimensions.length-1?(be=le.left,Te="left"):(be=le.left+le.width,Te="right");var ke=fe.model.categoryLabel,Ee=oe.parcatsViewModel.model.count,Le=0;oe.categoryViewModel.bands.forEach(function(ot){ot.color===oe.color&&(Le+=ot.count)});var Fe=fe.model.count,qe=0;de.pathSelection.each(function(ot){ot.model.color===oe.color&&(qe+=ot.model.count)});var We=Le/Ee,Qe=Le/qe,De=Le/Fe,me={countLabel:Ee,categoryLabel:ke,probabilityLabel:We.toFixed(3)},Ce=[];fe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ce.push(["Count:",me.countLabel].join(" ")),fe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ce.push("P(color ∩ "+ke+"): "+me.probabilityLabel),Ce.push("P("+ke+" | color): "+Qe.toFixed(3)),Ce.push("P(color | "+ke+"): "+De.toFixed(3)));var et=Ce.join("
"),st=f.mostReadable(oe.color,["black","white"]);return{trace:we,x:X*(be-Y.left),y:ee*(Oe-Y.top),text:et,color:oe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:st,fontSize:10,idealAlign:Te,hovertemplate:we.hovertemplate,hovertemplateLabels:me,eventData:[{data:we._input,fullData:we,category:ke,count:Ee,probability:We,categorycount:Fe,colorcount:qe,bandcolorcount:Le}]}}function D(j){if(!j.parcatsViewModel.dragDimension&&j.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Y=e.mouse(this)[1];if(Y<-1)return;var K=j.parcatsViewModel.graphDiv,X=K._fullLayout,ee=X._paperdiv.node().getBoundingClientRect(),le=j.parcatsViewModel.hoveron,oe=this;if(le==="color"?(x(oe),k(oe,"plotly_hover",e.event)):(C(oe),_(oe,"plotly_hover",e.event)),j.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var fe;le==="category"?fe=E(K,ee,oe):le==="color"?fe=F(K,ee,oe):le==="dimension"&&(fe=I(K,ee,oe)),fe&&n.loneHover(fe,{container:X._hoverlayer.node(),outerContainer:X._paper.node(),gd:K})}}}function z(j){var Y=j.parcatsViewModel;if(!Y.dragDimension&&(b(Y.pathSelection),S(Y.dimensionSelection.selectAll("g.category")),M(Y.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),n.loneUnhover(Y.graphDiv._fullLayout._hoverlayer.node()),Y.pathSelection.sort(h),Y.hoverinfoItems.indexOf("skip")===-1)){var K=j.parcatsViewModel.hoveron,X=this;K==="color"?k(X,"plotly_unhover",e.event):_(X,"plotly_unhover",e.event)}}function N(j){j.parcatsViewModel.arrangement!=="fixed"&&(j.dragDimensionDisplayInd=j.model.displayInd,j.initialDragDimensionDisplayInds=j.parcatsViewModel.model.dimensions.map(function(Y){return Y.displayInd}),j.dragHasMoved=!1,j.dragCategoryDisplayInd=null,e.select(this).selectAll("g.category").select("rect.catrect").each(function(Y){var K=e.mouse(this)[0],X=e.mouse(this)[1];-2<=K&&K<=Y.width+2&&-2<=X&&X<=Y.height+2&&(j.dragCategoryDisplayInd=Y.model.displayInd,j.initialDragCategoryDisplayInds=j.model.categories.map(function(ee){return ee.displayInd}),Y.model.dragY=Y.y,o.raiseToTop(this.parentNode),e.select(this.parentNode).selectAll("rect.bandrect").each(function(ee){ee.ywe.y+we.height/2&&(le.model.displayInd=we.model.displayInd,we.model.displayInd=fe),j.dragCategoryDisplayInd=le.model.displayInd}if(j.dragCategoryDisplayInd===null||j.parcatsViewModel.arrangement==="freeform"){ee.model.dragX=e.event.x;var Oe=j.parcatsViewModel.dimensions[K],be=j.parcatsViewModel.dimensions[X];Oe!==void 0&&ee.model.dragXbe.x&&(ee.model.displayInd=be.model.displayInd,be.model.displayInd=j.dragDimensionDisplayInd),j.dragDimensionDisplayInd=ee.model.displayInd}Z(j.parcatsViewModel),te(j.parcatsViewModel),Q(j.parcatsViewModel),$(j.parcatsViewModel)}}function P(j){if(j.parcatsViewModel.arrangement!=="fixed"&&j.dragDimensionDisplayInd!==null){e.select(this).selectAll("text").attr("font-weight","normal");var Y={},K=B(j.parcatsViewModel),X=j.parcatsViewModel.model.dimensions.map(function(be){return be.displayInd}),ee=j.initialDragDimensionDisplayInds.some(function(be,Te){return be!==X[Te]});ee&&X.forEach(function(be,Te){var ke=j.parcatsViewModel.model.dimensions[Te].containerInd;Y["dimensions["+ke+"].displayindex"]=be});var le=!1;if(j.dragCategoryDisplayInd!==null){var oe=j.model.categories.map(function(be){return be.displayInd});if(le=j.initialDragCategoryDisplayInds.some(function(be,Te){return be!==oe[Te]}),le){var fe=j.model.categories.slice().sort(function(be,Te){return be.displayInd-Te.displayInd}),de=fe.map(function(be){return be.categoryValue}),_e=fe.map(function(be){return be.categoryLabel});Y["dimensions["+j.model.containerInd+"].categoryarray"]=[de],Y["dimensions["+j.model.containerInd+"].ticktext"]=[_e],Y["dimensions["+j.model.containerInd+"].categoryorder"]="array"}}if(j.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!j.dragHasMoved&&j.potentialClickBand&&(j.parcatsViewModel.hoveron==="color"?k(j.potentialClickBand,"plotly_click",e.event.sourceEvent):_(j.potentialClickBand,"plotly_click",e.event.sourceEvent)),j.model.dragX=null,j.dragCategoryDisplayInd!==null){var we=j.parcatsViewModel.dimensions[j.dragDimensionDisplayInd].categories[j.dragCategoryDisplayInd];we.model.dragY=null,j.dragCategoryDisplayInd=null}j.dragDimensionDisplayInd=null,j.parcatsViewModel.dragDimension=null,j.dragHasMoved=null,j.potentialClickBand=null,Z(j.parcatsViewModel),te(j.parcatsViewModel);var Oe=e.transition().duration(300).ease("cubic-in-out");Oe.each(function(){Q(j.parcatsViewModel,!0),$(j.parcatsViewModel,!0)}).each("end",function(){(ee||le)&&r.restyle(j.parcatsViewModel.graphDiv,Y,[K])})}}function B(j){for(var Y,K=j.graphDiv._fullData,X=0;X=0;de--)_e+="C"+oe[de]+","+(Y[de+1]+X)+" "+le[de]+","+(Y[de]+X)+" "+(j[de]+K[de])+","+(Y[de]+X),_e+="l-"+K[de]+",0 ";return _e+="Z",_e}function te(j){var Y=j.dimensions,K=j.model,X=Y.map(function(Ht){return Ht.categories.map(function(Et){return Et.y})}),ee=j.model.dimensions.map(function(Ht){return Ht.categories.map(function(Et){return Et.displayInd})}),le=j.model.dimensions.map(function(Ht){return Ht.displayInd}),oe=j.dimensions.map(function(Ht){return Ht.model.dimensionInd}),fe=Y.map(function(Ht){return Ht.x}),de=Y.map(function(Ht){return Ht.width}),_e=[];for(var we in K.paths)K.paths.hasOwnProperty(we)&&_e.push(K.paths[we]);function Oe(Ht){var Et=Ht.categoryInds.map(function(Tt,rt){return ee[rt][Tt]}),Jt=oe.map(function(Tt){return Et[Tt]});return Jt}_e.sort(function(Ht,Et){var Jt=Oe(Ht),Tt=Oe(Et);return j.sortpaths==="backward"&&(Jt.reverse(),Tt.reverse()),Jt.push(Ht.valueInds[0]),Tt.push(Et.valueInds[0]),j.bundlecolors&&(Jt.unshift(Ht.rawColor),Tt.unshift(Et.rawColor)),JtTt?1:0});for(var be=new Array(_e.length),Te=Y[0].model.count,ke=Y[0].categories.map(function(Ht){return Ht.height}).reduce(function(Ht,Et){return Ht+Et}),Ee=0;Ee<_e.length;Ee++){var Le=_e[Ee],Fe;Te>0?Fe=ke*(Le.count/Te):Fe=0;for(var qe=new Array(X.length),We=0;We1?oe=(j.width-2*K-X)/(ee-1):oe=0,fe=K,de=fe+oe*le;var _e=[],we=j.model.maxCats,Oe=Y.categories.length,be=8,Te=Y.count,ke=j.height-be*(we-1),Ee,Le,Fe,qe,We,Qe=(we-Oe)*be/2,De=Y.categories.map(function(me){return{displayInd:me.displayInd,categoryInd:me.categoryInd}});for(De.sort(function(me,Ce){return me.displayInd-Ce.displayInd}),We=0;We0?Ee=Le.count/Te*ke:Ee=0,Fe={key:Le.valueInds[0],model:Le,width:X,height:Ee,y:Le.dragY!==null?Le.dragY:Qe,bands:[],parcatsViewModel:j},Qe=Qe+Ee+be,_e.push(Fe);return{key:Y.dimensionInd,x:Y.dragX!==null?Y.dragX:de,y:0,width:X,model:Y,categories:_e,parcatsViewModel:j,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}return W9}var X9,pye;function r5e(){if(pye)return X9;pye=1;var e=sXe();return X9=function(r,n,o,s){var a=r._fullLayout,f=a._paper,i=a._size;e(r,f,n,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},o,s)},X9}var x_={},gye;function lXe(){if(gye)return x_;gye=1;var e=cc().getModuleCalcData,t=r5e(),r="parcats";return x_.name=r,x_.plot=function(n,o,s,a){var f=e(n.calcdata,r);if(f.length){var i=f[0];t(n,i,s,a)}},x_.clean=function(n,o,s,a){var f=a._has&&a._has("parcats"),i=o._has&&o._has("parcats");f&&!i&&a._paperdiv.selectAll(".parcats").remove()},x_}var Z9,yye;function uXe(){return yye||(yye=1,Z9={attributes:t5e(),supplyDefaults:iXe(),calc:oXe(),plot:r5e(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:lXe(),categories:["noOpacity"],meta:{description:["Parallel categories diagram for multidimensional categorical data."].join(" ")}}),Z9}var K9,mye;function fXe(){return mye||(mye=1,K9=uXe()),K9}var J9={exports:{}},Q9,xye;function xy(){if(xye)return Q9;xye=1;var e=qx(),t="1.13.4",r='© OpenStreetMap contributors',n=['© Carto',r].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),a={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:r,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:n,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:n,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},f=e(a);return Q9={requiredVersion:t,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:a,styleValuesNonMapbox:f,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+t+"."].join(` +`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` +`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",f.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` +`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}},Q9}var bye;function DA(){if(bye)return J9.exports;bye=1;var e=rr(),t=va().defaultLine,r=Vs().attributes,n=Gs(),o=Yl().textposition,s=ws().overrideAll,a=go().templatedArray,f=xy(),i=n({description:["Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).","Has an effect only when `type` is set to *symbol*."].join(" ")});i.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var l=J9.exports=s({_arrayAttrRegexps:[e.counterRegex("mapbox",".layers",!0)],domain:r({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0,description:["Sets the mapbox access token to be used for this mapbox map.","Alternatively, the mapbox access token can be set in the","configuration options under `mapboxAccessToken`.","Note that accessToken are only required when `style`","(e.g with values :",f.styleValuesMapbox.join(", "),")","and/or a layout layer references the Mapbox server."].join(" ")},style:{valType:"any",values:f.styleValuesMapbox.concat(f.styleValuesNonMapbox),dflt:f.styleValueDflt,description:["Defines the map layers that are rendered by default below the trace layers defined in `data`,","which are themselves by default rendered below the layers defined in `layout.mapbox.layers`.","","These layers can be defined either explicitly as a Mapbox Style object which can contain multiple","layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS)","or implicitly by using one of the built-in style objects which use WMSes which do not require any","access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of","which require a Mapbox access token","","Note that Mapbox access token can be set in the `accesstoken` attribute","or in the `mapboxAccessToken` config option.","","Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at","https://docs.mapbox.com/mapbox-gl-js/style-spec","","The built-in plotly.js styles objects are:",f.styleValuesNonMapbox.join(", "),"","The built-in Mapbox styles are:",f.styleValuesMapbox.join(", "),"","Mapbox style URLs are of the form: mapbox://mapbox.mapbox--"].join(" ")},center:{lon:{valType:"number",dflt:0,description:"Sets the longitude of the center of the map (in degrees East)."},lat:{valType:"number",dflt:0,description:"Sets the latitude of the center of the map (in degrees North)."}},zoom:{valType:"number",dflt:1,description:"Sets the zoom level of the map (mapbox.zoom)."},bearing:{valType:"number",dflt:0,description:"Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing)."},pitch:{valType:"number",dflt:0,description:["Sets the pitch angle of the map","(in degrees, where *0* means perpendicular to the surface of the map) (mapbox.pitch)."].join(" ")},bounds:{west:{valType:"number",description:["Sets the minimum longitude of the map (in degrees East)","if `east`, `south` and `north` are declared."].join(" ")},east:{valType:"number",description:["Sets the maximum longitude of the map (in degrees East)","if `west`, `south` and `north` are declared."].join(" ")},south:{valType:"number",description:["Sets the minimum latitude of the map (in degrees North)","if `east`, `west` and `north` are declared."].join(" ")},north:{valType:"number",description:["Sets the maximum latitude of the map (in degrees North)","if `east`, `west` and `south` are declared."].join(" ")}},layers:a("layer",{visible:{valType:"boolean",dflt:!0,description:["Determines whether this layer is displayed"].join(" ")},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson",description:["Sets the source type for this layer,","that is the type of the layer data."].join(" ")},source:{valType:"any",description:["Sets the source data for this layer (mapbox.layer.source).","When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON","or a GeoJSON object.","When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or","an array of tile URLs.","When `sourcetype` is set to *image*, `source` can be a URL to an image."].join(" ")},sourcelayer:{valType:"string",dflt:"",description:["Specifies the layer to use from a vector tile source (mapbox.layer.source-layer).","Required for *vector* source type that supports multiple layers."].join(" ")},sourceattribution:{valType:"string",description:["Sets the attribution for this source."].join(" ")},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle",description:["Sets the layer type,","that is the how the layer data set in `source` will be rendered","With `sourcetype` set to *geojson*, the following values are allowed:","*circle*, *line*, *fill* and *symbol*.","but note that *line* and *fill* are not compatible with Point","GeoJSON geometries.","With `sourcetype` set to *vector*, the following values are allowed:"," *circle*, *line*, *fill* and *symbol*.","With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed."].join(" ")},coordinates:{valType:"any",description:["Sets the coordinates array contains [longitude, latitude] pairs","for the image corners listed in clockwise order:","top left, top right, bottom right, bottom left.","Only has an effect for *image* `sourcetype`."].join(" ")},below:{valType:"string",description:["Determines if the layer will be inserted","before the layer with the specified ID.","If omitted or set to '',","the layer will be inserted above every existing layer."].join(" ")},color:{valType:"color",dflt:t,description:["Sets the primary layer color.","If `type` is *circle*, color corresponds to the circle color (mapbox.layer.paint.circle-color)","If `type` is *line*, color corresponds to the line color (mapbox.layer.paint.line-color)","If `type` is *fill*, color corresponds to the fill color (mapbox.layer.paint.fill-color)","If `type` is *symbol*, color corresponds to the icon color (mapbox.layer.paint.icon-color)"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:["Sets the opacity of the layer.","If `type` is *circle*, opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity)","If `type` is *line*, opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity)","If `type` is *fill*, opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity)","If `type` is *symbol*, opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity)"].join(" ")},minzoom:{valType:"number",min:0,max:24,dflt:0,description:["Sets the minimum zoom level (mapbox.layer.minzoom).","At zoom levels less than the minzoom, the layer will be hidden."].join(" ")},maxzoom:{valType:"number",min:0,max:24,dflt:24,description:["Sets the maximum zoom level (mapbox.layer.maxzoom).","At zoom levels equal to or greater than the maxzoom, the layer will be hidden."].join(" ")},circle:{radius:{valType:"number",dflt:15,description:["Sets the circle radius (mapbox.layer.paint.circle-radius).","Has an effect only when `type` is set to *circle*."].join(" ")}},line:{width:{valType:"number",dflt:2,description:["Sets the line width (mapbox.layer.paint.line-width).","Has an effect only when `type` is set to *line*."].join(" ")},dash:{valType:"data_array",description:["Sets the length of dashes and gaps (mapbox.layer.paint.line-dasharray).","Has an effect only when `type` is set to *line*."].join(" ")}},fill:{outlinecolor:{valType:"color",dflt:t,description:["Sets the fill outline color (mapbox.layer.paint.fill-outline-color).","Has an effect only when `type` is set to *fill*."].join(" ")}},symbol:{icon:{valType:"string",dflt:"marker",description:["Sets the symbol icon image (mapbox.layer.layout.icon-image).","Full list: https://www.mapbox.com/maki-icons/"].join(" ")},iconsize:{valType:"number",dflt:10,description:["Sets the symbol icon size (mapbox.layer.layout.icon-size).","Has an effect only when `type` is set to *symbol*."].join(" ")},text:{valType:"string",dflt:"",description:["Sets the symbol text (mapbox.layer.layout.text-field)."].join(" ")},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point",description:["Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).","If `placement` is *point*, the label is placed where the geometry is located","If `placement` is *line*, the label is placed along the line of the geometry","If `placement` is *line-center*, the label is placed on the center of the geometry"].join(" ")},textfont:i,textposition:e.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root");return l.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view:","`center`, `zoom`, `bearing`, `pitch`. Defaults to `layout.uirevision`."].join(" ")},J9.exports}var eq,_ye;function BX(){if(_ye)return eq;_ye=1;var e=bi().hovertemplateAttrs,t=bi().texttemplateAttrs,r=og(),n=Z2(),o=Yl(),s=DA(),a=qo(),f=os(),i=ja().extendFlat,l=ws().overrideAll,u=DA(),c=n.line,h=n.marker;return eq=l({lon:n.lon,lat:n.lat,cluster:{enabled:{valType:"boolean",description:"Determines whether clustering is enabled or disabled."},maxzoom:i({},u.layers.maxzoom,{description:["Sets the maximum zoom level.","At zoom levels equal to or greater than this, points will never be clustered."].join(" ")}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1,description:["Sets how many points it takes to create a cluster or advance to the next cluster step.","Use this in conjunction with arrays for `size` and / or `color`.","If an integer, steps start at multiples of this number.","If an array, each step extends from the given value until one less than the next value."].join(" ")},size:{valType:"number",arrayOk:!0,dflt:20,min:0,description:["Sets the size for each cluster step."].join(" ")},color:{valType:"color",arrayOk:!0,description:["Sets the color for each cluster step."].join(" ")},opacity:i({},h.opacity,{dflt:1})},mode:i({},o.mode,{dflt:"markers",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover."].join(" ")}),text:i({},o.text,{description:["Sets text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:t({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:i({},o.hovertext,{description:["Sets hover text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:c.color,width:c.width},connectgaps:o.connectgaps,marker:i({symbol:{valType:"string",dflt:"circle",arrayOk:!0,description:["Sets the marker symbol.","Full list: https://www.mapbox.com/maki-icons/","Note that the array `marker.color` and `marker.size`","are only available for *circle* symbols."].join(" ")},angle:{valType:"number",dflt:"auto",arrayOk:!0,description:["Sets the marker orientation from true North, in degrees clockwise.","When using the *auto* default, no rotation would be applied","in perspective views which is different from using a zero angle."].join(" ")},allowoverlap:{valType:"boolean",dflt:!1,description:["Flag to draw all symbols, even if they overlap."].join(" ")},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},f("marker")),fill:n.fill,fillcolor:r(),textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:"string",description:["Determines if this scattermapbox trace's layers are to be inserted","before the layer with the specified ID.","By default, scattermapbox layers are inserted","above all the base layers.","To place the scattermapbox layers above every other layer, set `below` to *''*."].join(" ")},selected:{marker:o.selected.marker},unselected:{marker:o.unselected.marker},hoverinfo:i({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:e()},"calc","nested"),eq}var tq,wye;function cXe(){if(wye)return tq;wye=1;var e=rr(),t=As(),r=gp(),n=y0(),o=m0(),s=sg(),a=BX(),f=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];tq=function(u,c,h,d){function v(w,C){return e.coerce(u,c,a,w,C)}function p(w,C){return e.coerce2(u,c,a,w,C)}var m=i(u,c,v);if(!m){c.visible=!1;return}if(v("text"),v("texttemplate"),v("hovertext"),v("hovertemplate"),v("mode"),v("below"),t.hasMarkers(c)){r(u,c,h,d,v,{noLine:!0,noAngle:!0}),v("marker.allowoverlap"),v("marker.angle");var y=c.marker;y.symbol!=="circle"&&(e.isArrayOrTypedArray(y.size)&&(y.size=y.size[0]),e.isArrayOrTypedArray(y.color)&&(y.color=y.color[0]))}t.hasLines(c)&&(n(u,c,h,d,v,{noDash:!0}),v("connectgaps"));var b=p("cluster.maxzoom"),g=p("cluster.step"),T=p("cluster.color",c.marker&&c.marker.color||h),S=p("cluster.size"),A=p("cluster.opacity"),M=b!==!1||g!==!1||T!==!1||S!==!1||A!==!1;v("cluster.enabled",M),t.hasText(c)&&o(u,c,d,v,{noSelect:!0,font:{family:f.indexOf(d.font.family)!==-1?d.font.family:"Open Sans Regular",size:d.font.size,color:d.font.color}}),v("fill"),c.fill!=="none"&&s(u,c,h,v),e.coerceSelectionMarkerOpacity(c,v)};function i(l,u,c){var h=c("lon")||[],d=c("lat")||[],v=Math.min(h.length,d.length);return u._length=v,v}return tq}var rq,Tye;function n5e(){if(Tye)return rq;Tye=1;var e=Ia();return rq=function(r,n,o){var s={},a=o[n.subplot]._subplot,f=a.mockAxis,i=r.lonlat;return s.lonLabel=e.tickText(f,f.c2l(i[0]),!0).text,s.latLabel=e.tickText(f,f.c2l(i[1]),!0).text,s},rq}var nq,Aye;function a5e(){if(Aye)return nq;Aye=1;var e=rr();return nq=function(r,n){var o=r.split(" "),s=o[0],a=o[1],f=e.isArrayOrTypedArray(n)?e.mean(n):n,i=.5+f/100,l=1.5+f/100,u=["",""],c=[0,0];switch(s){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-i;break;case"right":u[1]="left",c[0]=i;break}var h;return u[0]&&u[1]?h=u.join("-"):u[0]?h=u[0]:u[1]?h=u[1]:h="center",{anchor:h,offset:c}},nq}var aq,Sye;function hXe(){if(Sye)return aq;Sye=1;var e=Ua(),t=rr(),r=Pi().BADNUM,n=bM(),o=Hs(),s=Ba(),a=IS(),f=As(),i=a5e(),l=Wd().appendArrayPointValue,u=ns().NEWLINES,c=ns().BR_TAG_ALL;aq=function(T,S){var A=S[0].trace,M=A.visible===!0&&A._length!==0,w=A.fill!=="none",C=f.hasLines(A),x=f.hasMarkers(A),_=f.hasText(A),k=x&&A.marker.symbol==="circle",E=x&&A.marker.symbol!=="circle",I=A.cluster&&A.cluster.enabled,F=h("fill"),D=h("line"),z=h("circle"),N=h("symbol"),q={fill:F,line:D,circle:z,symbol:N};if(!M)return q;var P;if((w||C)&&(P=n.calcTraceToLineCoords(S)),w&&(F.geojson=n.makePolygon(P),F.layout.visibility="visible",t.extendFlat(F.paint,{"fill-color":A.fillcolor})),C&&(D.geojson=n.makeLine(P),D.layout.visibility="visible",t.extendFlat(D.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),k){var B=d(S);z.geojson=B.geojson,z.layout.visibility="visible",I&&(z.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":b(A.cluster.color,A.cluster.step),"circle-radius":b(A.cluster.size,A.cluster.step),"circle-opacity":b(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Regular","Arial Unicode MS Regular"],"text-size":12}}),t.extendFlat(z.paint,{"circle-color":B.mcc,"circle-radius":B.mrc,"circle-opacity":B.mo})}if(k&&I&&(z.filter=["!",["has","point_count"]]),(E||_)&&(N.geojson=v(S,T),t.extendFlat(N.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),E&&(t.extendFlat(N.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&t.extendFlat(N.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),N.layout["icon-allow-overlap"]=A.marker.allowoverlap,t.extendFlat(N.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),_)){var $=(A.marker||{}).size,Q=i(A.textposition,$);t.extendFlat(N.layout,{"text-size":A.textfont.size,"text-anchor":Q.anchor,"text-offset":Q.offset,"text-font":A.textfont.family.split(", ")}),t.extendFlat(N.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function h(g){return{type:g,geojson:n.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function d(g){var T=g[0].trace,S=T.marker,A=T.selectedpoints,M=t.isArrayOrTypedArray(S.color),w=t.isArrayOrTypedArray(S.size),C=t.isArrayOrTypedArray(S.opacity),x;function _($){return T.opacity*$}function k($){return $/2}var E;M&&(o.hasColorscale(T,"marker")?E=o.makeColorScaleFuncFromTrace(S):E=t.identity);var I;w&&(I=a(T));var F;C&&(F=function($){var Q=e($)?+t.constrain($,0,1):0;return _(Q)});var D=[];for(x=0;x=0;_--){var k=x[_];u.removeLayer(p.layerIds[k])}C||u.removeSource(p.sourceIds.circle)}function b(C){for(var x=n.nonCluster,_=0;_=0;_--){var k=x[_];u.removeLayer(p.layerIds[k]),C||u.removeSource(p.sourceIds[k])}}function T(C){v?y(C):g(C)}function S(C){d?m(C):b(C)}function A(){for(var C=d?n.cluster:n.nonCluster,x=0;x=0;l--){var u=i[l];f.removeLayer(this.layerIds[u]),f.removeSource(this.sourceIds[u])}},iq=function(f,i){var l=i[0].trace,u=l.cluster&&l.cluster.enabled,c=l.visible!==!0,h=new o(f,l.uid,u,c),d=t(f.gd,i),v=h.below=f.belowLookup["trace-"+l.uid],p,m,y;if(u)for(h.addSource("circle",d.circle,l.cluster),p=0;p=0?Math.floor((l+180)/360):Math.ceil((l-180)/360),S=T*360,A=l-S;function M(D){var z=D.lonlat;if(z[0]===o||b&&m.indexOf(D.i+1)===-1)return 1/0;var N=t.modHalf(z[0],360),q=z[1],P=p.project([N,q]),B=P.x-d.c2p([A,q]),$=P.y-v.c2p([N,u]),Q=Math.max(3,D.mrc||0);return Math.max(Math.sqrt(B*B+$*$)-Q,1-3/Q)}if(e.getClosest(c,M,i),i.index!==!1){var w=c[i.index],C=w.lonlat,x=[t.modHalf(C[0],360)+S,C[1]],_=d.c2p(x),k=v.c2p(x),E=w.mrc||1;i.x0=_-E,i.x1=_+E,i.y0=k-E,i.y1=k+E;var I={};I[h.subplot]={_subplot:p};var F=h._module.formatLabels(w,h,I);return i.lonLabel=F.lonLabel,i.latLabel=F.latLabel,i.color=r(h,w),i.extraText=f(h,w,c[0].t.labels),i.hovertemplate=h.hovertemplate,[i]}}function f(i,l,u){if(i.hovertemplate)return;var c=l.hi||i.hoverinfo,h=c.split("+"),d=h.indexOf("all")!==-1,v=h.indexOf("lon")!==-1,p=h.indexOf("lat")!==-1,m=l.lonlat,y=[];function b(g){return g+"°"}return d||v&&p?y.push("("+b(m[1])+", "+b(m[0])+")"):v?y.push(u.lon+b(m[0])):p&&y.push(u.lat+b(m[1])),(d||h.indexOf("text")!==-1)&&n(l,i,y),y.join("
")}return oq={hoverPoints:a,getExtraText:f},oq}var sq,kye;function vXe(){return kye||(kye=1,sq=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}),sq}var lq,Cye;function pXe(){if(Cye)return lq;Cye=1;var e=rr(),t=As(),r=Pi().BADNUM;return lq=function(o,s){var a=o.cd,f=o.xaxis,i=o.yaxis,l=[],u=a[0].trace,c;if(!t.hasMarkers(u))return[];if(s===!1)for(c=0;c"u"&&(L=1e-6);var U,re,he,ge,Ae;for(he=R,Ae=0;Ae<8;Ae++){if(ge=this.sampleCurveX(he)-R,Math.abs(ge)re)return re;for(;Uge?U=he:re=he,he=(re-U)*.5+U}return he},u.prototype.solve=function(R,L){return this.sampleCurveY(this.solveCurveX(R,L))};var c=h;function h(R,L){this.x=R,this.y=L}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,L){return this.clone()._rotateAround(R,L)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var L=R.x-this.x,U=R.y-this.y;return L*L+U*U},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,L){return Math.atan2(this.x*L-this.y*R,this.x*R+this.y*L)},_matMult:function(R){var L=R[0]*this.x+R[1]*this.y,U=R[2]*this.x+R[3]*this.y;return this.x=L,this.y=U,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var L=Math.cos(R),U=Math.sin(R),re=L*this.x-U*this.y,he=U*this.x+L*this.y;return this.x=re,this.y=he,this},_rotateAround:function(R,L){var U=Math.cos(R),re=Math.sin(R),he=L.x+U*(this.x-L.x)-re*(this.y-L.y),ge=L.y+re*(this.x-L.x)+U*(this.y-L.y);return this.x=he,this.y=ge,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},h.convert=function(R){return R instanceof h?R:Array.isArray(R)?new h(R[0],R[1]):R};var d=typeof self<"u"?self:{};function v(R,L){if(Array.isArray(R)){if(!Array.isArray(L)||R.length!==L.length)return!1;for(var U=0;U=1)return 1;var L=R*R,U=L*R;return 4*(R<.5?U:3*(R-L)+U-.75)}function y(R,L,U,re){var he=new l(R,L,U,re);return function(ge){return he.solve(ge)}}var b=y(.25,.1,.25,1);function g(R,L,U){return Math.min(U,Math.max(L,R))}function T(R,L,U){var re=U-L,he=((R-L)%re+re)%re+L;return he===L?U:he}function S(R,L,U){if(!R.length)return U(null,[]);var re=R.length,he=new Array(R.length),ge=null;R.forEach(function(Ae,Ge){L(Ae,function(nt,ft){nt&&(ge=nt),he[Ge]=ft,--re===0&&U(ge,he)})})}function A(R){var L=[];for(var U in R)L.push(R[U]);return L}function M(R,L){var U=[];for(var re in R)re in L||U.push(re);return U}function w(R){for(var L=[],U=arguments.length-1;U-- >0;)L[U]=arguments[U+1];for(var re=0,he=L;re>L/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,R)}return R()}function E(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))}function I(R){return R?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(R):!1}function F(R,L){R.forEach(function(U){L[U]&&(L[U]=L[U].bind(L))})}function D(R,L){return R.indexOf(L,R.length-L.length)!==-1}function z(R,L,U){var re={};for(var he in R)re[he]=L.call(U||this,R[he],he,R);return re}function N(R,L,U){var re={};for(var he in R)L.call(U||this,R[he],he,R)&&(re[he]=R[he]);return re}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?z(R,q):R}function P(R,L){for(var U=0;U=0)return!0;return!1}var B={};function $(R){B[R]||(typeof console<"u"&&console.warn(R),B[R]=!0)}function Q(R,L,U){return(U.y-R.y)*(L.x-R.x)>(L.y-R.y)*(U.x-R.x)}function J(R){for(var L=0,U=0,re=R.length,he=re-1,ge=void 0,Ae=void 0;U@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,U={};if(R.replace(L,function(he,ge,Ae,Ge){var nt=Ae||Ge;return U[ge]=nt?nt.toLowerCase():!0,""}),U["max-age"]){var re=parseInt(U["max-age"],10);isNaN(re)?delete U["max-age"]:U["max-age"]=re}return U}var G=null;function j(R){if(G==null){var L=R.navigator?R.navigator.userAgent:null;G=!!R.safari||!!(L&&(/\b(iPad|iPhone|iPod)\b/.test(L)||L.match("Safari")&&!L.match("Chrome")))}return G}function Y(R){try{var L=d[R];return L.setItem("_mapbox_test_",1),L.removeItem("_mapbox_test_"),!0}catch{return!1}}function K(R){return d.btoa(encodeURIComponent(R).replace(/%([0-9A-F]{2})/g,function(L,U){return String.fromCharCode(+("0x"+U))}))}function X(R){return decodeURIComponent(d.atob(R).split("").map(function(L){return"%"+("00"+L.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ee=d.performance&&d.performance.now?d.performance.now.bind(d.performance):Date.now.bind(Date),le=d.requestAnimationFrame||d.mozRequestAnimationFrame||d.webkitRequestAnimationFrame||d.msRequestAnimationFrame,oe=d.cancelAnimationFrame||d.mozCancelAnimationFrame||d.webkitCancelAnimationFrame||d.msCancelAnimationFrame,fe,de,_e={now:ee,frame:function(L){var U=le(L);return{cancel:function(){return oe(U)}}},getImageData:function(L,U){U===void 0&&(U=0);var re=d.document.createElement("canvas"),he=re.getContext("2d");if(!he)throw new Error("failed to create canvas 2d context");return re.width=L.width,re.height=L.height,he.drawImage(L,0,0,L.width,L.height),he.getImageData(-U,-U,L.width+2*U,L.height+2*U)},resolveURL:function(L){return fe||(fe=d.document.createElement("a")),fe.href=L,fe.href},hardwareConcurrency:d.navigator&&d.navigator.hardwareConcurrency||4,get devicePixelRatio(){return d.devicePixelRatio},get prefersReducedMotion(){return d.matchMedia?(de==null&&(de=d.matchMedia("(prefers-reduced-motion: reduce)")),de.matches):!1}},we={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Oe={supported:!1,testSupport:Le},be,Te=!1,ke,Ee=!1;d.document&&(ke=d.document.createElement("img"),ke.onload=function(){be&&Fe(be),be=null,Ee=!0},ke.onerror=function(){Te=!0,be=null},ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Le(R){Te||!ke||(Ee?Fe(R):be=R)}function Fe(R){var L=R.createTexture();R.bindTexture(R.TEXTURE_2D,L);try{if(R.texImage2D(R.TEXTURE_2D,0,R.RGBA,R.RGBA,R.UNSIGNED_BYTE,ke),R.isContextLost())return;Oe.supported=!0}catch{}R.deleteTexture(L),Te=!0}var qe="01";function We(){for(var R="1",L="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",U="",re=0;re<10;re++)U+=L[Math.floor(Math.random()*62)];var he=720*60*1e3,ge=[R,qe,U].join(""),Ae=Date.now()+he;return{token:ge,tokenExpiresAt:Ae}}var Qe=function(L,U){this._transformRequestFn=L,this._customAccessToken=U,this._createSkuToken()};Qe.prototype._createSkuToken=function(){var L=We();this._skuToken=L.token,this._skuTokenExpiresAt=L.tokenExpiresAt},Qe.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Qe.prototype.transformRequest=function(L,U){return this._transformRequestFn?this._transformRequestFn(L,U)||{url:L}:{url:L}},Qe.prototype.normalizeStyleURL=function(L,U){if(!De(L))return L;var re=ut(L);return re.path="/styles/v1"+re.path,this._makeAPIURL(re,this._customAccessToken||U)},Qe.prototype.normalizeGlyphsURL=function(L,U){if(!De(L))return L;var re=ut(L);return re.path="/fonts/v1"+re.path,this._makeAPIURL(re,this._customAccessToken||U)},Qe.prototype.normalizeSourceURL=function(L,U){if(!De(L))return L;var re=ut(L);return re.path="/v4/"+re.authority+".json",re.params.push("secure"),this._makeAPIURL(re,this._customAccessToken||U)},Qe.prototype.normalizeSpriteURL=function(L,U,re,he){var ge=ut(L);return De(L)?(ge.path="/styles/v1"+ge.path+"/sprite"+U+re,this._makeAPIURL(ge,this._customAccessToken||he)):(ge.path+=""+U+re,ht(ge))},Qe.prototype.normalizeTileURL=function(L,U){if(this._isSkuTokenExpired()&&this._createSkuToken(),L&&!De(L))return L;var re=ut(L),he=/(\.(png|jpg)\d*)(?=$)/,ge=/^.+\/v4\//,Ae=_e.devicePixelRatio>=2||U===512?"@2x":"",Ge=Oe.supported?".webp":"$1";re.path=re.path.replace(he,""+Ae+Ge),re.path=re.path.replace(ge,"/"),re.path="/v4"+re.path;var nt=this._customAccessToken||st(re.params)||we.ACCESS_TOKEN;return we.REQUIRE_ACCESS_TOKEN&&nt&&this._skuToken&&re.params.push("sku="+this._skuToken),this._makeAPIURL(re,nt)},Qe.prototype.canonicalizeTileURL=function(L,U){var re="/v4/",he=/\.[\w]+$/,ge=ut(L);if(!ge.path.match(/(^\/v4\/)/)||!ge.path.match(he))return L;var Ae="mapbox://tiles/";Ae+=ge.path.replace(re,"");var Ge=ge.params;return U&&(Ge=Ge.filter(function(nt){return!nt.match(/^access_token=/)})),Ge.length&&(Ae+="?"+Ge.join("&")),Ae},Qe.prototype.canonicalizeTileset=function(L,U){for(var re=U?De(U):!1,he=[],ge=0,Ae=L.tiles||[];ge=0&&L.params.splice(ge,1)}if(he.path!=="/"&&(L.path=""+he.path+L.path),!we.REQUIRE_ACCESS_TOKEN)return ht(L);if(U=U||we.ACCESS_TOKEN,!U)throw new Error("An API access token is required to use Mapbox GL. "+re);if(U[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+re);return L.params=L.params.filter(function(Ae){return Ae.indexOf("access_token")===-1}),L.params.push("access_token="+U),ht(L)};function De(R){return R.indexOf("mapbox:")===0}var me=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ce(R){return me.test(R)}function et(R){return R.indexOf("sku=")>0&&Ce(R)}function st(R){for(var L=0,U=R;L=1&&d.localStorage.setItem(U,JSON.stringify(this.eventData))}catch{$("Unable to write to LocalStorage")}},Jt.prototype.processRequests=function(L){},Jt.prototype.postEvent=function(L,U,re,he){var ge=this;if(we.EVENTS_URL){var Ae=ut(we.EVENTS_URL);Ae.params.push("access_token="+(he||we.ACCESS_TOKEN||""));var Ge={event:this.type,created:new Date(L).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:i,skuId:qe,userId:this.anonId},nt=U?w(Ge,U):Ge,ft={url:ht(Ae),headers:{"Content-Type":"text/plain"},body:JSON.stringify([nt])};this.pendingRequest=lr(ft,function(pt){ge.pendingRequest=null,re(pt),ge.saveEventData(),ge.processRequests(he)})}},Jt.prototype.queueRequest=function(L,U){this.queue.push(L),this.processRequests(U)};var Tt=(function(R){function L(){R.call(this,"map.load"),this.success={},this.skuToken=""}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.postMapLoadEvent=function(re,he,ge,Ae){this.skuToken=ge,(we.EVENTS_URL&&Ae||we.ACCESS_TOKEN&&Array.isArray(re)&&re.some(function(Ge){return De(Ge)||Ce(Ge)}))&&this.queueRequest({id:he,timestamp:Date.now()},Ae)},L.prototype.processRequests=function(re){var he=this;if(!(this.pendingRequest||this.queue.length===0)){var ge=this.queue.shift(),Ae=ge.id,Ge=ge.timestamp;Ae&&this.success[Ae]||(this.anonId||this.fetchEventData(),I(this.anonId)||(this.anonId=k()),this.postEvent(Ge,{skuToken:this.skuToken},function(nt){nt||Ae&&(he.success[Ae]=!0)},re))}},L})(Jt),rt=(function(R){function L(U){R.call(this,"appUserTurnstile"),this._customAccessToken=U}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.postTurnstileEvent=function(re,he){we.EVENTS_URL&&we.ACCESS_TOKEN&&Array.isArray(re)&&re.some(function(ge){return De(ge)||Ce(ge)})&&this.queueRequest(Date.now(),he)},L.prototype.processRequests=function(re){var he=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ge=Et(we.ACCESS_TOKEN),Ae=ge?ge.u:we.ACCESS_TOKEN,Ge=Ae!==this.eventData.tokenU;I(this.anonId)||(this.anonId=k(),Ge=!0);var nt=this.queue.shift();if(this.eventData.lastSuccess){var ft=new Date(this.eventData.lastSuccess),pt=new Date(nt),Dt=(nt-this.eventData.lastSuccess)/(1440*60*1e3);Ge=Ge||Dt>=1||Dt<-1||ft.getDate()!==pt.getDate()}else Ge=!0;if(!Ge)return this.processRequests();this.postEvent(nt,{"enabled.telemetry":!1},function(Kt){Kt||(he.eventData.lastSuccess=nt,he.eventData.tokenU=Ae)},re)}},L})(Jt),gt=new rt,mt=gt.postTurnstileEvent.bind(gt),He=new Tt,Ie=He.postMapLoadEvent.bind(He),je="mapbox-tiles",pe=500,ye=50,Se=1e3*60*7,Pe;function it(){d.caches&&!Pe&&(Pe=d.caches.open(je))}var vt;function Pt(R,L){if(vt===void 0)try{new Response(new ReadableStream),vt=!0}catch{vt=!1}vt?L(R.body):R.blob().then(L)}function Bt(R,L,U){if(it(),!!Pe){var re={status:L.status,statusText:L.statusText,headers:new d.Headers};L.headers.forEach(function(Ae,Ge){return re.headers.set(Ge,Ae)});var he=Z(L.headers.get("Cache-Control")||"");if(!he["no-store"]){he["max-age"]&&re.headers.set("Expires",new Date(U+he["max-age"]*1e3).toUTCString());var ge=new Date(re.headers.get("Expires")).getTime()-U;geDate.now()&&!U["no-cache"]}var _r=1/0;function Rr(R){_r++,_r>ye&&(R.getActor().send("enforceCacheSizeLimit",pe),_r=0)}function an(R){it(),Pe&&Pe.then(function(L){L.keys().then(function(U){for(var re=0;re=200&&U.status<300||U.status===0)&&U.response!==null){var he=U.response;if(R.type==="json")try{he=JSON.parse(U.response)}catch(ge){return L(ge)}L(null,he,U.getResponseHeader("Cache-Control"),U.getResponseHeader("Expires"))}else L(new Wr(U.statusText,U.status,R.url))},U.send(R.body),{cancel:function(){return U.abort()}}}var Ft=function(R,L){if(!tt(R.url)){if(d.fetch&&d.Request&&d.AbortController&&d.Request.prototype.hasOwnProperty("signal"))return yt(R,L);if(te()&&self.worker&&self.worker.actor){var U=!0;return self.worker.actor.send("getResource",R,L,void 0,U)}}return wt(R,L)},er=function(R,L){return Ft(w(R,{type:"json"}),L)},cr=function(R,L){return Ft(w(R,{type:"arrayBuffer"}),L)},lr=function(R,L){return Ft(w(R,{method:"POST"}),L)};function Ue(R){var L=d.document.createElement("a");return L.href=R,L.protocol===d.document.location.protocol&&L.host===d.document.location.host}var Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function At(R,L,U,re){var he=new d.Image,ge=d.URL;he.onload=function(){L(null,he),ge.revokeObjectURL(he.src),he.onload=null,d.requestAnimationFrame(function(){he.src=Ne})},he.onerror=function(){return L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Ae=new d.Blob([new Uint8Array(R)],{type:"image/png"});he.cacheControl=U,he.expires=re,he.src=R.byteLength?ge.createObjectURL(Ae):Ne}function Rt(R,L){var U=new d.Blob([new Uint8Array(R)],{type:"image/png"});d.createImageBitmap(U).then(function(re){L(null,re)}).catch(function(re){L(new Error("Could not load image because of "+re.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Ct,Wt,Qt=function(){Ct=[],Wt=0};Qt();var Xt=function(R,L){if(Oe.supported&&(R.headers||(R.headers={}),R.headers.accept="image/webp,*/*"),Wt>=we.MAX_PARALLEL_IMAGE_REQUESTS){var U={requestParameters:R,callback:L,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ct.push(U),U}Wt++;var re=!1,he=function(){if(!re)for(re=!0,Wt--;Ct.length&&Wt0||this._oneTimeListeners&&this._oneTimeListeners[L]&&this._oneTimeListeners[L].length>0||this._eventedParent&&this._eventedParent.listens(L)},Pr.prototype.setEventedParent=function(L,U){return this._eventedParent=L,this._eventedParentData=U,this};var Cr=8,Zr={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},jr={"*":{type:"source"}},Sn=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Fn={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},ea={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},An={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Hn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},In={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},ua={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Ln={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},oa=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ta={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ba={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Da={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_i={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ci={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Bi={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},es={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Qa={type:"array",value:"*"},Ii={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Ci={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Hi={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},qi={type:"array",value:"*",minimum:1},Ga={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Wa=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Ai={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},fo={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Vi={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Yi={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Ps={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ts={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Eo={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gs={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},jo={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},no={"*":{type:"string"}},dn={$version:Cr,$root:Zr,sources:jr,source:Sn,source_vector:Fn,source_raster:ea,source_raster_dem:An,source_geojson:Hn,source_video:In,source_image:ua,layer:Ln,layout:oa,layout_background:Ta,layout_fill:ba,layout_circle:Da,layout_heatmap:_i,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:ci,layout_symbol:Bi,layout_raster:yo,layout_hillshade:es,filter:Qa,filter_operator:Ii,geometry_type:Ci,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Hi,expression:qi,light:Ga,paint:Wa,paint_fill:Ai,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:fo,paint_circle:Vi,paint_heatmap:Yi,paint_symbol:Ps,paint_raster:ts,paint_hillshade:Eo,paint_background:gs,transition:jo,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:no},ia=function(L,U,re,he){this.message=(L?L+": ":"")+re,he&&(this.identifier=he),U!=null&&U.__line__&&(this.line=U.__line__)};function Ef(R){var L=R.key,U=R.value;return U?[new ia(L,U,"constants have been deprecated as of v8")]:[]}function bl(R){for(var L=[],U=arguments.length-1;U-- >0;)L[U]=arguments[U+1];for(var re=0,he=L;re":R.itemType.kind==="value"?"array":"array<"+L+">"}else return R.kind}var dh=[ao,$n,ai,ri,cu,nl,ul,al(oi),Lu];function Wl(R,L){if(L.kind==="error")return null;if(R.kind==="array"){if(L.kind==="array"&&(L.N===0&&L.itemType.kind==="value"||!Wl(R.itemType,L.itemType))&&(typeof R.N!="number"||R.N===L.N))return null}else{if(R.kind===L.kind)return null;if(R.kind==="value")for(var U=0,re=dh;U255?255:ft}function he(ft){return ft<0?0:ft>1?1:ft}function ge(ft){return ft[ft.length-1]==="%"?re(parseFloat(ft)/100*255):re(parseInt(ft))}function Ae(ft){return ft[ft.length-1]==="%"?he(parseFloat(ft)/100):he(parseFloat(ft))}function Ge(ft,pt,Dt){return Dt<0?Dt+=1:Dt>1&&(Dt-=1),Dt*6<1?ft+(pt-ft)*Dt*6:Dt*2<1?pt:Dt*3<2?ft+(pt-ft)*(2/3-Dt)*6:ft}function nt(ft){var pt=ft.replace(/ /g,"").toLowerCase();if(pt in U)return U[pt].slice();if(pt[0]==="#"){if(pt.length===4){var Dt=parseInt(pt.substr(1),16);return Dt>=0&&Dt<=4095?[(Dt&3840)>>4|(Dt&3840)>>8,Dt&240|(Dt&240)>>4,Dt&15|(Dt&15)<<4,1]:null}else if(pt.length===7){var Dt=parseInt(pt.substr(1),16);return Dt>=0&&Dt<=16777215?[(Dt&16711680)>>16,(Dt&65280)>>8,Dt&255,1]:null}return null}var Kt=pt.indexOf("("),Yt=pt.indexOf(")");if(Kt!==-1&&Yt+1===pt.length){var tr=pt.substr(0,Kt),gr=pt.substr(Kt+1,Yt-(Kt+1)).split(","),zr=1;switch(tr){case"rgba":if(gr.length!==4)return null;zr=Ae(gr.pop());case"rgb":return gr.length!==3?null:[ge(gr[0]),ge(gr[1]),ge(gr[2]),zr];case"hsla":if(gr.length!==4)return null;zr=Ae(gr.pop());case"hsl":if(gr.length!==3)return null;var Er=(parseFloat(gr[0])%360+360)%360/360,nn=Ae(gr[1]),Hr=Ae(gr[2]),rn=Hr<=.5?Hr*(nn+1):Hr+nn-Hr*nn,fn=Hr*2-rn;return[re(Ge(fn,rn,Er+1/3)*255),re(Ge(fn,rn,Er)*255),re(Ge(fn,rn,Er-1/3)*255),zr];default:return null}}return null}try{L.parseCSSColor=nt}catch{}}),Zd=b0.parseCSSColor,Zi=function(L,U,re,he){he===void 0&&(he=1),this.r=L,this.g=U,this.b=re,this.a=he};Zi.parse=function(L){if(L){if(L instanceof Zi)return L;if(typeof L=="string"){var U=Zd(L);if(U)return new Zi(U[0]/255*U[3],U[1]/255*U[3],U[2]/255*U[3],U[3])}}},Zi.prototype.toString=function(){var L=this.toArray(),U=L[0],re=L[1],he=L[2],ge=L[3];return"rgba("+Math.round(U)+","+Math.round(re)+","+Math.round(he)+","+ge+")"},Zi.prototype.toArray=function(){var L=this,U=L.r,re=L.g,he=L.b,ge=L.a;return ge===0?[0,0,0,0]:[U*255/ge,re*255/ge,he*255/ge,ge]},Zi.black=new Zi(0,0,0,1),Zi.white=new Zi(1,1,1,1),Zi.transparent=new Zi(0,0,0,0),Zi.red=new Zi(1,0,0,1);var bd=function(L,U,re){L?this.sensitivity=U?"variant":"case":this.sensitivity=U?"accent":"base",this.locale=re,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};bd.prototype.compare=function(L,U){return this.collator.compare(L,U)},bd.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var _d=function(L,U,re,he,ge){this.text=L,this.image=U,this.scale=re,this.fontStack=he,this.textColor=ge},Ys=function(L){this.sections=L};Ys.fromString=function(L){return new Ys([new _d(L,null,null,null,null)])},Ys.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(L){return L.text.length!==0||L.image&&L.image.name.length!==0})},Ys.factory=function(L){return L instanceof Ys?L:Ys.fromString(L)},Ys.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(L){return L.text}).join("")},Ys.prototype.serialize=function(){for(var L=["format"],U=0,re=this.sections;U=0&&R<=255&&typeof L=="number"&&L>=0&&L<=255&&typeof U=="number"&&U>=0&&U<=255)){var he=typeof re=="number"?[R,L,U,re]:[R,L,U];return"Invalid rgba value ["+he.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof re>"u"||typeof re=="number"&&re>=0&&re<=1?null:"Invalid rgba value ["+[R,L,U,re].join(", ")+"]: 'a' must be between 0 and 1."}function Cf(R){if(R===null)return!0;if(typeof R=="string")return!0;if(typeof R=="boolean")return!0;if(typeof R=="number")return!0;if(R instanceof Zi)return!0;if(R instanceof bd)return!0;if(R instanceof Ys)return!0;if(R instanceof ys)return!0;if(Array.isArray(R)){for(var L=0,U=R;L2){var Ge=L[1];if(typeof Ge!="string"||!(Ge in Jd)||Ge==="object")return U.error('The item type argument of "array" must be one of string, number, boolean',1);Ae=Jd[Ge],re++}else Ae=oi;var nt;if(L.length>3){if(L[2]!==null&&(typeof L[2]!="number"||L[2]<0||L[2]!==Math.floor(L[2])))return U.error('The length argument to "array" must be a positive integer literal',2);nt=L[2],re++}he=al(Ae,nt)}else he=Jd[ge];for(var ft=[];re1)&&U.push(he)}}return U.concat(this.args.map(function(ge){return ge.serialize()}))};var Ku=function(L){this.type=nl,this.sections=L};Ku.parse=function(L,U){if(L.length<2)return U.error("Expected at least one argument.");var re=L[1];if(!Array.isArray(re)&&typeof re=="object")return U.error("First argument must be an image or text section.");for(var he=[],ge=!1,Ae=1;Ae<=L.length-1;++Ae){var Ge=L[Ae];if(ge&&typeof Ge=="object"&&!Array.isArray(Ge)){ge=!1;var nt=null;if(Ge["font-scale"]&&(nt=U.parse(Ge["font-scale"],1,$n),!nt))return null;var ft=null;if(Ge["text-font"]&&(ft=U.parse(Ge["text-font"],1,al(ai)),!ft))return null;var pt=null;if(Ge["text-color"]&&(pt=U.parse(Ge["text-color"],1,cu),!pt))return null;var Dt=he[he.length-1];Dt.scale=nt,Dt.font=ft,Dt.textColor=pt}else{var Kt=U.parse(L[Ae],1,oi);if(!Kt)return null;var Yt=Kt.type.kind;if(Yt!=="string"&&Yt!=="value"&&Yt!=="null"&&Yt!=="resolvedImage")return U.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ge=!0,he.push({content:Kt,scale:null,font:null,textColor:null})}}return new Ku(he)},Ku.prototype.evaluate=function(L){var U=function(re){var he=re.content.evaluate(L);return ms(he)===Lu?new _d("",he,null,null,null):new _d(Xl(he),null,re.scale?re.scale.evaluate(L):null,re.font?re.font.evaluate(L).join(","):null,re.textColor?re.textColor.evaluate(L):null)};return new Ys(this.sections.map(U))},Ku.prototype.eachChild=function(L){for(var U=0,re=this.sections;U-1),re},Ju.prototype.eachChild=function(L){L(this.input)},Ju.prototype.outputDefined=function(){return!1},Ju.prototype.serialize=function(){return["image",this.input.serialize()]};var Qd={"to-boolean":ri,"to-color":cu,"to-number":$n,"to-string":ai},Zl=function(L,U){this.type=L,this.args=U};Zl.parse=function(L,U){if(L.length<2)return U.error("Expected at least one argument.");var re=L[0];if((re==="to-boolean"||re==="to-string")&&L.length!==2)return U.error("Expected one argument.");for(var he=Qd[re],ge=[],Ae=1;Ae4?re="Invalid rbga value "+JSON.stringify(U)+": expected an array containing either three or four numeric values.":re=Kd(U[0],U[1],U[2],U[3]),!re))return new Zi(U[0]/255,U[1]/255,U[2]/255,U[3])}throw new Fo(re||"Could not parse color from value '"+(typeof U=="string"?U:String(JSON.stringify(U)))+"'")}else if(this.type.kind==="number"){for(var nt=null,ft=0,pt=this.args;ft=L[2]||R[1]<=L[1]||R[3]>=L[3])}function wp(R,L){var U=Wh(R[0]),re=_0(R[1]),he=Math.pow(2,L.z);return[Math.round(U*he*Ll),Math.round(re*he*Ll)]}function Tp(R,L,U){var re=R[0]-L[0],he=R[1]-L[1],ge=R[0]-U[0],Ae=R[1]-U[1];return re*Ae-ge*he===0&&re*ge<=0&&he*Ae<=0}function Xh(R,L,U){return L[1]>R[1]!=U[1]>R[1]&&R[0]<(U[0]-L[0])*(R[1]-L[1])/(U[1]-L[1])+L[0]}function ph(R,L){for(var U=!1,re=0,he=L.length;re0&&Dt<0||pt<0&&Dt>0}function w0(R,L,U,re){var he=[L[0]-R[0],L[1]-R[1]],ge=[re[0]-U[0],re[1]-U[1]];return ev(ge,he)===0?!1:!!(tv(R,L,U,re)&&tv(U,re,R,L))}function gc(R,L,U){for(var re=0,he=U;reU[2]){var he=re*.5,ge=R[0]-U[0]>he?-re:U[0]-R[0]>he?re:0;ge===0&&(ge=R[0]-U[2]>he?-re:U[2]-R[0]>he?re:0),R[0]+=ge}qc(L,R)}function Bv(R){R[0]=R[1]=1/0,R[2]=R[3]=-1/0}function rv(R,L,U,re){for(var he=Math.pow(2,re.z)*Ll,ge=[re.x*Ll,re.y*Ll],Ae=[],Ge=0,nt=R;Ge=0)return!1;var U=!0;return R.eachChild(function(re){U&&!yc(re,L)&&(U=!1)}),U}var Qu=function(L,U){this.type=U.type,this.name=L,this.boundExpression=U};Qu.parse=function(L,U){if(L.length!==2||typeof L[1]!="string")return U.error("'var' expression requires exactly one string literal argument.");var re=L[1];return U.scope.has(re)?new Qu(re,U.scope.get(re)):U.error('Unknown variable "'+re+'". Make sure "'+re+'" has been bound in an enclosing "let" expression before using it.',1)},Qu.prototype.evaluate=function(L){return this.boundExpression.evaluate(L)},Qu.prototype.eachChild=function(){},Qu.prototype.outputDefined=function(){return!1},Qu.prototype.serialize=function(){return["var",this.name]};var cl=function(L,U,re,he,ge){U===void 0&&(U=[]),he===void 0&&(he=new Uo),ge===void 0&&(ge=[]),this.registry=L,this.path=U,this.key=U.map(function(Ae){return"["+Ae+"]"}).join(""),this.scope=he,this.errors=ge,this.expectedType=re};cl.prototype.parse=function(L,U,re,he,ge){return ge===void 0&&(ge={}),U?this.concat(U,re,he)._parse(L,ge):this._parse(L,ge)},cl.prototype._parse=function(L,U){(L===null||typeof L=="string"||typeof L=="boolean"||typeof L=="number")&&(L=["literal",L]);function re(pt,Dt,Kt){return Kt==="assert"?new fl(Dt,[pt]):Kt==="coerce"?new Zl(Dt,[pt]):pt}if(Array.isArray(L)){if(L.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var he=L[0];if(typeof he!="string")return this.error("Expression name must be a string, but found "+typeof he+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ge=this.registry[he];if(ge){var Ae=ge.parse(L,this);if(!Ae)return null;if(this.expectedType){var Ge=this.expectedType,nt=Ae.type;if((Ge.kind==="string"||Ge.kind==="number"||Ge.kind==="boolean"||Ge.kind==="object"||Ge.kind==="array")&&nt.kind==="value")Ae=re(Ae,Ge,U.typeAnnotation||"assert");else if((Ge.kind==="color"||Ge.kind==="formatted"||Ge.kind==="resolvedImage")&&(nt.kind==="value"||nt.kind==="string"))Ae=re(Ae,Ge,U.typeAnnotation||"coerce");else if(this.checkSubtype(Ge,nt))return null}if(!(Ae instanceof Vo)&&Ae.type.kind!=="resolvedImage"&&ef(Ae)){var ft=new du;try{Ae=new Vo(Ae.type,Ae.evaluate(ft))}catch(pt){return this.error(pt.message),null}}return Ae}return this.error('Unknown expression "'+he+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof L>"u"?this.error("'undefined' value invalid. Use null instead."):typeof L=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof L+" instead.")},cl.prototype.concat=function(L,U,re){var he=typeof L=="number"?this.path.concat(L):this.path,ge=re?this.scope.concat(re):this.scope;return new cl(this.registry,he,U||null,ge,this.errors)},cl.prototype.error=function(L){for(var U=[],re=arguments.length-1;re-- >0;)U[re]=arguments[re+1];var he=""+this.key+U.map(function(ge){return"["+ge+"]"}).join("");this.errors.push(new mo(he,L))},cl.prototype.checkSubtype=function(L,U){var re=Wl(L,U);return re&&this.error(re),re};function ef(R){if(R instanceof Qu)return ef(R.boundExpression);if(R instanceof io&&R.name==="error")return!1;if(R instanceof Rf)return!1;if(R instanceof Pu)return!1;var L=R instanceof Zl||R instanceof fl,U=!0;return R.eachChild(function(re){L?U=U&&ef(re):U=U&&re instanceof Vo}),U?Lf(R)&&yc(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Kl(R,L){for(var U=R.length-1,re=0,he=U,ge=0,Ae,Ge;re<=he;)if(ge=Math.floor((re+he)/2),Ae=R[ge],Ge=R[ge+1],Ae<=L){if(ge===U||LL)he=ge-1;else throw new Fo("Input is not a number.");return 0}var _l=function(L,U,re){this.type=L,this.input=U,this.labels=[],this.outputs=[];for(var he=0,ge=re;he=Ge)return U.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ft);var Dt=U.parse(nt,pt,ge);if(!Dt)return null;ge=ge||Dt.type,he.push([Ge,Dt])}return new _l(ge,re,he)},_l.prototype.evaluate=function(L){var U=this.labels,re=this.outputs;if(U.length===1)return re[0].evaluate(L);var he=this.input.evaluate(L);if(he<=U[0])return re[0].evaluate(L);var ge=U.length;if(he>=U[ge-1])return re[ge-1].evaluate(L);var Ae=Kl(U,he);return re[Ae].evaluate(L)},_l.prototype.eachChild=function(L){L(this.input);for(var U=0,re=this.outputs;U0&&L.push(this.labels[U]),L.push(this.outputs[U].serialize());return L};function Yo(R,L,U){return R*(1-U)+L*U}function hl(R,L,U){return new Zi(Yo(R.r,L.r,U),Yo(R.g,L.g,U),Yo(R.b,L.b,U),Yo(R.a,L.a,U))}function qv(R,L,U){return R.map(function(re,he){return Yo(re,L[he],U)})}var Kh=Object.freeze({__proto__:null,number:Yo,color:hl,array:qv}),jv=.95047,Sp=1,Uv=1.08883,Mp=4/29,gh=6/29,Hv=3*gh*gh,wd=gh*gh*gh,Jl=Math.PI/180,Jh=180/Math.PI;function wl(R){return R>wd?Math.pow(R,1/3):R/Hv+Mp}function mc(R){return R>gh?R*R*R:Hv*(R-Mp)}function Hc(R){return 255*(R<=.0031308?12.92*R:1.055*Math.pow(R,1/2.4)-.055)}function Gc(R){return R/=255,R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function Td(R){var L=Gc(R.r),U=Gc(R.g),re=Gc(R.b),he=wl((.4124564*L+.3575761*U+.1804375*re)/jv),ge=wl((.2126729*L+.7151522*U+.072175*re)/Sp),Ae=wl((.0193339*L+.119192*U+.9503041*re)/Uv);return{l:116*ge-16,a:500*(he-ge),b:200*(ge-Ae),alpha:R.a}}function Qh(R){var L=(R.l+16)/116,U=isNaN(R.a)?L:L+R.a/500,re=isNaN(R.b)?L:L-R.b/200;return L=Sp*mc(L),U=jv*mc(U),re=Uv*mc(re),new Zi(Hc(3.2404542*U-1.5371385*L-.4985314*re),Hc(-.969266*U+1.8760108*L+.041556*re),Hc(.0556434*U-.2040259*L+1.0572252*re),R.alpha)}function xo(R,L,U){return{l:Yo(R.l,L.l,U),a:Yo(R.a,L.a,U),b:Yo(R.b,L.b,U),alpha:Yo(R.alpha,L.alpha,U)}}function Ep(R){var L=Td(R),U=L.l,re=L.a,he=L.b,ge=Math.atan2(he,re)*Jh;return{h:ge<0?ge+360:ge,c:Math.sqrt(re*re+he*he),l:U,alpha:R.a}}function xc(R){var L=R.h*Jl,U=R.c,re=R.l;return Qh({l:re,a:Math.cos(L)*U,b:Math.sin(L)*U,alpha:R.alpha})}function Vc(R,L,U){var re=L-R;return R+U*(re>180||re<-180?re-360*Math.round(re/360):re)}function Gv(R,L,U){return{h:Vc(R.h,L.h,U),c:Yo(R.c,L.c,U),l:Yo(R.l,L.l,U),alpha:Yo(R.alpha,L.alpha,U)}}var Ds={forward:Td,reverse:Qh,interpolate:xo},yh={forward:Ep,reverse:xc,interpolate:Gv},Pf=Object.freeze({__proto__:null,lab:Ds,hcl:yh}),Is=function(L,U,re,he,ge){this.type=L,this.operator=U,this.interpolation=re,this.input=he,this.labels=[],this.outputs=[];for(var Ae=0,Ge=ge;Ae1}))return U.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);he={name:"cubic-bezier",controlPoints:nt}}else return U.error("Unknown interpolation type "+String(he[0]),1,0);if(L.length-1<4)return U.error("Expected at least 4 arguments, but found only "+(L.length-1)+".");if((L.length-1)%2!==0)return U.error("Expected an even number of arguments.");if(ge=U.parse(ge,2,$n),!ge)return null;var ft=[],pt=null;re==="interpolate-hcl"||re==="interpolate-lab"?pt=cu:U.expectedType&&U.expectedType.kind!=="value"&&(pt=U.expectedType);for(var Dt=0;Dt=Kt)return U.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',tr);var zr=U.parse(Yt,gr,pt);if(!zr)return null;pt=pt||zr.type,ft.push([Kt,zr])}return pt.kind!=="number"&&pt.kind!=="color"&&!(pt.kind==="array"&&pt.itemType.kind==="number"&&typeof pt.N=="number")?U.error("Type "+Ho(pt)+" is not interpolatable."):new Is(pt,re,he,ge,ft)},Is.prototype.evaluate=function(L){var U=this.labels,re=this.outputs;if(U.length===1)return re[0].evaluate(L);var he=this.input.evaluate(L);if(he<=U[0])return re[0].evaluate(L);var ge=U.length;if(he>=U[ge-1])return re[ge-1].evaluate(L);var Ae=Kl(U,he),Ge=U[Ae],nt=U[Ae+1],ft=Is.interpolationFactor(this.interpolation,he,Ge,nt),pt=re[Ae].evaluate(L),Dt=re[Ae+1].evaluate(L);return this.operator==="interpolate"?Kh[this.type.kind.toLowerCase()](pt,Dt,ft):this.operator==="interpolate-hcl"?yh.reverse(yh.interpolate(yh.forward(pt),yh.forward(Dt),ft)):Ds.reverse(Ds.interpolate(Ds.forward(pt),Ds.forward(Dt),ft))},Is.prototype.eachChild=function(L){L(this.input);for(var U=0,re=this.outputs;U=re.length)throw new Fo("Array index out of bounds: "+U+" > "+(re.length-1)+".");if(U!==Math.floor(U))throw new Fo("Array index must be an integer, but found "+U+" instead.");return re[U]},Df.prototype.eachChild=function(L){L(this.index),L(this.input)},Df.prototype.outputDefined=function(){return!1},Df.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var bc=function(L,U){this.type=ri,this.needle=L,this.haystack=U};bc.parse=function(L,U){if(L.length!==3)return U.error("Expected 2 arguments, but found "+(L.length-1)+" instead.");var re=U.parse(L[1],1,oi),he=U.parse(L[2],2,oi);return!re||!he?null:Fv(re.type,[ri,ai,$n,ao,oi])?new bc(re,he):U.error("Expected first argument to be of type boolean, string, number or null, but found "+Ho(re.type)+" instead")},bc.prototype.evaluate=function(L){var U=this.needle.evaluate(L),re=this.haystack.evaluate(L);if(!re)return!1;if(!Bc(U,["boolean","string","number","null"]))throw new Fo("Expected first argument to be of type boolean, string, number or null, but found "+Ho(ms(U))+" instead.");if(!Bc(re,["string","array"]))throw new Fo("Expected second argument to be of type array or string, but found "+Ho(ms(re))+" instead.");return re.indexOf(U)>=0},bc.prototype.eachChild=function(L){L(this.needle),L(this.haystack)},bc.prototype.outputDefined=function(){return!0},bc.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _c=function(L,U,re){this.type=$n,this.needle=L,this.haystack=U,this.fromIndex=re};_c.parse=function(L,U){if(L.length<=2||L.length>=5)return U.error("Expected 3 or 4 arguments, but found "+(L.length-1)+" instead.");var re=U.parse(L[1],1,oi),he=U.parse(L[2],2,oi);if(!re||!he)return null;if(!Fv(re.type,[ri,ai,$n,ao,oi]))return U.error("Expected first argument to be of type boolean, string, number or null, but found "+Ho(re.type)+" instead");if(L.length===4){var ge=U.parse(L[3],3,$n);return ge?new _c(re,he,ge):null}else return new _c(re,he)},_c.prototype.evaluate=function(L){var U=this.needle.evaluate(L),re=this.haystack.evaluate(L);if(!Bc(U,["boolean","string","number","null"]))throw new Fo("Expected first argument to be of type boolean, string, number or null, but found "+Ho(ms(U))+" instead.");if(!Bc(re,["string","array"]))throw new Fo("Expected second argument to be of type array or string, but found "+Ho(ms(re))+" instead.");if(this.fromIndex){var he=this.fromIndex.evaluate(L);return re.indexOf(U,he)}return re.indexOf(U)},_c.prototype.eachChild=function(L){L(this.needle),L(this.haystack),this.fromIndex&&L(this.fromIndex)},_c.prototype.outputDefined=function(){return!1},_c.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var L=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),L]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var No=function(L,U,re,he,ge,Ae){this.inputType=L,this.type=U,this.input=re,this.cases=he,this.outputs=ge,this.otherwise=Ae};No.parse=function(L,U){if(L.length<5)return U.error("Expected at least 4 arguments, but found only "+(L.length-1)+".");if(L.length%2!==1)return U.error("Expected an even number of arguments.");var re,he;U.expectedType&&U.expectedType.kind!=="value"&&(he=U.expectedType);for(var ge={},Ae=[],Ge=2;GeNumber.MAX_SAFE_INTEGER)return pt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Yt=="number"&&Math.floor(Yt)!==Yt)return pt.error("Numeric branch labels must be integer values.");if(!re)re=ms(Yt);else if(pt.checkSubtype(re,ms(Yt)))return null;if(typeof ge[String(Yt)]<"u")return pt.error("Branch labels must be unique.");ge[String(Yt)]=Ae.length}var tr=U.parse(ft,Ge,he);if(!tr)return null;he=he||tr.type,Ae.push(tr)}var gr=U.parse(L[1],1,oi);if(!gr)return null;var zr=U.parse(L[L.length-1],L.length-1,he);return!zr||gr.type.kind!=="value"&&U.concat(1).checkSubtype(re,gr.type)?null:new No(re,he,gr,ge,Ae,zr)},No.prototype.evaluate=function(L){var U=this.input.evaluate(L),re=ms(U)===this.inputType&&this.outputs[this.cases[U]]||this.otherwise;return re.evaluate(L)},No.prototype.eachChild=function(L){L(this.input),this.outputs.forEach(L),L(this.otherwise)},No.prototype.outputDefined=function(){return this.outputs.every(function(L){return L.outputDefined()})&&this.otherwise.outputDefined()},No.prototype.serialize=function(){for(var L=this,U=["match",this.input.serialize()],re=Object.keys(this.cases).sort(),he=[],ge={},Ae=0,Ge=re;Ae=5)return U.error("Expected 3 or 4 arguments, but found "+(L.length-1)+" instead.");var re=U.parse(L[1],1,oi),he=U.parse(L[2],2,$n);if(!re||!he)return null;if(!Fv(re.type,[al(oi),ai,oi]))return U.error("Expected first argument to be of type array or string, but found "+Ho(re.type)+" instead");if(L.length===4){var ge=U.parse(L[3],3,$n);return ge?new vu(re.type,re,he,ge):null}else return new vu(re.type,re,he)},vu.prototype.evaluate=function(L){var U=this.input.evaluate(L),re=this.beginIndex.evaluate(L);if(!Bc(U,["string","array"]))throw new Fo("Expected first argument to be of type array or string, but found "+Ho(ms(U))+" instead.");if(this.endIndex){var he=this.endIndex.evaluate(L);return U.slice(re,he)}return U.slice(re)},vu.prototype.eachChild=function(L){L(this.input),L(this.beginIndex),this.endIndex&&L(this.endIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var L=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),L]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function ed(R,L){return R==="=="||R==="!="?L.kind==="boolean"||L.kind==="string"||L.kind==="number"||L.kind==="null"||L.kind==="value":L.kind==="string"||L.kind==="number"||L.kind==="value"}function td(R,L,U){return L===U}function eu(R,L,U){return L!==U}function pu(R,L,U){return LU}function gu(R,L,U){return L<=U}function If(R,L,U){return L>=U}function Co(R,L,U,re){return re.compare(L,U)===0}function wc(R,L,U,re){return!Co(R,L,U,re)}function $c(R,L,U,re){return re.compare(L,U)<0}function ov(R,L,U,re){return re.compare(L,U)>0}function Wc(R,L,U,re){return re.compare(L,U)<=0}function Ws(R,L,U,re){return re.compare(L,U)>=0}function Ji(R,L,U){var re=R!=="=="&&R!=="!=";return(function(){function he(ge,Ae,Ge){this.type=ri,this.lhs=ge,this.rhs=Ae,this.collator=Ge,this.hasUntypedArgument=ge.type.kind==="value"||Ae.type.kind==="value"}return he.parse=function(Ae,Ge){if(Ae.length!==3&&Ae.length!==4)return Ge.error("Expected two or three arguments.");var nt=Ae[0],ft=Ge.parse(Ae[1],1,oi);if(!ft)return null;if(!ed(nt,ft.type))return Ge.concat(1).error('"'+nt+`" comparisons are not supported for type '`+Ho(ft.type)+"'.");var pt=Ge.parse(Ae[2],2,oi);if(!pt)return null;if(!ed(nt,pt.type))return Ge.concat(2).error('"'+nt+`" comparisons are not supported for type '`+Ho(pt.type)+"'.");if(ft.type.kind!==pt.type.kind&&ft.type.kind!=="value"&&pt.type.kind!=="value")return Ge.error("Cannot compare types '"+Ho(ft.type)+"' and '"+Ho(pt.type)+"'.");re&&(ft.type.kind==="value"&&pt.type.kind!=="value"?ft=new fl(pt.type,[ft]):ft.type.kind!=="value"&&pt.type.kind==="value"&&(pt=new fl(ft.type,[pt])));var Dt=null;if(Ae.length===4){if(ft.type.kind!=="string"&&pt.type.kind!=="string"&&ft.type.kind!=="value"&&pt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(Dt=Ge.parse(Ae[3],3,hu),!Dt)return null}return new he(ft,pt,Dt)},he.prototype.evaluate=function(Ae){var Ge=this.lhs.evaluate(Ae),nt=this.rhs.evaluate(Ae);if(re&&this.hasUntypedArgument){var ft=ms(Ge),pt=ms(nt);if(ft.kind!==pt.kind||!(ft.kind==="string"||ft.kind==="number"))throw new Fo('Expected arguments for "'+R+'" to be (string, string) or (number, number), but found ('+ft.kind+", "+pt.kind+") instead.")}if(this.collator&&!re&&this.hasUntypedArgument){var Dt=ms(Ge),Kt=ms(nt);if(Dt.kind!=="string"||Kt.kind!=="string")return L(Ae,Ge,nt)}return this.collator?U(Ae,Ge,nt,this.collator.evaluate(Ae)):L(Ae,Ge,nt)},he.prototype.eachChild=function(Ae){Ae(this.lhs),Ae(this.rhs),this.collator&&Ae(this.collator)},he.prototype.outputDefined=function(){return!0},he.prototype.serialize=function(){var Ae=[R];return this.eachChild(function(Ge){Ae.push(Ge.serialize())}),Ae},he})()}var Gi=Ji("==",td,Co),Iu=Ji("!=",eu,wc),Dl=Ji("<",pu,$c),Ad=Ji(">",tf,ov),rf=Ji("<=",gu,Wc),Xc=Ji(">=",If,Ws),Of=function(L,U,re,he,ge){this.type=ai,this.number=L,this.locale=U,this.currency=re,this.minFractionDigits=he,this.maxFractionDigits=ge};Of.parse=function(L,U){if(L.length!==3)return U.error("Expected two arguments.");var re=U.parse(L[1],1,$n);if(!re)return null;var he=L[2];if(typeof he!="object"||Array.isArray(he))return U.error("NumberFormat options argument must be an object.");var ge=null;if(he.locale&&(ge=U.parse(he.locale,1,ai),!ge))return null;var Ae=null;if(he.currency&&(Ae=U.parse(he.currency,1,ai),!Ae))return null;var Ge=null;if(he["min-fraction-digits"]&&(Ge=U.parse(he["min-fraction-digits"],1,$n),!Ge))return null;var nt=null;return he["max-fraction-digits"]&&(nt=U.parse(he["max-fraction-digits"],1,$n),!nt)?null:new Of(re,ge,Ae,Ge,nt)},Of.prototype.evaluate=function(L){return new Intl.NumberFormat(this.locale?this.locale.evaluate(L):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(L):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(L):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(L):void 0}).format(this.number.evaluate(L))},Of.prototype.eachChild=function(L){L(this.number),this.locale&&L(this.locale),this.currency&&L(this.currency),this.minFractionDigits&&L(this.minFractionDigits),this.maxFractionDigits&&L(this.maxFractionDigits)},Of.prototype.outputDefined=function(){return!1},Of.prototype.serialize=function(){var L={};return this.locale&&(L.locale=this.locale.serialize()),this.currency&&(L.currency=this.currency.serialize()),this.minFractionDigits&&(L["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(L["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),L]};var yu=function(L){this.type=$n,this.input=L};yu.parse=function(L,U){if(L.length!==2)return U.error("Expected 1 argument, but found "+(L.length-1)+" instead.");var re=U.parse(L[1],1);return re?re.type.kind!=="array"&&re.type.kind!=="string"&&re.type.kind!=="value"?U.error("Expected argument of type string or array, but found "+Ho(re.type)+" instead."):new yu(re):null},yu.prototype.evaluate=function(L){var U=this.input.evaluate(L);if(typeof U=="string")return U.length;if(Array.isArray(U))return U.length;throw new Fo("Expected value to be of type string or array, but found "+Ho(ms(U))+" instead.")},yu.prototype.eachChild=function(L){L(this.input)},yu.prototype.outputDefined=function(){return!1},yu.prototype.serialize=function(){var L=["length"];return this.eachChild(function(U){L.push(U.serialize())}),L};var mu={"==":Gi,"!=":Iu,">":Ad,"<":Dl,">=":Xc,"<=":rf,array:fl,at:Df,boolean:fl,case:Ql,coalesce:Tl,collator:Rf,format:Ku,image:Ju,in:bc,"index-of":_c,interpolate:Is,"interpolate-hcl":Is,"interpolate-lab":Is,length:yu,let:Du,literal:Vo,match:No,number:fl,"number-format":Of,object:fl,slice:vu,step:_l,string:fl,"to-boolean":Zl,"to-color":Zl,"to-number":Zl,"to-string":Zl,var:Qu,within:Pu};function Sd(R,L){var U=L[0],re=L[1],he=L[2],ge=L[3];U=U.evaluate(R),re=re.evaluate(R),he=he.evaluate(R);var Ae=ge?ge.evaluate(R):1,Ge=Kd(U,re,he,Ae);if(Ge)throw new Fo(Ge);return new Zi(U/255*Ae,re/255*Ae,he/255*Ae,Ae)}function Tc(R,L){return R in L}function Zc(R,L){var U=L[R];return typeof U>"u"?null:U}function zf(R,L,U,re){for(;U<=re;){var he=U+re>>1;if(L[he]===R)return!0;L[he]>R?re=he-1:U=he+1}return!1}function dl(R){return{type:R}}io.register(mu,{error:[kf,[ai],function(R,L){var U=L[0];throw new Fo(U.evaluate(R))}],typeof:[ai,[oi],function(R,L){var U=L[0];return Ho(ms(U.evaluate(R)))}],"to-rgba":[al($n,4),[cu],function(R,L){var U=L[0];return U.evaluate(R).toArray()}],rgb:[cu,[$n,$n,$n],Sd],rgba:[cu,[$n,$n,$n,$n],Sd],has:{type:ri,overloads:[[[ai],function(R,L){var U=L[0];return Tc(U.evaluate(R),R.properties())}],[[ai,ul],function(R,L){var U=L[0],re=L[1];return Tc(U.evaluate(R),re.evaluate(R))}]]},get:{type:oi,overloads:[[[ai],function(R,L){var U=L[0];return Zc(U.evaluate(R),R.properties())}],[[ai,ul],function(R,L){var U=L[0],re=L[1];return Zc(U.evaluate(R),re.evaluate(R))}]]},"feature-state":[oi,[ai],function(R,L){var U=L[0];return Zc(U.evaluate(R),R.featureState||{})}],properties:[ul,[],function(R){return R.properties()}],"geometry-type":[ai,[],function(R){return R.geometryType()}],id:[oi,[],function(R){return R.id()}],zoom:[$n,[],function(R){return R.globals.zoom}],"heatmap-density":[$n,[],function(R){return R.globals.heatmapDensity||0}],"line-progress":[$n,[],function(R){return R.globals.lineProgress||0}],accumulated:[oi,[],function(R){return R.globals.accumulated===void 0?null:R.globals.accumulated}],"+":[$n,dl($n),function(R,L){for(var U=0,re=0,he=L;re":[ri,[ai,oi],function(R,L){var U=L[0],re=L[1],he=R.properties()[U.value],ge=re.value;return typeof he==typeof ge&&he>ge}],"filter-id->":[ri,[oi],function(R,L){var U=L[0],re=R.id(),he=U.value;return typeof re==typeof he&&re>he}],"filter-<=":[ri,[ai,oi],function(R,L){var U=L[0],re=L[1],he=R.properties()[U.value],ge=re.value;return typeof he==typeof ge&&he<=ge}],"filter-id-<=":[ri,[oi],function(R,L){var U=L[0],re=R.id(),he=U.value;return typeof re==typeof he&&re<=he}],"filter->=":[ri,[ai,oi],function(R,L){var U=L[0],re=L[1],he=R.properties()[U.value],ge=re.value;return typeof he==typeof ge&&he>=ge}],"filter-id->=":[ri,[oi],function(R,L){var U=L[0],re=R.id(),he=U.value;return typeof re==typeof he&&re>=he}],"filter-has":[ri,[oi],function(R,L){var U=L[0];return U.value in R.properties()}],"filter-has-id":[ri,[],function(R){return R.id()!==null&&R.id()!==void 0}],"filter-type-in":[ri,[al(ai)],function(R,L){var U=L[0];return U.value.indexOf(R.geometryType())>=0}],"filter-id-in":[ri,[al(oi)],function(R,L){var U=L[0];return U.value.indexOf(R.id())>=0}],"filter-in-small":[ri,[ai,al(oi)],function(R,L){var U=L[0],re=L[1];return re.value.indexOf(R.properties()[U.value])>=0}],"filter-in-large":[ri,[ai,al(oi)],function(R,L){var U=L[0],re=L[1];return zf(R.properties()[U.value],re.value,0,re.value.length-1)}],all:{type:ri,overloads:[[[ri,ri],function(R,L){var U=L[0],re=L[1];return U.evaluate(R)&&re.evaluate(R)}],[dl(ri),function(R,L){for(var U=0,re=L;U-1}function Ac(R){return!!R.expression&&R.expression.interpolated}function oo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function bu(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Xs(R){return R}function Sc(R,L){var U=L.type==="color",re=R.stops&&typeof R.stops[0][0]=="object",he=re||R.property!==void 0,ge=re||!he,Ae=R.type||(Ac(L)?"exponential":"interval");if(U&&(R=bl({},R),R.stops&&(R.stops=R.stops.map(function(Kn){return[Kn[0],Zi.parse(Kn[1])]})),R.default?R.default=Zi.parse(R.default):R.default=Zi.parse(L.default)),R.colorSpace&&R.colorSpace!=="rgb"&&!Pf[R.colorSpace])throw new Error("Unknown color space: "+R.colorSpace);var Ge,nt,ft;if(Ae==="exponential")Ge=nd;else if(Ae==="interval")Ge=lv;else if(Ae==="categorical"){Ge=sv,nt=Object.create(null);for(var pt=0,Dt=R.stops;pt=R.stops[re-1][0])return R.stops[re-1][1];var he=Kl(R.stops.map(function(ge){return ge[0]}),U);return R.stops[he][1]}function nd(R,L,U){var re=R.base!==void 0?R.base:1;if(oo(U)!=="number")return nf(R.default,L.default);var he=R.stops.length;if(he===1||U<=R.stops[0][0])return R.stops[0][1];if(U>=R.stops[he-1][0])return R.stops[he-1][1];var ge=Kl(R.stops.map(function(Dt){return Dt[0]}),U),Ae=Md(U,re,R.stops[ge][0],R.stops[ge+1][0]),Ge=R.stops[ge][1],nt=R.stops[ge+1][1],ft=Kh[L.type]||Xs;if(R.colorSpace&&R.colorSpace!=="rgb"){var pt=Pf[R.colorSpace];ft=function(Dt,Kt){return pt.reverse(pt.interpolate(pt.forward(Dt),pt.forward(Kt),Ae))}}return typeof Ge.evaluate=="function"?{evaluate:function(){for(var Kt=[],Yt=arguments.length;Yt--;)Kt[Yt]=arguments[Yt];var tr=Ge.evaluate.apply(void 0,Kt),gr=nt.evaluate.apply(void 0,Kt);if(!(tr===void 0||gr===void 0))return ft(tr,gr,Ae)}}:ft(Ge,nt,Ae)}function wo(R,L,U){return L.type==="color"?U=Zi.parse(U):L.type==="formatted"?U=Ys.fromString(U.toString()):L.type==="resolvedImage"?U=ys.fromString(U.toString()):oo(U)!==L.type&&(L.type!=="enum"||!L.values[U])&&(U=void 0),nf(U,R.default,L.default)}function Md(R,L,U,re){var he=re-U,ge=R-U;return he===0?0:L===1?ge/he:(Math.pow(L,ge)-1)/(Math.pow(L,he)-1)}var af=function(L,U){this.expression=L,this._warningHistory={},this._evaluator=new du,this._defaultValue=U?Jc(U):null,this._enumValues=U&&U.type==="enum"?U.values:null};af.prototype.evaluateWithoutErrorHandling=function(L,U,re,he,ge,Ae){return this._evaluator.globals=L,this._evaluator.feature=U,this._evaluator.featureState=re,this._evaluator.canonical=he,this._evaluator.availableImages=ge||null,this._evaluator.formattedSection=Ae,this.expression.evaluate(this._evaluator)},af.prototype.evaluate=function(L,U,re,he,ge,Ae){this._evaluator.globals=L,this._evaluator.feature=U||null,this._evaluator.featureState=re||null,this._evaluator.canonical=he,this._evaluator.availableImages=ge||null,this._evaluator.formattedSection=Ae||null;try{var Ge=this.expression.evaluate(this._evaluator);if(Ge==null||typeof Ge=="number"&&Ge!==Ge)return this._defaultValue;if(this._enumValues&&!(Ge in this._enumValues))throw new Fo("Expected value to be one of "+Object.keys(this._enumValues).map(function(nt){return JSON.stringify(nt)}).join(", ")+", but found "+JSON.stringify(Ge)+" instead.");return Ge}catch(nt){return this._warningHistory[nt.message]||(this._warningHistory[nt.message]=!0,typeof console<"u"&&console.warn(nt.message)),this._defaultValue}};function zu(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in mu}function Fu(R,L){var U=new cl(mu,[],L?Nf(L):void 0),re=U.parse(R,void 0,void 0,void 0,L&&L.type==="string"?{typeAnnotation:"coerce"}:void 0);return re?xu(new af(re,L)):Al(U.errors)}var Il=function(L,U){this.kind=L,this._styleExpression=U,this.isStateDependent=L!=="constant"&&!$s(U.expression)};Il.prototype.evaluateWithoutErrorHandling=function(L,U,re,he,ge,Ae){return this._styleExpression.evaluateWithoutErrorHandling(L,U,re,he,ge,Ae)},Il.prototype.evaluate=function(L,U,re,he,ge,Ae){return this._styleExpression.evaluate(L,U,re,he,ge,Ae)};var Sl=function(L,U,re,he){this.kind=L,this.zoomStops=re,this._styleExpression=U,this.isStateDependent=L!=="camera"&&!$s(U.expression),this.interpolationType=he};Sl.prototype.evaluateWithoutErrorHandling=function(L,U,re,he,ge,Ae){return this._styleExpression.evaluateWithoutErrorHandling(L,U,re,he,ge,Ae)},Sl.prototype.evaluate=function(L,U,re,he,ge,Ae){return this._styleExpression.evaluate(L,U,re,he,ge,Ae)},Sl.prototype.interpolationFactor=function(L,U,re){return this.interpolationType?Is.interpolationFactor(this.interpolationType,L,U,re):0};function Ff(R,L){if(R=Fu(R,L),R.result==="error")return R;var U=R.value.expression,re=Lf(U);if(!re&&!Ou(L))return Al([new mo("","data expressions not supported")]);var he=yc(U,["zoom"]);if(!he&&!rd(L))return Al([new mo("","zoom expressions not supported")]);var ge=Mc(U);if(!ge&&!he)return Al([new mo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ge instanceof mo)return Al([ge]);if(ge instanceof Is&&!Ac(L))return Al([new mo("",'"interpolate" expressions cannot be used with this property')]);if(!ge)return xu(re?new Il("constant",R.value):new Il("source",R.value));var Ae=ge instanceof Is?ge.interpolation:void 0;return xu(re?new Sl("camera",R.value,ge.labels,Ae):new Sl("composite",R.value,ge.labels,Ae))}var Nu=function(L,U){this._parameters=L,this._specification=U,bl(this,Sc(this._parameters,this._specification))};Nu.deserialize=function(L){return new Nu(L._parameters,L._specification)},Nu.serialize=function(L){return{_parameters:L._parameters,_specification:L._specification}};function Kc(R,L){if(bu(R))return new Nu(R,L);if(zu(R)){var U=Ff(R,L);if(U.result==="error")throw new Error(U.value.map(function(he){return he.key+": "+he.message}).join(", "));return U.value}else{var re=R;return typeof R=="string"&&L.type==="color"&&(re=Zi.parse(R)),{kind:"constant",evaluate:function(){return re}}}}function Mc(R){var L=null;if(R instanceof Du)L=Mc(R.result);else if(R instanceof Tl)for(var U=0,re=R.args;Ure.maximum?[new ia(L,U,U+" is greater than the maximum value "+re.maximum)]:[]}function mh(R){var L=R.valueSpec,U=gi(R.value.type),re,he={},ge,Ae,Ge=U!=="categorical"&&R.value.property===void 0,nt=!Ge,ft=oo(R.value.stops)==="array"&&oo(R.value.stops[0])==="array"&&oo(R.value.stops[0][0])==="object",pt=Zs({key:R.key,value:R.value,valueSpec:R.styleSpec.function,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:Dt,default:tr}});return U==="identity"&&Ge&&pt.push(new ia(R.key,R.value,'missing required property "property"')),U!=="identity"&&!R.value.stops&&pt.push(new ia(R.key,R.value,'missing required property "stops"')),U==="exponential"&&R.valueSpec.expression&&!Ac(R.valueSpec)&&pt.push(new ia(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(nt&&!Ou(R.valueSpec)?pt.push(new ia(R.key,R.value,"property functions not supported")):Ge&&!rd(R.valueSpec)&&pt.push(new ia(R.key,R.value,"zoom functions not supported"))),(U==="categorical"||ft)&&R.value.property===void 0&&pt.push(new ia(R.key,R.value,'"property" property is required')),pt;function Dt(gr){if(U==="identity")return[new ia(gr.key,gr.value,'identity function may not have a "stops" property')];var zr=[],Er=gr.value;return zr=zr.concat(Os({key:gr.key,value:Er,valueSpec:gr.valueSpec,style:gr.style,styleSpec:gr.styleSpec,arrayElementValidator:Kt})),oo(Er)==="array"&&Er.length===0&&zr.push(new ia(gr.key,Er,"array must have at least one stop")),zr}function Kt(gr){var zr=[],Er=gr.value,nn=gr.key;if(oo(Er)!=="array")return[new ia(nn,Er,"array expected, "+oo(Er)+" found")];if(Er.length!==2)return[new ia(nn,Er,"array length 2 expected, length "+Er.length+" found")];if(ft){if(oo(Er[0])!=="object")return[new ia(nn,Er,"object expected, "+oo(Er[0])+" found")];if(Er[0].zoom===void 0)return[new ia(nn,Er,"object stop key must have zoom")];if(Er[0].value===void 0)return[new ia(nn,Er,"object stop key must have value")];if(Ae&&Ae>gi(Er[0].zoom))return[new ia(nn,Er[0].zoom,"stop zoom values must appear in ascending order")];gi(Er[0].zoom)!==Ae&&(Ae=gi(Er[0].zoom),ge=void 0,he={}),zr=zr.concat(Zs({key:nn+"[0]",value:Er[0],valueSpec:{zoom:{}},style:gr.style,styleSpec:gr.styleSpec,objectElementValidators:{zoom:of,value:Yt}}))}else zr=zr.concat(Yt({key:nn+"[0]",value:Er[0],style:gr.style,styleSpec:gr.styleSpec},Er));return zu(_o(Er[1]))?zr.concat([new ia(nn+"[1]",Er[1],"expressions are not allowed in function stops.")]):zr.concat(zs({key:nn+"[1]",value:Er[1],valueSpec:L,style:gr.style,styleSpec:gr.styleSpec}))}function Yt(gr,zr){var Er=oo(gr.value),nn=gi(gr.value),Hr=gr.value!==null?gr.value:zr;if(!re)re=Er;else if(Er!==re)return[new ia(gr.key,Hr,Er+" stop domain type must match previous stop domain type "+re)];if(Er!=="number"&&Er!=="string"&&Er!=="boolean")return[new ia(gr.key,Hr,"stop domain value must be a number, string, or boolean")];if(Er!=="number"&&U!=="categorical"){var rn="number expected, "+Er+" found";return Ou(L)&&U===void 0&&(rn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ia(gr.key,Hr,rn)]}return U==="categorical"&&Er==="number"&&(!isFinite(nn)||Math.floor(nn)!==nn)?[new ia(gr.key,Hr,"integer expected, found "+nn)]:U!=="categorical"&&Er==="number"&&ge!==void 0&&nn=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(var L=0,U=R.slice(1);LL?1:0}function sf(R){if(!Array.isArray(R))return!1;if(R[0]==="within")return!0;for(var L=1;L"||L==="<="||L===">="?id(R[1],R[2],L):L==="any"?lf(R.slice(1)):L==="all"?["all"].concat(R.slice(1).map(qf)):L==="none"?["all"].concat(R.slice(1).map(qf).map(jf)):L==="in"?_h(R[1],R.slice(2)):L==="!in"?jf(_h(R[1],R.slice(2))):L==="has"?Vv(R[1]):L==="!has"?jf(Vv(R[1])):L==="within"?R:!0;return U}function id(R,L,U){switch(R){case"$type":return["filter-type-"+U,L];case"$id":return["filter-id-"+U,L];default:return["filter-"+U,R,L]}}function lf(R){return["any"].concat(R.map(qf))}function _h(R,L){if(L.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",L]];case"$id":return["filter-id-in",["literal",L]];default:return L.length>200&&!L.some(function(U){return typeof U!=typeof L[0]})?["filter-in-large",R,["literal",L.sort(uv)]]:["filter-in-small",R,["literal",L]]}}function Vv(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jf(R){return["!",R]}function Ed(R){return tu(_o(R.value))?Ks(bl({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Uf(R)}function Uf(R){var L=R.value,U=R.key;if(oo(L)!=="array")return[new ia(U,L,"array expected, "+oo(L)+" found")];var re=R.styleSpec,he,ge=[];if(L.length<1)return[new ia(U,L,"filter array must have at least 1 element")];switch(ge=ge.concat(Bf({key:U+"[0]",value:L[0],valueSpec:re.filter_operator,style:R.style,styleSpec:R.styleSpec})),gi(L[0])){case"<":case"<=":case">":case">=":L.length>=2&&gi(L[1])==="$type"&&ge.push(new ia(U,L,'"$type" cannot be use with operator "'+L[0]+'"'));case"==":case"!=":L.length!==3&&ge.push(new ia(U,L,'filter array for operator "'+L[0]+'" must have 3 elements'));case"in":case"!in":L.length>=2&&(he=oo(L[1]),he!=="string"&&ge.push(new ia(U+"[1]",L[1],"string expected, "+he+" found")));for(var Ae=2;Ae=pt[Yt+0]&&re>=pt[Yt+1])?(Ae[Kt]=!0,ge.push(ft[Kt])):Ae[Kt]=!1}}},Ve.prototype._forEachCell=function(R,L,U,re,he,ge,Ae,Ge){for(var nt=this._convertToCellCoord(R),ft=this._convertToCellCoord(L),pt=this._convertToCellCoord(U),Dt=this._convertToCellCoord(re),Kt=nt;Kt<=pt;Kt++)for(var Yt=ft;Yt<=Dt;Yt++){var tr=this.d*Yt+Kt;if(!(Ge&&!Ge(this._convertFromCellCoord(Kt),this._convertFromCellCoord(Yt),this._convertFromCellCoord(Kt+1),this._convertFromCellCoord(Yt+1)))&&he.call(this,R,L,U,re,tr,ge,Ae,Ge))return}},Ve.prototype._convertFromCellCoord=function(R){return(R-this.padding)/this.scale},Ve.prototype._convertToCellCoord=function(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))},Ve.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var R=this.cells,L=Re+this.cells.length+1+1,U=0,re=0;re=0)){var Dt=R[pt];ft[pt]=dt[nt].shallow.indexOf(pt)>=0?Dt:ar(Dt,L)}R instanceof Error&&(ft.message=R.message)}if(ft.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(ft.$name=nt),ft}throw new Error("can't serialize object of type "+typeof R)}function ir(R){if(R==null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||Gt(R)||Zt(R)||ArrayBuffer.isView(R)||R instanceof Xe)return R;if(Array.isArray(R))return R.map(ir);if(typeof R=="object"){var L=R.$name||"Object",U=dt[L],re=U.klass;if(!re)throw new Error("can't deserialize unregistered class "+L);if(re.deserialize)return re.deserialize(R);for(var he=Object.create(re.prototype),ge=0,Ae=Object.keys(R);ge=0?nt:ir(nt)}}return he}throw new Error("can't deserialize object of type "+typeof R)}var Tr=function(){this.first=!0};Tr.prototype.update=function(L,U){var re=Math.floor(L);return this.first?(this.first=!1,this.lastIntegerZoom=re,this.lastIntegerZoomTime=0,this.lastZoom=L,this.lastFloorZoom=re,!0):(this.lastFloorZoom>re?(this.lastIntegerZoom=re+1,this.lastIntegerZoomTime=U):this.lastFloorZoom=128&&R<=255},Arabic:function(R){return R>=1536&&R<=1791},"Arabic Supplement":function(R){return R>=1872&&R<=1919},"Arabic Extended-A":function(R){return R>=2208&&R<=2303},"Hangul Jamo":function(R){return R>=4352&&R<=4607},"Unified Canadian Aboriginal Syllabics":function(R){return R>=5120&&R<=5759},Khmer:function(R){return R>=6016&&R<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(R){return R>=6320&&R<=6399},"General Punctuation":function(R){return R>=8192&&R<=8303},"Letterlike Symbols":function(R){return R>=8448&&R<=8527},"Number Forms":function(R){return R>=8528&&R<=8591},"Miscellaneous Technical":function(R){return R>=8960&&R<=9215},"Control Pictures":function(R){return R>=9216&&R<=9279},"Optical Character Recognition":function(R){return R>=9280&&R<=9311},"Enclosed Alphanumerics":function(R){return R>=9312&&R<=9471},"Geometric Shapes":function(R){return R>=9632&&R<=9727},"Miscellaneous Symbols":function(R){return R>=9728&&R<=9983},"Miscellaneous Symbols and Arrows":function(R){return R>=11008&&R<=11263},"CJK Radicals Supplement":function(R){return R>=11904&&R<=12031},"Kangxi Radicals":function(R){return R>=12032&&R<=12255},"Ideographic Description Characters":function(R){return R>=12272&&R<=12287},"CJK Symbols and Punctuation":function(R){return R>=12288&&R<=12351},Hiragana:function(R){return R>=12352&&R<=12447},Katakana:function(R){return R>=12448&&R<=12543},Bopomofo:function(R){return R>=12544&&R<=12591},"Hangul Compatibility Jamo":function(R){return R>=12592&&R<=12687},Kanbun:function(R){return R>=12688&&R<=12703},"Bopomofo Extended":function(R){return R>=12704&&R<=12735},"CJK Strokes":function(R){return R>=12736&&R<=12783},"Katakana Phonetic Extensions":function(R){return R>=12784&&R<=12799},"Enclosed CJK Letters and Months":function(R){return R>=12800&&R<=13055},"CJK Compatibility":function(R){return R>=13056&&R<=13311},"CJK Unified Ideographs Extension A":function(R){return R>=13312&&R<=19903},"Yijing Hexagram Symbols":function(R){return R>=19904&&R<=19967},"CJK Unified Ideographs":function(R){return R>=19968&&R<=40959},"Yi Syllables":function(R){return R>=40960&&R<=42127},"Yi Radicals":function(R){return R>=42128&&R<=42191},"Hangul Jamo Extended-A":function(R){return R>=43360&&R<=43391},"Hangul Syllables":function(R){return R>=44032&&R<=55215},"Hangul Jamo Extended-B":function(R){return R>=55216&&R<=55295},"Private Use Area":function(R){return R>=57344&&R<=63743},"CJK Compatibility Ideographs":function(R){return R>=63744&&R<=64255},"Arabic Presentation Forms-A":function(R){return R>=64336&&R<=65023},"Vertical Forms":function(R){return R>=65040&&R<=65055},"CJK Compatibility Forms":function(R){return R>=65072&&R<=65103},"Small Form Variants":function(R){return R>=65104&&R<=65135},"Arabic Presentation Forms-B":function(R){return R>=65136&&R<=65279},"Halfwidth and Fullwidth Forms":function(R){return R>=65280&&R<=65519}};function sr(R){for(var L=0,U=R;L=65097&&R<=65103)||hr["CJK Compatibility Ideographs"](R)||hr["CJK Compatibility"](R)||hr["CJK Radicals Supplement"](R)||hr["CJK Strokes"](R)||hr["CJK Symbols and Punctuation"](R)&&!(R>=12296&&R<=12305)&&!(R>=12308&&R<=12319)&&R!==12336||hr["CJK Unified Ideographs Extension A"](R)||hr["CJK Unified Ideographs"](R)||hr["Enclosed CJK Letters and Months"](R)||hr["Hangul Compatibility Jamo"](R)||hr["Hangul Jamo Extended-A"](R)||hr["Hangul Jamo Extended-B"](R)||hr["Hangul Jamo"](R)||hr["Hangul Syllables"](R)||hr.Hiragana(R)||hr["Ideographic Description Characters"](R)||hr.Kanbun(R)||hr["Kangxi Radicals"](R)||hr["Katakana Phonetic Extensions"](R)||hr.Katakana(R)&&R!==12540||hr["Halfwidth and Fullwidth Forms"](R)&&R!==65288&&R!==65289&&R!==65293&&!(R>=65306&&R<=65310)&&R!==65339&&R!==65341&&R!==65343&&!(R>=65371&&R<=65503)&&R!==65507&&!(R>=65512&&R<=65519)||hr["Small Form Variants"](R)&&!(R>=65112&&R<=65118)&&!(R>=65123&&R<=65126)||hr["Unified Canadian Aboriginal Syllabics"](R)||hr["Unified Canadian Aboriginal Syllabics Extended"](R)||hr["Vertical Forms"](R)||hr["Yijing Hexagram Symbols"](R)||hr["Yi Syllables"](R)||hr["Yi Radicals"](R))}function Sr(R){return!!(hr["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||hr["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||hr["Letterlike Symbols"](R)||hr["Number Forms"](R)||hr["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||hr["Control Pictures"](R)&&R!==9251||hr["Optical Character Recognition"](R)||hr["Enclosed Alphanumerics"](R)||hr["Geometric Shapes"](R)||hr["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||hr["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||hr["CJK Symbols and Punctuation"](R)||hr.Katakana(R)||hr["Private Use Area"](R)||hr["CJK Compatibility Forms"](R)||hr["Small Form Variants"](R)||hr["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}function yn(R){return!(Or(R)||Sr(R))}function On(R){return hr.Arabic(R)||hr["Arabic Supplement"](R)||hr["Arabic Extended-A"](R)||hr["Arabic Presentation Forms-A"](R)||hr["Arabic Presentation Forms-B"](R)}function Zn(R){return R>=1424&&R<=2303||hr["Arabic Presentation Forms-A"](R)||hr["Arabic Presentation Forms-B"](R)}function Mn(R,L){return!(!L&&Zn(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||hr.Khmer(R))}function Un(R){for(var L=0,U=R;L-1&&(ka=Oa.error),xa&&xa(R)};function zi(){Jn.fire(new mr("pluginStateChange",{pluginStatus:ka,pluginURL:Na}))}var Jn=new Pr,Xa=function(){return ka},ui=function(R){return R({pluginStatus:ka,pluginURL:Na}),Jn.on("pluginStateChange",R),R},$i=function(R,L,U){if(U===void 0&&(U=!1),ka===Oa.deferred||ka===Oa.loading||ka===Oa.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Na=_e.resolveURL(R),ka=Oa.deferred,xa=L,zi(),U||Lo()},Lo=function(){if(ka!==Oa.deferred||!Na)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ka=Oa.loading,zi(),Na&&cr({url:Na},function(R){R?Oi(R):(ka=Oa.loaded,zi())})},eo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ka===Oa.loaded||eo.applyArabicShaping!=null},isLoading:function(){return ka===Oa.loading},setState:function(L){ka=L.pluginStatus,Na=L.pluginURL},isParsed:function(){return eo.applyArabicShaping!=null&&eo.processBidirectionalText!=null&&eo.processStyledBidirectionalText!=null},getPluginURL:function(){return Na}},xs=function(){!eo.isLoading()&&!eo.isLoaded()&&Xa()==="deferred"&&Lo()},yi=function(L,U){this.zoom=L,U?(this.now=U.now,this.fadeDuration=U.fadeDuration,this.zoomHistory=U.zoomHistory,this.transition=U.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Tr,this.transition={})};yi.prototype.isSupportedScript=function(L){return sa(L,eo.isLoaded())},yi.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},yi.prototype.getCrossfadeParameters=function(){var L=this.zoom,U=L-Math.floor(L),re=this.crossFadingFactor();return L>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:U+(1-U)*re}:{fromScale:.5,toScale:1,t:1-(1-re)*U}};var Ss=function(L,U){this.property=L,this.value=U,this.expression=Kc(U===void 0?L.specification.default:U,L.specification)};Ss.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ss.prototype.possiblyEvaluate=function(L,U,re){return this.property.possiblyEvaluate(this,L,U,re)};var Ms=function(L){this.property=L,this.value=new Ss(L,void 0)};Ms.prototype.transitioned=function(L,U){return new Lt(this.property,this.value,U,w({},L.transition,this.transition),L.now)},Ms.prototype.untransitioned=function(){return new Lt(this.property,this.value,null,{},0)};var To=function(L){this._properties=L,this._values=Object.create(L.defaultTransitionablePropertyValues)};To.prototype.getValue=function(L){return q(this._values[L].value.value)},To.prototype.setValue=function(L,U){this._values.hasOwnProperty(L)||(this._values[L]=new Ms(this._values[L].property)),this._values[L].value=new Ss(this._values[L].property,U===null?void 0:q(U))},To.prototype.getTransition=function(L){return q(this._values[L].transition)},To.prototype.setTransition=function(L,U){this._values.hasOwnProperty(L)||(this._values[L]=new Ms(this._values[L].property)),this._values[L].transition=q(U)||void 0},To.prototype.serialize=function(){for(var L={},U=0,re=Object.keys(this._values);Uthis.end)return this.prior=null,ge;if(this.value.isDataDriven())return this.prior=null,ge;if(heAe.zoomHistory.lastIntegerZoom?{from:re,to:he}:{from:ge,to:he}},L.prototype.interpolate=function(re){return re},L})(Lr),Nn=function(L){this.specification=L};Nn.prototype.possiblyEvaluate=function(L,U,re,he){if(L.value!==void 0)if(L.expression.kind==="constant"){var ge=L.expression.evaluate(U,null,{},re,he);return this._calculate(ge,ge,ge,U)}else return this._calculate(L.expression.evaluate(new yi(Math.floor(U.zoom-1),U)),L.expression.evaluate(new yi(Math.floor(U.zoom),U)),L.expression.evaluate(new yi(Math.floor(U.zoom+1),U)),U)},Nn.prototype._calculate=function(L,U,re,he){var ge=he.zoom;return ge>he.zoomHistory.lastIntegerZoom?{from:L,to:U}:{from:re,to:U}},Nn.prototype.interpolate=function(L){return L};var Gn=function(L){this.specification=L};Gn.prototype.possiblyEvaluate=function(L,U,re,he){return!!L.expression.evaluate(U,null,{},re,he)},Gn.prototype.interpolate=function(){return!1};var Wn=function(L){this.properties=L,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var U in L){var re=L[U];re.specification.overridable&&this.overridableProperties.push(U);var he=this.defaultPropertyValues[U]=new Ss(re,void 0),ge=this.defaultTransitionablePropertyValues[U]=new Ms(re);this.defaultTransitioningPropertyValues[U]=ge.untransitioned(),this.defaultPossiblyEvaluatedValues[U]=he.possiblyEvaluate({})}};at("DataDrivenProperty",Lr),at("DataConstantProperty",Mr),at("CrossFadedDataDrivenProperty",qn),at("CrossFadedProperty",Nn),at("ColorRampProperty",Gn);var Aa="-transition",ca=(function(R){function L(U,re){if(R.call(this),this.id=U.id,this.type=U.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},U.type!=="custom"&&(U=U,this.metadata=U.metadata,this.minzoom=U.minzoom,this.maxzoom=U.maxzoom,U.type!=="background"&&(this.source=U.source,this.sourceLayer=U["source-layer"],this.filter=U.filter),re.layout&&(this._unevaluatedLayout=new xr(re.layout)),re.paint)){this._transitionablePaint=new To(re.paint);for(var he in U.paint)this.setPaintProperty(he,U.paint[he],{validate:!1});for(var ge in U.layout)this.setLayoutProperty(ge,U.layout[ge],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _n(re.paint)}}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},L.prototype.getLayoutProperty=function(re){return re==="visibility"?this.visibility:this._unevaluatedLayout.getValue(re)},L.prototype.setLayoutProperty=function(re,he,ge){if(ge===void 0&&(ge={}),he!=null){var Ae="layers."+this.id+".layout."+re;if(this._validate(Gf,Ae,re,he,ge))return}if(re==="visibility"){this.visibility=he;return}this._unevaluatedLayout.setValue(re,he)},L.prototype.getPaintProperty=function(re){return D(re,Aa)?this._transitionablePaint.getTransition(re.slice(0,-Aa.length)):this._transitionablePaint.getValue(re)},L.prototype.setPaintProperty=function(re,he,ge){if(ge===void 0&&(ge={}),he!=null){var Ae="layers."+this.id+".paint."+re;if(this._validate(Rd,Ae,re,he,ge))return!1}if(D(re,Aa))return this._transitionablePaint.setTransition(re.slice(0,-Aa.length),he||void 0),!1;var Ge=this._transitionablePaint._values[re],nt=Ge.property.specification["property-type"]==="cross-faded-data-driven",ft=Ge.value.isDataDriven(),pt=Ge.value;this._transitionablePaint.setValue(re,he),this._handleSpecialPaintPropertyUpdate(re);var Dt=this._transitionablePaint._values[re].value,Kt=Dt.isDataDriven();return Kt||ft||nt||this._handleOverridablePaintPropertyUpdate(re,pt,Dt)},L.prototype._handleSpecialPaintPropertyUpdate=function(re){},L.prototype._handleOverridablePaintPropertyUpdate=function(re,he,ge){return!1},L.prototype.isHidden=function(re){return this.minzoom&&re=this.maxzoom?!0:this.visibility==="none"},L.prototype.updateTransitions=function(re){this._transitioningPaint=this._transitionablePaint.transitioned(re,this._transitioningPaint)},L.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},L.prototype.recalculate=function(re,he){re.getCrossfadeParameters&&(this._crossfadeParameters=re.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(re,void 0,he)),this.paint=this._transitioningPaint.possiblyEvaluate(re,void 0,he)},L.prototype.serialize=function(){var re={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(re.layout=re.layout||{},re.layout.visibility=this.visibility),N(re,function(he,ge){return he!==void 0&&!(ge==="layout"&&!Object.keys(he).length)&&!(ge==="paint"&&!Object.keys(he).length)})},L.prototype._validate=function(re,he,ge,Ae,Ge){return Ge===void 0&&(Ge={}),Ge&&Ge.validate===!1?!1:se(this,re.call(di,{key:he,layerType:this.type,objectKey:ge,value:Ae,styleSpec:dn,style:{glyphs:!0,sprite:!0}}))},L.prototype.is3D=function(){return!1},L.prototype.isTileClipped=function(){return!1},L.prototype.hasOffscreenPass=function(){return!1},L.prototype.resize=function(){},L.prototype.isStateDependent=function(){for(var re in this.paint._values){var he=this.paint.get(re);if(!(!(he instanceof tn)||!Ou(he.property.specification))&&(he.value.kind==="source"||he.value.kind==="composite")&&he.value.isStateDependent)return!0}return!1},L})(Pr),aa={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},zn=function(L,U){this._structArray=L,this._pos1=U*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ir=128,pn=5,vn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};vn.serialize=function(L,U){return L._trim(),U&&(L.isTransferred=!0,U.push(L.arrayBuffer)),{length:L.length,arrayBuffer:L.arrayBuffer}},vn.deserialize=function(L){var U=Object.create(this.prototype);return U.arrayBuffer=L.arrayBuffer,U.length=L.length,U.capacity=L.arrayBuffer.byteLength/U.bytesPerElement,U._refreshViews(),U},vn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},vn.prototype.clear=function(){this.length=0},vn.prototype.resize=function(L){this.reserve(L),this.length=L},vn.prototype.reserve=function(L){if(L>this.capacity){this.capacity=Math.max(L,Math.floor(this.capacity*pn),Ir),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var U=this.uint8;this._refreshViews(),U&&this.uint8.set(U)}},vn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function kn(R,L){L===void 0&&(L=1);var U=0,re=0,he=R.map(function(Ae){var Ge=Rn(Ae.type),nt=U=ma(U,Math.max(L,Ge)),ft=Ae.components||1;return re=Math.max(re,Ge),U+=Ge*ft,{name:Ae.name,type:Ae.type,components:ft,offset:nt}}),ge=ma(U,Math.max(re,L));return{members:he,size:ge,alignment:L}}function Rn(R){return aa[R].BYTES_PER_ELEMENT}function ma(R,L){return Math.ceil(R/L)*L}var ra=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he){var ge=this.length;return this.resize(ge+1),this.emplace(ge,re,he)},L.prototype.emplace=function(re,he,ge){var Ae=re*2;return this.int16[Ae+0]=he,this.int16[Ae+1]=ge,re},L})(vn);ra.prototype.bytesPerElement=4,at("StructArrayLayout2i4",ra);var Ra=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,re,he,ge,Ae)},L.prototype.emplace=function(re,he,ge,Ae,Ge){var nt=re*4;return this.int16[nt+0]=he,this.int16[nt+1]=ge,this.int16[nt+2]=Ae,this.int16[nt+3]=Ge,re},L})(vn);Ra.prototype.bytesPerElement=8,at("StructArrayLayout4i8",Ra);var Cn=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt){var ft=this.length;return this.resize(ft+1),this.emplace(ft,re,he,ge,Ae,Ge,nt)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft){var pt=re*6;return this.int16[pt+0]=he,this.int16[pt+1]=ge,this.int16[pt+2]=Ae,this.int16[pt+3]=Ge,this.int16[pt+4]=nt,this.int16[pt+5]=ft,re},L})(vn);Cn.prototype.bytesPerElement=12,at("StructArrayLayout2i4i12",Cn);var bn=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt){var ft=this.length;return this.resize(ft+1),this.emplace(ft,re,he,ge,Ae,Ge,nt)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft){var pt=re*4,Dt=re*8;return this.int16[pt+0]=he,this.int16[pt+1]=ge,this.uint8[Dt+4]=Ae,this.uint8[Dt+5]=Ge,this.uint8[Dt+6]=nt,this.uint8[Dt+7]=ft,re},L})(vn);bn.prototype.bytesPerElement=8,at("StructArrayLayout2i4ub8",bn);var ha=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he){var ge=this.length;return this.resize(ge+1),this.emplace(ge,re,he)},L.prototype.emplace=function(re,he,ge){var Ae=re*2;return this.float32[Ae+0]=he,this.float32[Ae+1]=ge,re},L})(vn);ha.prototype.bytesPerElement=8,at("StructArrayLayout2f8",ha);var on=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt){var Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt){var tr=re*10;return this.uint16[tr+0]=he,this.uint16[tr+1]=ge,this.uint16[tr+2]=Ae,this.uint16[tr+3]=Ge,this.uint16[tr+4]=nt,this.uint16[tr+5]=ft,this.uint16[tr+6]=pt,this.uint16[tr+7]=Dt,this.uint16[tr+8]=Kt,this.uint16[tr+9]=Yt,re},L})(vn);on.prototype.bytesPerElement=20,at("StructArrayLayout10ui20",on);var la=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr){var gr=this.length;return this.resize(gr+1),this.emplace(gr,re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr){var zr=re*12;return this.int16[zr+0]=he,this.int16[zr+1]=ge,this.int16[zr+2]=Ae,this.int16[zr+3]=Ge,this.uint16[zr+4]=nt,this.uint16[zr+5]=ft,this.uint16[zr+6]=pt,this.uint16[zr+7]=Dt,this.int16[zr+8]=Kt,this.int16[zr+9]=Yt,this.int16[zr+10]=tr,this.int16[zr+11]=gr,re},L})(vn);la.prototype.bytesPerElement=24,at("StructArrayLayout4i4ui4i24",la);var Xn=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,re,he,ge)},L.prototype.emplace=function(re,he,ge,Ae){var Ge=re*3;return this.float32[Ge+0]=he,this.float32[Ge+1]=ge,this.float32[Ge+2]=Ae,re},L})(vn);Xn.prototype.bytesPerElement=12,at("StructArrayLayout3f12",Xn);var La=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re){var he=this.length;return this.resize(he+1),this.emplace(he,re)},L.prototype.emplace=function(re,he){var ge=re*1;return this.uint32[ge+0]=he,re},L})(vn);La.prototype.bytesPerElement=4,at("StructArrayLayout1ul4",La);var vi=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt){var Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,re,he,ge,Ae,Ge,nt,ft,pt,Dt)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt){var Yt=re*10,tr=re*5;return this.int16[Yt+0]=he,this.int16[Yt+1]=ge,this.int16[Yt+2]=Ae,this.int16[Yt+3]=Ge,this.int16[Yt+4]=nt,this.int16[Yt+5]=ft,this.uint32[tr+3]=pt,this.uint16[Yt+8]=Dt,this.uint16[Yt+9]=Kt,re},L})(vn);vi.prototype.bytesPerElement=20,at("StructArrayLayout6i1ul2ui20",vi);var _a=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt){var ft=this.length;return this.resize(ft+1),this.emplace(ft,re,he,ge,Ae,Ge,nt)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft){var pt=re*6;return this.int16[pt+0]=he,this.int16[pt+1]=ge,this.int16[pt+2]=Ae,this.int16[pt+3]=Ge,this.int16[pt+4]=nt,this.int16[pt+5]=ft,re},L})(vn);_a.prototype.bytesPerElement=12,at("StructArrayLayout2i2i2i12",_a);var Pa=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge){var nt=this.length;return this.resize(nt+1),this.emplace(nt,re,he,ge,Ae,Ge)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt){var ft=re*4,pt=re*8;return this.float32[ft+0]=he,this.float32[ft+1]=ge,this.float32[ft+2]=Ae,this.int16[pt+6]=Ge,this.int16[pt+7]=nt,re},L})(vn);Pa.prototype.bytesPerElement=16,at("StructArrayLayout2f1f2i16",Pa);var Qn=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,re,he,ge,Ae)},L.prototype.emplace=function(re,he,ge,Ae,Ge){var nt=re*12,ft=re*3;return this.uint8[nt+0]=he,this.uint8[nt+1]=ge,this.float32[ft+1]=Ae,this.float32[ft+2]=Ge,re},L})(vn);Qn.prototype.bytesPerElement=12,at("StructArrayLayout2ub2f12",Qn);var si=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,re,he,ge)},L.prototype.emplace=function(re,he,ge,Ae){var Ge=re*3;return this.uint16[Ge+0]=he,this.uint16[Ge+1]=ge,this.uint16[Ge+2]=Ae,re},L})(vn);si.prototype.bytesPerElement=6,at("StructArrayLayout3ui6",si);var Fi=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr){var rn=this.length;return this.resize(rn+1),this.emplace(rn,re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr,rn){var fn=re*24,Pn=re*12,ta=re*48;return this.int16[fn+0]=he,this.int16[fn+1]=ge,this.uint16[fn+2]=Ae,this.uint16[fn+3]=Ge,this.uint32[Pn+2]=nt,this.uint32[Pn+3]=ft,this.uint32[Pn+4]=pt,this.uint16[fn+10]=Dt,this.uint16[fn+11]=Kt,this.uint16[fn+12]=Yt,this.float32[Pn+7]=tr,this.float32[Pn+8]=gr,this.uint8[ta+36]=zr,this.uint8[ta+37]=Er,this.uint8[ta+38]=nn,this.uint32[Pn+10]=Hr,this.int16[fn+22]=rn,re},L})(vn);Fi.prototype.bytesPerElement=48,at("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Fi);var Wi=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr,rn,fn,Pn,ta,Kn,Ma,pa,wa,ni,Ea,Ca){var Ei=this.length;return this.resize(Ei+1),this.emplace(Ei,re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr,rn,fn,Pn,ta,Kn,Ma,pa,wa,ni,Ea,Ca)},L.prototype.emplace=function(re,he,ge,Ae,Ge,nt,ft,pt,Dt,Kt,Yt,tr,gr,zr,Er,nn,Hr,rn,fn,Pn,ta,Kn,Ma,pa,wa,ni,Ea,Ca,Ei){var ei=re*34,ho=re*17;return this.int16[ei+0]=he,this.int16[ei+1]=ge,this.int16[ei+2]=Ae,this.int16[ei+3]=Ge,this.int16[ei+4]=nt,this.int16[ei+5]=ft,this.int16[ei+6]=pt,this.int16[ei+7]=Dt,this.uint16[ei+8]=Kt,this.uint16[ei+9]=Yt,this.uint16[ei+10]=tr,this.uint16[ei+11]=gr,this.uint16[ei+12]=zr,this.uint16[ei+13]=Er,this.uint16[ei+14]=nn,this.uint16[ei+15]=Hr,this.uint16[ei+16]=rn,this.uint16[ei+17]=fn,this.uint16[ei+18]=Pn,this.uint16[ei+19]=ta,this.uint16[ei+20]=Kn,this.uint16[ei+21]=Ma,this.uint16[ei+22]=pa,this.uint32[ho+12]=wa,this.float32[ho+13]=ni,this.float32[ho+14]=Ea,this.float32[ho+15]=Ca,this.float32[ho+16]=Ei,re},L})(vn);Wi.prototype.bytesPerElement=68,at("StructArrayLayout8i15ui1ul4f68",Wi);var ss=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re){var he=this.length;return this.resize(he+1),this.emplace(he,re)},L.prototype.emplace=function(re,he){var ge=re*1;return this.float32[ge+0]=he,re},L})(vn);ss.prototype.bytesPerElement=4,at("StructArrayLayout1f4",ss);var Ri=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,re,he,ge)},L.prototype.emplace=function(re,he,ge,Ae){var Ge=re*3;return this.int16[Ge+0]=he,this.int16[Ge+1]=ge,this.int16[Ge+2]=Ae,re},L})(vn);Ri.prototype.bytesPerElement=6,at("StructArrayLayout3i6",Ri);var Es=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,re,he,ge)},L.prototype.emplace=function(re,he,ge,Ae){var Ge=re*2,nt=re*4;return this.uint32[Ge+0]=he,this.uint16[nt+2]=ge,this.uint16[nt+3]=Ae,re},L})(vn);Es.prototype.bytesPerElement=8,at("StructArrayLayout1ul2ui8",Es);var co=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he){var ge=this.length;return this.resize(ge+1),this.emplace(ge,re,he)},L.prototype.emplace=function(re,he,ge){var Ae=re*2;return this.uint16[Ae+0]=he,this.uint16[Ae+1]=ge,re},L})(vn);co.prototype.bytesPerElement=4,at("StructArrayLayout2ui4",co);var ks=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re){var he=this.length;return this.resize(he+1),this.emplace(he,re)},L.prototype.emplace=function(re,he){var ge=re*1;return this.uint16[ge+0]=he,re},L})(vn);ks.prototype.bytesPerElement=2,at("StructArrayLayout1ui2",ks);var Js=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},L.prototype.emplaceBack=function(re,he,ge,Ae){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,re,he,ge,Ae)},L.prototype.emplace=function(re,he,ge,Ae,Ge){var nt=re*4;return this.float32[nt+0]=he,this.float32[nt+1]=ge,this.float32[nt+2]=Ae,this.float32[nt+3]=Ge,re},L})(vn);Js.prototype.bytesPerElement=16,at("StructArrayLayout4f16",Js);var Qs=(function(R){function L(){R.apply(this,arguments)}R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L;var U={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return U.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},U.x1.get=function(){return this._structArray.int16[this._pos2+2]},U.y1.get=function(){return this._structArray.int16[this._pos2+3]},U.x2.get=function(){return this._structArray.int16[this._pos2+4]},U.y2.get=function(){return this._structArray.int16[this._pos2+5]},U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.anchorPoint.get=function(){return new c(this.anchorPointX,this.anchorPointY)},Object.defineProperties(L.prototype,U),L})(zn);Qs.prototype.size=20;var qu=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.get=function(re){return new Qs(this,re)},L})(vi);at("CollisionBoxArray",qu);var rs=(function(R){function L(){R.apply(this,arguments)}R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L;var U={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},U.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},U.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},U.segment.get=function(){return this._structArray.uint16[this._pos2+10]},U.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},U.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},U.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},U.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},U.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},U.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},U.placedOrientation.set=function(re){this._structArray.uint8[this._pos1+37]=re},U.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},U.hidden.set=function(re){this._structArray.uint8[this._pos1+38]=re},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},U.crossTileID.set=function(re){this._structArray.uint32[this._pos4+10]=re},U.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(L.prototype,U),L})(zn);rs.prototype.size=48;var Fs=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.get=function(re){return new rs(this,re)},L})(Fi);at("PlacedSymbolArray",Fs);var Ka=(function(R){function L(){R.apply(this,arguments)}R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L;var U={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},U.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},U.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},U.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},U.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},U.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},U.key.get=function(){return this._structArray.uint16[this._pos2+8]},U.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},U.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},U.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},U.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},U.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},U.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},U.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},U.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},U.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},U.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},U.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},U.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},U.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},U.crossTileID.set=function(re){this._structArray.uint32[this._pos4+12]=re},U.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},U.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},U.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},U.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(L.prototype,U),L})(zn);Ka.prototype.size=68;var nu=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.get=function(re){return new Ka(this,re)},L})(Wi);at("SymbolInstanceArray",nu);var Po=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.getoffsetX=function(re){return this.float32[re*1+0]},L})(ss);at("GlyphOffsetArray",Po);var Bo=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.getx=function(re){return this.int16[re*3+0]},L.prototype.gety=function(re){return this.int16[re*3+1]},L.prototype.gettileUnitDistanceFromAnchor=function(re){return this.int16[re*3+2]},L})(Ri);at("SymbolLineVertexArray",Bo);var Ns=(function(R){function L(){R.apply(this,arguments)}R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L;var U={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(L.prototype,U),L})(zn);Ns.prototype.size=8;var Ol=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.get=function(re){return new Ns(this,re)},L})(Es);at("FeatureIndexArray",Ol);var mi=kn([{name:"a_pos",components:2,type:"Int16"}],4),Xi=mi.members,pi=function(L){L===void 0&&(L=[]),this.segments=L};pi.prototype.prepareSegment=function(L,U,re,he){var ge=this.segments[this.segments.length-1];return L>pi.MAX_VERTEX_ARRAY_LENGTH&&$("Max vertices per segment is "+pi.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+L),(!ge||ge.vertexLength+L>pi.MAX_VERTEX_ARRAY_LENGTH||ge.sortKey!==he)&&(ge={vertexOffset:U.length,primitiveOffset:re.length,vertexLength:0,primitiveLength:0},he!==void 0&&(ge.sortKey=he),this.segments.push(ge)),ge},pi.prototype.get=function(){return this.segments},pi.prototype.destroy=function(){for(var L=0,U=this.segments;L>>16)*nt&65535)<<16)&4294967295,pt=pt<<15|pt>>>17,pt=(pt&65535)*ft+(((pt>>>16)*ft&65535)<<16)&4294967295,Ae^=pt,Ae=Ae<<13|Ae>>>19,Ge=(Ae&65535)*5+(((Ae>>>16)*5&65535)<<16)&4294967295,Ae=(Ge&65535)+27492+(((Ge>>>16)+58964&65535)<<16);switch(pt=0,he){case 3:pt^=(U.charCodeAt(Dt+2)&255)<<16;case 2:pt^=(U.charCodeAt(Dt+1)&255)<<8;case 1:pt^=U.charCodeAt(Dt)&255,pt=(pt&65535)*nt+(((pt>>>16)*nt&65535)<<16)&4294967295,pt=pt<<15|pt>>>17,pt=(pt&65535)*ft+(((pt>>>16)*ft&65535)<<16)&4294967295,Ae^=pt}return Ae^=U.length,Ae^=Ae>>>16,Ae=(Ae&65535)*2246822507+(((Ae>>>16)*2246822507&65535)<<16)&4294967295,Ae^=Ae>>>13,Ae=(Ae&65535)*3266489909+(((Ae>>>16)*3266489909&65535)<<16)&4294967295,Ae^=Ae>>>16,Ae>>>0}R.exports=L}),W=f(function(R){function L(U,re){for(var he=U.length,ge=re^he,Ae=0,Ge;he>=4;)Ge=U.charCodeAt(Ae)&255|(U.charCodeAt(++Ae)&255)<<8|(U.charCodeAt(++Ae)&255)<<16|(U.charCodeAt(++Ae)&255)<<24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),Ge^=Ge>>>24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),ge=(ge&65535)*1540483477+(((ge>>>16)*1540483477&65535)<<16)^Ge,he-=4,++Ae;switch(he){case 3:ge^=(U.charCodeAt(Ae+2)&255)<<16;case 2:ge^=(U.charCodeAt(Ae+1)&255)<<8;case 1:ge^=U.charCodeAt(Ae)&255,ge=(ge&65535)*1540483477+(((ge>>>16)*1540483477&65535)<<16)}return ge^=ge>>>13,ge=(ge&65535)*1540483477+(((ge>>>16)*1540483477&65535)<<16),ge^=ge>>>15,ge>>>0}R.exports=L}),ce=ie,Me=ie,ze=W;ce.murmur3=Me,ce.murmur2=ze;var $e=function(){this.ids=[],this.positions=[],this.indexed=!1};$e.prototype.add=function(L,U,re,he){this.ids.push(Je(L)),this.positions.push(U,re,he)},$e.prototype.getPositions=function(L){for(var U=Je(L),re=0,he=this.ids.length-1;re>1;this.ids[ge]>=U?he=ge:re=ge+1}for(var Ae=[];this.ids[re]===U;){var Ge=this.positions[3*re],nt=this.positions[3*re+1],ft=this.positions[3*re+2];Ae.push({index:Ge,start:nt,end:ft}),re++}return Ae},$e.serialize=function(L,U){var re=new Float64Array(L.ids),he=new Uint32Array(L.positions);return lt(re,he,0,re.length-1),U&&U.push(re.buffer,he.buffer),{ids:re,positions:he}},$e.deserialize=function(L){var U=new $e;return U.ids=L.ids,U.positions=L.positions,U.indexed=!0,U};var Ye=Math.pow(2,53)-1;function Je(R){var L=+R;return!isNaN(L)&&L<=Ye?L:ce(String(R))}function lt(R,L,U,re){for(;U>1],ge=U-1,Ae=re+1;;){do ge++;while(R[ge]he);if(ge>=Ae)break;_t(R,ge,Ae),_t(L,3*ge,3*Ae),_t(L,3*ge+1,3*Ae+1),_t(L,3*ge+2,3*Ae+2)}Ae-UAe.x+1||ntAe.y+1)&&$("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return U}function Ni(R,L){return{type:R.type,id:R.id,properties:R.properties,geometry:L?ii(R):[]}}function wi(R,L,U,re,he){R.emplaceBack(L*2+(re+1)/2,U*2+(he+1)/2)}var Ao=function(L){this.zoom=L.zoom,this.overscaling=L.overscaling,this.layers=L.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=L.index,this.hasPattern=!1,this.layoutVertexArray=new ra,this.indexArray=new si,this.segments=new pi,this.programConfigurations=new Qr(L.layers,L.zoom),this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};Ao.prototype.populate=function(L,U,re){var he=this.layers[0],ge=[],Ae=null;he.type==="circle"&&(Ae=he.layout.get("circle-sort-key"));for(var Ge=0,nt=L;Ge=Vn||Kt<0||Kt>=Vn)){var Yt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,L.sortKey),tr=Yt.vertexLength;wi(this.layoutVertexArray,Dt,Kt,-1,-1),wi(this.layoutVertexArray,Dt,Kt,1,-1),wi(this.layoutVertexArray,Dt,Kt,1,1),wi(this.layoutVertexArray,Dt,Kt,-1,1),this.indexArray.emplaceBack(tr,tr+1,tr+2),this.indexArray.emplaceBack(tr,tr+3,tr+2),Yt.vertexLength+=4,Yt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,L,re,{},he)},at("CircleBucket",Ao,{omit:["layers"]});function Ja(R,L){for(var U=0;U=3){for(var ge=0;ge1){if(ju(R,L))return!0;for(var re=0;re1?R.distSqr(U):R.distSqr(U.sub(L)._mult(he)._add(L))}function Vf(R,L){for(var U=!1,re,he,ge,Ae=0;AeL.y!=ge.y>L.y&&L.x<(ge.x-he.x)*(L.y-he.y)/(ge.y-he.y)+he.x&&(U=!U)}return U}function qs(R,L){for(var U=!1,re=0,he=R.length-1;reL.y!=Ae.y>L.y&&L.x<(Ae.x-ge.x)*(L.y-ge.y)/(Ae.y-ge.y)+ge.x&&(U=!U)}return U}function Ah(R,L,U,re,he){for(var ge=0,Ae=R;ge=Ge.x&&he>=Ge.y)return!0}var nt=[new c(L,U),new c(L,he),new c(re,he),new c(re,U)];if(R.length>2)for(var ft=0,pt=nt;fthe.x&&L.x>he.x||R.yhe.y&&L.y>he.y)return!1;var ge=Q(R,L,U[0]);return ge!==Q(R,L,U[1])||ge!==Q(R,L,U[2])||ge!==Q(R,L,U[3])}function Hu(R,L,U){var re=L.paint.get(R).value;return re.kind==="constant"?re.value:U.programConfigurations.get(L.id).getMaxValue(R)}function kc(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Sh(R,L,U,re,he){if(!L[0]&&!L[1])return R;var ge=c.convert(L)._mult(he);U==="viewport"&&ge._rotate(-re);for(var Ae=[],Ge=0;Ge0&&(ge=1/Math.sqrt(ge)),R[0]=L[0]*ge,R[1]=L[1]*ge,R[2]=L[2]*ge,R}function Tb(R,L){return R[0]*L[0]+R[1]*L[1]+R[2]*L[2]}function Ab(R,L,U){var re=L[0],he=L[1],ge=L[2],Ae=U[0],Ge=U[1],nt=U[2];return R[0]=he*nt-ge*Ge,R[1]=ge*Ae-re*nt,R[2]=re*Ge-he*Ae,R}function Pd(R,L,U){var re=L[0],he=L[1],ge=L[2];return R[0]=re*U[0]+he*U[3]+ge*U[6],R[1]=re*U[1]+he*U[4]+ge*U[7],R[2]=re*U[2]+he*U[5]+ge*U[8],R}var bw=Ld;(function(){var R=Pp();return function(L,U,re,he,ge,Ae){var Ge,nt;for(U||(U=3),re||(re=0),he?nt=Math.min(he*U+re,L.length):nt=L.length,Ge=re;GeR.width||he.height>R.height||U.x>R.width-he.width||U.y>R.height-he.height)throw new RangeError("out of range source coordinates for image copy");if(he.width>L.width||he.height>L.height||re.x>L.width-he.width||re.y>L.height-he.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ae=R.data,Ge=L.data,nt=0;nt80*U){Ge=ft=R[0],nt=pt=R[1];for(var tr=U;trft&&(ft=Dt),Kt>pt&&(pt=Kt);Yt=Math.max(ft-Ge,pt-nt),Yt=Yt!==0?1/Yt:0}return k0(ge,Ae,U,Ge,nt,Yt),Ae}function wg(R,L,U,re,he){var ge,Ae;if(he===o1(R,L,U,re)>0)for(ge=L;ge=L;ge-=re)Ae=Lb(ge,R[ge],R[ge+1],Ae);return Ae&&vf(Ae,Ae.next)&&(Ag(Ae),Ae=Ae.next),Ae}function Fl(R,L){if(!R)return R;L||(L=R);var U=R,re;do if(re=!1,!U.steiner&&(vf(U,U.next)||il(U.prev,U,U.next)===0)){if(Ag(U),U=L=U.prev,U===U.next)break;re=!0}else U=U.next;while(re||U!==L);return L}function k0(R,L,U,re,he,ge,Ae){if(R){!Ae&&ge&&Eb(R,re,he,ge);for(var Ge=R,nt,ft;R.prev!==R.next;){if(nt=R.prev,ft=R.next,ge?Mw(R,re,he,ge):e1(R)){L.push(nt.i/U),L.push(R.i/U),L.push(ft.i/U),Ag(R),R=ft.next,Ge=ft.next;continue}if(R=ft,R===Ge){Ae?Ae===1?(R=t1(Fl(R),L,U),k0(R,L,U,re,he,ge,2)):Ae===2&&r1(R,L,U,re,he,ge):k0(Fl(R),L,U,re,he,ge,1);break}}}}function e1(R){var L=R.prev,U=R,re=R.next;if(il(L,U,re)>=0)return!1;for(var he=R.next.next;he!==R.prev;){if(zp(L.x,L.y,U.x,U.y,re.x,re.y,he.x,he.y)&&il(he.prev,he,he.next)>=0)return!1;he=he.next}return!0}function Mw(R,L,U,re){var he=R.prev,ge=R,Ae=R.next;if(il(he,ge,Ae)>=0)return!1;for(var Ge=he.xge.x?he.x>Ae.x?he.x:Ae.x:ge.x>Ae.x?ge.x:Ae.x,pt=he.y>ge.y?he.y>Ae.y?he.y:Ae.y:ge.y>Ae.y?ge.y:Ae.y,Dt=n1(Ge,nt,L,U,re),Kt=n1(ft,pt,L,U,re),Yt=R.prevZ,tr=R.nextZ;Yt&&Yt.z>=Dt&&tr&&tr.z<=Kt;){if(Yt!==R.prev&&Yt!==R.next&&zp(he.x,he.y,ge.x,ge.y,Ae.x,Ae.y,Yt.x,Yt.y)&&il(Yt.prev,Yt,Yt.next)>=0||(Yt=Yt.prevZ,tr!==R.prev&&tr!==R.next&&zp(he.x,he.y,ge.x,ge.y,Ae.x,Ae.y,tr.x,tr.y)&&il(tr.prev,tr,tr.next)>=0))return!1;tr=tr.nextZ}for(;Yt&&Yt.z>=Dt;){if(Yt!==R.prev&&Yt!==R.next&&zp(he.x,he.y,ge.x,ge.y,Ae.x,Ae.y,Yt.x,Yt.y)&&il(Yt.prev,Yt,Yt.next)>=0)return!1;Yt=Yt.prevZ}for(;tr&&tr.z<=Kt;){if(tr!==R.prev&&tr!==R.next&&zp(he.x,he.y,ge.x,ge.y,Ae.x,Ae.y,tr.x,tr.y)&&il(tr.prev,tr,tr.next)>=0)return!1;tr=tr.nextZ}return!0}function t1(R,L,U){var re=R;do{var he=re.prev,ge=re.next.next;!vf(he,ge)&&Cb(he,re,re.next,ge)&&Np(he,ge)&&Np(ge,he)&&(L.push(he.i/U),L.push(re.i/U),L.push(ge.i/U),Ag(re),Ag(re.next),re=R=ge),re=re.next}while(re!==R);return Fl(re)}function r1(R,L,U,re,he,ge){var Ae=R;do{for(var Ge=Ae.next.next;Ge!==Ae.prev;){if(Ae.i!==Ge.i&&Rh(Ae,Ge)){var nt=C0(Ae,Ge);Ae=Fl(Ae,Ae.next),nt=Fl(nt,nt.next),k0(Ae,L,U,re,he,ge),k0(nt,L,U,re,he,ge);return}Ge=Ge.next}Ae=Ae.next}while(Ae!==R)}function Ip(R,L,U,re){var he=[],ge,Ae,Ge,nt,ft;for(ge=0,Ae=L.length;ge=U.next.y&&U.next.y!==U.y){var Ge=U.x+(he-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(Ge<=re&&Ge>ge){if(ge=Ge,Ge===re){if(he===U.y)return U;if(he===U.next.y)return U.next}Ae=U.x=U.x&&U.x>=ft&&re!==U.x&&zp(heAe.x||U.x===Ae.x&&Kv(Ae,U)))&&(Ae=U,Dt=Kt)),U=U.next;while(U!==nt);return Ae}function Kv(R,L){return il(R.prev,R,L.prev)<0&&il(L.next,R,R.next)<0}function Eb(R,L,U,re){var he=R;do he.z===null&&(he.z=n1(he.x,he.y,L,U,re)),he.prevZ=he.prev,he.nextZ=he.next,he=he.next;while(he!==R);he.prevZ.nextZ=null,he.prevZ=null,kb(he)}function kb(R){var L,U,re,he,ge,Ae,Ge,nt,ft=1;do{for(U=R,R=null,ge=null,Ae=0;U;){for(Ae++,re=U,Ge=0,L=0;L0||nt>0&&re;)Ge!==0&&(nt===0||!re||U.z<=re.z)?(he=U,U=U.nextZ,Ge--):(he=re,re=re.nextZ,nt--),ge?ge.nextZ=he:R=he,he.prevZ=ge,ge=he;U=re}ge.nextZ=null,ft*=2}while(Ae>1);return R}function n1(R,L,U,re,he){return R=32767*(R-U)*he,L=32767*(L-re)*he,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,R|L<<1}function Ry(R){var L=R,U=R;do(L.x=0&&(R-Ae)*(re-Ge)-(U-Ae)*(L-Ge)>=0&&(U-Ae)*(ge-Ge)-(he-Ae)*(re-Ge)>=0}function Rh(R,L){return R.next.i!==L.i&&R.prev.i!==L.i&&!Fp(R,L)&&(Np(R,L)&&Np(L,R)&&Rb(R,L)&&(il(R.prev,R,L.prev)||il(R,L.prev,L))||vf(R,L)&&il(R.prev,R,R.next)>0&&il(L.prev,L,L.next)>0)}function il(R,L,U){return(L.y-R.y)*(U.x-L.x)-(L.x-R.x)*(U.y-L.y)}function vf(R,L){return R.x===L.x&&R.y===L.y}function Cb(R,L,U,re){var he=a1(il(R,L,U)),ge=a1(il(R,L,re)),Ae=a1(il(U,re,R)),Ge=a1(il(U,re,L));return!!(he!==ge&&Ae!==Ge||he===0&&Ly(R,U,L)||ge===0&&Ly(R,re,L)||Ae===0&&Ly(U,R,re)||Ge===0&&Ly(U,L,re))}function Ly(R,L,U){return L.x<=Math.max(R.x,U.x)&&L.x>=Math.min(R.x,U.x)&&L.y<=Math.max(R.y,U.y)&&L.y>=Math.min(R.y,U.y)}function a1(R){return R>0?1:R<0?-1:0}function Fp(R,L){var U=R;do{if(U.i!==R.i&&U.next.i!==R.i&&U.i!==L.i&&U.next.i!==L.i&&Cb(U,U.next,R,L))return!0;U=U.next}while(U!==R);return!1}function Np(R,L){return il(R.prev,R,R.next)<0?il(R,L,R.next)>=0&&il(R,R.prev,L)>=0:il(R,L,R.prev)<0||il(R,R.next,L)<0}function Rb(R,L){var U=R,re=!1,he=(R.x+L.x)/2,ge=(R.y+L.y)/2;do U.y>ge!=U.next.y>ge&&U.next.y!==U.y&&he<(U.next.x-U.x)*(ge-U.y)/(U.next.y-U.y)+U.x&&(re=!re),U=U.next;while(U!==R);return re}function C0(R,L){var U=new i1(R.i,R.x,R.y),re=new i1(L.i,L.x,L.y),he=R.next,ge=L.prev;return R.next=L,L.prev=R,U.next=he,he.prev=U,re.next=U,U.prev=re,ge.next=re,re.prev=ge,re}function Lb(R,L,U,re){var he=new i1(R,L,U);return re?(he.next=re.next,he.prev=re,re.next.prev=he,re.next=he):(he.prev=he,he.next=he),he}function Ag(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)}function i1(R,L,U){this.i=R,this.x=L,this.y=U,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Zv.deviation=function(R,L,U,re){var he=L&&L.length,ge=he?L[0]*U:R.length,Ae=Math.abs(o1(R,0,ge,U));if(he)for(var Ge=0,nt=L.length;Ge0&&(re+=R[he-1].length,U.holes.push(re))}return U},Cy.default=Ch;function s1(R,L,U,re,he){l1(R,L,U,re||R.length-1,he||DE)}function l1(R,L,U,re,he){for(;re>U;){if(re-U>600){var ge=re-U+1,Ae=L-U+1,Ge=Math.log(ge),nt=.5*Math.exp(2*Ge/3),ft=.5*Math.sqrt(Ge*nt*(ge-nt)/ge)*(Ae-ge/2<0?-1:1),pt=Math.max(U,Math.floor(L-Ae*nt/ge+ft)),Dt=Math.min(re,Math.floor(L+(ge-Ae)*nt/ge+ft));l1(R,L,pt,Dt,he)}var Kt=R[L],Yt=U,tr=re;for(Py(R,U,L),he(R[re],Kt)>0&&Py(R,U,re);Yt0;)tr--}he(R[U],Kt)===0?Py(R,U,tr):(tr++,Py(R,tr,re)),tr<=L&&(U=tr+1),L<=tr&&(re=tr-1)}}function Py(R,L,U){var re=R[L];R[L]=R[U],R[U]=re}function DE(R,L){return RL?1:0}function Pb(R,L){var U=R.length;if(U<=1)return[R];for(var re=[],he,ge,Ae=0;Ae1)for(var nt=0;nt>3}if(re--,U===1||U===2)he+=R.readSVarint(),ge+=R.readSVarint(),U===1&&(Ge&&Ae.push(Ge),Ge=[]),Ge.push(new c(he,ge));else if(U===7)Ge&&Ge.push(Ge[0].clone());else throw new Error("unknown command "+U)}return Ge&&Ae.push(Ge),Ae},R0.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var L=R.readVarint()+R.pos,U=1,re=0,he=0,ge=0,Ae=1/0,Ge=-1/0,nt=1/0,ft=-1/0;R.pos>3}if(re--,U===1||U===2)he+=R.readSVarint(),ge+=R.readSVarint(),heGe&&(Ge=he),geft&&(ft=ge);else if(U!==7)throw new Error("unknown command "+U)}return[Ae,nt,Ge,ft]},R0.prototype.toGeoJSON=function(R,L,U){var re=this.extent*Math.pow(2,U),he=this.extent*R,ge=this.extent*L,Ae=this.loadGeometry(),Ge=R0.types[this.type],nt,ft;function pt(Yt){for(var tr=0;tr>3;L=re===1?R.readString():re===2?R.readFloat():re===3?R.readDouble():re===4?R.readVarint64():re===5?R.readVarint():re===6?R.readSVarint():re===7?R.readBoolean():null}return L}Ow.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var L=this._pbf.readVarint()+this._pbf.pos;return new Db(this._pbf,L,this.extent,this._keys,this._values)};var Sg=Ob;function Ob(R,L){this.layers=R.readFields(d1,{},L)}function d1(R,L,U){if(R===3){var re=new Iw(U,U.readVarint()+U.pos);re.length&&(L[re.name]=re)}}var zb=Sg,qp=Db,hv=Iw,dv={VectorTile:zb,VectorTileFeature:qp,VectorTileLayer:hv},zE=dv.VectorTileFeature.types,zw=500,v1=Math.pow(2,13);function Mg(R,L,U,re,he,ge,Ae,Ge){R.emplaceBack(L,U,Math.floor(re*v1)*2+Ae,he*v1*2,ge*v1*2,Math.round(Ge))}var sd=function(L){this.zoom=L.zoom,this.overscaling=L.overscaling,this.layers=L.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=L.index,this.hasPattern=!1,this.layoutVertexArray=new Cn,this.indexArray=new si,this.programConfigurations=new Qr(L.layers,L.zoom),this.segments=new pi,this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};sd.prototype.populate=function(L,U,re){this.features=[],this.hasPattern=u1("fill-extrusion",this.layers,U);for(var he=0,ge=L;he=1){var rn=zr[nn-1];if(!FE(Hr,rn)){Yt.vertexLength+4>pi.MAX_VERTEX_ARRAY_LENGTH&&(Yt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var fn=Hr.sub(rn)._perp()._unit(),Pn=rn.dist(Hr);Er+Pn>32768&&(Er=0),Mg(this.layoutVertexArray,Hr.x,Hr.y,fn.x,fn.y,0,0,Er),Mg(this.layoutVertexArray,Hr.x,Hr.y,fn.x,fn.y,0,1,Er),Er+=Pn,Mg(this.layoutVertexArray,rn.x,rn.y,fn.x,fn.y,0,0,Er),Mg(this.layoutVertexArray,rn.x,rn.y,fn.x,fn.y,0,1,Er);var ta=Yt.vertexLength;this.indexArray.emplaceBack(ta,ta+2,ta+1),this.indexArray.emplaceBack(ta+1,ta+2,ta+3),Yt.vertexLength+=4,Yt.primitiveLength+=2}}}}if(Yt.vertexLength+ft>pi.MAX_VERTEX_ARRAY_LENGTH&&(Yt=this.segments.prepareSegment(ft,this.layoutVertexArray,this.indexArray)),zE[L.type]==="Polygon"){for(var Kn=[],Ma=[],pa=Yt.vertexLength,wa=0,ni=nt;waVn)||R.y===L.y&&(R.y<0||R.y>Vn)}function Fb(R){return R.every(function(L){return L.x<0})||R.every(function(L){return L.x>Vn})||R.every(function(L){return L.y<0})||R.every(function(L){return L.y>Vn})}var Fw=new Wn({"fill-extrusion-opacity":new Mr(dn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Lr(dn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Mr(dn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Mr(dn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qn(dn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Lr(dn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Lr(dn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Mr(dn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Nw={paint:Fw},NE=(function(R){function L(U){R.call(this,U,Nw)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.createBucket=function(re){return new sd(re)},L.prototype.queryRadius=function(){return kc(this.paint.get("fill-extrusion-translate"))},L.prototype.is3D=function(){return!0},L.prototype.queryIntersectsFeature=function(re,he,ge,Ae,Ge,nt,ft,pt){var Dt=Sh(re,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),nt.angle,ft),Kt=this.paint.get("fill-extrusion-height").evaluate(he,ge),Yt=this.paint.get("fill-extrusion-base").evaluate(he,ge),tr=Dy(Dt,pt,nt,0),gr=qE(Ae,Yt,Kt,pt),zr=gr[0],Er=gr[1];return BE(zr,Er,tr)},L})(ca);function L0(R,L){return R.x*L.x+R.y*L.y}function p1(R,L){if(R.length===1){for(var U=0,re=L[U++],he;!he||re.equals(he);)if(he=L[U++],!he)return 1/0;for(;U=2&&L[ft-1].equals(L[ft-2]);)ft--;for(var pt=0;pt0;if(Kn&&nn>pt){var pa=Yt.dist(tr);if(pa>2*Dt){var wa=Yt.sub(Yt.sub(tr)._mult(Dt/pa)._round());this.updateDistance(tr,wa),this.addCurrentVertex(wa,zr,0,0,Kt),tr=wa}}var ni=tr&&gr,Ea=ni?re:nt?"butt":he;if(ni&&Ea==="round"&&(Pnge&&(Ea="bevel"),Ea==="bevel"&&(Pn>2&&(Ea="flipbevel"),Pn100)Hr=Er.mult(-1);else{var Ca=Pn*zr.add(Er).mag()/zr.sub(Er).mag();Hr._perp()._mult(Ca*(Ma?-1:1))}this.addCurrentVertex(Yt,Hr,0,0,Kt),this.addCurrentVertex(Yt,Hr.mult(-1),0,0,Kt)}else if(Ea==="bevel"||Ea==="fakeround"){var Ei=-Math.sqrt(Pn*Pn-1),ei=Ma?Ei:0,ho=Ma?0:Ei;if(tr&&this.addCurrentVertex(Yt,zr,ei,ho,Kt),Ea==="fakeround")for(var Qo=Math.round(ta*180/Math.PI/Iy),vo=1;vo2*Dt){var ql=Yt.add(gr.sub(Yt)._mult(Dt/Au)._round());this.updateDistance(Yt,ql),this.addCurrentVertex(ql,Er,0,0,Kt),Yt=ql}}}}},pf.prototype.addCurrentVertex=function(L,U,re,he,ge,Ae){Ae===void 0&&(Ae=!1);var Ge=U.x+U.y*re,nt=U.y-U.x*re,ft=-U.x+U.y*he,pt=-U.y-U.x*he;this.addHalfVertex(L,Ge,nt,Ae,!1,re,ge),this.addHalfVertex(L,ft,pt,Ae,!0,-he,ge),this.distance>qb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(L,U,re,he,ge,Ae))},pf.prototype.addHalfVertex=function(L,U,re,he,ge,Ae,Ge){var nt=L.x,ft=L.y,pt=this.lineClips?this.scaledDistance*(qb-1):this.scaledDistance,Dt=pt*jw;if(this.layoutVertexArray.emplaceBack((nt<<1)+(he?1:0),(ft<<1)+(ge?1:0),Math.round(y1*U)+128,Math.round(y1*re)+128,(Ae===0?0:Ae<0?-1:1)+1|(Dt&63)<<2,Dt>>6),this.lineClips){var Kt=this.scaledDistance-this.lineClips.start,Yt=this.lineClips.end-this.lineClips.start,tr=Kt/Yt;this.layoutVertexArray2.emplaceBack(tr,this.lineClipsArray.length)}var gr=Ge.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,gr),Ge.primitiveLength++),ge?this.e2=gr:this.e1=gr},pf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},pf.prototype.updateDistance=function(L,U){this.distance+=L.dist(U),this.updateScaledDistance()},at("LineBucket",pf,{omit:["layers","patternFeatures"]});var UE=new Wn({"line-cap":new Mr(dn.layout_line["line-cap"]),"line-join":new Lr(dn.layout_line["line-join"]),"line-miter-limit":new Mr(dn.layout_line["line-miter-limit"]),"line-round-limit":new Mr(dn.layout_line["line-round-limit"]),"line-sort-key":new Lr(dn.layout_line["line-sort-key"])}),Uw=new Wn({"line-opacity":new Lr(dn.paint_line["line-opacity"]),"line-color":new Lr(dn.paint_line["line-color"]),"line-translate":new Mr(dn.paint_line["line-translate"]),"line-translate-anchor":new Mr(dn.paint_line["line-translate-anchor"]),"line-width":new Lr(dn.paint_line["line-width"]),"line-gap-width":new Lr(dn.paint_line["line-gap-width"]),"line-offset":new Lr(dn.paint_line["line-offset"]),"line-blur":new Lr(dn.paint_line["line-blur"]),"line-dasharray":new Nn(dn.paint_line["line-dasharray"]),"line-pattern":new qn(dn.paint_line["line-pattern"]),"line-gradient":new Gn(dn.paint_line["line-gradient"])}),jb={paint:Uw,layout:UE},bs=(function(R){function L(){R.apply(this,arguments)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.possiblyEvaluate=function(re,he){return he=new yi(Math.floor(he.zoom),{now:he.now,fadeDuration:he.fadeDuration,zoomHistory:he.zoomHistory,transition:he.transition}),R.prototype.possiblyEvaluate.call(this,re,he)},L.prototype.evaluate=function(re,he,ge,Ae){return he=w({},he,{zoom:Math.floor(he.zoom)}),R.prototype.evaluate.call(this,re,he,ge,Ae)},L})(Lr),x1=new bs(jb.paint.properties["line-width"].specification);x1.useIntegerZoom=!0;var gf=(function(R){function L(U){R.call(this,U,jb),this.gradientVersion=0}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype._handleSpecialPaintPropertyUpdate=function(re){if(re==="line-gradient"){var he=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=he._styleExpression.expression instanceof _l,this.gradientVersion=(this.gradientVersion+1)%p}},L.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},L.prototype.recalculate=function(re,he){R.prototype.recalculate.call(this,re,he),this.paint._values["line-floorwidth"]=x1.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,re)},L.prototype.createBucket=function(re){return new pf(re)},L.prototype.queryRadius=function(re){var he=re,ge=Hw(Hu("line-width",this,he),Hu("line-gap-width",this,he)),Ae=Hu("line-offset",this,he);return ge/2+Math.abs(Ae)+kc(this.paint.get("line-translate"))},L.prototype.queryIntersectsFeature=function(re,he,ge,Ae,Ge,nt,ft){var pt=Sh(re,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),nt.angle,ft),Dt=ft/2*Hw(this.paint.get("line-width").evaluate(he,ge),this.paint.get("line-gap-width").evaluate(he,ge)),Kt=this.paint.get("line-offset").evaluate(he,ge);return Kt&&(Ae=Gw(Ae,Kt*ft)),El(pt,Ae,Dt)},L.prototype.isTileClipped=function(){return!0},L})(ca);function Hw(R,L){return L>0?L+2*R:R}function Gw(R,L){for(var U=[],re=new c(0,0),he=0;he":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function $w(R){for(var L="",U=0;U>1,pt=-7,Dt=U?he-1:0,Kt=U?-1:1,Yt=R[L+Dt];for(Dt+=Kt,ge=Yt&(1<<-pt)-1,Yt>>=-pt,pt+=Ge;pt>0;ge=ge*256+R[L+Dt],Dt+=Kt,pt-=8);for(Ae=ge&(1<<-pt)-1,ge>>=-pt,pt+=re;pt>0;Ae=Ae*256+R[L+Dt],Dt+=Kt,pt-=8);if(ge===0)ge=1-ft;else{if(ge===nt)return Ae?NaN:(Yt?-1:1)*(1/0);Ae=Ae+Math.pow(2,re),ge=ge-ft}return(Yt?-1:1)*Ae*Math.pow(2,ge-re)},GE=function(R,L,U,re,he,ge){var Ae,Ge,nt,ft=ge*8-he-1,pt=(1<>1,Kt=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,Yt=re?0:ge-1,tr=re?1:-1,gr=L<0||L===0&&1/L<0?1:0;for(L=Math.abs(L),isNaN(L)||L===1/0?(Ge=isNaN(L)?1:0,Ae=pt):(Ae=Math.floor(Math.log(L)/Math.LN2),L*(nt=Math.pow(2,-Ae))<1&&(Ae--,nt*=2),Ae+Dt>=1?L+=Kt/nt:L+=Kt*Math.pow(2,1-Dt),L*nt>=2&&(Ae++,nt/=2),Ae+Dt>=pt?(Ge=0,Ae=pt):Ae+Dt>=1?(Ge=(L*nt-1)*Math.pow(2,he),Ae=Ae+Dt):(Ge=L*Math.pow(2,Dt-1)*Math.pow(2,he),Ae=0));he>=8;R[U+Yt]=Ge&255,Yt+=tr,Ge/=256,he-=8);for(Ae=Ae<0;R[U+Yt]=Ae&255,Yt+=tr,Ae/=256,ft-=8);R[U+Yt-tr]|=gr*128},b1={read:Ww,write:GE},Dd=Zo;function Zo(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}Zo.Varint=0,Zo.Fixed64=1,Zo.Bytes=2,Zo.Fixed32=5;var _1=65536*65536,w1=1/_1,VE=12,Xw=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Zo.prototype={destroy:function(){this.buf=null},readFields:function(R,L,U){for(U=U||this.length;this.pos>3,ge=this.pos;this.type=re&7,R(he,L,this),this.pos===ge&&this.skip(re)}return L},readMessage:function(R,L){return this.readFields(R,L,this.readVarint()+this.pos)},readFixed32:function(){var R=Qv(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=eT(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=Qv(this.buf,this.pos)+Qv(this.buf,this.pos+4)*_1;return this.pos+=8,R},readSFixed64:function(){var R=Qv(this.buf,this.pos)+eT(this.buf,this.pos+4)*_1;return this.pos+=8,R},readFloat:function(){var R=b1.read(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=b1.read(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var L=this.buf,U,re;return re=L[this.pos++],U=re&127,re<128||(re=L[this.pos++],U|=(re&127)<<7,re<128)||(re=L[this.pos++],U|=(re&127)<<14,re<128)||(re=L[this.pos++],U|=(re&127)<<21,re<128)?U:(re=L[this.pos],U|=(re&15)<<28,Zw(U,R,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2===1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,L=this.pos;return this.pos=R,R-L>=VE&&Xw?ZE(this.buf,L,R):XE(this.buf,L,R)},readBytes:function(){var R=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,R);return this.pos=R,L},readPackedVarint:function(R,L){if(this.type!==Zo.Bytes)return R.push(this.readVarint(L));var U=Id(this);for(R=R||[];this.pos127;);else if(L===Zo.Bytes)this.pos=this.readVarint()+this.pos;else if(L===Zo.Fixed32)this.pos+=4;else if(L===Zo.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+L)},writeTag:function(R,L){this.writeVarint(R<<3|L)},realloc:function(R){for(var L=this.length||16;L268435455||R<0){YE(R,this);return}this.realloc(4),this.buf[this.pos++]=R&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=R>>>7&127)))},writeSVarint:function(R){this.writeVarint(R<0?-R*2-1:R*2)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(R.length*4),this.pos++;var L=this.pos;this.pos=KE(this.buf,R,this.pos);var U=this.pos-L;U>=128&&$b(L,U,this),this.pos=L-1,this.writeVarint(U),this.pos+=U},writeFloat:function(R){this.realloc(4),b1.write(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),b1.write(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var L=R.length;this.writeVarint(L),this.realloc(L);for(var U=0;U=128&&$b(U,re,this),this.pos=U-1,this.writeVarint(re),this.pos+=re},writeMessage:function(R,L,U){this.writeTag(R,Zo.Bytes),this.writeRawMessage(L,U)},writePackedVarint:function(R,L){L.length&&this.writeMessage(R,Kw,L)},writePackedSVarint:function(R,L){L.length&&this.writeMessage(R,Jw,L)},writePackedBoolean:function(R,L){L.length&&this.writeMessage(R,Qw,L)},writePackedFloat:function(R,L){L.length&&this.writeMessage(R,Fy,L)},writePackedDouble:function(R,L){L.length&&this.writeMessage(R,ud,L)},writePackedFixed32:function(R,L){L.length&&this.writeMessage(R,T1,L)},writePackedSFixed32:function(R,L){L.length&&this.writeMessage(R,Jv,L)},writePackedFixed64:function(R,L){L.length&&this.writeMessage(R,$E,L)},writePackedSFixed64:function(R,L){L.length&&this.writeMessage(R,WE,L)},writeBytesField:function(R,L){this.writeTag(R,Zo.Bytes),this.writeBytes(L)},writeFixed32Field:function(R,L){this.writeTag(R,Zo.Fixed32),this.writeFixed32(L)},writeSFixed32Field:function(R,L){this.writeTag(R,Zo.Fixed32),this.writeSFixed32(L)},writeFixed64Field:function(R,L){this.writeTag(R,Zo.Fixed64),this.writeFixed64(L)},writeSFixed64Field:function(R,L){this.writeTag(R,Zo.Fixed64),this.writeSFixed64(L)},writeVarintField:function(R,L){this.writeTag(R,Zo.Varint),this.writeVarint(L)},writeSVarintField:function(R,L){this.writeTag(R,Zo.Varint),this.writeSVarint(L)},writeStringField:function(R,L){this.writeTag(R,Zo.Bytes),this.writeString(L)},writeFloatField:function(R,L){this.writeTag(R,Zo.Fixed32),this.writeFloat(L)},writeDoubleField:function(R,L){this.writeTag(R,Zo.Fixed64),this.writeDouble(L)},writeBooleanField:function(R,L){this.writeVarintField(R,!!L)}};function Zw(R,L,U){var re=U.buf,he,ge;if(ge=re[U.pos++],he=(ge&112)>>4,ge<128||(ge=re[U.pos++],he|=(ge&127)<<3,ge<128)||(ge=re[U.pos++],he|=(ge&127)<<10,ge<128)||(ge=re[U.pos++],he|=(ge&127)<<17,ge<128)||(ge=re[U.pos++],he|=(ge&127)<<24,ge<128)||(ge=re[U.pos++],he|=(ge&1)<<31,ge<128))return jp(R,he,L);throw new Error("Expected varint not more than 10 bytes")}function Id(R){return R.type===Zo.Bytes?R.readVarint()+R.pos:R.pos+1}function jp(R,L,U){return U?L*4294967296+(R>>>0):(L>>>0)*4294967296+(R>>>0)}function YE(R,L){var U,re;if(R>=0?(U=R%4294967296|0,re=R/4294967296|0):(U=~(-R%4294967296),re=~(-R/4294967296),U^4294967295?U=U+1|0:(U=0,re=re+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");L.realloc(10),ld(U,re,L),Yb(re,L)}function ld(R,L,U){U.buf[U.pos++]=R&127|128,R>>>=7,U.buf[U.pos++]=R&127|128,R>>>=7,U.buf[U.pos++]=R&127|128,R>>>=7,U.buf[U.pos++]=R&127|128,R>>>=7,U.buf[U.pos]=R&127}function Yb(R,L){var U=(R&7)<<4;L.buf[L.pos++]|=U|((R>>>=3)?128:0),R&&(L.buf[L.pos++]=R&127|((R>>>=7)?128:0),R&&(L.buf[L.pos++]=R&127|((R>>>=7)?128:0),R&&(L.buf[L.pos++]=R&127|((R>>>=7)?128:0),R&&(L.buf[L.pos++]=R&127|((R>>>=7)?128:0),R&&(L.buf[L.pos++]=R&127)))))}function $b(R,L,U){var re=L<=16383?1:L<=2097151?2:L<=268435455?3:Math.floor(Math.log(L)/(Math.LN2*7));U.realloc(re);for(var he=U.pos-1;he>=R;he--)U.buf[he+re]=U.buf[he]}function Kw(R,L){for(var U=0;U>>8,R[U+2]=L>>>16,R[U+3]=L>>>24}function eT(R,L){return(R[L]|R[L+1]<<8|R[L+2]<<16)+(R[L+3]<<24)}function XE(R,L,U){for(var re="",he=L;he239?4:ge>223?3:ge>191?2:1;if(he+Ge>U)break;var nt,ft,pt;Ge===1?ge<128&&(Ae=ge):Ge===2?(nt=R[he+1],(nt&192)===128&&(Ae=(ge&31)<<6|nt&63,Ae<=127&&(Ae=null))):Ge===3?(nt=R[he+1],ft=R[he+2],(nt&192)===128&&(ft&192)===128&&(Ae=(ge&15)<<12|(nt&63)<<6|ft&63,(Ae<=2047||Ae>=55296&&Ae<=57343)&&(Ae=null))):Ge===4&&(nt=R[he+1],ft=R[he+2],pt=R[he+3],(nt&192)===128&&(ft&192)===128&&(pt&192)===128&&(Ae=(ge&15)<<18|(nt&63)<<12|(ft&63)<<6|pt&63,(Ae<=65535||Ae>=1114112)&&(Ae=null))),Ae===null?(Ae=65533,Ge=1):Ae>65535&&(Ae-=65536,re+=String.fromCharCode(Ae>>>10&1023|55296),Ae=56320|Ae&1023),re+=String.fromCharCode(Ae),he+=Ge}return re}function ZE(R,L,U){return Xw.decode(R.subarray(L,U))}function KE(R,L,U){for(var re=0,he,ge;re55295&&he<57344)if(ge)if(he<56320){R[U++]=239,R[U++]=191,R[U++]=189,ge=he;continue}else he=ge-55296<<10|he-56320|65536,ge=null;else{he>56319||re+1===L.length?(R[U++]=239,R[U++]=191,R[U++]=189):ge=he;continue}else ge&&(R[U++]=239,R[U++]=191,R[U++]=189,ge=null);he<128?R[U++]=he:(he<2048?R[U++]=he>>6|192:(he<65536?R[U++]=he>>12|224:(R[U++]=he>>18|240,R[U++]=he>>12&63|128),R[U++]=he>>6&63|128),R[U++]=he&63|128)}return U}var Wb=3;function JE(R,L,U){R===1&&U.readMessage(QE,L)}function QE(R,L,U){if(R===3){var re=U.readMessage(tT,{}),he=re.id,ge=re.bitmap,Ae=re.width,Ge=re.height,nt=re.left,ft=re.top,pt=re.advance;L.push({id:he,bitmap:new Ki({width:Ae+2*Wb,height:Ge+2*Wb},ge),metrics:{width:Ae,height:Ge,left:nt,top:ft,advance:pt}})}}function tT(R,L,U){R===1?L.id=U.readVarint():R===2?L.bitmap=U.readBytes():R===3?L.width=U.readVarint():R===4?L.height=U.readVarint():R===5?L.left=U.readSVarint():R===6?L.top=U.readSVarint():R===7&&(L.advance=U.readVarint())}function Eg(R){return new Dd(R).readFields(JE,[])}var kg=Wb;function Xb(R){for(var L=0,U=0,re=0,he=R;re=0;Yt--){var tr=Ge[Yt];if(!(Kt.w>tr.w||Kt.h>tr.h)){if(Kt.x=tr.x,Kt.y=tr.y,ft=Math.max(ft,Kt.y+Kt.h),nt=Math.max(nt,Kt.x+Kt.w),Kt.w===tr.w&&Kt.h===tr.h){var gr=Ge.pop();Yt=0&&he>=L&&fd[this.text.charCodeAt(he)];he--)re--;this.text=this.text.substring(L,re),this.sectionIndex=this.sectionIndex.slice(L,re)},Gu.prototype.substring=function(L,U){var re=new Gu;return re.text=this.text.substring(L,U),re.sectionIndex=this.sectionIndex.slice(L,U),re.sections=this.sections,re},Gu.prototype.toString=function(){return this.text},Gu.prototype.getMaxScale=function(){var L=this;return this.sectionIndex.reduce(function(U,re){return Math.max(U,L.sections[re].scale)},0)},Gu.prototype.addTextSection=function(L,U){this.text+=L.text,this.sections.push(I0.forText(L.scale,L.fontStack||U));for(var re=this.sections.length-1,he=0;he=Kb?null:++this.imageSectionID:(this.imageSectionID=Ny,this.imageSectionID)};function rT(R,L){for(var U=[],re=R.text,he=0,ge=0,Ae=L;ge=0,pt=0,Dt=0;Dt0&&ql>Ma&&(Ma=ql)}else{var po=U[wa.fontStack],lo=po&&po[Ea];if(lo&&lo.rect)ei=lo.rect,Ei=lo.metrics;else{var as=L[wa.fontStack],hs=as&&as[Ea];if(!hs)continue;Ei=hs.metrics}Ca=(fn-wa.scale)*iu}vo?(R.verticalizable=!0,Kn.push({glyph:Ea,imageName:ho,x:Kt,y:Yt+Ca,vertical:vo,scale:wa.scale,fontStack:wa.fontStack,sectionIndex:ni,metrics:Ei,rect:ei}),Kt+=Qo*wa.scale+ft):(Kn.push({glyph:Ea,imageName:ho,x:Kt,y:Yt+Ca,vertical:vo,scale:wa.scale,fontStack:wa.fontStack,sectionIndex:ni,metrics:Ei,rect:ei}),Kt+=Ei.advance*wa.scale+ft)}if(Kn.length!==0){var Kf=Kt-ft;tr=Math.max(Kf,tr),iT(Kn,0,Kn.length-1,zr,Ma)}Kt=0;var Jf=ge*fn+Ma;ta.lineOffset=Math.max(Ma,Pn),Yt+=Jf,gr=Math.max(Jf,gr),++Er}var Su=Yt-D0,Lc=E1(Ae),Pc=Lc.horizontalAlign,ou=Lc.verticalAlign;Jb(R.positionedLines,zr,Pc,ou,tr,gr,ge,Su,he.length),R.top+=-ou*Su,R.bottom=R.top+Su,R.left+=-Pc*tr,R.right=R.left+tr}function iT(R,L,U,re,he){if(!(!re&&!he))for(var ge=R[U],Ae=ge.metrics.advance*ge.scale,Ge=(R[U].x+Ae)*re,nt=L;nt<=U;nt++)R[nt].x-=Ge,R[nt].y+=he}function Jb(R,L,U,re,he,ge,Ae,Ge,nt){var ft=(L-U)*he,pt=0;ge!==Ae?pt=-Ge*re-D0:pt=(-re*nt+.5)*Ae;for(var Dt=0,Kt=R;Dt-U/2;){if(Ae--,Ae<0)return!1;Ge-=R[Ae].dist(ge),ge=R[Ae]}Ge+=R[Ae].dist(R[Ae+1]),Ae++;for(var nt=[],ft=0;Gere;)ft-=nt.shift().angleDelta;if(ft>he)return!1;Ae++,Ge+=Dt.dist(Kt)}return!0}function t_(R){for(var L=0,U=0;Uft){var tr=(ft-nt)/Yt,gr=Yo(Dt.x,Kt.x,tr),zr=Yo(Dt.y,Kt.y,tr),Er=new rp(gr,zr,Kt.angleTo(Dt),pt);return Er._round(),!Ae||L1(R,Er,Ge,Ae,L)?Er:void 0}nt+=Yt}}function Hp(R,L,U,re,he,ge,Ae,Ge,nt){var ft=P1(re,ge,Ae),pt=np(re,he),Dt=pt*Ae,Kt=R[0].x===0||R[0].x===nt||R[0].y===0||R[0].y===nt;L-Dt=0&&rn=0&&fn=0&&Kt+ft<=pt){var Pn=new rp(rn,fn,nn,tr);Pn._round(),(!re||L1(R,Pn,ge,re,he))&&Yt.push(Pn)}}Dt+=Er}return!Ge&&!Yt.length&&!Ae&&(Yt=Lg(R,Dt/2,U,re,he,ge,Ae,!0,nt)),Yt}function Pg(R,L,U,re,he){for(var ge=[],Ae=0;Ae=re&&Dt.x>=re)&&(pt.x>=re?pt=new c(re,pt.y+(Dt.y-pt.y)*((re-pt.x)/(Dt.x-pt.x)))._round():Dt.x>=re&&(Dt=new c(re,pt.y+(Dt.y-pt.y)*((re-pt.x)/(Dt.x-pt.x)))._round()),!(pt.y>=he&&Dt.y>=he)&&(pt.y>=he?pt=new c(pt.x+(Dt.x-pt.x)*((he-pt.y)/(Dt.y-pt.y)),he)._round():Dt.y>=he&&(Dt=new c(pt.x+(Dt.x-pt.x)*((he-pt.y)/(Dt.y-pt.y)),he)._round()),(!nt||!pt.equals(nt[nt.length-1]))&&(nt=[pt],ge.push(nt)),nt.push(Dt)))))}return ge}var Lh=Cc;function sT(R,L,U,re){var he=[],ge=R.image,Ae=ge.pixelRatio,Ge=ge.paddedRect.w-2*Lh,nt=ge.paddedRect.h-2*Lh,ft=R.right-R.left,pt=R.bottom-R.top,Dt=ge.stretchX||[[0,Ge]],Kt=ge.stretchY||[[0,nt]],Yt=function(po,lo){return po+lo[1]-lo[0]},tr=Dt.reduce(Yt,0),gr=Kt.reduce(Yt,0),zr=Ge-tr,Er=nt-gr,nn=0,Hr=tr,rn=0,fn=gr,Pn=0,ta=zr,Kn=0,Ma=Er;if(ge.content&&re){var pa=ge.content;nn=jy(Dt,0,pa[0]),rn=jy(Kt,0,pa[1]),Hr=jy(Dt,pa[0],pa[2]),fn=jy(Kt,pa[1],pa[3]),Pn=pa[0]-nn,Kn=pa[1]-rn,ta=pa[2]-pa[0]-Hr,Ma=pa[3]-pa[1]-fn}var wa=function(po,lo,as,hs){var ol=D1(po.stretch-nn,Hr,ft,R.left),vl=Uy(po.fixed-Pn,ta,po.stretch,tr),Au=D1(lo.stretch-rn,fn,pt,R.top),ql=Uy(lo.fixed-Kn,Ma,lo.stretch,gr),Kf=D1(as.stretch-nn,Hr,ft,R.left),Jf=Uy(as.fixed-Pn,ta,as.stretch,tr),Su=D1(hs.stretch-rn,fn,pt,R.top),Lc=Uy(hs.fixed-Kn,Ma,hs.stretch,gr),Pc=new c(ol,Au),ou=new c(Kf,Au),Dc=new c(Kf,Su),cd=new c(ol,Su),F0=new c(vl/Ae,ql/Ae),zg=new c(Jf/Ae,Lc/Ae),Fg=L*Math.PI/180;if(Fg){var Ng=Math.sin(Fg),j1=Math.cos(Fg),vv=[j1,-Ng,Ng,j1];Pc._matMult(vv),ou._matMult(vv),cd._matMult(vv),Dc._matMult(vv)}var vT=po.stretch+po.fixed,ik=as.stretch+as.fixed,pT=lo.stretch+lo.fixed,ok=hs.stretch+hs.fixed,Fd={x:ge.paddedRect.x+Lh+vT,y:ge.paddedRect.y+Lh+pT,w:ik-vT,h:ok-pT},U1=ta/Ae/ft,gT=Ma/Ae/pt;return{tl:Pc,tr:ou,bl:cd,br:Dc,tex:Fd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:F0,pixelOffsetBR:zg,minFontScaleX:U1,minFontScaleY:gT,isSDF:U}};if(!re||!ge.stretchX&&!ge.stretchY)he.push(wa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ge+1},{fixed:0,stretch:nt+1}));else for(var ni=Dg(Dt,zr,tr),Ea=Dg(Kt,Er,gr),Ca=0;Ca0&&(tr=Math.max(10,tr),this.circleDiameter=tr)}else{var gr=Ae.top*Ge-nt,zr=Ae.bottom*Ge+nt,Er=Ae.left*Ge-nt,nn=Ae.right*Ge+nt,Hr=Ae.collisionPadding;if(Hr&&(Er-=Hr[0]*Ge,gr-=Hr[1]*Ge,nn+=Hr[2]*Ge,zr+=Hr[3]*Ge),pt){var rn=new c(Er,gr),fn=new c(nn,gr),Pn=new c(Er,zr),ta=new c(nn,zr),Kn=pt*Math.PI/180;rn._rotate(Kn),fn._rotate(Kn),Pn._rotate(Kn),ta._rotate(Kn),Er=Math.min(rn.x,fn.x,Pn.x,ta.x),nn=Math.max(rn.x,fn.x,Pn.x,ta.x),gr=Math.min(rn.y,fn.y,Pn.y,ta.y),zr=Math.max(rn.y,fn.y,Pn.y,ta.y)}L.emplaceBack(U.x,U.y,Er,gr,nn,zr,re,he,ge)}this.boxEndIndex=L.length},Ig=function(L,U){if(L===void 0&&(L=[]),U===void 0&&(U=O1),this.data=L,this.length=this.data.length,this.compare=U,this.length>0)for(var re=(this.length>>1)-1;re>=0;re--)this._down(re)};Ig.prototype.push=function(L){this.data.push(L),this.length++,this._up(this.length-1)},Ig.prototype.pop=function(){if(this.length!==0){var L=this.data[0],U=this.data.pop();return this.length--,this.length>0&&(this.data[0]=U,this._down(0)),L}},Ig.prototype.peek=function(){return this.data[0]},Ig.prototype._up=function(L){for(var U=this,re=U.data,he=U.compare,ge=re[L];L>0;){var Ae=L-1>>1,Ge=re[Ae];if(he(ge,Ge)>=0)break;re[L]=Ge,L=Ae}re[L]=ge},Ig.prototype._down=function(L){for(var U=this,re=U.data,he=U.compare,ge=this.length>>1,Ae=re[L];L=0)break;re[L]=nt,L=Ge}re[L]=Ae};function O1(R,L){return RL?1:0}function z1(R,L,U){U===void 0&&(U=!1);for(var re=1/0,he=1/0,ge=-1/0,Ae=-1/0,Ge=R[0],nt=0;ntge)&&(ge=ft.x),(!nt||ft.y>Ae)&&(Ae=ft.y)}var pt=ge-re,Dt=Ae-he,Kt=Math.min(pt,Dt),Yt=Kt/2,tr=new Ig([],lT);if(Kt===0)return new c(re,he);for(var gr=re;grEr.d||!Er.d)&&(Er=Hr,U&&console.log("found best %d after %d probes",Math.round(1e4*Hr.d)/1e4,nn)),!(Hr.max-Er.d<=L)&&(Yt=Hr.h/2,tr.push(new zd(Hr.p.x-Yt,Hr.p.y-Yt,Yt,R)),tr.push(new zd(Hr.p.x+Yt,Hr.p.y-Yt,Yt,R)),tr.push(new zd(Hr.p.x-Yt,Hr.p.y+Yt,Yt,R)),tr.push(new zd(Hr.p.x+Yt,Hr.p.y+Yt,Yt,R)),nn+=4)}return U&&(console.log("num probes: "+nn),console.log("best distance: "+Er.d)),Er.p}function lT(R,L){return L.max-R.max}function zd(R,L,U,re){this.p=new c(R,L),this.h=U,this.d=uT(this.p,re),this.max=this.d+this.h*Math.SQRT2}function uT(R,L){for(var U=!1,re=1/0,he=0;heR.y!=pt.y>R.y&&R.x<(pt.x-ft.x)*(R.y-ft.y)/(pt.y-ft.y)+ft.x&&(U=!U),re=Math.min(re,cv(R,ft,pt))}return(U?1:-1)*Math.sqrt(re)}function r_(R){for(var L=0,U=0,re=0,he=R[0],ge=0,Ae=he.length,Ge=Ae-1;ge=Vn||vv.y<0||vv.y>=Vn||kt(R,vv,j1,U,re,he,Ea,R.layers[0],R.collisionBoxArray,L.index,L.sourceLayerIndex,R.index,Er,fn,Kn,nt,Hr,Pn,Ma,Yt,L,ge,ft,pt,Ae)};if(pa==="line")for(var Ei=0,ei=Pg(L.geometry,0,0,Vn,Vn);Ei1){var Au=Up(vl,ta,U.vertical||tr,re,gr,nn);Au&&Ca(vl,Au)}}else if(L.type==="Polygon")for(var ql=0,Kf=Pb(L.geometry,0);qlve&&$(R.layerIds[0]+': Value for "text-size" is >= '+ae+'. Reduce your "text-size".')):zr.kind==="composite"&&(Er=[Od*Yt.compositeTextSizes[0].evaluate(Ae,{},tr),Od*Yt.compositeTextSizes[1].evaluate(Ae,{},tr)],(Er[0]>ve||Er[1]>ve)&&$(R.layerIds[0]+': Value for "text-size" is >= '+ae+'. Reduce your "text-size".')),R.addSymbols(R.text,gr,Er,Ge,ge,Ae,ft,L,nt.lineStartIndex,nt.lineLength,Kt,tr);for(var nn=0,Hr=pt;nnve&&$(R.layerIds[0]+': Value for "icon-size" is >= '+ae+'. Reduce your "icon-size".')):Pc.kind==="composite"&&(ou=[Od*fn.compositeIconSizes[0].evaluate(rn,{},ta),Od*fn.compositeIconSizes[1].evaluate(rn,{},ta)],(ou[0]>ve||ou[1]>ve)&&$(R.layerIds[0]+': Value for "icon-size" is >= '+ae+'. Reduce your "icon-size".')),R.addSymbols(R.icon,Su,ou,Hr,nn,rn,!1,L,pa.lineStartIndex,pa.lineLength,-1,ta),vo=R.icon.placedSymbolArray.length-1,Lc&&(ei=Lc.length*4,R.addSymbols(R.icon,Lc,ou,Hr,nn,rn,yf.vertical,L,pa.lineStartIndex,pa.lineLength,-1,ta),po=R.icon.placedSymbolArray.length-1)}for(var Dc in re.horizontal){var cd=re.horizontal[Dc];if(!wa){as=ce(cd.text);var F0=Ge.layout.get("text-rotate").evaluate(rn,{},ta);wa=new Hy(nt,L,ft,pt,Dt,cd,Kt,Yt,tr,F0)}var zg=cd.positionedLines.length===1;if(ho+=Be(R,L,cd,ge,Ge,tr,rn,gr,pa,re.vertical?yf.horizontal:yf.horizontalOnly,zg?Object.keys(re.horizontal):[Dc],lo,vo,fn,ta),zg)break}re.vertical&&(Qo+=Be(R,L,re.vertical,ge,Ge,tr,rn,gr,pa,yf.vertical,["vertical"],lo,po,fn,ta));var Fg=wa?wa.boxStartIndex:R.collisionBoxArray.length,Ng=wa?wa.boxEndIndex:R.collisionBoxArray.length,j1=Ea?Ea.boxStartIndex:R.collisionBoxArray.length,vv=Ea?Ea.boxEndIndex:R.collisionBoxArray.length,vT=ni?ni.boxStartIndex:R.collisionBoxArray.length,ik=ni?ni.boxEndIndex:R.collisionBoxArray.length,pT=Ca?Ca.boxStartIndex:R.collisionBoxArray.length,ok=Ca?Ca.boxEndIndex:R.collisionBoxArray.length,Fd=-1,U1=function(a_,ZK){return a_&&a_.circleDiameter?Math.max(a_.circleDiameter,ZK):ZK};Fd=U1(wa,Fd),Fd=U1(Ea,Fd),Fd=U1(ni,Fd),Fd=U1(Ca,Fd);var gT=Fd>-1?1:0;gT&&(Fd*=Kn/iu),R.glyphOffsetArray.length>=Sa.MAX_GLYPHS&&$("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),rn.sortKey!==void 0&&R.addToSortKeyRanges(R.symbolInstances.length,rn.sortKey),R.symbolInstances.emplaceBack(L.x,L.y,lo.right>=0?lo.right:-1,lo.center>=0?lo.center:-1,lo.left>=0?lo.left:-1,lo.vertical||-1,vo,po,as,Fg,Ng,j1,vv,vT,ik,pT,ok,ft,ho,Qo,Ei,ei,gT,0,Kt,hs,ol,Fd)}function nr(R,L,U,re){var he=R.compareText;if(!(L in he))he[L]=[];else for(var ge=he[L],Ae=ge.length-1;Ae>=0;Ae--)if(re.dist(ge[Ae])0)&&(Ae.value.kind!=="constant"||Ae.value.value.length>0),pt=nt.value.kind!=="constant"||!!nt.value.value||Object.keys(nt.parameters).length>0,Dt=ge.get("symbol-sort-key");if(this.features=[],!(!ft&&!pt)){for(var Kt=U.iconDependencies,Yt=U.glyphDependencies,tr=U.availableImages,gr=new yi(this.zoom),zr=0,Er=L;zr=0;for(var Qo=0,vo=Ma.sections;Qo=0;nt--)Ae[nt]={x:U[nt].x,y:U[nt].y,tileUnitDistanceFromAnchor:ge},nt>0&&(ge+=U[nt-1].dist(U[nt]));for(var ft=0;ft0},Sa.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Sa.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Sa.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Sa.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Sa.prototype.addIndicesForPlacedSymbol=function(L,U){for(var re=L.placedSymbolArray.get(U),he=re.vertexStartIndex+re.numGlyphs*4,ge=re.vertexStartIndex;ge1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(L),this.sortedAngle=L,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var re=0,he=this.symbolInstanceIndexes;re=0&&ft.indexOf(Ge)===nt&&U.addIndicesForPlacedSymbol(U.text,Ge)}),Ae.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ae.verticalPlacedTextSymbolIndex),Ae.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ae.placedIconSymbolIndex),Ae.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ae.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},at("SymbolBucket",Sa,{omit:["layers","collisionBoxArray","features","compareText"]}),Sa.MAX_GLYPHS=65535,Sa.addDynamicAttributes=Yn;function _s(R,L){return L.replace(/{([^{}]+)}/g,function(U,re){return re in R?String(R[re]):""})}var Jr=new Wn({"symbol-placement":new Mr(dn.layout_symbol["symbol-placement"]),"symbol-spacing":new Mr(dn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Mr(dn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Lr(dn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Mr(dn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Mr(dn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Mr(dn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Mr(dn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Mr(dn.layout_symbol["icon-rotation-alignment"]),"icon-size":new Lr(dn.layout_symbol["icon-size"]),"icon-text-fit":new Mr(dn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Mr(dn.layout_symbol["icon-text-fit-padding"]),"icon-image":new Lr(dn.layout_symbol["icon-image"]),"icon-rotate":new Lr(dn.layout_symbol["icon-rotate"]),"icon-padding":new Mr(dn.layout_symbol["icon-padding"]),"icon-keep-upright":new Mr(dn.layout_symbol["icon-keep-upright"]),"icon-offset":new Lr(dn.layout_symbol["icon-offset"]),"icon-anchor":new Lr(dn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Mr(dn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Mr(dn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Mr(dn.layout_symbol["text-rotation-alignment"]),"text-field":new Lr(dn.layout_symbol["text-field"]),"text-font":new Lr(dn.layout_symbol["text-font"]),"text-size":new Lr(dn.layout_symbol["text-size"]),"text-max-width":new Lr(dn.layout_symbol["text-max-width"]),"text-line-height":new Mr(dn.layout_symbol["text-line-height"]),"text-letter-spacing":new Lr(dn.layout_symbol["text-letter-spacing"]),"text-justify":new Lr(dn.layout_symbol["text-justify"]),"text-radial-offset":new Lr(dn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Mr(dn.layout_symbol["text-variable-anchor"]),"text-anchor":new Lr(dn.layout_symbol["text-anchor"]),"text-max-angle":new Mr(dn.layout_symbol["text-max-angle"]),"text-writing-mode":new Mr(dn.layout_symbol["text-writing-mode"]),"text-rotate":new Lr(dn.layout_symbol["text-rotate"]),"text-padding":new Mr(dn.layout_symbol["text-padding"]),"text-keep-upright":new Mr(dn.layout_symbol["text-keep-upright"]),"text-transform":new Lr(dn.layout_symbol["text-transform"]),"text-offset":new Lr(dn.layout_symbol["text-offset"]),"text-allow-overlap":new Mr(dn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Mr(dn.layout_symbol["text-ignore-placement"]),"text-optional":new Mr(dn.layout_symbol["text-optional"])}),qr=new Wn({"icon-opacity":new Lr(dn.paint_symbol["icon-opacity"]),"icon-color":new Lr(dn.paint_symbol["icon-color"]),"icon-halo-color":new Lr(dn.paint_symbol["icon-halo-color"]),"icon-halo-width":new Lr(dn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Lr(dn.paint_symbol["icon-halo-blur"]),"icon-translate":new Mr(dn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Mr(dn.paint_symbol["icon-translate-anchor"]),"text-opacity":new Lr(dn.paint_symbol["text-opacity"]),"text-color":new Lr(dn.paint_symbol["text-color"],{runtimeType:cu,getOverride:function(R){return R.textColor},hasOverride:function(R){return!!R.textColor}}),"text-halo-color":new Lr(dn.paint_symbol["text-halo-color"]),"text-halo-width":new Lr(dn.paint_symbol["text-halo-width"]),"text-halo-blur":new Lr(dn.paint_symbol["text-halo-blur"]),"text-translate":new Mr(dn.paint_symbol["text-translate"]),"text-translate-anchor":new Mr(dn.paint_symbol["text-translate-anchor"])}),sn={paint:qr,layout:Jr},Bn=function(L){this.type=L.property.overrides?L.property.overrides.runtimeType:ao,this.defaultValue=L};Bn.prototype.evaluate=function(L){if(L.formattedSection){var U=this.defaultValue.property.overrides;if(U&&U.hasOverride(L.formattedSection))return U.getOverride(L.formattedSection)}return L.feature&&L.featureState?this.defaultValue.evaluate(L.feature,L.featureState):this.defaultValue.property.specification.default},Bn.prototype.eachChild=function(L){if(!this.defaultValue.isConstant()){var U=this.defaultValue.value;L(U._styleExpression.expression)}},Bn.prototype.outputDefined=function(){return!1},Bn.prototype.serialize=function(){return null},at("FormatSectionOverride",Bn,{omit:["defaultValue"]});var hi=(function(R){function L(U){R.call(this,U,sn)}return R&&(L.__proto__=R),L.prototype=Object.create(R&&R.prototype),L.prototype.constructor=L,L.prototype.recalculate=function(re,he){if(R.prototype.recalculate.call(this,re,he),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var ge=this.layout.get("text-writing-mode");if(ge){for(var Ae=[],Ge=0,nt=ge;Ge",targetMapId:he,sourceMapId:Ae.mapId})}}},B1.prototype.receive=function(L){var U=L.data,re=U.id;if(re&&!(U.targetMapId&&this.mapId!==U.targetMapId))if(U.type===""){delete this.tasks[re];var he=this.cancelCallbacks[re];delete this.cancelCallbacks[re],he&&he()}else te()||U.mustQueue?(this.tasks[re]=U,this.taskQueue.push(re),this.invoker.trigger()):this.processTask(re,U)},B1.prototype.process=function(){if(this.taskQueue.length){var L=this.taskQueue.shift(),U=this.tasks[L];delete this.tasks[L],this.taskQueue.length&&this.invoker.trigger(),U&&this.processTask(L,U)}},B1.prototype.processTask=function(L,U){var re=this;if(U.type===""){var he=this.callbacks[L];delete this.callbacks[L],he&&(U.error?he(ir(U.error)):he(null,ir(U.data)))}else{var ge=!1,Ae=j(this.globalScope)?void 0:[],Ge=U.hasCallback?function(Kt,Yt){ge=!0,delete re.cancelCallbacks[L],re.target.postMessage({id:L,type:"",sourceMapId:re.mapId,error:Kt?ar(Kt):null,data:ar(Yt,Ae)},Ae)}:function(Kt){ge=!0},nt=null,ft=ir(U.data);if(this.parent[U.type])nt=this.parent[U.type](U.sourceMapId,ft,Ge);else if(this.parent.getWorkerSource){var pt=U.type.split("."),Dt=this.parent.getWorkerSource(U.sourceMapId,pt[0],ft.source);nt=Dt[pt[1]](ft,Ge)}else Ge(new Error("Could not find function "+U.type));!ge&&nt&&nt.cancel&&(this.cancelCallbacks[L]=nt.cancel)}},B1.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function YDe(R,L,U){L=Math.pow(2,U)-L-1;var re=BK(R*256,L*256,U),he=BK((R+1)*256,(L+1)*256,U);return re[0]+","+re[1]+","+he[0]+","+he[1]}function BK(R,L,U){var re=2*Math.PI*6378137/256/Math.pow(2,U),he=R*re-2*Math.PI*6378137/2,ge=L*re-2*Math.PI*6378137/2;return[he,ge]}var Nl=function(L,U){L&&(U?this.setSouthWest(L).setNorthEast(U):L.length===4?this.setSouthWest([L[0],L[1]]).setNorthEast([L[2],L[3]]):this.setSouthWest(L[0]).setNorthEast(L[1]))};Nl.prototype.setNorthEast=function(L){return this._ne=L instanceof Cs?new Cs(L.lng,L.lat):Cs.convert(L),this},Nl.prototype.setSouthWest=function(L){return this._sw=L instanceof Cs?new Cs(L.lng,L.lat):Cs.convert(L),this},Nl.prototype.extend=function(L){var U=this._sw,re=this._ne,he,ge;if(L instanceof Cs)he=L,ge=L;else if(L instanceof Nl){if(he=L._sw,ge=L._ne,!he||!ge)return this}else{if(Array.isArray(L))if(L.length===4||L.every(Array.isArray)){var Ae=L;return this.extend(Nl.convert(Ae))}else{var Ge=L;return this.extend(Cs.convert(Ge))}return this}return!U&&!re?(this._sw=new Cs(he.lng,he.lat),this._ne=new Cs(ge.lng,ge.lat)):(U.lng=Math.min(he.lng,U.lng),U.lat=Math.min(he.lat,U.lat),re.lng=Math.max(ge.lng,re.lng),re.lat=Math.max(ge.lat,re.lat)),this},Nl.prototype.getCenter=function(){return new Cs((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Nl.prototype.getSouthWest=function(){return this._sw},Nl.prototype.getNorthEast=function(){return this._ne},Nl.prototype.getNorthWest=function(){return new Cs(this.getWest(),this.getNorth())},Nl.prototype.getSouthEast=function(){return new Cs(this.getEast(),this.getSouth())},Nl.prototype.getWest=function(){return this._sw.lng},Nl.prototype.getSouth=function(){return this._sw.lat},Nl.prototype.getEast=function(){return this._ne.lng},Nl.prototype.getNorth=function(){return this._ne.lat},Nl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Nl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Nl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Nl.prototype.contains=function(L){var U=Cs.convert(L),re=U.lng,he=U.lat,ge=this._sw.lat<=he&&he<=this._ne.lat,Ae=this._sw.lng<=re&&re<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ae=this._sw.lng>=re&&re>=this._ne.lng),ge&&Ae},Nl.convert=function(L){return!L||L instanceof Nl?L:new Nl(L)};var qK=63710088e-1,Cs=function(L,U){if(isNaN(L)||isNaN(U))throw new Error("Invalid LngLat object: ("+L+", "+U+")");if(this.lng=+L,this.lat=+U,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Cs.prototype.wrap=function(){return new Cs(T(this.lng,-180,180),this.lat)},Cs.prototype.toArray=function(){return[this.lng,this.lat]},Cs.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Cs.prototype.distanceTo=function(L){var U=Math.PI/180,re=this.lat*U,he=L.lat*U,ge=Math.sin(re)*Math.sin(he)+Math.cos(re)*Math.cos(he)*Math.cos((L.lng-this.lng)*U),Ae=qK*Math.acos(Math.min(ge,1));return Ae},Cs.prototype.toBounds=function(L){L===void 0&&(L=0);var U=40075017,re=360*L/U,he=re/Math.cos(Math.PI/180*this.lat);return new Nl(new Cs(this.lng-he,this.lat-re),new Cs(this.lng+he,this.lat+re))},Cs.convert=function(L){if(L instanceof Cs)return L;if(Array.isArray(L)&&(L.length===2||L.length===3))return new Cs(Number(L[0]),Number(L[1]));if(!Array.isArray(L)&&typeof L=="object"&&L!==null)return new Cs(Number("lng"in L?L.lng:L.lon),Number(L.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var jK=2*Math.PI*qK;function UK(R){return jK*Math.cos(R*Math.PI/180)}function HK(R){return(180+R)/360}function GK(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function VK(R,L){return R/UK(L)}function $De(R){return R*360-180}function nk(R){var L=180-R*360;return 360/Math.PI*Math.atan(Math.exp(L*Math.PI/180))-90}function WDe(R,L){return R*UK(nk(L))}function XDe(R){return 1/Math.cos(R*Math.PI/180)}var Vy=function(L,U,re){re===void 0&&(re=0),this.x=+L,this.y=+U,this.z=+re};Vy.fromLngLat=function(L,U){U===void 0&&(U=0);var re=Cs.convert(L);return new Vy(HK(re.lng),GK(re.lat),VK(U,re.lat))},Vy.prototype.toLngLat=function(){return new Cs($De(this.x),nk(this.y))},Vy.prototype.toAltitude=function(){return WDe(this.z,this.y)},Vy.prototype.meterInMercatorCoordinateUnits=function(){return 1/jK*XDe(nk(this.y))};var Yy=function(L,U,re){this.z=L,this.x=U,this.y=re,this.key=n_(0,L,L,U,re)};Yy.prototype.equals=function(L){return this.z===L.z&&this.x===L.x&&this.y===L.y},Yy.prototype.url=function(L,U){var re=YDe(this.x,this.y,this.z),he=ZDe(this.z,this.x,this.y);return L[(this.x+this.y)%L.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(U==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",he).replace("{bbox-epsg-3857}",re)},Yy.prototype.getTilePoint=function(L){var U=Math.pow(2,this.z);return new c((L.x*U-this.x)*Vn,(L.y*U-this.y)*Vn)},Yy.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var YK=function(L,U){this.wrap=L,this.canonical=U,this.key=n_(L,U.z,U.z,U.x,U.y)},Bl=function(L,U,re,he,ge){this.overscaledZ=L,this.wrap=U,this.canonical=new Yy(re,+he,+ge),this.key=n_(U,L,re,he,ge)};Bl.prototype.equals=function(L){return this.overscaledZ===L.overscaledZ&&this.wrap===L.wrap&&this.canonical.equals(L.canonical)},Bl.prototype.scaledTo=function(L){var U=this.canonical.z-L;return L>this.canonical.z?new Bl(L,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Bl(L,this.wrap,L,this.canonical.x>>U,this.canonical.y>>U)},Bl.prototype.calculateScaledKey=function(L,U){var re=this.canonical.z-L;return L>this.canonical.z?n_(this.wrap*+U,L,this.canonical.z,this.canonical.x,this.canonical.y):n_(this.wrap*+U,L,L,this.canonical.x>>re,this.canonical.y>>re)},Bl.prototype.isChildOf=function(L){if(L.wrap!==this.wrap)return!1;var U=this.canonical.z-L.canonical.z;return L.overscaledZ===0||L.overscaledZ>U&&L.canonical.y===this.canonical.y>>U},Bl.prototype.children=function(L){if(this.overscaledZ>=L)return[new Bl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var U=this.canonical.z+1,re=this.canonical.x*2,he=this.canonical.y*2;return[new Bl(U,this.wrap,U,re,he),new Bl(U,this.wrap,U,re+1,he),new Bl(U,this.wrap,U,re,he+1),new Bl(U,this.wrap,U,re+1,he+1)]},Bl.prototype.isLessThan=function(L){return this.wrapL.wrap?!1:this.overscaledZL.overscaledZ?!1:this.canonical.xL.canonical.x?!1:this.canonical.y0;ge--)he=1<=this.dim+1||U<-1||U>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(U+1)*this.stride+(L+1)},O0.prototype._unpackMapbox=function(L,U,re){return(L*256*256+U*256+re)/10-1e4},O0.prototype._unpackTerrarium=function(L,U,re){return L*256+U+re/256-32768},O0.prototype.getPixels=function(){return new Mi({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},O0.prototype.backfillBorder=function(L,U,re){if(this.dim!==L.dim)throw new Error("dem dimension mismatch");var he=U*this.dim,ge=U*this.dim+this.dim,Ae=re*this.dim,Ge=re*this.dim+this.dim;switch(U){case-1:he=ge-1;break;case 1:ge=he+1;break}switch(re){case-1:Ae=Ge-1;break;case 1:Ge=Ae+1;break}for(var nt=-U*this.dim,ft=-re*this.dim,pt=Ae;pt=0&&Dt[3]>=0&&nt.insert(Ge,Dt[0],Dt[1],Dt[2],Dt[3])}},z0.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new dv.VectorTile(new Dd(this.rawTileData)).layers,this.sourceLayerCoder=new hT(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},z0.prototype.query=function(L,U,re,he){var ge=this;this.loadVTLayers();for(var Ae=L.params||{},Ge=Vn/L.tileSize/L.scale,nt=bh(Ae.filter),ft=L.queryGeometry,pt=L.queryPadding*Ge,Dt=WK(ft),Kt=this.grid.query(Dt.minX-pt,Dt.minY-pt,Dt.maxX+pt,Dt.maxY+pt),Yt=WK(L.cameraQueryGeometry),tr=this.grid3D.query(Yt.minX-pt,Yt.minY-pt,Yt.maxX+pt,Yt.maxY+pt,function(Pn,ta,Kn,Ma){return Ah(L.cameraQueryGeometry,Pn-pt,ta-pt,Kn+pt,Ma+pt)}),gr=0,zr=tr;grhe)ge=!1;else if(!U)ge=!0;else if(this.expirationTime=Cr.maxzoom)&&Cr.visibility!=="none"){v(Pr,this.zoom,wt);var Zr=Ne[Cr.id]=Cr.createBucket({index:Ue.bucketLayerIDs.length,layers:Pr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Qt,sourceID:this.source});Zr.populate(Xt,At,this.tileID.canonical),Ue.bucketLayerIDs.push(Pr.map(function(Ln){return Ln.id}))}}}}var jr,Sn,Fn,ea,An=a.mapObject(At.glyphDependencies,function(Ln){return Object.keys(Ln).map(Number)});Object.keys(An).length?Ft.send("getGlyphs",{uid:this.uid,stacks:An},function(Ln,oa){jr||(jr=Ln,Sn=oa,ua.call(cr))}):Sn={};var Hn=Object.keys(At.iconDependencies);Hn.length?Ft.send("getImages",{icons:Hn,source:this.source,tileID:this.tileID,type:"icons"},function(Ln,oa){jr||(jr=Ln,Fn=oa,ua.call(cr))}):Fn={};var In=Object.keys(At.patternDependencies);In.length?Ft.send("getImages",{icons:In,source:this.source,tileID:this.tileID,type:"patterns"},function(Ln,oa){jr||(jr=Ln,ea=oa,ua.call(cr))}):ea={},ua.call(this);function ua(){if(jr)return er(jr);if(Sn&&Fn&&ea){var Ln=new h(Sn),oa=new a.ImageAtlas(Fn,ea);for(var Ta in Ne){var ba=Ne[Ta];ba instanceof a.SymbolBucket?(v(ba.layers,this.zoom,wt),a.performSymbolLayout(ba,Sn,Ln.positions,Fn,oa.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ba.hasPattern&&(ba instanceof a.LineBucket||ba instanceof a.FillBucket||ba instanceof a.FillExtrusionBucket)&&(v(ba.layers,this.zoom,wt),ba.addFeatures(At,this.tileID.canonical,oa.patternPositions))}this.status="done",er(null,{buckets:a.values(Ne).filter(function(Da){return!Da.isEmpty()}),featureIndex:Ue,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ln.image,imageAtlas:oa,glyphMap:this.returnDependencies?Sn:null,iconMap:this.returnDependencies?Fn:null,glyphPositions:this.returnDependencies?Ln.positions:null})}}};function v(bt,tt,yt){for(var wt=new a.EvaluationParameters(tt),Ft=0,er=bt;Ft=0!=!!tt&&bt.reverse()}var M=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(tt){this._feature=tt,this.extent=a.EXTENT,this.type=tt.type,this.properties=tt.tags,"id"in tt&&!isNaN(tt.id)&&(this.id=parseInt(tt.id,10))};w.prototype.loadGeometry=function(){if(this._feature.type===1){for(var tt=[],yt=0,wt=this._feature.geometry;yt"u"&&(wt.push(lr),Ue=wt.length-1,er[lr]=Ue),tt.writeVarint(Ue);var Ne=yt.properties[lr],At=typeof Ne;At!=="string"&&At!=="boolean"&&At!=="number"&&(Ne=JSON.stringify(Ne));var Rt=At+":"+Ne,Ct=cr[Rt];typeof Ct>"u"&&(Ft.push(Ne),Ct=Ft.length-1,cr[Rt]=Ct),tt.writeVarint(Ct)}}function J(bt,tt){return(tt<<3)+(bt&7)}function ne(bt){return bt<<1^bt>>31}function te(bt,tt){for(var yt=bt.loadGeometry(),wt=bt.type,Ft=0,er=0,cr=yt.length,lr=0;lr>1;j(bt,tt,cr,wt,Ft,er%2),G(bt,tt,yt,wt,cr-1,er+1),G(bt,tt,yt,cr+1,Ft,er+1)}}function j(bt,tt,yt,wt,Ft,er){for(;Ft>wt;){if(Ft-wt>600){var cr=Ft-wt+1,lr=yt-wt+1,Ue=Math.log(cr),Ne=.5*Math.exp(2*Ue/3),At=.5*Math.sqrt(Ue*Ne*(cr-Ne)/cr)*(lr-cr/2<0?-1:1),Rt=Math.max(wt,Math.floor(yt-lr*Ne/cr+At)),Ct=Math.min(Ft,Math.floor(yt+(cr-lr)*Ne/cr+At));j(bt,tt,yt,Rt,Ct,er)}var Wt=tt[2*yt+er],Qt=wt,Xt=Ft;for(Y(bt,tt,wt,yt),tt[2*Ft+er]>Wt&&Y(bt,tt,wt,Ft);QtWt;)Xt--}tt[2*wt+er]===Wt?Y(bt,tt,wt,Xt):(Xt++,Y(bt,tt,Xt,Ft)),Xt<=yt&&(wt=Xt+1),yt<=Xt&&(Ft=Xt-1)}}function Y(bt,tt,yt,wt){K(bt,yt,wt),K(tt,2*yt,2*wt),K(tt,2*yt+1,2*wt+1)}function K(bt,tt,yt){var wt=bt[tt];bt[tt]=bt[yt],bt[yt]=wt}function X(bt,tt,yt,wt,Ft,er,cr){for(var lr=[0,bt.length-1,0],Ue=[],Ne,At;lr.length;){var Rt=lr.pop(),Ct=lr.pop(),Wt=lr.pop();if(Ct-Wt<=cr){for(var Qt=Wt;Qt<=Ct;Qt++)Ne=tt[2*Qt],At=tt[2*Qt+1],Ne>=yt&&Ne<=Ft&&At>=wt&&At<=er&&Ue.push(bt[Qt]);continue}var Xt=Math.floor((Wt+Ct)/2);Ne=tt[2*Xt],At=tt[2*Xt+1],Ne>=yt&&Ne<=Ft&&At>=wt&&At<=er&&Ue.push(bt[Xt]);var $t=(Rt+1)%2;(Rt===0?yt<=Ne:wt<=At)&&(lr.push(Wt),lr.push(Xt-1),lr.push($t)),(Rt===0?Ft>=Ne:er>=At)&&(lr.push(Xt+1),lr.push(Ct),lr.push($t))}return Ue}function ee(bt,tt,yt,wt,Ft,er){for(var cr=[0,bt.length-1,0],lr=[],Ue=Ft*Ft;cr.length;){var Ne=cr.pop(),At=cr.pop(),Rt=cr.pop();if(At-Rt<=er){for(var Ct=Rt;Ct<=At;Ct++)le(tt[2*Ct],tt[2*Ct+1],yt,wt)<=Ue&&lr.push(bt[Ct]);continue}var Wt=Math.floor((Rt+At)/2),Qt=tt[2*Wt],Xt=tt[2*Wt+1];le(Qt,Xt,yt,wt)<=Ue&&lr.push(bt[Wt]);var $t=(Ne+1)%2;(Ne===0?yt-Ft<=Qt:wt-Ft<=Xt)&&(cr.push(Rt),cr.push(Wt-1),cr.push($t)),(Ne===0?yt+Ft>=Qt:wt+Ft>=Xt)&&(cr.push(Wt+1),cr.push(At),cr.push($t))}return lr}function le(bt,tt,yt,wt){var Ft=bt-yt,er=tt-wt;return Ft*Ft+er*er}var oe=function(bt){return bt[0]},fe=function(bt){return bt[1]},de=function(tt,yt,wt,Ft,er){yt===void 0&&(yt=oe),wt===void 0&&(wt=fe),Ft===void 0&&(Ft=64),er===void 0&&(er=Float64Array),this.nodeSize=Ft,this.points=tt;for(var cr=tt.length<65536?Uint16Array:Uint32Array,lr=this.ids=new cr(tt.length),Ue=this.coords=new er(tt.length*2),Ne=0;Ne=Ft;At--){var Rt=+Date.now();Ue=this._cluster(Ue,At),this.trees[At]=new de(Ue,Qe,De,cr,Float32Array),wt&&console.log("z%d: %d clusters in %dms",At,Ue.length,+Date.now()-Rt)}return wt&&console.timeEnd("total time"),this},we.prototype.getClusters=function(tt,yt){var wt=((tt[0]+180)%360+360)%360-180,Ft=Math.max(-90,Math.min(90,tt[1])),er=tt[2]===180?180:((tt[2]+180)%360+360)%360-180,cr=Math.max(-90,Math.min(90,tt[3]));if(tt[2]-tt[0]>=360)wt=-180,er=180;else if(wt>er){var lr=this.getClusters([wt,Ft,180,cr],yt),Ue=this.getClusters([-180,Ft,er,cr],yt);return lr.concat(Ue)}for(var Ne=this.trees[this._limitZoom(yt)],At=Ne.range(Ee(wt),Le(cr),Ee(er),Le(Ft)),Rt=[],Ct=0,Wt=At;Ctyt&&(Xt+=mr.numPoints||1)}if(Xt>=Ue){for(var br=Rt.x*Qt,Pr=Rt.y*Qt,Cr=lr&&Qt>1?this._map(Rt,!0):null,Zr=(At<<5)+(yt+1)+this.points.length,jr=0,Sn=Wt;jr1)for(var Hn=0,In=Wt;Hn>5},we.prototype._getOriginZoom=function(tt){return(tt-this.points.length)%32},we.prototype._map=function(tt,yt){if(tt.numPoints)return yt?We({},tt.properties):tt.properties;var wt=this.points[tt.index].properties,Ft=this.options.map(wt);return yt&&Ft===wt?We({},Ft):Ft};function Oe(bt,tt,yt,wt,Ft){return{x:bt,y:tt,zoom:1/0,id:yt,parentId:-1,numPoints:wt,properties:Ft}}function be(bt,tt){var yt=bt.geometry.coordinates,wt=yt[0],Ft=yt[1];return{x:Ee(wt),y:Le(Ft),zoom:1/0,index:tt,parentId:-1}}function Te(bt){return{type:"Feature",id:bt.id,properties:ke(bt),geometry:{type:"Point",coordinates:[Fe(bt.x),qe(bt.y)]}}}function ke(bt){var tt=bt.numPoints,yt=tt>=1e4?Math.round(tt/1e3)+"k":tt>=1e3?Math.round(tt/100)/10+"k":tt;return We(We({},bt.properties),{cluster:!0,cluster_id:bt.id,point_count:tt,point_count_abbreviated:yt})}function Ee(bt){return bt/360+.5}function Le(bt){var tt=Math.sin(bt*Math.PI/180),yt=.5-.25*Math.log((1+tt)/(1-tt))/Math.PI;return yt<0?0:yt>1?1:yt}function Fe(bt){return(bt-.5)*360}function qe(bt){var tt=(180-bt*360)*Math.PI/180;return 360*Math.atan(Math.exp(tt))/Math.PI-90}function We(bt,tt){for(var yt in tt)bt[yt]=tt[yt];return bt}function Qe(bt){return bt.x}function De(bt){return bt.y}function me(bt,tt,yt,wt){for(var Ft=wt,er=yt-tt>>1,cr=yt-tt,lr,Ue=bt[tt],Ne=bt[tt+1],At=bt[yt],Rt=bt[yt+1],Ct=tt+3;CtFt)lr=Ct,Ft=Wt;else if(Wt===Ft){var Qt=Math.abs(Ct-er);Qtwt&&(lr-tt>3&&me(bt,tt,lr,wt),bt[lr+2]=Ft,yt-lr>3&&me(bt,lr,yt,wt))}function Ce(bt,tt,yt,wt,Ft,er){var cr=Ft-yt,lr=er-wt;if(cr!==0||lr!==0){var Ue=((bt-yt)*cr+(tt-wt)*lr)/(cr*cr+lr*lr);Ue>1?(yt=Ft,wt=er):Ue>0&&(yt+=cr*Ue,wt+=lr*Ue)}return cr=bt-yt,lr=tt-wt,cr*cr+lr*lr}function et(bt,tt,yt,wt){var Ft={id:typeof bt>"u"?null:bt,type:tt,geometry:yt,tags:wt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return st(Ft),Ft}function st(bt){var tt=bt.geometry,yt=bt.type;if(yt==="Point"||yt==="MultiPoint"||yt==="LineString")ot(bt,tt);else if(yt==="Polygon"||yt==="MultiLineString")for(var wt=0;wt0&&(wt?cr+=(Ft*Ne-Ue*er)/2:cr+=Math.sqrt(Math.pow(Ue-Ft,2)+Math.pow(Ne-er,2))),Ft=Ue,er=Ne}var At=tt.length-3;tt[2]=1,me(tt,0,At,yt),tt[At+2]=1,tt.size=Math.abs(cr),tt.start=0,tt.end=tt.size}function Jt(bt,tt,yt,wt){for(var Ft=0;Ft1?1:yt}function gt(bt,tt,yt,wt,Ft,er,cr,lr){if(yt/=tt,wt/=tt,er>=yt&&cr=wt)return null;for(var Ue=[],Ne=0;Ne=yt&&Qt=wt)continue;var Xt=[];if(Ct==="Point"||Ct==="MultiPoint")mt(Rt,Xt,yt,wt,Ft);else if(Ct==="LineString")He(Rt,Xt,yt,wt,Ft,!1,lr.lineMetrics);else if(Ct==="MultiLineString")je(Rt,Xt,yt,wt,Ft,!1);else if(Ct==="Polygon")je(Rt,Xt,yt,wt,Ft,!0);else if(Ct==="MultiPolygon")for(var $t=0;$t=yt&&cr<=wt&&(tt.push(bt[er]),tt.push(bt[er+1]),tt.push(bt[er+2]))}}function He(bt,tt,yt,wt,Ft,er,cr){for(var lr=Ie(bt),Ue=Ft===0?ye:Se,Ne=bt.start,At,Rt,Ct=0;Ctyt&&(Rt=Ue(lr,Wt,Qt,$t,ur,yt),cr&&(lr.start=Ne+At*Rt)):fr>wt?mr=yt&&(Rt=Ue(lr,Wt,Qt,$t,ur,yt),br=!0),mr>wt&&fr<=wt&&(Rt=Ue(lr,Wt,Qt,$t,ur,wt),br=!0),!er&&br&&(cr&&(lr.end=Ne+At*Rt),tt.push(lr),lr=Ie(bt)),cr&&(Ne+=At)}var Pr=bt.length-3;Wt=bt[Pr],Qt=bt[Pr+1],Xt=bt[Pr+2],fr=Ft===0?Wt:Qt,fr>=yt&&fr<=wt&&pe(lr,Wt,Qt,Xt),Pr=lr.length-3,er&&Pr>=3&&(lr[Pr]!==lr[0]||lr[Pr+1]!==lr[1])&&pe(lr,lr[0],lr[1],lr[2]),lr.length&&tt.push(lr)}function Ie(bt){var tt=[];return tt.size=bt.size,tt.start=bt.start,tt.end=bt.end,tt}function je(bt,tt,yt,wt,Ft,er){for(var cr=0;crcr.maxX&&(cr.maxX=At),Rt>cr.maxY&&(cr.maxY=Rt)}return cr}function qt(bt,tt,yt,wt){var Ft=tt.geometry,er=tt.type,cr=[];if(er==="Point"||er==="MultiPoint")for(var lr=0;lr0&&tt.size<(Ft?cr:wt)){yt.numPoints+=tt.length/3;return}for(var lr=[],Ue=0;Uecr)&&(yt.numSimplified++,lr.push(tt[Ue]),lr.push(tt[Ue+1])),yt.numPoints++;Ft&&_r(lr,er),bt.push(lr)}function _r(bt,tt){for(var yt=0,wt=0,Ft=bt.length,er=Ft-2;wt0===tt)for(wt=0,Ft=bt.length;wt24)throw new Error("maxZoom should be in the 0-24 range");if(tt.promoteId&&tt.generateId)throw new Error("promoteId and generateId cannot be used together.");var wt=ut(bt,tt);this.tiles={},this.tileCoords=[],yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",tt.indexMaxZoom,tt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),wt=Pe(wt,tt),wt.length&&this.splitTile(wt,0,0,0),yt&&(wt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}an.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},an.prototype.splitTile=function(bt,tt,yt,wt,Ft,er,cr){for(var lr=[bt,tt,yt,wt],Ue=this.options,Ne=Ue.debug;lr.length;){wt=lr.pop(),yt=lr.pop(),tt=lr.pop(),bt=lr.pop();var At=1<1&&console.time("creation"),Ct=this.tiles[Rt]=It(bt,tt,yt,wt,Ue),this.tileCoords.push({z:tt,x:yt,y:wt}),Ne)){Ne>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",tt,yt,wt,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));var Wt="z"+tt;this.stats[Wt]=(this.stats[Wt]||0)+1,this.total++}if(Ct.source=bt,Ft){if(tt===Ue.maxZoom||tt===Ft)continue;var Qt=1<1&&console.time("clipping");var Xt=.5*Ue.buffer/Ue.extent,$t=.5-Xt,ur=.5+Xt,fr=1+Xt,mr,br,Pr,Cr,Zr,jr;mr=br=Pr=Cr=null,Zr=gt(bt,At,yt-Xt,yt+ur,0,Ct.minX,Ct.maxX,Ue),jr=gt(bt,At,yt+$t,yt+fr,0,Ct.minX,Ct.maxX,Ue),bt=null,Zr&&(mr=gt(Zr,At,wt-Xt,wt+ur,1,Ct.minY,Ct.maxY,Ue),br=gt(Zr,At,wt+$t,wt+fr,1,Ct.minY,Ct.maxY,Ue),Zr=null),jr&&(Pr=gt(jr,At,wt-Xt,wt+ur,1,Ct.minY,Ct.maxY,Ue),Cr=gt(jr,At,wt+$t,wt+fr,1,Ct.minY,Ct.maxY,Ue),jr=null),Ne>1&&console.timeEnd("clipping"),lr.push(mr||[],tt+1,yt*2,wt*2),lr.push(br||[],tt+1,yt*2,wt*2+1),lr.push(Pr||[],tt+1,yt*2+1,wt*2),lr.push(Cr||[],tt+1,yt*2+1,wt*2+1)}}},an.prototype.getTile=function(bt,tt,yt){var wt=this.options,Ft=wt.extent,er=wt.debug;if(bt<0||bt>24)return null;var cr=1<1&&console.log("drilling down to z%d-%d-%d",bt,tt,yt);for(var Ue=bt,Ne=tt,At=yt,Rt;!Rt&&Ue>0;)Ue--,Ne=Math.floor(Ne/2),At=Math.floor(At/2),Rt=this.tiles[Br(Ue,Ne,At)];return!Rt||!Rt.source?null:(er>1&&console.log("found parent tile z%d-%d-%d",Ue,Ne,At),er>1&&console.time("drilling down"),this.splitTile(Rt.source,Ue,Ne,At,bt,tt,yt),er>1&&console.timeEnd("drilling down"),this.tiles[lr]?Pt(this.tiles[lr],Ft):null)};function Br(bt,tt,yt){return((1<=0?0:ue.button},i.remove=function(ue){ue.parentNode&&ue.parentNode.removeChild(ue)};function y(ue,H,ie){var W,ce,Me,ze=a.browser.devicePixelRatio>1?"@2x":"",$e=a.getJSON(H.transformRequest(H.normalizeSpriteURL(ue,ze,".json"),a.ResourceType.SpriteJSON),function(lt,_t){$e=null,Me||(Me=lt,W=_t,Je())}),Ye=a.getImage(H.transformRequest(H.normalizeSpriteURL(ue,ze,".png"),a.ResourceType.SpriteImage),function(lt,_t){Ye=null,Me||(Me=lt,ce=_t,Je())});function Je(){if(Me)ie(Me);else if(W&&ce){var lt=a.browser.getImageData(ce),_t={};for(var xt in W){var Ot=W[xt],Ut=Ot.width,jt=Ot.height,Mt=Ot.x,zt=Ot.y,Nt=Ot.sdf,or=Ot.pixelRatio,dr=Ot.stretchX,wr=Ot.stretchY,Ur=Ot.content,Fr=new a.RGBAImage({width:Ut,height:jt});a.RGBAImage.copy(lt,Fr,{x:Mt,y:zt},{x:0,y:0},{width:Ut,height:jt}),_t[xt]={data:Fr,pixelRatio:or,sdf:Nt,stretchX:dr,stretchY:wr,content:Ur}}ie(null,_t)}}return{cancel:function(){$e&&($e.cancel(),$e=null),Ye&&(Ye.cancel(),Ye=null)}}}function b(ue){var H=ue.userImage;if(H&&H.render){var ie=H.render();if(ie)return ue.data.replace(new Uint8Array(H.data.buffer)),!0}return!1}var g=1,T=(function(ue){function H(){ue.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.isLoaded=function(){return this.loaded},H.prototype.setLoaded=function(W){if(this.loaded!==W&&(this.loaded=W,W)){for(var ce=0,Me=this.requestors;ce=0?1.2:1))}C.prototype.draw=function(ue){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ue,this.buffer,this.middle);for(var H=this.ctx.getImageData(0,0,this.size,this.size),ie=new Uint8ClampedArray(this.size*this.size),W=0;W65535){lt(new Error("glyphs > 65535 not supported"));return}if(Ot.ranges[jt]){lt(null,{stack:_t,id:xt,glyph:Ut});return}var Mt=Ot.requests[jt];Mt||(Mt=Ot.requests[jt]=[],k.loadGlyphRange(_t,jt,W.url,W.requestManager,function(zt,Nt){if(Nt){for(var or in Nt)W._doesCharSupportLocalGlyph(+or)||(Ot.glyphs[+or]=Nt[+or]);Ot.ranges[jt]=!0}for(var dr=0,wr=Mt;dr1&&(Je=H[++Ye]);var _t=Math.abs(lt-Je.left),xt=Math.abs(lt-Je.right),Ot=Math.min(_t,xt),Ut=void 0,jt=Me/W*(ce+1);if(Je.isDash){var Mt=ce-Math.abs(jt);Ut=Math.sqrt(Ot*Ot+Mt*Mt)}else Ut=ce-Math.sqrt(Ot*Ot+jt*jt);this.data[$e+lt]=Math.max(0,Math.min(255,Ut+128))}},z.prototype.addRegularDash=function(H){for(var ie=H.length-1;ie>=0;--ie){var W=H[ie],ce=H[ie+1];W.zeroLength?H.splice(ie,1):ce&&ce.isDash===W.isDash&&(ce.left=W.left,H.splice(ie,1))}var Me=H[0],ze=H[H.length-1];Me.isDash===ze.isDash&&(Me.left=ze.left-this.width,ze.right=Me.right+this.width);for(var $e=this.width*this.nextRow,Ye=0,Je=H[Ye],lt=0;lt1&&(Je=H[++Ye]);var _t=Math.abs(lt-Je.left),xt=Math.abs(lt-Je.right),Ot=Math.min(_t,xt),Ut=Je.isDash?Ot:-Ot;this.data[$e+lt]=Math.max(0,Math.min(255,Ut+128))}},z.prototype.addDash=function(H,ie){var W=ie?7:0,ce=2*W+1;if(this.nextRow+ce>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var Me=0,ze=0;ze=W.minX&&H.x=W.minY&&H.y0&&(lt[new a.OverscaledTileID(W.overscaledZ,$e,ce.z,ze,ce.y-1).key]={backfilled:!1},lt[new a.OverscaledTileID(W.overscaledZ,W.wrap,ce.z,ce.x,ce.y-1).key]={backfilled:!1},lt[new a.OverscaledTileID(W.overscaledZ,Je,ce.z,Ye,ce.y-1).key]={backfilled:!1}),ce.y+10&&(Me.resourceTiming=W._resourceTiming,W._resourceTiming=[]),W.fire(new a.Event("data",Me))})},H.prototype.onAdd=function(W){this.map=W,this.load()},H.prototype.setData=function(W){var ce=this;return this._data=W,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Me){if(Me){ce.fire(new a.ErrorEvent(Me));return}var ze={dataType:"source",sourceDataType:"content"};ce._collectResourceTiming&&ce._resourceTiming&&ce._resourceTiming.length>0&&(ze.resourceTiming=ce._resourceTiming,ce._resourceTiming=[]),ce.fire(new a.Event("data",ze))}),this},H.prototype.getClusterExpansionZoom=function(W,ce){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:W,source:this.id},ce),this},H.prototype.getClusterChildren=function(W,ce){return this.actor.send("geojson.getClusterChildren",{clusterId:W,source:this.id},ce),this},H.prototype.getClusterLeaves=function(W,ce,Me,ze){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:W,limit:ce,offset:Me},ze),this},H.prototype._updateWorkerData=function(W){var ce=this;this._loaded=!1;var Me=a.extend({},this.workerOptions),ze=this._data;typeof ze=="string"?(Me.request=this.map._requestManager.transformRequest(a.browser.resolveURL(ze),a.ResourceType.Source),Me.request.collectResourceTiming=this._collectResourceTiming):Me.data=JSON.stringify(ze),this.actor.send(this.type+".loadData",Me,function($e,Ye){ce._removed||Ye&&Ye.abandoned||(ce._loaded=!0,Ye&&Ye.resourceTiming&&Ye.resourceTiming[ce.id]&&(ce._resourceTiming=Ye.resourceTiming[ce.id].slice(0)),ce.actor.send(ce.type+".coalesce",{source:Me.source},null),W($e))})},H.prototype.loaded=function(){return this._loaded},H.prototype.loadTile=function(W,ce){var Me=this,ze=W.actor?"reloadTile":"loadTile";W.actor=this.actor;var $e={type:this.type,uid:W.uid,tileID:W.tileID,zoom:W.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};W.request=this.actor.send(ze,$e,function(Ye,Je){return delete W.request,W.unloadVectorData(),W.aborted?ce(null):Ye?ce(Ye):(W.loadVectorData(Je,Me.map.painter,ze==="reloadTile"),ce(null))})},H.prototype.abortTile=function(W){W.request&&(W.request.cancel(),delete W.request),W.aborted=!0},H.prototype.unloadTile=function(W){W.unloadVectorData(),this.actor.send("removeTile",{uid:W.uid,type:this.type,source:this.id})},H.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},H.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},H.prototype.hasTransition=function(){return!1},H})(a.Evented),ne=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),te=(function(ue){function H(ie,W,ce,Me){ue.call(this),this.id=ie,this.dispatcher=ce,this.coordinates=W.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Me),this.options=W}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.load=function(W,ce){var Me=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),function(ze,$e){Me._loaded=!0,ze?Me.fire(new a.ErrorEvent(ze)):$e&&(Me.image=$e,W&&(Me.coordinates=W),ce&&ce(),Me._finishLoading())})},H.prototype.loaded=function(){return this._loaded},H.prototype.updateImage=function(W){var ce=this;return!this.image||!W.url?this:(this.options.url=W.url,this.load(W.coordinates,function(){ce.texture=null}),this)},H.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},H.prototype.onAdd=function(W){this.map=W,this.load()},H.prototype.setCoordinates=function(W){var ce=this;this.coordinates=W;var Me=W.map(a.MercatorCoordinate.fromLngLat);this.tileID=Z(Me),this.minzoom=this.maxzoom=this.tileID.z;var ze=Me.map(function($e){return ce.tileID.getTilePoint($e)._round()});return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(ze[0].x,ze[0].y,0,0),this._boundsArray.emplaceBack(ze[1].x,ze[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(ze[3].x,ze[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(ze[2].x,ze[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this},H.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var W=this.map.painter.context,ce=W.gl;this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,ne.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(W,this.image,ce.RGBA),this.texture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE));for(var Me in this.tiles){var ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture)}}},H.prototype.loadTile=function(W,ce){this.tileID&&this.tileID.equals(W.tileID.canonical)?(this.tiles[String(W.tileID.wrap)]=W,W.buckets={},ce(null)):(W.state="errored",ce(null))},H.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},H.prototype.hasTransition=function(){return!1},H})(a.Evented);function Z(ue){for(var H=1/0,ie=1/0,W=-1/0,ce=-1/0,Me=0,ze=ue;Mece.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ce.start(0)+" and "+ce.end(0)+"-second mark."))):this.video.currentTime=W}},H.prototype.getVideo=function(){return this.video},H.prototype.onAdd=function(W){this.map||(this.map=W,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},H.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var W=this.map.painter.context,ce=W.gl;this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,ne.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE),ce.texSubImage2D(ce.TEXTURE_2D,0,0,0,ce.RGBA,ce.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(W,this.video,ce.RGBA),this.texture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE));for(var Me in this.tiles){var ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture)}}},H.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},H.prototype.hasTransition=function(){return this.video&&!this.video.paused},H})(te),j=(function(ue){function H(ie,W,ce,Me){ue.call(this,ie,W,ce,Me),W.coordinates?(!Array.isArray(W.coordinates)||W.coordinates.length!==4||W.coordinates.some(function(ze){return!Array.isArray(ze)||ze.length!==2||ze.some(function($e){return typeof $e!="number"})}))&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+ie,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+ie,null,'missing required property "coordinates"'))),W.animate&&typeof W.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+ie,null,'optional "animate" property must be a boolean value'))),W.canvas?typeof W.canvas!="string"&&!(W.canvas instanceof a.window.HTMLCanvasElement)&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+ie,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+ie,null,'missing required property "canvas"'))),this.options=W,this.animate=W.animate!==void 0?W.animate:!0}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new a.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},H.prototype.getCanvas=function(){return this.canvas},H.prototype.onAdd=function(W){this.map=W,this.load(),this.canvas&&this.animate&&this.play()},H.prototype.onRemove=function(){this.pause()},H.prototype.prepare=function(){var W=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,W=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,W=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ce=this.map.painter.context,Me=ce.gl;this.boundsBuffer||(this.boundsBuffer=ce.createVertexBuffer(this._boundsArray,ne.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(W||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(ce,this.canvas,Me.RGBA,{premultiply:!0});for(var ze in this.tiles){var $e=this.tiles[ze];$e.state!=="loaded"&&($e.state="loaded",$e.texture=this.texture)}}},H.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},H.prototype.hasTransition=function(){return this._playing},H.prototype._hasInvalidDimensions=function(){for(var W=0,ce=[this.canvas.width,this.canvas.height];Wthis.max){var $e=this._getAndRemoveByKey(this.order[0]);$e&&this.onRemove($e)}return this},be.prototype.has=function(H){return H.wrapped().key in this.data},be.prototype.getAndRemove=function(H){return this.has(H)?this._getAndRemoveByKey(H.wrapped().key):null},be.prototype._getAndRemoveByKey=function(H){var ie=this.data[H].shift();return ie.timeout&&clearTimeout(ie.timeout),this.data[H].length===0&&delete this.data[H],this.order.splice(this.order.indexOf(H),1),ie.value},be.prototype.getByKey=function(H){var ie=this.data[H];return ie?ie[0].value:null},be.prototype.get=function(H){if(!this.has(H))return null;var ie=this.data[H.wrapped().key][0];return ie.value},be.prototype.remove=function(H,ie){if(!this.has(H))return this;var W=H.wrapped().key,ce=ie===void 0?0:this.data[W].indexOf(ie),Me=this.data[W][ce];return this.data[W].splice(ce,1),Me.timeout&&clearTimeout(Me.timeout),this.data[W].length===0&&delete this.data[W],this.onRemove(Me.value),this.order.splice(this.order.indexOf(W),1),this},be.prototype.setMaxSize=function(H){for(this.max=H;this.order.length>this.max;){var ie=this._getAndRemoveByKey(this.order[0]);ie&&this.onRemove(ie)}return this},be.prototype.filter=function(H){var ie=[];for(var W in this.data)for(var ce=0,Me=this.data[W];ce1||(Math.abs(_t)>1&&(Math.abs(_t+Ot)===1?_t+=Ot:Math.abs(_t-Ot)===1&&(_t-=Ot)),!(!lt.dem||!Je.dem)&&(Je.dem.backfillBorder(lt.dem,_t,xt),Je.neighboringTiles&&Je.neighboringTiles[Ut]&&(Je.neighboringTiles[Ut].backfilled=!0)))}},H.prototype.getTile=function(W){return this.getTileByID(W.key)},H.prototype.getTileByID=function(W){return this._tiles[W]},H.prototype._retainLoadedChildren=function(W,ce,Me,ze){for(var $e in this._tiles){var Ye=this._tiles[$e];if(!(ze[$e]||!Ye.hasData()||Ye.tileID.overscaledZ<=ce||Ye.tileID.overscaledZ>Me)){for(var Je=Ye.tileID;Ye&&Ye.tileID.overscaledZ>ce+1;){var lt=Ye.tileID.scaledTo(Ye.tileID.overscaledZ-1);Ye=this._tiles[lt.key],Ye&&Ye.hasData()&&(Je=lt)}for(var _t=Je;_t.overscaledZ>ce;)if(_t=_t.scaledTo(_t.overscaledZ-1),W[_t.key]){ze[Je.key]=Je;break}}}},H.prototype.findLoadedParent=function(W,ce){if(W.key in this._loadedParentTiles){var Me=this._loadedParentTiles[W.key];return Me&&Me.tileID.overscaledZ>=ce?Me:null}for(var ze=W.overscaledZ-1;ze>=ce;ze--){var $e=W.scaledTo(ze),Ye=this._getLoadedTile($e);if(Ye)return Ye}},H.prototype._getLoadedTile=function(W){var ce=this._tiles[W.key];if(ce&&ce.hasData())return ce;var Me=this._cache.getByKey(W.wrapped().key);return Me},H.prototype.updateCacheSize=function(W){var ce=Math.ceil(W.width/this._source.tileSize)+1,Me=Math.ceil(W.height/this._source.tileSize)+1,ze=ce*Me,$e=5,Ye=Math.floor(ze*$e),Je=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Ye):Ye;this._cache.setMaxSize(Je)},H.prototype.handleWrapJump=function(W){var ce=this._prevLng===void 0?W:this._prevLng,Me=W-ce,ze=Me/360,$e=Math.round(ze);if(this._prevLng=W,$e){var Ye={};for(var Je in this._tiles){var lt=this._tiles[Je];lt.tileID=lt.tileID.unwrapTo(lt.tileID.wrap+$e),Ye[lt.tileID.key]=lt}this._tiles=Ye;for(var _t in this._timers)clearTimeout(this._timers[_t]),delete this._timers[_t];for(var xt in this._tiles){var Ot=this._tiles[xt];this._setTileReloadTimer(xt,Ot)}}},H.prototype.update=function(W){var ce=this;if(this.transform=W,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(W),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Me;this.used?this._source.tileID?Me=W.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Kr){return new a.OverscaledTileID(Kr.canonical.z,Kr.wrap,Kr.canonical.z,Kr.canonical.x,Kr.canonical.y)}):(Me=W.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Me=Me.filter(function(Kr){return ce._source.hasTile(Kr)}))):Me=[];var ze=W.coveringZoomLevel(this._source),$e=Math.max(ze-H.maxOverzooming,this._source.minzoom),Ye=Math.max(ze+H.maxUnderzooming,this._source.minzoom),Je=this._updateRetainedTiles(Me,ze);if(Ue(this._source.type)){for(var lt={},_t={},xt=Object.keys(Je),Ot=0,Ut=xt;Otthis._source.maxzoom){var Nt=Mt.children(this._source.maxzoom)[0],or=this.getTile(Nt);if(or&&or.hasData()){Me[Nt.key]=Nt;continue}}else{var dr=Mt.children(this._source.maxzoom);if(Me[dr[0].key]&&Me[dr[1].key]&&Me[dr[2].key]&&Me[dr[3].key])continue}for(var wr=zt.wasRequested(),Ur=Mt.overscaledZ-1;Ur>=$e;--Ur){var Fr=Mt.scaledTo(Ur);if(ze[Fr.key]||(ze[Fr.key]=!0,zt=this.getTile(Fr),!zt&&wr&&(zt=this._addTile(Fr)),zt&&(Me[Fr.key]=Fr,wr=zt.wasRequested(),zt.hasData())))break}}}return Me},H.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var W in this._tiles){for(var ce=[],Me=void 0,ze=this._tiles[W].tileID;ze.overscaledZ>0;){if(ze.key in this._loadedParentTiles){Me=this._loadedParentTiles[ze.key];break}ce.push(ze.key);var $e=ze.scaledTo(ze.overscaledZ-1);if(Me=this._getLoadedTile($e),Me)break;ze=$e}for(var Ye=0,Je=ce;Ye0)&&(ce.hasData()&&ce.state!=="reloading"?this._cache.add(ce.tileID,ce,ce.getExpiryTimeout()):(ce.aborted=!0,this._abortTile(ce),this._unloadTile(ce))))},H.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var W in this._tiles)this._removeTile(W);this._cache.reset()},H.prototype.tilesIn=function(W,ce,Me){var ze=this,$e=[],Ye=this.transform;if(!Ye)return $e;for(var Je=Me?Ye.getCameraQueryGeometry(W):W,lt=W.map(function(Ur){return Ye.pointCoordinate(Ur)}),_t=Je.map(function(Ur){return Ye.pointCoordinate(Ur)}),xt=this.getIds(),Ot=1/0,Ut=1/0,jt=-1/0,Mt=-1/0,zt=0,Nt=_t;zt=0&&ln[1].y+Kr>=0){var Qr=lt.map(function(jn){return Nr.getTilePoint(jn)}),wn=_t.map(function(jn){return Nr.getTilePoint(jn)});$e.push({tile:Fr,tileID:Nr,queryGeometry:Qr,cameraQueryGeometry:wn,scale:$r})}}},wr=0;wr=a.browser.now())return!0}return!1},H.prototype.setFeatureState=function(W,ce,Me){W=W||"_geojsonTileLayer",this._state.updateState(W,ce,Me)},H.prototype.removeFeatureState=function(W,ce,Me){W=W||"_geojsonTileLayer",this._state.removeFeatureState(W,ce,Me)},H.prototype.getFeatureState=function(W,ce){return W=W||"_geojsonTileLayer",this._state.getState(W,ce)},H.prototype.setDependencies=function(W,ce,Me){var ze=this._tiles[W];ze&&ze.setDependencies(ce,Me)},H.prototype.reloadTilesForDependencies=function(W,ce){for(var Me in this._tiles){var ze=this._tiles[Me];ze.hasDependency(W,ce)&&this._reloadTile(Me,"reloading")}this._cache.filter(function($e){return!$e.hasDependency(W,ce)})},H})(a.Evented);cr.maxOverzooming=10,cr.maxUnderzooming=3;function lr(ue,H){var ie=Math.abs(ue.wrap*2)-+(ue.wrap<0),W=Math.abs(H.wrap*2)-+(H.wrap<0);return ue.overscaledZ-H.overscaledZ||W-ie||H.canonical.y-ue.canonical.y||H.canonical.x-ue.canonical.x}function Ue(ue){return ue==="raster"||ue==="image"||ue==="video"}function Ne(){return new a.window.Worker(pi.workerUrl)}var At="mapboxgl_preloaded_worker_pool",Rt=function(){this.active={}};Rt.prototype.acquire=function(H){if(!this.workers)for(this.workers=[];this.workers.length0?(ce-ze)/$e:0;return this.points[Me].mult(1-Ye).add(this.points[ie].mult(Ye))};var Ln=function(H,ie,W){var ce=this.boxCells=[],Me=this.circleCells=[];this.xCellCount=Math.ceil(H/W),this.yCellCount=Math.ceil(ie/W);for(var ze=0;zethis.width||ce<0||ie>this.height)return Me?!1:[];var $e=[];if(H<=0&&ie<=0&&this.width<=W&&this.height<=ce){if(Me)return!0;for(var Ye=0;Ye0:$e}},Ln.prototype._queryCircle=function(H,ie,W,ce,Me){var ze=H-W,$e=H+W,Ye=ie-W,Je=ie+W;if($e<0||ze>this.width||Je<0||Ye>this.height)return ce?!1:[];var lt=[],_t={hitTest:ce,circle:{x:H,y:ie,radius:W},seenUids:{box:{},circle:{}}};return this._forEachCell(ze,Ye,$e,Je,this._queryCellCircle,lt,_t,Me),ce?lt.length>0:lt},Ln.prototype.query=function(H,ie,W,ce,Me){return this._query(H,ie,W,ce,!1,Me)},Ln.prototype.hitTest=function(H,ie,W,ce,Me){return this._query(H,ie,W,ce,!0,Me)},Ln.prototype.hitTestCircle=function(H,ie,W,ce){return this._queryCircle(H,ie,W,!0,ce)},Ln.prototype._queryCell=function(H,ie,W,ce,Me,ze,$e,Ye){var Je=$e.seenUids,lt=this.boxCells[Me];if(lt!==null)for(var _t=this.bboxes,xt=0,Ot=lt;xt=_t[jt+0]&&ce>=_t[jt+1]&&(!Ye||Ye(this.boxKeys[Ut]))){if($e.hitTest)return ze.push(!0),!0;ze.push({key:this.boxKeys[Ut],x1:_t[jt],y1:_t[jt+1],x2:_t[jt+2],y2:_t[jt+3]})}}}var Mt=this.circleCells[Me];if(Mt!==null)for(var zt=this.circles,Nt=0,or=Mt;Nt$e*$e+Ye*Ye},Ln.prototype._circleAndRectCollide=function(H,ie,W,ce,Me,ze,$e){var Ye=(ze-ce)/2,Je=Math.abs(H-(ce+Ye));if(Je>Ye+W)return!1;var lt=($e-Me)/2,_t=Math.abs(ie-(Me+lt));if(_t>lt+W)return!1;if(Je<=Ye||_t<=lt)return!0;var xt=Je-Ye,Ot=_t-lt;return xt*xt+Ot*Ot<=W*W};function oa(ue,H,ie,W,ce){var Me=a.create();return H?(a.scale(Me,Me,[1/ce,1/ce,1]),ie||a.rotateZ(Me,Me,W.angle)):a.multiply(Me,W.labelPlaneMatrix,ue),Me}function Ta(ue,H,ie,W,ce){if(H){var Me=a.clone(ue);return a.scale(Me,Me,[ce,ce,1]),ie||a.rotateZ(Me,Me,-W.angle),Me}else return W.glCoordMatrix}function ba(ue,H){var ie=[ue.x,ue.y,0,1];qi(ie,ie,H);var W=ie[3];return{point:new a.Point(ie[0]/W,ie[1]/W),signedDistanceFromCamera:W}}function Da(ue,H){return .5+.5*(ue/H)}function _i(ue,H){var ie=ue[0]/ue[3],W=ue[1]/ue[3],ce=ie>=-H[0]&&ie<=H[0]&&W>=-H[1]&&W<=H[1];return ce}function ci(ue,H,ie,W,ce,Me,ze,$e){var Ye=W?ue.textSizeData:ue.iconSizeData,Je=a.evaluateSizeForZoom(Ye,ie.transform.zoom),lt=[256/ie.width*2+1,256/ie.height*2+1],_t=W?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;_t.clear();for(var xt=ue.lineVertexArray,Ot=W?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,Ut=ie.transform.width/ie.transform.height,jt=!1,Mt=0;MtMe)return{useVertical:!0}}return(ue===a.WritingMode.vertical?H.yie.x)?{needsFlipping:!0}:null}function es(ue,H,ie,W,ce,Me,ze,$e,Ye,Je,lt,_t,xt,Ot){var Ut=H/24,jt=ue.lineOffsetX*Ut,Mt=ue.lineOffsetY*Ut,zt;if(ue.numGlyphs>1){var Nt=ue.glyphStartIndex+ue.numGlyphs,or=ue.lineStartIndex,dr=ue.lineStartIndex+ue.lineLength,wr=Bi(Ut,$e,jt,Mt,ie,lt,_t,ue,Ye,Me,xt);if(!wr)return{notEnoughRoom:!0};var Ur=ba(wr.first.point,ze).point,Fr=ba(wr.last.point,ze).point;if(W&&!ie){var Nr=yo(ue.writingMode,Ur,Fr,Ot);if(Nr)return Nr}zt=[wr.first];for(var $r=ue.glyphStartIndex+1;$r0?wn.point:Qa(_t,Qr,Kr,1,ce),na=yo(ue.writingMode,Kr,jn,Ot);if(na)return na}var Vn=Ii(Ut*$e.getoffsetX(ue.glyphStartIndex),jt,Mt,ie,lt,_t,ue.segment,ue.lineStartIndex,ue.lineStartIndex+ue.lineLength,Ye,Me,xt);if(!Vn)return{notEnoughRoom:!0};zt=[Vn]}for(var Va=0,za=zt;Va0?1:-1,Ut=0;W&&(Ot*=-1,Ut=Math.PI),Ot<0&&(Ut+=Math.PI);for(var jt=Ot>0?$e+ze:$e+ze+1,Mt=ce,zt=ce,Nt=0,or=0,dr=Math.abs(xt),wr=[];Nt+or<=dr;){if(jt+=Ot,jt<$e||jt>=Ye)return null;if(zt=Mt,wr.push(Mt),Mt=_t[jt],Mt===void 0){var Ur=new a.Point(Je.getx(jt),Je.gety(jt)),Fr=ba(Ur,lt);if(Fr.signedDistanceFromCamera>0)Mt=_t[jt]=Fr.point;else{var Nr=jt-Ot,$r=Nt===0?Me:new a.Point(Je.getx(Nr),Je.gety(Nr));Mt=Qa($r,Ur,zt,dr-Nt+1,lt)}}Nt+=or,or=zt.dist(Mt)}var Kr=(dr-Nt)/or,ln=Mt.sub(zt),Qr=ln.mult(Kr)._add(zt);Qr._add(ln._unit()._perp()._mult(ie*Ot));var wn=Ut+Math.atan2(Mt.y-zt.y,Mt.x-zt.x);return wr.push(Qr),{point:Qr,angle:wn,path:wr}}var Ci=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Hi(ue,H){for(var ie=0;ie=1;Si--)za.push(Vn.path[Si]);for(var ii=1;ii0){for(var Ja=za[0].clone(),qa=za[0].clone(),Bs=1;Bs=wn.x&&qa.x<=jn.x&&Ja.y>=wn.y&&qa.y<=jn.y?Ao=[za]:qa.xjn.x||qa.yjn.y?Ao=[]:Ao=a.clipLine([za],wn.x,wn.y,jn.x,jn.y)}for(var El=0,Ec=Ao;El=this.screenRightBoundary||cethis.screenBottomBoundary},Wa.prototype.isInsideGrid=function(H,ie,W,ce){return W>=0&&H=0&&ie0){var dr;return this.prevPlacement&&this.prevPlacement.variableOffsets[xt.crossTileID]&&this.prevPlacement.placements[xt.crossTileID]&&this.prevPlacement.placements[xt.crossTileID].text&&(dr=this.prevPlacement.variableOffsets[xt.crossTileID].anchor),this.variableOffsets[xt.crossTileID]={textOffset:Mt,width:W,height:ce,anchor:H,textBoxScale:Me,prevAnchor:dr},this.markUsedJustification(Ot,H,xt,Ut),Ot.allowVerticalPlacement&&(this.markUsedOrientation(Ot,Ut,xt),this.placedOrientations[xt.crossTileID]=Ut),{shift:zt,placedGlyphBoxes:Nt}}},no.prototype.placeLayerBucketPart=function(H,ie,W){var ce=this,Me=H.parameters,ze=Me.bucket,$e=Me.layout,Ye=Me.posMatrix,Je=Me.textLabelPlaneMatrix,lt=Me.labelToScreenMatrix,_t=Me.textPixelRatio,xt=Me.holdingForFade,Ot=Me.collisionBoxArray,Ut=Me.partiallyEvaluatedTextSize,jt=Me.collisionGroup,Mt=$e.get("text-optional"),zt=$e.get("icon-optional"),Nt=$e.get("text-allow-overlap"),or=$e.get("icon-allow-overlap"),dr=$e.get("text-rotation-alignment")==="map",wr=$e.get("text-pitch-alignment")==="map",Ur=$e.get("icon-text-fit")!=="none",Fr=$e.get("symbol-z-order")==="viewport-y",Nr=Nt&&(or||!ze.hasIconData()||zt),$r=or&&(Nt||!ze.hasTextData()||Mt);!ze.collisionArrays&&Ot&&ze.deserializeCollisionBoxes(Ot);var Kr=function(Vn,Va){if(!ie[Vn.crossTileID]){if(xt){ce.placements[Vn.crossTileID]=new Yi(!1,!1,!1);return}var za=!1,Si=!1,ii=!0,Ni=null,wi={box:null,offscreen:null},Ao={box:null},Ja=null,qa=null,Bs=null,El=0,Ec=0,ju=0;Va.textFeatureIndex?El=Va.textFeatureIndex:Vn.useRuntimeCollisionCircles&&(El=Vn.featureIndex),Va.verticalTextFeatureIndex&&(Ec=Va.verticalTextFeatureIndex);var au=Va.textBox;if(au){var Th=function(js){var hf=a.WritingMode.horizontal;if(ze.allowVerticalPlacement&&!js&&ce.prevPlacement){var df=ce.prevPlacement.placedOrientations[Vn.crossTileID];df&&(ce.placedOrientations[Vn.crossTileID]=df,hf=df,ce.markUsedOrientation(ze,hf,Vn))}return hf},cv=function(js,hf){if(ze.allowVerticalPlacement&&Vn.numVerticalGlyphVertices>0&&Va.verticalTextBox)for(var df=0,xg=ze.writingModes;df0&&(Uu=Uu.filter(function(js){return js!==Hu.anchor}),Uu.unshift(Hu.anchor))}var kc=function(js,hf,df){for(var xg=js.x2-js.x1,Lp=js.y2-js.y1,Xf=Vn.textBoxScale,Mh=Ur&&!or?hf:null,Pp={box:[],offscreen:!1},Zf=Nt?Uu.length*2:Uu.length,M0=0;M0=Uu.length,Eh=ce.attemptAnchorPlacement(Ld,js,xg,Lp,Xf,dr,wr,_t,Ye,jt,Yv,Vn,ze,df,Mh);if(Eh&&(Pp=Eh.placedGlyphBoxes,Pp&&Pp.box&&Pp.box.length)){za=!0,Ni=Eh.shift;break}}return Pp},Sh=function(){return kc(au,Va.iconBox,a.WritingMode.horizontal)},Yf=function(){var js=Va.verticalTextBox,hf=wi&&wi.box&&wi.box.length;return ze.allowVerticalPlacement&&!hf&&Vn.numVerticalGlyphVertices>0&&js?kc(js,Va.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}};cv(Sh,Yf),wi&&(za=wi.box,ii=wi.offscreen);var T0=Th(wi&&wi.box);if(!za&&ce.prevPlacement){var $f=ce.prevPlacement.variableOffsets[Vn.crossTileID];$f&&(ce.variableOffsets[Vn.crossTileID]=$f,ce.markUsedJustification(ze,$f.anchor,Vn,T0))}}else{var Vf=function(js,hf){var df=ce.collisionIndex.placeCollisionBox(js,Nt,_t,Ye,jt.predicate);return df&&df.box&&df.box.length&&(ce.markUsedOrientation(ze,hf,Vn),ce.placedOrientations[Vn.crossTileID]=hf),df},qs=function(){return Vf(au,a.WritingMode.horizontal)},Ah=function(){var js=Va.verticalTextBox;return ze.allowVerticalPlacement&&Vn.numVerticalGlyphVertices>0&&js?Vf(js,a.WritingMode.vertical):{box:null,offscreen:null}};cv(qs,Ah),Th(wi&&wi.box&&wi.box.length)}}if(Ja=wi,za=Ja&&Ja.box&&Ja.box.length>0,ii=Ja&&Ja.offscreen,Vn.useRuntimeCollisionCircles){var so=ze.text.placedSymbolArray.get(Vn.centerJustifiedTextSymbolIndex),kp=a.evaluateSizeForFeature(ze.textSizeData,Ut,so),Cp=$e.get("text-padding"),Do=Vn.collisionCircleDiameter;qa=ce.collisionIndex.placeCollisionCircles(Nt,so,ze.lineVertexArray,ze.glyphOffsetArray,kp,Ye,Je,lt,W,wr,jt.predicate,Do,Cp),za=Nt||qa.circles.length>0&&!qa.collisionDetected,ii=ii&&qa.offscreen}if(Va.iconFeatureIndex&&(ju=Va.iconFeatureIndex),Va.iconBox){var Rp=function(js){var hf=Ur&&Ni?jo(js,Ni.x,Ni.y,dr,wr,ce.transform.angle):js;return ce.collisionIndex.placeCollisionBox(hf,or,_t,Ye,jt.predicate)};Ao&&Ao.box&&Ao.box.length&&Va.verticalIconBox?(Bs=Rp(Va.verticalIconBox),Si=Bs.box.length>0):(Bs=Rp(Va.iconBox),Si=Bs.box.length>0),ii=ii&&Bs.offscreen}var A0=Mt||Vn.numHorizontalGlyphVertices===0&&Vn.numVerticalGlyphVertices===0,S0=zt||Vn.numIconVertices===0;if(!A0&&!S0?Si=za=Si&&za:S0?A0||(Si=Si&&za):za=Si&&za,za&&Ja&&Ja.box&&(Ao&&Ao.box&&Ec?ce.collisionIndex.insertCollisionBox(Ja.box,$e.get("text-ignore-placement"),ze.bucketInstanceId,Ec,jt.ID):ce.collisionIndex.insertCollisionBox(Ja.box,$e.get("text-ignore-placement"),ze.bucketInstanceId,El,jt.ID)),Si&&Bs&&ce.collisionIndex.insertCollisionBox(Bs.box,$e.get("icon-ignore-placement"),ze.bucketInstanceId,ju,jt.ID),qa&&(za&&ce.collisionIndex.insertCollisionCircles(qa.circles,$e.get("text-ignore-placement"),ze.bucketInstanceId,El,jt.ID),W)){var ls=ze.bucketInstanceId,zl=ce.collisionCircleArrays[ls];zl===void 0&&(zl=ce.collisionCircleArrays[ls]=new Ps);for(var Wf=0;Wf=0;--Qr){var wn=ln[Qr];Kr(ze.symbolInstances.get(wn),ze.collisionArrays[wn])}else for(var jn=H.symbolInstanceStart;jn=0&&(ze>=0&<!==ze?H.text.placedSymbolArray.get(lt).crossTileID=0:H.text.placedSymbolArray.get(lt).crossTileID=W.crossTileID)}},no.prototype.markUsedOrientation=function(H,ie,W){for(var ce=ie===a.WritingMode.horizontal||ie===a.WritingMode.horizontalOnly?ie:0,Me=ie===a.WritingMode.vertical?ie:0,ze=[W.leftJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.rightJustifiedTextSymbolIndex],$e=0,Ye=ze;$e0||wr>0,Kr=or.numIconVertices>0,ln=ce.placedOrientations[or.crossTileID],Qr=ln===a.WritingMode.vertical,wn=ln===a.WritingMode.horizontal||ln===a.WritingMode.horizontalOnly;if($r){var jn=ao(Nr.text),na=Qr?$n:jn;Ut(H.text,dr,na);var Vn=wn?$n:jn;Ut(H.text,wr,Vn);var Va=Nr.text.isHidden();[or.rightJustifiedTextSymbolIndex,or.centerJustifiedTextSymbolIndex,or.leftJustifiedTextSymbolIndex].forEach(function(ju){ju>=0&&(H.text.placedSymbolArray.get(ju).hidden=Va||Qr?1:0)}),or.verticalPlacedTextSymbolIndex>=0&&(H.text.placedSymbolArray.get(or.verticalPlacedTextSymbolIndex).hidden=Va||wn?1:0);var za=ce.variableOffsets[or.crossTileID];za&&ce.markUsedJustification(H,za.anchor,or,ln);var Si=ce.placedOrientations[or.crossTileID];Si&&(ce.markUsedJustification(H,"left",or,Si),ce.markUsedOrientation(H,Si,or))}if(Kr){var ii=ao(Nr.icon),Ni=!(xt&&or.verticalPlacedIconSymbolIndex&&Qr);if(or.placedIconSymbolIndex>=0){var wi=Ni?ii:$n;Ut(H.icon,or.numIconVertices,wi),H.icon.placedSymbolArray.get(or.placedIconSymbolIndex).hidden=Nr.icon.isHidden()}if(or.verticalPlacedIconSymbolIndex>=0){var Ao=Ni?$n:ii;Ut(H.icon,or.numVerticalIconVertices,Ao),H.icon.placedSymbolArray.get(or.verticalPlacedIconSymbolIndex).hidden=Nr.icon.isHidden()}}if(H.hasIconCollisionBoxData()||H.hasTextCollisionBoxData()){var Ja=H.collisionArrays[Nt];if(Ja){var qa=new a.Point(0,0);if(Ja.textBox||Ja.verticalTextBox){var Bs=!0;if(Je){var El=ce.variableOffsets[Ur];El?(qa=gs(El.anchor,El.width,El.height,El.textOffset,El.textBoxScale),lt&&qa._rotate(_t?ce.transform.angle:-ce.transform.angle)):Bs=!1}Ja.textBox&&dn(H.textCollisionBox.collisionVertexArray,Nr.text.placed,!Bs||Qr,qa.x,qa.y),Ja.verticalTextBox&&dn(H.textCollisionBox.collisionVertexArray,Nr.text.placed,!Bs||wn,qa.x,qa.y)}var Ec=!!(!wn&&Ja.verticalIconBox);Ja.iconBox&&dn(H.iconCollisionBox.collisionVertexArray,Nr.icon.placed,Ec,xt?qa.x:0,xt?qa.y:0),Ja.verticalIconBox&&dn(H.iconCollisionBox.collisionVertexArray,Nr.icon.placed,!Ec,xt?qa.x:0,xt?qa.y:0)}}},Mt=0;MtH},no.prototype.setStale=function(){this.stale=!0};function dn(ue,H,ie,W,ce){ue.emplaceBack(H?1:0,ie?1:0,W||0,ce||0),ue.emplaceBack(H?1:0,ie?1:0,W||0,ce||0),ue.emplaceBack(H?1:0,ie?1:0,W||0,ce||0),ue.emplaceBack(H?1:0,ie?1:0,W||0,ce||0)}var ia=Math.pow(2,25),Ef=Math.pow(2,24),bl=Math.pow(2,17),gi=Math.pow(2,16),_o=Math.pow(2,9),mo=Math.pow(2,8),Uo=Math.pow(2,1);function ao(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;var H=ue.placed?1:0,ie=Math.floor(ue.opacity*127);return ie*ia+H*Ef+ie*bl+H*gi+ie*_o+H*mo+ie*Uo+H}var $n=0,ai=function(H){this._sortAcrossTiles=H.layout.get("symbol-z-order")!=="viewport-y"&&H.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};ai.prototype.continuePlacement=function(H,ie,W,ce,Me){for(var ze=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var $e=H[this._currentPlacementIndex],Ye=ie[$e],Je=this.placement.collisionIndex.transform.zoom;if(Ye.type==="symbol"&&(!Ye.minzoom||Ye.minzoom<=Je)&&(!Ye.maxzoom||Ye.maxzoom>Je)){this._inProgressLayer||(this._inProgressLayer=new ai(Ye));var lt=this._inProgressLayer.continuePlacement(W[Ye.source],this.placement,this._showCollisionBoxes,Ye,ze);if(lt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ri.prototype.commit=function(H){return this.placement.commit(H),this.placement};var cu=512/a.EXTENT/2,ul=function(H,ie,W){this.tileID=H,this.indexedSymbolInstances={},this.bucketInstanceId=W;for(var ce=0;ceH.overscaledZ)for(var Je in Ye){var lt=Ye[Je];lt.tileID.isChildOf(H)&<.findMatches(ie.symbolInstances,H,ze)}else{var _t=H.scaledTo(Number($e)),xt=Ye[_t.key];xt&&xt.findMatches(ie.symbolInstances,H,ze)}}for(var Ot=0;Ot0)throw new Error("Unimplemented: "+ze.map(function($e){return $e.command}).join(", ")+".");return Me.forEach(function($e){$e.command!=="setTransition"&&ce[$e.command].apply(ce,$e.args)}),this.stylesheet=W,!0},H.prototype.addImage=function(W,ce){if(this.getImage(W))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(W,ce),this._afterImageUpdated(W)},H.prototype.updateImage=function(W,ce){this.imageManager.updateImage(W,ce)},H.prototype.getImage=function(W){return this.imageManager.getImage(W)},H.prototype.removeImage=function(W){if(!this.getImage(W))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(W),this._afterImageUpdated(W)},H.prototype._afterImageUpdated=function(W){this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},H.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},H.prototype.addSource=function(W,ce,Me){var ze=this;if(Me===void 0&&(Me={}),this._checkLoaded(),this.sourceCaches[W]!==void 0)throw new Error("There is already a source with this ID");if(!ce.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(ce).join(", ")+".");var $e=["vector","raster","geojson","video","image"],Ye=$e.indexOf(ce.type)>=0;if(!(Ye&&this._validate(a.validateStyle.source,"sources."+W,ce,null,Me))){this.map&&this.map._collectResourceTiming&&(ce.collectResourceTiming=!0);var Je=this.sourceCaches[W]=new cr(W,ce,this.dispatcher);Je.style=this,Je.setEventedParent(this,function(){return{isSourceLoaded:ze.loaded(),source:Je.serialize(),sourceId:W}}),Je.onAdd(this.map),this._changed=!0}},H.prototype.removeSource=function(W){if(this._checkLoaded(),this.sourceCaches[W]===void 0)throw new Error("There is no source with this ID");for(var ce in this._layers)if(this._layers[ce].source===W)return this.fire(new a.ErrorEvent(new Error('Source "'+W+'" cannot be removed while layer "'+ce+'" is using it.')));var Me=this.sourceCaches[W];delete this.sourceCaches[W],delete this._updatedSources[W],Me.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:W})),Me.setEventedParent(null),Me.clearTiles(),Me.onRemove&&Me.onRemove(this.map),this._changed=!0},H.prototype.setGeoJSONSourceData=function(W,ce){this._checkLoaded();var Me=this.sourceCaches[W].getSource();Me.setData(ce),this._changed=!0},H.prototype.getSource=function(W){return this.sourceCaches[W]&&this.sourceCaches[W].getSource()},H.prototype.addLayer=function(W,ce,Me){Me===void 0&&(Me={}),this._checkLoaded();var ze=W.id;if(this.getLayer(ze)){this.fire(new a.ErrorEvent(new Error('Layer with id "'+ze+'" already exists on this map')));return}var $e;if(W.type==="custom"){if(nl(this,a.validateCustomStyleLayer(W)))return;$e=a.createStyleLayer(W)}else{if(typeof W.source=="object"&&(this.addSource(ze,W.source),W=a.clone$1(W),W=a.extend(W,{source:ze})),this._validate(a.validateStyle.layer,"layers."+ze,W,{arrayIndex:-1},Me))return;$e=a.createStyleLayer(W),this._validateLayer($e),$e.setEventedParent(this,{layer:{id:ze}}),this._serializedLayers[$e.id]=$e.serialize()}var Ye=ce?this._order.indexOf(ce):this._order.length;if(ce&&Ye===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+ce+'" does not exist on this map.')));return}if(this._order.splice(Ye,0,ze),this._layerOrderChanged=!0,this._layers[ze]=$e,this._removedLayers[ze]&&$e.source&&$e.type!=="custom"){var Je=this._removedLayers[ze];delete this._removedLayers[ze],Je.type!==$e.type?this._updatedSources[$e.source]="clear":(this._updatedSources[$e.source]="reload",this.sourceCaches[$e.source].pause())}this._updateLayer($e),$e.onAdd&&$e.onAdd(this.map)},H.prototype.moveLayer=function(W,ce){this._checkLoaded(),this._changed=!0;var Me=this._layers[W];if(!Me){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be moved.")));return}if(W!==ce){var ze=this._order.indexOf(W);this._order.splice(ze,1);var $e=ce?this._order.indexOf(ce):this._order.length;if(ce&&$e===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+ce+'" does not exist on this map.')));return}this._order.splice($e,0,W),this._layerOrderChanged=!0}},H.prototype.removeLayer=function(W){this._checkLoaded();var ce=this._layers[W];if(!ce){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be removed.")));return}ce.setEventedParent(null);var Me=this._order.indexOf(W);this._order.splice(Me,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[W]=ce,delete this._layers[W],delete this._serializedLayers[W],delete this._updatedLayers[W],delete this._updatedPaintProps[W],ce.onRemove&&ce.onRemove(this.map)},H.prototype.getLayer=function(W){return this._layers[W]},H.prototype.hasLayer=function(W){return W in this._layers},H.prototype.setLayerZoomRange=function(W,ce,Me){this._checkLoaded();var ze=this.getLayer(W);if(!ze){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot have zoom extent.")));return}ze.minzoom===ce&&ze.maxzoom===Me||(ce!=null&&(ze.minzoom=ce),Me!=null&&(ze.maxzoom=Me),this._updateLayer(ze))},H.prototype.setFilter=function(W,ce,Me){Me===void 0&&(Me={}),this._checkLoaded();var ze=this.getLayer(W);if(!ze){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be filtered.")));return}if(!a.deepEqual(ze.filter,ce)){if(ce==null){ze.filter=void 0,this._updateLayer(ze);return}this._validate(a.validateStyle.filter,"layers."+ze.id+".filter",ce,null,Me)||(ze.filter=a.clone$1(ce),this._updateLayer(ze))}},H.prototype.getFilter=function(W){return a.clone$1(this.getLayer(W).filter)},H.prototype.setLayoutProperty=function(W,ce,Me,ze){ze===void 0&&(ze={}),this._checkLoaded();var $e=this.getLayer(W);if(!$e){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")));return}a.deepEqual($e.getLayoutProperty(ce),Me)||($e.setLayoutProperty(ce,Me,ze),this._updateLayer($e))},H.prototype.getLayoutProperty=function(W,ce){var Me=this.getLayer(W);if(!Me){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style.")));return}return Me.getLayoutProperty(ce)},H.prototype.setPaintProperty=function(W,ce,Me,ze){ze===void 0&&(ze={}),this._checkLoaded();var $e=this.getLayer(W);if(!$e){this.fire(new a.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")));return}if(!a.deepEqual($e.getPaintProperty(ce),Me)){var Ye=$e.setPaintProperty(ce,Me,ze);Ye&&this._updateLayer($e),this._changed=!0,this._updatedPaintProps[W]=!0}},H.prototype.getPaintProperty=function(W,ce){return this.getLayer(W).getPaintProperty(ce)},H.prototype.setFeatureState=function(W,ce){this._checkLoaded();var Me=W.source,ze=W.sourceLayer,$e=this.sourceCaches[Me];if($e===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+Me+"' does not exist in the map's style.")));return}var Ye=$e.getSource().type;if(Ye==="geojson"&&ze){this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Ye==="vector"&&!ze){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}W.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),$e.setFeatureState(ze,W.id,ce)},H.prototype.removeFeatureState=function(W,ce){this._checkLoaded();var Me=W.source,ze=this.sourceCaches[Me];if(ze===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+Me+"' does not exist in the map's style.")));return}var $e=ze.getSource().type,Ye=$e==="vector"?W.sourceLayer:void 0;if($e==="vector"&&!Ye){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ce&&typeof W.id!="string"&&typeof W.id!="number"){this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ze.removeFeatureState(Ye,W.id,ce)},H.prototype.getFeatureState=function(W){this._checkLoaded();var ce=W.source,Me=W.sourceLayer,ze=this.sourceCaches[ce];if(ze===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+ce+"' does not exist in the map's style.")));return}var $e=ze.getSource().type;if($e==="vector"&&!Me){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return W.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),ze.getFeatureState(Me,W.id)},H.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},H.prototype.serialize=function(){return a.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:a.mapObject(this.sourceCaches,function(W){return W.serialize()}),layers:this._serializeLayers(this._order)},function(W){return W!==void 0})},H.prototype._updateLayer=function(W){this._updatedLayers[W.id]=!0,W.source&&!this._updatedSources[W.source]&&this.sourceCaches[W.source].getSource().type!=="raster"&&(this._updatedSources[W.source]="reload",this.sourceCaches[W.source].pause()),this._changed=!0},H.prototype._flattenAndSortRenderedFeatures=function(W){for(var ce=this,Me=function(wn){return ce._layers[wn].type==="fill-extrusion"},ze={},$e=[],Ye=this._order.length-1;Ye>=0;Ye--){var Je=this._order[Ye];if(Me(Je)){ze[Je]=Ye;for(var lt=0,_t=W;lt<_t.length;lt+=1){var xt=_t[lt],Ot=xt[Je];if(Ot)for(var Ut=0,jt=Ot;Ut=0;Nt--){var or=this._order[Nt];if(Me(or))for(var dr=$e.length-1;dr>=0;dr--){var wr=$e[dr].feature;if(ze[wr.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,vh=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,wp=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Tp=`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Xh="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",ph=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Nv="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",ev=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,tv=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,w0=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,gc=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Ap=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,jc=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Zh=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Pl=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Uc=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Bv="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",rv=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,nv=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,av=`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,iv=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Pu=`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Lf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,$s=xo(Fv,Bc),yc=xo(b0,Zd),Qu=xo(Zi,bd),cl=xo(_d,Ys),ef=xo(ys,Kd),Kl=xo(Cf,ms),_l=xo(Xl,Vo),Yo=xo(Fo,Jd),hl=xo(fl,Ku),qv=xo(Ju,Qd),Kh=xo(Zl,$h),jv=xo(du,io),Sp=xo(_p,Rf),Uv=xo(Ll,qc),Mp=xo(Wh,_0),gh=xo(vh,wp),Hv=xo(Tp,Xh),wd=xo(ph,Nv),Jl=xo(ev,tv),Jh=xo(w0,gc),wl=xo(Ap,jc),mc=xo(Zh,Pl),Hc=xo(Uc,Bv),Gc=xo(rv,nv),Td=xo(av,iv),Qh=xo(Pu,Lf);function xo(ue,H){var ie=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,W=H.match(/attribute ([\w]+) ([\w]+)/g),ce=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Me=H.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ze=Me?Me.concat(ce):ce,$e={};return ue=ue.replace(ie,function(Ye,Je,lt,_t,xt){return $e[xt]=!0,Je==="define"?` +#ifndef HAS_UNIFORM_u_`+xt+` +varying `+lt+" "+_t+" "+xt+`; +#else +uniform `+lt+" "+_t+" u_"+xt+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+xt+` + `+lt+" "+_t+" "+xt+" = u_"+xt+`; +#endif +`}),H=H.replace(ie,function(Ye,Je,lt,_t,xt){var Ot=_t==="float"?"vec2":"vec4",Ut=xt.match(/color/)?"color":Ot;return $e[xt]?Je==="define"?` +#ifndef HAS_UNIFORM_u_`+xt+` +uniform lowp float u_`+xt+`_t; +attribute `+lt+" "+Ot+" a_"+xt+`; +varying `+lt+" "+_t+" "+xt+`; +#else +uniform `+lt+" "+_t+" u_"+xt+`; +#endif +`:Ut==="vec4"?` +#ifndef HAS_UNIFORM_u_`+xt+` + `+xt+" = a_"+xt+`; +#else + `+lt+" "+_t+" "+xt+" = u_"+xt+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+xt+` + `+xt+" = unpack_mix_"+Ut+"(a_"+xt+", u_"+xt+`_t); +#else + `+lt+" "+_t+" "+xt+" = u_"+xt+`; +#endif +`:Je==="define"?` +#ifndef HAS_UNIFORM_u_`+xt+` +uniform lowp float u_`+xt+`_t; +attribute `+lt+" "+Ot+" a_"+xt+`; +#else +uniform `+lt+" "+_t+" u_"+xt+`; +#endif +`:Ut==="vec4"?` +#ifndef HAS_UNIFORM_u_`+xt+` + `+lt+" "+_t+" "+xt+" = a_"+xt+`; +#else + `+lt+" "+_t+" "+xt+" = u_"+xt+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+xt+` + `+lt+" "+_t+" "+xt+" = unpack_mix_"+Ut+"(a_"+xt+", u_"+xt+`_t); +#else + `+lt+" "+_t+" "+xt+" = u_"+xt+`; +#endif +`}),{fragmentSource:ue,vertexSource:H,staticAttributes:W,staticUniforms:ze}}var Ep=Object.freeze({__proto__:null,prelude:$s,background:yc,backgroundPattern:Qu,circle:cl,clippingMask:ef,heatmap:Kl,heatmapTexture:_l,collisionBox:Yo,collisionCircle:hl,debug:qv,fill:Kh,fillOutline:jv,fillOutlinePattern:Sp,fillPattern:Uv,fillExtrusion:Mp,fillExtrusionPattern:gh,hillshadePrepare:Hv,hillshade:wd,line:Jl,lineGradient:Jh,linePattern:wl,lineSDF:mc,raster:Hc,symbolIcon:Gc,symbolSDF:Td,symbolTextAndIcon:Qh}),xc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};xc.prototype.bind=function(H,ie,W,ce,Me,ze,$e,Ye){this.context=H;for(var Je=this.boundPaintVertexBuffers.length!==ce.length,lt=0;!Je&<>16,$e>>16],u_pixel_coord_lower:[ze&65535,$e&65535]}}function yh(ue,H,ie,W){var ce=ie.imageManager.getPattern(ue.from.toString()),Me=ie.imageManager.getPattern(ue.to.toString()),ze=ie.imageManager.getPixelSize(),$e=ze.width,Ye=ze.height,Je=Math.pow(2,W.tileID.overscaledZ),lt=W.tileSize*Math.pow(2,ie.transform.tileZoom)/Je,_t=lt*(W.tileID.canonical.x+W.tileID.wrap*Je),xt=lt*W.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ce.tl,u_pattern_br_a:ce.br,u_pattern_tl_b:Me.tl,u_pattern_br_b:Me.br,u_texsize:[$e,Ye],u_mix:H.t,u_pattern_size_a:ce.displaySize,u_pattern_size_b:Me.displaySize,u_scale_a:H.fromScale,u_scale_b:H.toScale,u_tile_units_to_pixels:1/Ai(W,1,ie.transform.tileZoom),u_pixel_coord_upper:[_t>>16,xt>>16],u_pixel_coord_lower:[_t&65535,xt&65535]}}var Pf=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_lightpos:new a.Uniform3f(ue,H.u_lightpos),u_lightintensity:new a.Uniform1f(ue,H.u_lightintensity),u_lightcolor:new a.Uniform3f(ue,H.u_lightcolor),u_vertical_gradient:new a.Uniform1f(ue,H.u_vertical_gradient),u_opacity:new a.Uniform1f(ue,H.u_opacity)}},Is=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_lightpos:new a.Uniform3f(ue,H.u_lightpos),u_lightintensity:new a.Uniform1f(ue,H.u_lightintensity),u_lightcolor:new a.Uniform3f(ue,H.u_lightcolor),u_vertical_gradient:new a.Uniform1f(ue,H.u_vertical_gradient),u_height_factor:new a.Uniform1f(ue,H.u_height_factor),u_image:new a.Uniform1i(ue,H.u_image),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ue,H.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ue,H.u_pixel_coord_lower),u_scale:new a.Uniform3f(ue,H.u_scale),u_fade:new a.Uniform1f(ue,H.u_fade),u_opacity:new a.Uniform1f(ue,H.u_opacity)}},Yc=function(ue,H,ie,W){var ce=H.style.light,Me=ce.properties.get("position"),ze=[Me.x,Me.y,Me.z],$e=a.create$1();ce.properties.get("anchor")==="viewport"&&a.fromRotation($e,-H.transform.angle),a.transformMat3(ze,ze,$e);var Ye=ce.properties.get("color");return{u_matrix:ue,u_lightpos:ze,u_lightintensity:ce.properties.get("intensity"),u_lightcolor:[Ye.r,Ye.g,Ye.b],u_vertical_gradient:+ie,u_opacity:W}},Tl=function(ue,H,ie,W,ce,Me,ze){return a.extend(Yc(ue,H,ie,W),Ds(Me,H,ze),{u_height_factor:-Math.pow(2,ce.overscaledZ)/ze.tileSize/8})},Du=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix)}},Df=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_image:new a.Uniform1i(ue,H.u_image),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ue,H.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ue,H.u_pixel_coord_lower),u_scale:new a.Uniform3f(ue,H.u_scale),u_fade:new a.Uniform1f(ue,H.u_fade)}},bc=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_world:new a.Uniform2f(ue,H.u_world)}},_c=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_world:new a.Uniform2f(ue,H.u_world),u_image:new a.Uniform1i(ue,H.u_image),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_pixel_coord_upper:new a.Uniform2f(ue,H.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ue,H.u_pixel_coord_lower),u_scale:new a.Uniform3f(ue,H.u_scale),u_fade:new a.Uniform1f(ue,H.u_fade)}},No=function(ue){return{u_matrix:ue}},Ql=function(ue,H,ie,W){return a.extend(No(ue),Ds(ie,H,W))},vu=function(ue,H){return{u_matrix:ue,u_world:H}},ed=function(ue,H,ie,W,ce){return a.extend(Ql(ue,H,ie,W),{u_world:ce})},td=function(ue,H){return{u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(ue,H.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(ue,H.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(ue,H.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix)}},eu=function(ue,H,ie,W){var ce=ue.transform,Me,ze;if(W.paint.get("circle-pitch-alignment")==="map"){var $e=Ai(ie,1,ce.zoom);Me=!0,ze=[$e,$e]}else Me=!1,ze=ce.pixelsToGLUnits;return{u_camera_to_center_distance:ce.cameraToCenterDistance,u_scale_with_map:+(W.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(H.posMatrix,ie,W.paint.get("circle-translate"),W.paint.get("circle-translate-anchor")),u_pitch_with_map:+Me,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:ze}},pu=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(ue,H.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(ue,H.u_extrude_scale),u_overscale_factor:new a.Uniform1f(ue,H.u_overscale_factor)}},tf=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_inv_matrix:new a.UniformMatrix4f(ue,H.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(ue,H.u_viewport_size)}},gu=function(ue,H,ie){var W=Ai(ie,1,H.zoom),ce=Math.pow(2,H.zoom-ie.tileID.overscaledZ),Me=ie.tileID.overscaleFactor();return{u_matrix:ue,u_camera_to_center_distance:H.cameraToCenterDistance,u_pixels_to_tile_units:W,u_extrude_scale:[H.pixelsToGLUnits[0]/(W*ce),H.pixelsToGLUnits[1]/(W*ce)],u_overscale_factor:Me}},If=function(ue,H,ie){return{u_matrix:ue,u_inv_matrix:H,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}},Co=function(ue,H){return{u_color:new a.UniformColor(ue,H.u_color),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_overlay:new a.Uniform1i(ue,H.u_overlay),u_overlay_scale:new a.Uniform1f(ue,H.u_overlay_scale)}},wc=function(ue,H,ie){return ie===void 0&&(ie=1),{u_matrix:ue,u_color:H,u_overlay:0,u_overlay_scale:ie}},$c=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix)}},ov=function(ue){return{u_matrix:ue}},Wc=function(ue,H){return{u_extrude_scale:new a.Uniform1f(ue,H.u_extrude_scale),u_intensity:new a.Uniform1f(ue,H.u_intensity),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix)}},Ws=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_world:new a.Uniform2f(ue,H.u_world),u_image:new a.Uniform1i(ue,H.u_image),u_color_ramp:new a.Uniform1i(ue,H.u_color_ramp),u_opacity:new a.Uniform1f(ue,H.u_opacity)}},Ji=function(ue,H,ie,W){return{u_matrix:ue,u_extrude_scale:Ai(H,1,ie),u_intensity:W}},Gi=function(ue,H,ie,W){var ce=a.create();a.ortho(ce,0,ue.width,ue.height,0,0,1);var Me=ue.context.gl;return{u_matrix:ce,u_world:[Me.drawingBufferWidth,Me.drawingBufferHeight],u_image:ie,u_color_ramp:W,u_opacity:H.paint.get("heatmap-opacity")}},Iu=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_image:new a.Uniform1i(ue,H.u_image),u_latrange:new a.Uniform2f(ue,H.u_latrange),u_light:new a.Uniform2f(ue,H.u_light),u_shadow:new a.UniformColor(ue,H.u_shadow),u_highlight:new a.UniformColor(ue,H.u_highlight),u_accent:new a.UniformColor(ue,H.u_accent)}},Dl=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_image:new a.Uniform1i(ue,H.u_image),u_dimension:new a.Uniform2f(ue,H.u_dimension),u_zoom:new a.Uniform1f(ue,H.u_zoom),u_unpack:new a.Uniform4f(ue,H.u_unpack)}},Ad=function(ue,H,ie){var W=ie.paint.get("hillshade-shadow-color"),ce=ie.paint.get("hillshade-highlight-color"),Me=ie.paint.get("hillshade-accent-color"),ze=ie.paint.get("hillshade-illumination-direction")*(Math.PI/180);ie.paint.get("hillshade-illumination-anchor")==="viewport"&&(ze-=ue.transform.angle);var $e=!ue.options.moving;return{u_matrix:ue.transform.calculatePosMatrix(H.tileID.toUnwrapped(),$e),u_image:0,u_latrange:Xc(ue,H.tileID),u_light:[ie.paint.get("hillshade-exaggeration"),ze],u_shadow:W,u_highlight:ce,u_accent:Me}},rf=function(ue,H){var ie=H.stride,W=a.create();return a.ortho(W,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(W,W,[0,-a.EXTENT,0]),{u_matrix:W,u_image:1,u_dimension:[ie,ie],u_zoom:ue.overscaledZ,u_unpack:H.getUnpackVector()}};function Xc(ue,H){var ie=Math.pow(2,H.canonical.z),W=H.canonical.y;return[new a.MercatorCoordinate(0,W/ie).toLngLat().lat,new a.MercatorCoordinate(0,(W+1)/ie).toLngLat().lat]}var Of=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_ratio:new a.Uniform1f(ue,H.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ue,H.u_units_to_pixels)}},yu=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_ratio:new a.Uniform1f(ue,H.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ue,H.u_units_to_pixels),u_image:new a.Uniform1i(ue,H.u_image),u_image_height:new a.Uniform1f(ue,H.u_image_height)}},mu=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_ratio:new a.Uniform1f(ue,H.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_image:new a.Uniform1i(ue,H.u_image),u_units_to_pixels:new a.Uniform2f(ue,H.u_units_to_pixels),u_scale:new a.Uniform3f(ue,H.u_scale),u_fade:new a.Uniform1f(ue,H.u_fade)}},Sd=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_ratio:new a.Uniform1f(ue,H.u_ratio),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(ue,H.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(ue,H.u_patternscale_a),u_patternscale_b:new a.Uniform2f(ue,H.u_patternscale_b),u_sdfgamma:new a.Uniform1f(ue,H.u_sdfgamma),u_image:new a.Uniform1i(ue,H.u_image),u_tex_y_a:new a.Uniform1f(ue,H.u_tex_y_a),u_tex_y_b:new a.Uniform1f(ue,H.u_tex_y_b),u_mix:new a.Uniform1f(ue,H.u_mix)}},Tc=function(ue,H,ie){var W=ue.transform;return{u_matrix:Al(ue,H,ie),u_ratio:1/Ai(H,1,W.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/W.pixelsToGLUnits[0],1/W.pixelsToGLUnits[1]]}},Zc=function(ue,H,ie,W){return a.extend(Tc(ue,H,ie),{u_image:0,u_image_height:W})},zf=function(ue,H,ie,W){var ce=ue.transform,Me=xu(H,ce);return{u_matrix:Al(ue,H,ie),u_texsize:H.imageAtlasTexture.size,u_ratio:1/Ai(H,1,ce.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[Me,W.fromScale,W.toScale],u_fade:W.t,u_units_to_pixels:[1/ce.pixelsToGLUnits[0],1/ce.pixelsToGLUnits[1]]}},dl=function(ue,H,ie,W,ce){var Me=ue.transform,ze=ue.lineAtlas,$e=xu(H,Me),Ye=ie.layout.get("line-cap")==="round",Je=ze.getDash(W.from,Ye),lt=ze.getDash(W.to,Ye),_t=Je.width*ce.fromScale,xt=lt.width*ce.toScale;return a.extend(Tc(ue,H,ie),{u_patternscale_a:[$e/_t,-Je.height/2],u_patternscale_b:[$e/xt,-lt.height/2],u_sdfgamma:ze.width/(Math.min(_t,xt)*256*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Je.y,u_tex_y_b:lt.y,u_mix:ce.t})};function xu(ue,H){return 1/Ai(ue,1,H.tileZoom)}function Al(ue,H,ie){return ue.translatePosMatrix(H.tileID.posMatrix,H,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}var Ou=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_tl_parent:new a.Uniform2f(ue,H.u_tl_parent),u_scale_parent:new a.Uniform1f(ue,H.u_scale_parent),u_buffer_scale:new a.Uniform1f(ue,H.u_buffer_scale),u_fade_t:new a.Uniform1f(ue,H.u_fade_t),u_opacity:new a.Uniform1f(ue,H.u_opacity),u_image0:new a.Uniform1i(ue,H.u_image0),u_image1:new a.Uniform1i(ue,H.u_image1),u_brightness_low:new a.Uniform1f(ue,H.u_brightness_low),u_brightness_high:new a.Uniform1f(ue,H.u_brightness_high),u_saturation_factor:new a.Uniform1f(ue,H.u_saturation_factor),u_contrast_factor:new a.Uniform1f(ue,H.u_contrast_factor),u_spin_weights:new a.Uniform3f(ue,H.u_spin_weights)}},rd=function(ue,H,ie,W,ce){return{u_matrix:ue,u_tl_parent:H,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:W.mix,u_opacity:W.opacity*ce.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ce.paint.get("raster-brightness-min"),u_brightness_high:ce.paint.get("raster-brightness-max"),u_saturation_factor:bu(ce.paint.get("raster-saturation")),u_contrast_factor:oo(ce.paint.get("raster-contrast")),u_spin_weights:Ac(ce.paint.get("raster-hue-rotate"))}};function Ac(ue){ue*=Math.PI/180;var H=Math.sin(ue),ie=Math.cos(ue);return[(2*ie+1)/3,(-Math.sqrt(3)*H-ie+1)/3,(Math.sqrt(3)*H-ie+1)/3]}function oo(ue){return ue>0?1/(1-ue):1+ue}function bu(ue){return ue>0?1-1/(1.001-ue):-ue}var Xs=function(ue,H){return{u_is_size_zoom_constant:new a.Uniform1i(ue,H.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ue,H.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ue,H.u_size_t),u_size:new a.Uniform1f(ue,H.u_size),u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ue,H.u_pitch),u_rotate_symbol:new a.Uniform1i(ue,H.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ue,H.u_aspect_ratio),u_fade_change:new a.Uniform1f(ue,H.u_fade_change),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ue,H.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ue,H.u_coord_matrix),u_is_text:new a.Uniform1i(ue,H.u_is_text),u_pitch_with_map:new a.Uniform1i(ue,H.u_pitch_with_map),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_texture:new a.Uniform1i(ue,H.u_texture)}},Sc=function(ue,H){return{u_is_size_zoom_constant:new a.Uniform1i(ue,H.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ue,H.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ue,H.u_size_t),u_size:new a.Uniform1f(ue,H.u_size),u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ue,H.u_pitch),u_rotate_symbol:new a.Uniform1i(ue,H.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ue,H.u_aspect_ratio),u_fade_change:new a.Uniform1f(ue,H.u_fade_change),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ue,H.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ue,H.u_coord_matrix),u_is_text:new a.Uniform1i(ue,H.u_is_text),u_pitch_with_map:new a.Uniform1i(ue,H.u_pitch_with_map),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_texture:new a.Uniform1i(ue,H.u_texture),u_gamma_scale:new a.Uniform1f(ue,H.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(ue,H.u_is_halo)}},nf=function(ue,H){return{u_is_size_zoom_constant:new a.Uniform1i(ue,H.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(ue,H.u_is_size_feature_constant),u_size_t:new a.Uniform1f(ue,H.u_size_t),u_size:new a.Uniform1f(ue,H.u_size),u_camera_to_center_distance:new a.Uniform1f(ue,H.u_camera_to_center_distance),u_pitch:new a.Uniform1f(ue,H.u_pitch),u_rotate_symbol:new a.Uniform1i(ue,H.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(ue,H.u_aspect_ratio),u_fade_change:new a.Uniform1f(ue,H.u_fade_change),u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(ue,H.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(ue,H.u_coord_matrix),u_is_text:new a.Uniform1i(ue,H.u_is_text),u_pitch_with_map:new a.Uniform1i(ue,H.u_pitch_with_map),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_texsize_icon:new a.Uniform2f(ue,H.u_texsize_icon),u_texture:new a.Uniform1i(ue,H.u_texture),u_texture_icon:new a.Uniform1i(ue,H.u_texture_icon),u_gamma_scale:new a.Uniform1f(ue,H.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(ue,H.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(ue,H.u_is_halo)}},sv=function(ue,H,ie,W,ce,Me,ze,$e,Ye,Je){var lt=ce.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:H?H.uSizeT:0,u_size:H?H.uSize:0,u_camera_to_center_distance:lt.cameraToCenterDistance,u_pitch:lt.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:lt.width/lt.height,u_fade_change:ce.options.fadeDuration?ce.symbolFadeChange:1,u_matrix:Me,u_label_plane_matrix:ze,u_coord_matrix:$e,u_is_text:+Ye,u_pitch_with_map:+W,u_texsize:Je,u_texture:0}},lv=function(ue,H,ie,W,ce,Me,ze,$e,Ye,Je,lt){var _t=ce.transform;return a.extend(sv(ue,H,ie,W,ce,Me,ze,$e,Ye,Je),{u_gamma_scale:W?Math.cos(_t._pitch)*_t.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:1})},nd=function(ue,H,ie,W,ce,Me,ze,$e,Ye,Je){return a.extend(lv(ue,H,ie,W,ce,Me,ze,$e,!0,Ye),{u_texsize_icon:Je,u_texture_icon:1})},wo=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_opacity:new a.Uniform1f(ue,H.u_opacity),u_color:new a.UniformColor(ue,H.u_color)}},Md=function(ue,H){return{u_matrix:new a.UniformMatrix4f(ue,H.u_matrix),u_opacity:new a.Uniform1f(ue,H.u_opacity),u_image:new a.Uniform1i(ue,H.u_image),u_pattern_tl_a:new a.Uniform2f(ue,H.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(ue,H.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(ue,H.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(ue,H.u_pattern_br_b),u_texsize:new a.Uniform2f(ue,H.u_texsize),u_mix:new a.Uniform1f(ue,H.u_mix),u_pattern_size_a:new a.Uniform2f(ue,H.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(ue,H.u_pattern_size_b),u_scale_a:new a.Uniform1f(ue,H.u_scale_a),u_scale_b:new a.Uniform1f(ue,H.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(ue,H.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(ue,H.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(ue,H.u_tile_units_to_pixels)}},af=function(ue,H,ie){return{u_matrix:ue,u_opacity:H,u_color:ie}},zu=function(ue,H,ie,W,ce,Me){return a.extend(yh(W,Me,ie,ce),{u_matrix:ue,u_opacity:H})},Fu={fillExtrusion:Pf,fillExtrusionPattern:Is,fill:Du,fillPattern:Df,fillOutline:bc,fillOutlinePattern:_c,circle:td,collisionBox:pu,collisionCircle:tf,debug:Co,clippingMask:$c,heatmap:Wc,heatmapTexture:Ws,hillshade:Iu,hillshadePrepare:Dl,line:Of,lineGradient:yu,linePattern:mu,lineSDF:Sd,raster:Ou,symbolIcon:Xs,symbolSDF:Sc,symbolTextAndIcon:nf,background:wo,backgroundPattern:Md},Il;function Sl(ue,H,ie,W,ce,Me,ze){for(var $e=ue.context,Ye=$e.gl,Je=ue.useProgram("collisionBox"),lt=[],_t=0,xt=0,Ot=0;Ot0){var dr=a.create(),wr=zt;a.mul(dr,Mt.placementInvProjMatrix,ue.transform.glCoordMatrix),a.mul(dr,dr,Mt.placementViewportMatrix),lt.push({circleArray:or,circleOffset:xt,transform:wr,invTransform:dr}),_t+=or.length/4,xt=_t}Nt&&Je.draw($e,Ye.LINES,Br.disabled,cn.disabled,ue.colorModeForRenderPass(),Ft.disabled,gu(zt,ue.transform,jt),ie.id,Nt.layoutVertexBuffer,Nt.indexBuffer,Nt.segments,null,ue.transform.zoom,null,null,Nt.collisionVertexBuffer)}}if(!(!ze||!lt.length)){var Ur=ue.useProgram("collisionCircle"),Fr=new a.StructArrayLayout2f1f2i16;Fr.resize(_t*4),Fr._trim();for(var Nr=0,$r=0,Kr=lt;$r=0&&(Ut[Mt.associatedIconIndex]={shiftedAnchor:wn,angle:jn})}}if(lt){Ot.clear();for(var Vn=ue.icon.placedSymbolArray,Va=0;Va0){var ze=a.browser.now(),$e=(ze-ue.timeAdded)/Me,Ye=H?(ze-H.timeAdded)/Me:-1,Je=ie.getSource(),lt=ce.coveringZoomLevel({tileSize:Je.tileSize,roundZoom:Je.roundZoom}),_t=!H||Math.abs(H.tileID.overscaledZ-lt)>Math.abs(ue.tileID.overscaledZ-lt),xt=_t&&ue.refreshedUponExpiration?1:a.clamp(_t?$e:1-Ye,0,1);return ue.refreshedUponExpiration&&$e>=1&&(ue.refreshedUponExpiration=!1),H?{opacity:1,mix:1-xt}:{opacity:xt,mix:0}}else return{opacity:1,mix:0}}function jf(ue,H,ie){var W=ie.paint.get("background-color"),ce=ie.paint.get("background-opacity");if(ce!==0){var Me=ue.context,ze=Me.gl,$e=ue.transform,Ye=$e.tileSize,Je=ie.paint.get("background-pattern");if(!ue.isPatternMissing(Je)){var lt=!Je&&W.a===1&&ce===1&&ue.opaquePassEnabledForLayer()?"opaque":"translucent";if(ue.renderPass===lt){var _t=cn.disabled,xt=ue.depthModeForSublayer(0,lt==="opaque"?Br.ReadWrite:Br.ReadOnly),Ot=ue.colorModeForRenderPass(),Ut=ue.useProgram(Je?"backgroundPattern":"background"),jt=$e.coveringTiles({tileSize:Ye});Je&&(Me.activeTexture.set(ze.TEXTURE0),ue.imageManager.bind(ue.context));for(var Mt=ie.getCrossfadeParameters(),zt=0,Nt=jt;zt "+ie.overscaledZ);var zt=Mt+" "+Ot+"kb";fv(ue,zt),ze.draw(W,ce.TRIANGLES,$e,Ye,tt.alphaBlended,Ft.disabled,wc(Me,a.Color.transparent,jt),lt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments)}function fv(ue,H){ue.initDebugOverlayCanvas();var ie=ue.debugOverlayCanvas,W=ue.context.gl,ce=ue.debugOverlayCanvas.getContext("2d");ce.clearRect(0,0,ie.width,ie.height),ce.shadowColor="white",ce.shadowBlur=2,ce.lineWidth=1.5,ce.strokeStyle="white",ce.textBaseline="top",ce.font="bold 36px Open Sans, sans-serif",ce.fillText(H,5,5),ce.strokeText(H,5,5),ue.debugOverlayTexture.update(ie),ue.debugOverlayTexture.bind(W.LINEAR,W.CLAMP_TO_EDGE)}function ff(ue,H,ie){var W=ue.context,ce=ie.implementation;if(ue.renderPass==="offscreen"){var Me=ce.prerender;Me&&(ue.setCustomLayerDefaults(),W.setColorMode(ue.colorModeForRenderPass()),Me.call(ce,W.gl,ue.transform.customLayerMatrix()),W.setDirty(),ue.setBaseState())}else if(ue.renderPass==="translucent"){ue.setCustomLayerDefaults(),W.setColorMode(ue.colorModeForRenderPass()),W.setStencilMode(cn.disabled);var ze=ce.renderingMode==="3d"?new Br(ue.context.gl.LEQUAL,Br.ReadWrite,ue.depthRangeFor3D):ue.depthModeForSublayer(0,Br.ReadOnly);W.setDepthMode(ze),ce.render(W.gl,ue.transform.customLayerMatrix()),W.setDirty(),ue.setBaseState(),W.bindFramebuffer.set(null)}}var zs={symbol:Kc,circle:mh,heatmap:Ks,line:tu,fill:xh,"fill-extrusion":uv,hillshade:qf,raster:_h,background:jf,debug:uf,custom:ff},Ro=function(H,ie){this.context=new er(H),this.transform=ie,this._tileTextures={},this.setup(),this.numSublayers=cr.maxUnderzooming+cr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new hu,this.gpuTimers={}};Ro.prototype.resize=function(H,ie){if(this.width=H*a.browser.devicePixelRatio,this.height=ie*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var W=0,ce=this.style._order;W256&&this.clearStencil(),W.setColorMode(tt.disabled),W.setDepthMode(Br.disabled);var Me=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ze=0,$e=ie;ze<$e.length;ze+=1){var Ye=$e[ze],Je=this._tileClippingMaskIDs[Ye.key]=this.nextStencilID++;Me.draw(W,ce.TRIANGLES,Br.disabled,new cn({func:ce.ALWAYS,mask:0},Je,255,ce.KEEP,ce.KEEP,ce.REPLACE),tt.disabled,Ft.disabled,ov(Ye.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ro.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var H=this.nextStencilID++,ie=this.context.gl;return new cn({func:ie.NOTEQUAL,mask:255},H,255,ie.KEEP,ie.KEEP,ie.REPLACE)},Ro.prototype.stencilModeForClipping=function(H){var ie=this.context.gl;return new cn({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[H.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)},Ro.prototype.stencilConfigForOverlap=function(H){var ie,W=this.context.gl,ce=H.sort(function(Je,lt){return lt.overscaledZ-Je.overscaledZ}),Me=ce[ce.length-1].overscaledZ,ze=ce[0].overscaledZ-Me+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();for(var $e={},Ye=0;Ye=0;this.currentLayer--){var dr=this.style._layers[ce[this.currentLayer]],wr=Me[dr.source],Ur=Ye[dr.source];this._renderTileClippingMasks(dr,Ur),this.renderLayer(this,wr,dr,Ur)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ie.pop():null},Ro.prototype.isPatternMissing=function(H){if(!H)return!1;if(!H.from||!H.to)return!0;var ie=this.imageManager.getPattern(H.from.toString()),W=this.imageManager.getPattern(H.to.toString());return!ie||!W},Ro.prototype.useProgram=function(H,ie){this.cache=this.cache||{};var W=""+H+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[W]||(this.cache[W]=new Gv(this.context,H,Ep[H],ie,Fu[H],this._showOverdrawInspector)),this.cache[W]},Ro.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ro.prototype.setBaseState=function(){var H=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(H.FUNC_ADD)},Ro.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var H=this.context.gl;this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,H.RGBA)}},Ro.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var _u=function(H,ie){this.points=H,this.planes=ie};_u.fromInvProjectionMatrix=function(H,ie,W){var ce=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Me=Math.pow(2,W),ze=ce.map(function(Je){return a.transformMat4([],Je,H)}).map(function(Je){return a.scale$1([],Je,1/Je[3]/ie*Me)}),$e=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ye=$e.map(function(Je){var lt=a.sub([],ze[Je[0]],ze[Je[1]]),_t=a.sub([],ze[Je[2]],ze[Je[1]]),xt=a.normalize([],a.cross([],lt,_t)),Ot=-a.dot(xt,ze[Je[1]]);return xt.concat(Ot)});return new _u(ze,Ye)};var cf=function(H,ie){this.min=H,this.max=ie,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};cf.prototype.quadrant=function(H){for(var ie=[H%2===0,H<2],W=a.clone$2(this.min),ce=a.clone$2(this.max),Me=0;Me=0;if(ze===0)return 0;ze!==ie.length&&(W=!1)}if(W)return 2;for(var Ye=0;Ye<3;Ye++){for(var Je=Number.MAX_VALUE,lt=-Number.MAX_VALUE,_t=0;_tthis.max[Ye]-this.min[Ye])return 0}return 1};var Wo=function(H,ie,W,ce){if(H===void 0&&(H=0),ie===void 0&&(ie=0),W===void 0&&(W=0),ce===void 0&&(ce=0),isNaN(H)||H<0||isNaN(ie)||ie<0||isNaN(W)||W<0||isNaN(ce)||ce<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=H,this.bottom=ie,this.left=W,this.right=ce};Wo.prototype.interpolate=function(H,ie,W){return ie.top!=null&&H.top!=null&&(this.top=a.number(H.top,ie.top,W)),ie.bottom!=null&&H.bottom!=null&&(this.bottom=a.number(H.bottom,ie.bottom,W)),ie.left!=null&&H.left!=null&&(this.left=a.number(H.left,ie.left,W)),ie.right!=null&&H.right!=null&&(this.right=a.number(H.right,ie.right,W)),this},Wo.prototype.getCenter=function(H,ie){var W=a.clamp((this.left+H-this.right)/2,0,H),ce=a.clamp((this.top+ie-this.bottom)/2,0,ie);return new a.Point(W,ce)},Wo.prototype.equals=function(H){return this.top===H.top&&this.bottom===H.bottom&&this.left===H.left&&this.right===H.right},Wo.prototype.clone=function(){return new Wo(this.top,this.bottom,this.left,this.right)},Wo.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var di=function(H,ie,W,ce,Me){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Me===void 0?!0:Me,this._minZoom=H||0,this._maxZoom=ie||22,this._minPitch=W??0,this._maxPitch=ce??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Wo,this._posMatrixCache={},this._alignedPosMatrixCache={}},ji={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};di.prototype.clone=function(){var H=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return H.tileSize=this.tileSize,H.latRange=this.latRange,H.width=this.width,H.height=this.height,H._center=this._center,H.zoom=this.zoom,H.angle=this.angle,H._fov=this._fov,H._pitch=this._pitch,H._unmodified=this._unmodified,H._edgeInsets=this._edgeInsets.clone(),H._calcMatrices(),H},ji.minZoom.get=function(){return this._minZoom},ji.minZoom.set=function(ue){this._minZoom!==ue&&(this._minZoom=ue,this.zoom=Math.max(this.zoom,ue))},ji.maxZoom.get=function(){return this._maxZoom},ji.maxZoom.set=function(ue){this._maxZoom!==ue&&(this._maxZoom=ue,this.zoom=Math.min(this.zoom,ue))},ji.minPitch.get=function(){return this._minPitch},ji.minPitch.set=function(ue){this._minPitch!==ue&&(this._minPitch=ue,this.pitch=Math.max(this.pitch,ue))},ji.maxPitch.get=function(){return this._maxPitch},ji.maxPitch.set=function(ue){this._maxPitch!==ue&&(this._maxPitch=ue,this.pitch=Math.min(this.pitch,ue))},ji.renderWorldCopies.get=function(){return this._renderWorldCopies},ji.renderWorldCopies.set=function(ue){ue===void 0?ue=!0:ue===null&&(ue=!1),this._renderWorldCopies=ue},ji.worldSize.get=function(){return this.tileSize*this.scale},ji.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ji.size.get=function(){return new a.Point(this.width,this.height)},ji.bearing.get=function(){return-this.angle/Math.PI*180},ji.bearing.set=function(ue){var H=-a.wrap(ue,-180,180)*Math.PI/180;this.angle!==H&&(this._unmodified=!1,this.angle=H,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ji.pitch.get=function(){return this._pitch/Math.PI*180},ji.pitch.set=function(ue){var H=a.clamp(ue,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==H&&(this._unmodified=!1,this._pitch=H,this._calcMatrices())},ji.fov.get=function(){return this._fov/Math.PI*180},ji.fov.set=function(ue){ue=Math.max(.01,Math.min(60,ue)),this._fov!==ue&&(this._unmodified=!1,this._fov=ue/180*Math.PI,this._calcMatrices())},ji.zoom.get=function(){return this._zoom},ji.zoom.set=function(ue){var H=Math.min(Math.max(ue,this.minZoom),this.maxZoom);this._zoom!==H&&(this._unmodified=!1,this._zoom=H,this.scale=this.zoomScale(H),this.tileZoom=Math.floor(H),this.zoomFraction=H-this.tileZoom,this._constrain(),this._calcMatrices())},ji.center.get=function(){return this._center},ji.center.set=function(ue){ue.lat===this._center.lat&&ue.lng===this._center.lng||(this._unmodified=!1,this._center=ue,this._constrain(),this._calcMatrices())},ji.padding.get=function(){return this._edgeInsets.toJSON()},ji.padding.set=function(ue){this._edgeInsets.equals(ue)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ue,1),this._calcMatrices())},ji.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},di.prototype.isPaddingEqual=function(H){return this._edgeInsets.equals(H)},di.prototype.interpolatePadding=function(H,ie,W){this._unmodified=!1,this._edgeInsets.interpolate(H,ie,W),this._constrain(),this._calcMatrices()},di.prototype.coveringZoomLevel=function(H){var ie=(H.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/H.tileSize));return Math.max(0,ie)},di.prototype.getVisibleUnwrappedCoordinates=function(H){var ie=[new a.UnwrappedTileID(0,H)];if(this._renderWorldCopies)for(var W=this.pointCoordinate(new a.Point(0,0)),ce=this.pointCoordinate(new a.Point(this.width,0)),Me=this.pointCoordinate(new a.Point(this.width,this.height)),ze=this.pointCoordinate(new a.Point(0,this.height)),$e=Math.floor(Math.min(W.x,ce.x,Me.x,ze.x)),Ye=Math.floor(Math.max(W.x,ce.x,Me.x,ze.x)),Je=1,lt=$e-Je;lt<=Ye+Je;lt++)lt!==0&&ie.push(new a.UnwrappedTileID(lt,H));return ie},di.prototype.coveringTiles=function(H){var ie=this.coveringZoomLevel(H),W=ie;if(H.minzoom!==void 0&&ieH.maxzoom&&(ie=H.maxzoom);var ce=a.MercatorCoordinate.fromLngLat(this.center),Me=Math.pow(2,ie),ze=[Me*ce.x,Me*ce.y,0],$e=_u.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ie),Ye=H.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Ye=ie);var Je=3,lt=function(Qr){return{aabb:new cf([Qr*Me,0,0],[(Qr+1)*Me,Me,0]),zoom:0,x:0,y:0,wrap:Qr,fullyVisible:!1}},_t=[],xt=[],Ot=ie,Ut=H.reparseOverscaled?W:ie;if(this._renderWorldCopies)for(var jt=1;jt<=3;jt++)_t.push(lt(-jt)),_t.push(lt(jt));for(_t.push(lt(0));_t.length>0;){var Mt=_t.pop(),zt=Mt.x,Nt=Mt.y,or=Mt.fullyVisible;if(!or){var dr=Mt.aabb.intersects($e);if(dr===0)continue;or=dr===2}var wr=Mt.aabb.distanceX(ze),Ur=Mt.aabb.distanceY(ze),Fr=Math.max(Math.abs(wr),Math.abs(Ur)),Nr=Je+(1<Nr&&Mt.zoom>=Ye){xt.push({tileID:new a.OverscaledTileID(Mt.zoom===Ot?Ut:Mt.zoom,Mt.wrap,Mt.zoom,zt,Nt),distanceSq:a.sqrLen([ze[0]-.5-zt,ze[1]-.5-Nt])});continue}for(var $r=0;$r<4;$r++){var Kr=(zt<<1)+$r%2,ln=(Nt<<1)+($r>>1);_t.push({aabb:Mt.aabb.quadrant($r),zoom:Mt.zoom+1,x:Kr,y:ln,wrap:Mt.wrap,fullyVisible:or})}}return xt.sort(function(Qr,wn){return Qr.distanceSq-wn.distanceSq}).map(function(Qr){return Qr.tileID})},di.prototype.resize=function(H,ie){this.width=H,this.height=ie,this.pixelsToGLUnits=[2/H,-2/ie],this._constrain(),this._calcMatrices()},ji.unmodified.get=function(){return this._unmodified},di.prototype.zoomScale=function(H){return Math.pow(2,H)},di.prototype.scaleZoom=function(H){return Math.log(H)/Math.LN2},di.prototype.project=function(H){var ie=a.clamp(H.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(H.lng)*this.worldSize,a.mercatorYfromLat(ie)*this.worldSize)},di.prototype.unproject=function(H){return new a.MercatorCoordinate(H.x/this.worldSize,H.y/this.worldSize).toLngLat()},ji.point.get=function(){return this.project(this.center)},di.prototype.setLocationAtPoint=function(H,ie){var W=this.pointCoordinate(ie),ce=this.pointCoordinate(this.centerPoint),Me=this.locationCoordinate(H),ze=new a.MercatorCoordinate(Me.x-(W.x-ce.x),Me.y-(W.y-ce.y));this.center=this.coordinateLocation(ze),this._renderWorldCopies&&(this.center=this.center.wrap())},di.prototype.locationPoint=function(H){return this.coordinatePoint(this.locationCoordinate(H))},di.prototype.pointLocation=function(H){return this.coordinateLocation(this.pointCoordinate(H))},di.prototype.locationCoordinate=function(H){return a.MercatorCoordinate.fromLngLat(H)},di.prototype.coordinateLocation=function(H){return H.toLngLat()},di.prototype.pointCoordinate=function(H){var ie=0,W=[H.x,H.y,0,1],ce=[H.x,H.y,1,1];a.transformMat4(W,W,this.pixelMatrixInverse),a.transformMat4(ce,ce,this.pixelMatrixInverse);var Me=W[3],ze=ce[3],$e=W[0]/Me,Ye=ce[0]/ze,Je=W[1]/Me,lt=ce[1]/ze,_t=W[2]/Me,xt=ce[2]/ze,Ot=_t===xt?0:(ie-_t)/(xt-_t);return new a.MercatorCoordinate(a.number($e,Ye,Ot)/this.worldSize,a.number(Je,lt,Ot)/this.worldSize)},di.prototype.coordinatePoint=function(H){var ie=[H.x*this.worldSize,H.y*this.worldSize,0,1];return a.transformMat4(ie,ie,this.pixelMatrix),new a.Point(ie[0]/ie[3],ie[1]/ie[3])},di.prototype.getBounds=function(){return new a.LngLatBounds().extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},di.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},di.prototype.setMaxBounds=function(H){H?(this.lngRange=[H.getWest(),H.getEast()],this.latRange=[H.getSouth(),H.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},di.prototype.calculatePosMatrix=function(H,ie){ie===void 0&&(ie=!1);var W=H.key,ce=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(ce[W])return ce[W];var Me=H.canonical,ze=this.worldSize/this.zoomScale(Me.z),$e=Me.x+Math.pow(2,Me.z)*H.wrap,Ye=a.identity(new Float64Array(16));return a.translate(Ye,Ye,[$e*ze,Me.y*ze,0]),a.scale(Ye,Ye,[ze/a.EXTENT,ze/a.EXTENT,1]),a.multiply(Ye,ie?this.alignedProjMatrix:this.projMatrix,Ye),ce[W]=new Float32Array(Ye),ce[W]},di.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},di.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var H=-90,ie=90,W=-180,ce=180,Me,ze,$e,Ye,Je=this.size,lt=this._unmodified;if(this.latRange){var _t=this.latRange;H=a.mercatorYfromLat(_t[1])*this.worldSize,ie=a.mercatorYfromLat(_t[0])*this.worldSize,Me=ie-Hie&&(Ye=ie-Mt)}if(this.lngRange){var zt=Ot.x,Nt=Je.x/2;zt-Ntce&&($e=ce-Nt)}($e!==void 0||Ye!==void 0)&&(this.center=this.unproject(new a.Point($e!==void 0?$e:Ot.x,Ye!==void 0?Ye:Ot.y))),this._unmodified=lt,this._constraining=!1}},di.prototype._calcMatrices=function(){if(this.height){var H=this._fov/2,ie=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(H)*this.height;var W=Math.PI/2+this._pitch,ce=this._fov*(.5+ie.y/this.height),Me=Math.sin(ce)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-W-ce,.01,Math.PI-.01)),ze=this.point,$e=ze.x,Ye=ze.y,Je=Math.cos(Math.PI/2-this._pitch)*Me+this.cameraToCenterDistance,lt=Je*1.01,_t=this.height/50,xt=new Float64Array(16);a.perspective(xt,this._fov,this.width/this.height,_t,lt),xt[8]=-ie.x*2/this.width,xt[9]=ie.y*2/this.height,a.scale(xt,xt,[1,-1,1]),a.translate(xt,xt,[0,0,-this.cameraToCenterDistance]),a.rotateX(xt,xt,this._pitch),a.rotateZ(xt,xt,this.angle),a.translate(xt,xt,[-$e,-Ye,0]),this.mercatorMatrix=a.scale([],xt,[this.worldSize,this.worldSize,this.worldSize]),a.scale(xt,xt,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=xt,this.invProjMatrix=a.invert([],this.projMatrix);var Ot=this.width%2/2,Ut=this.height%2/2,jt=Math.cos(this.angle),Mt=Math.sin(this.angle),zt=$e-Math.round($e)+jt*Ot+Mt*Ut,Nt=Ye-Math.round(Ye)+jt*Ut+Mt*Ot,or=new Float64Array(xt);if(a.translate(or,or,[zt>.5?zt-1:zt,Nt>.5?Nt-1:Nt,0]),this.alignedProjMatrix=or,xt=a.create(),a.scale(xt,xt,[this.width/2,-this.height/2,1]),a.translate(xt,xt,[1,-1,0]),this.labelPlaneMatrix=xt,xt=a.create(),a.scale(xt,xt,[1,-1,1]),a.translate(xt,xt,[-1,-1,0]),a.scale(xt,xt,[2/this.width,2/this.height,1]),this.glCoordMatrix=xt,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),xt=a.invert(new Float64Array(16),this.pixelMatrix),!xt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=xt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},di.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var H=this.pointCoordinate(new a.Point(0,0)),ie=[H.x*this.worldSize,H.y*this.worldSize,0,1],W=a.transformMat4(ie,ie,this.pixelMatrix);return W[3]/this.cameraToCenterDistance},di.prototype.getCameraPoint=function(){var H=this._pitch,ie=Math.tan(H)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,ie))},di.prototype.getCameraQueryGeometry=function(H){var ie=this.getCameraPoint();if(H.length===1)return[H[0],ie];for(var W=ie.x,ce=ie.y,Me=ie.x,ze=ie.y,$e=0,Ye=H;$e=3&&!H.some(function(W){return isNaN(W)})){var ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(H[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+H[2],+H[1]],zoom:+H[0],bearing:ie,pitch:+(H[4]||0)}),!0}return!1},Gf.prototype._updateHashUnthrottled=function(){var H=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,H)}catch{}};var se={linearity:.3,easing:a.bezier(0,0,.3,1)},xe=a.extend({deceleration:2500,maxSpeed:1400},se),Re=a.extend({deceleration:20,maxSpeed:1400},se),Ve=a.extend({deceleration:1e3,maxSpeed:360},se),Xe=a.extend({deceleration:1e3,maxSpeed:90},se),Ke=function(H){this._map=H,this.clear()};Ke.prototype.clear=function(){this._inertiaBuffer=[]},Ke.prototype.record=function(H){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:H})},Ke.prototype._drainInertiaBuffer=function(){for(var H=this._inertiaBuffer,ie=a.browser.now(),W=160;H.length>0&&ie-H[0].time>W;)H.shift()},Ke.prototype._onMoveEnd=function(H){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ie={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},W=0,ce=this._inertiaBuffer;W=this._clickTolerance||this._map.fire(new St(H.type,this._map,H))},ar.prototype.dblclick=function(H){return this._firePreventable(new St(H.type,this._map,H))},ar.prototype.mouseover=function(H){this._map.fire(new St(H.type,this._map,H))},ar.prototype.mouseout=function(H){this._map.fire(new St(H.type,this._map,H))},ar.prototype.touchstart=function(H){return this._firePreventable(new Gt(H.type,this._map,H))},ar.prototype.touchmove=function(H){this._map.fire(new Gt(H.type,this._map,H))},ar.prototype.touchend=function(H){this._map.fire(new Gt(H.type,this._map,H))},ar.prototype.touchcancel=function(H){this._map.fire(new Gt(H.type,this._map,H))},ar.prototype._firePreventable=function(H){if(this._map.fire(H),H.defaultPrevented)return{}},ar.prototype.isEnabled=function(){return!0},ar.prototype.isActive=function(){return!1},ar.prototype.enable=function(){},ar.prototype.disable=function(){};var ir=function(H){this._map=H};ir.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},ir.prototype.mousemove=function(H){this._map.fire(new St(H.type,this._map,H))},ir.prototype.mousedown=function(){this._delayContextMenu=!0},ir.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new St("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},ir.prototype.contextmenu=function(H){this._delayContextMenu?this._contextMenuEvent=H:this._map.fire(new St(H.type,this._map,H)),this._map.listens("contextmenu")&&H.preventDefault()},ir.prototype.isEnabled=function(){return!0},ir.prototype.isActive=function(){return!1},ir.prototype.enable=function(){},ir.prototype.disable=function(){};var Tr=function(H,ie){this._map=H,this._el=H.getCanvasContainer(),this._container=H.getContainer(),this._clickTolerance=ie.clickTolerance||1};Tr.prototype.isEnabled=function(){return!!this._enabled},Tr.prototype.isActive=function(){return!!this._active},Tr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Tr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Tr.prototype.mousedown=function(H,ie){this.isEnabled()&&H.shiftKey&&H.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)},Tr.prototype.mousemoveWindow=function(H,ie){if(this._active){var W=ie;if(!(this._lastPos.equals(W)||!this._box&&W.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=H.timeStamp),W.length===this.numTouches&&(this.centroid=sr(ie),this.touches=hr(W,ie)))},Or.prototype.touchmove=function(H,ie,W){if(!(this.aborted||!this.centroid)){var ce=hr(W,ie);for(var Me in this.touches){var ze=this.touches[Me],$e=ce[Me];(!$e||$e.dist(ze)>Dr)&&(this.aborted=!0)}}},Or.prototype.touchend=function(H,ie,W){if((!this.centroid||H.timeStamp-this.startTime>Ar)&&(this.aborted=!0),W.length===0){var ce=!this.aborted&&this.centroid;if(this.reset(),ce)return ce}};var Sr=function(H){this.singleTap=new Or(H),this.numTaps=H.numTaps,this.reset()};Sr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Sr.prototype.touchstart=function(H,ie,W){this.singleTap.touchstart(H,ie,W)},Sr.prototype.touchmove=function(H,ie,W){this.singleTap.touchmove(H,ie,W)},Sr.prototype.touchend=function(H,ie,W){var ce=this.singleTap.touchend(H,ie,W);if(ce){var Me=H.timeStamp-this.lastTime0&&(this._active=!0);var ce=hr(W,ie),Me=new a.Point(0,0),ze=new a.Point(0,0),$e=0;for(var Ye in ce){var Je=ce[Ye],lt=this._touches[Ye];lt&&(Me._add(Je),ze._add(Je.sub(lt)),$e++,ce[Ye]=Je)}if(this._touches=ce,!($eMath.abs(ue.x)}var yi=100,Ss=(function(ue){function H(){ue.apply(this,arguments)}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.reset=function(){ue.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},H.prototype._start=function(W){this._lastPoints=W,xs(W[0].sub(W[1]))&&(this._valid=!1)},H.prototype._move=function(W,ce,Me){var ze=W[0].sub(this._lastPoints[0]),$e=W[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ze,$e,Me.timeStamp),!!this._valid){this._lastPoints=W,this._active=!0;var Ye=(ze.y+$e.y)/2,Je=-.5;return{pitchDelta:Ye*Je}}},H.prototype.gestureBeginsVertically=function(W,ce,Me){if(this._valid!==void 0)return this._valid;var ze=2,$e=W.mag()>=ze,Ye=ce.mag()>=ze;if(!(!$e&&!Ye)){if(!$e||!Ye)return this._firstMove===void 0&&(this._firstMove=Me),Me-this._firstMove0==ce.y>0;return xs(W)&&xs(ce)&&Je}},H})(Oi),Ms={panStep:100,bearingStep:15,pitchStep:10},To=function(){var H=Ms;this._panStep=H.panStep,this._bearingStep=H.bearingStep,this._pitchStep=H.pitchStep,this._rotationDisabled=!1};To.prototype.reset=function(){this._active=!1},To.prototype.keydown=function(H){var ie=this;if(!(H.altKey||H.ctrlKey||H.metaKey)){var W=0,ce=0,Me=0,ze=0,$e=0;switch(H.keyCode){case 61:case 107:case 171:case 187:W=1;break;case 189:case 109:case 173:W=-1;break;case 37:H.shiftKey?ce=-1:(H.preventDefault(),ze=-1);break;case 39:H.shiftKey?ce=1:(H.preventDefault(),ze=1);break;case 38:H.shiftKey?Me=1:(H.preventDefault(),$e=-1);break;case 40:H.shiftKey?Me=-1:(H.preventDefault(),$e=1);break;default:return}return this._rotationDisabled&&(ce=0,Me=0),{cameraAnimation:function(Ye){var Je=Ye.getZoom();Ye.easeTo({duration:300,easeId:"keyboardHandler",easing:Lt,zoom:W?Math.round(Je)+W*(H.shiftKey?2:1):Je,bearing:Ye.getBearing()+ce*ie._bearingStep,pitch:Ye.getPitch()+Me*ie._pitchStep,offset:[-ze*ie._panStep,-$e*ie._panStep],center:Ye.getCenter()},{originalEvent:H})}}}},To.prototype.enable=function(){this._enabled=!0},To.prototype.disable=function(){this._enabled=!1,this.reset()},To.prototype.isEnabled=function(){return this._enabled},To.prototype.isActive=function(){return this._active},To.prototype.disableRotation=function(){this._rotationDisabled=!0},To.prototype.enableRotation=function(){this._rotationDisabled=!1};function Lt(ue){return ue*(2-ue)}var vr=4.000244140625,xr=1/100,tn=1/450,_n=2,Mr=function(H,ie){this._map=H,this._el=H.getCanvasContainer(),this._handler=ie,this._delta=0,this._defaultZoomRate=xr,this._wheelZoomRate=tn,a.bindAll(["_onTimeout"],this)};Mr.prototype.setZoomRate=function(H){this._defaultZoomRate=H},Mr.prototype.setWheelZoomRate=function(H){this._wheelZoomRate=H},Mr.prototype.isEnabled=function(){return!!this._enabled},Mr.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Mr.prototype.isZooming=function(){return!!this._zooming},Mr.prototype.enable=function(H){this.isEnabled()||(this._enabled=!0,this._aroundCenter=H&&H.around==="center")},Mr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Mr.prototype.wheel=function(H){if(this.isEnabled()){var ie=H.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?H.deltaY*40:H.deltaY,W=a.browser.now(),ce=W-(this._lastWheelEventTime||0);this._lastWheelEventTime=W,ie!==0&&ie%vr===0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":ce>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,H)):this._type||(this._type=Math.abs(ce*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),H.shiftKey&&ie&&(ie=ie/4),this._type&&(this._lastWheelEvent=H,this._delta-=ie,this._active||this._start(H)),H.preventDefault()}},Mr.prototype._onTimeout=function(H){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(H)},Mr.prototype._start=function(H){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ie=i.mousePos(this._el,H);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ie)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Mr.prototype.renderFrame=function(){var H=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ie=this._map.transform;if(this._delta!==0){var W=this._type==="wheel"&&Math.abs(this._delta)>vr?this._wheelZoomRate:this._defaultZoomRate,ce=_n/(1+Math.exp(-Math.abs(this._delta*W)));this._delta<0&&ce!==0&&(ce=1/ce);var Me=typeof this._targetZoom=="number"?ie.zoomScale(this._targetZoom):ie.scale;this._targetZoom=Math.min(ie.maxZoom,Math.max(ie.minZoom,ie.scaleZoom(Me*ce))),this._type==="wheel"&&(this._startZoom=ie.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ze=typeof this._targetZoom=="number"?this._targetZoom:ie.zoom,$e=this._startZoom,Ye=this._easing,Je=!1,lt;if(this._type==="wheel"&&$e&&Ye){var _t=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),xt=Ye(_t);lt=a.number($e,ze,xt),_t<1?this._frameId||(this._frameId=!0):Je=!0}else lt=ze,Je=!0;return this._active=!0,Je&&(this._active=!1,this._finishTimeout=setTimeout(function(){H._zooming=!1,H._handler._triggerRenderFrame(),delete H._targetZoom,delete H._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Je,zoomDelta:lt-ie.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Mr.prototype._smoothOutEasing=function(H){var ie=a.ease;if(this._prevEase){var W=this._prevEase,ce=(a.browser.now()-W.start)/W.duration,Me=W.easing(ce+.01)-W.easing(ce),ze=.27/Math.sqrt(Me*Me+1e-4)*.01,$e=Math.sqrt(.27*.27-ze*ze);ie=a.bezier(ze,$e,.25,1)}return this._prevEase={start:a.browser.now(),duration:H,easing:ie},ie},Mr.prototype.reset=function(){this._active=!1};var Lr=function(H,ie){this._clickZoom=H,this._tapZoom=ie};Lr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Lr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Lr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Lr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var qn=function(){this.reset()};qn.prototype.reset=function(){this._active=!1},qn.prototype.dblclick=function(H,ie){return H.preventDefault(),{cameraAnimation:function(W){W.easeTo({duration:300,zoom:W.getZoom()+(H.shiftKey?-1:1),around:W.unproject(ie)},{originalEvent:H})}}},qn.prototype.enable=function(){this._enabled=!0},qn.prototype.disable=function(){this._enabled=!1,this.reset()},qn.prototype.isEnabled=function(){return this._enabled},qn.prototype.isActive=function(){return this._active};var Nn=function(){this._tap=new Sr({numTouches:1,numTaps:1}),this.reset()};Nn.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Nn.prototype.touchstart=function(H,ie,W){this._swipePoint||(this._tapTime&&H.timeStamp-this._tapTime>yr&&this.reset(),this._tapTime?W.length>0&&(this._swipePoint=ie[0],this._swipeTouch=W[0].identifier):this._tap.touchstart(H,ie,W))},Nn.prototype.touchmove=function(H,ie,W){if(!this._tapTime)this._tap.touchmove(H,ie,W);else if(this._swipePoint){if(W[0].identifier!==this._swipeTouch)return;var ce=ie[0],Me=ce.y-this._swipePoint.y;return this._swipePoint=ce,H.preventDefault(),this._active=!0,{zoomDelta:Me/128}}},Nn.prototype.touchend=function(H,ie,W){if(this._tapTime)this._swipePoint&&W.length===0&&this.reset();else{var ce=this._tap.touchend(H,ie,W);ce&&(this._tapTime=H.timeStamp)}},Nn.prototype.touchcancel=function(){this.reset()},Nn.prototype.enable=function(){this._enabled=!0},Nn.prototype.disable=function(){this._enabled=!1,this.reset()},Nn.prototype.isEnabled=function(){return this._enabled},Nn.prototype.isActive=function(){return this._active};var Gn=function(H,ie,W){this._el=H,this._mousePan=ie,this._touchPan=W};Gn.prototype.enable=function(H){this._inertiaOptions=H||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Gn.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Gn.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Gn.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Wn=function(H,ie,W){this._pitchWithRotate=H.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=W};Wn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Wn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Wn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Wn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Aa=function(H,ie,W,ce){this._el=H,this._touchZoom=ie,this._touchRotate=W,this._tapDragZoom=ce,this._rotationDisabled=!1,this._enabled=!0};Aa.prototype.enable=function(H){this._touchZoom.enable(H),this._rotationDisabled||this._touchRotate.enable(H),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Aa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Aa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Aa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Aa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Aa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ca=function(ue){return ue.zoom||ue.drag||ue.pitch||ue.rotate},aa=(function(ue){function H(){ue.apply(this,arguments)}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H})(a.Event);function zn(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}var Ir=function(H,ie){this._map=H,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ke(H),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie),a.bindAll(["handleEvent","handleWindowEvent"],this);var W=this._el;this._listeners=[[W,"touchstart",{passive:!0}],[W,"touchmove",{passive:!1}],[W,"touchend",void 0],[W,"touchcancel",void 0],[W,"mousedown",void 0],[W,"mousemove",void 0],[W,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[W,"mouseover",void 0],[W,"mouseout",void 0],[W,"dblclick",void 0],[W,"click",void 0],[W,"keydown",{capture:!1}],[W,"keyup",void 0],[W,"wheel",{passive:!1}],[W,"contextmenu",void 0],[a.window,"blur",void 0]];for(var ce=0,Me=this._listeners;ce$e?Math.min(2,wr):Math.max(.5,wr),Qr=Math.pow(ln,1-$r),wn=ze.unproject(or.add(dr.mult($r*Qr)).mult(Kr));ze.setLocationAtPoint(ze.renderWorldCopies?wn.wrap():wn,Mt)}Me._fireMoveEvents(ce)},function($r){Me._afterEase(ce,$r)},W),this},H.prototype._prepareEase=function(W,ce,Me){Me===void 0&&(Me={}),this._moving=!0,!ce&&!Me.moving&&this.fire(new a.Event("movestart",W)),this._zooming&&!Me.zooming&&this.fire(new a.Event("zoomstart",W)),this._rotating&&!Me.rotating&&this.fire(new a.Event("rotatestart",W)),this._pitching&&!Me.pitching&&this.fire(new a.Event("pitchstart",W))},H.prototype._fireMoveEvents=function(W){this.fire(new a.Event("move",W)),this._zooming&&this.fire(new a.Event("zoom",W)),this._rotating&&this.fire(new a.Event("rotate",W)),this._pitching&&this.fire(new a.Event("pitch",W))},H.prototype._afterEase=function(W,ce){if(!(this._easeId&&ce&&this._easeId===ce)){delete this._easeId;var Me=this._zooming,ze=this._rotating,$e=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Me&&this.fire(new a.Event("zoomend",W)),ze&&this.fire(new a.Event("rotateend",W)),$e&&this.fire(new a.Event("pitchend",W)),this.fire(new a.Event("moveend",W))}},H.prototype.flyTo=function(W,ce){var Me=this;if(!W.essential&&a.browser.prefersReducedMotion){var ze=a.pick(W,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ze,ce)}this.stop(),W=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},W);var $e=this.transform,Ye=this.getZoom(),Je=this.getBearing(),lt=this.getPitch(),_t=this.getPadding(),xt="zoom"in W?a.clamp(+W.zoom,$e.minZoom,$e.maxZoom):Ye,Ot="bearing"in W?this._normalizeBearing(W.bearing,Je):Je,Ut="pitch"in W?+W.pitch:lt,jt="padding"in W?W.padding:$e.padding,Mt=$e.zoomScale(xt-Ye),zt=a.Point.convert(W.offset),Nt=$e.centerPoint.add(zt),or=$e.pointLocation(Nt),dr=a.LngLat.convert(W.center||or);this._normalizeCenter(dr);var wr=$e.project(or),Ur=$e.project(dr).sub(wr),Fr=W.curve,Nr=Math.max($e.width,$e.height),$r=Nr/Mt,Kr=Ur.mag();if("minZoom"in W){var ln=a.clamp(Math.min(W.minZoom,Ye,xt),$e.minZoom,$e.maxZoom),Qr=Nr/$e.zoomScale(ln-Ye);Fr=Math.sqrt(Qr/Kr*2)}var wn=Fr*Fr;function jn(Ja){var qa=($r*$r-Nr*Nr+(Ja?-1:1)*wn*wn*Kr*Kr)/(2*(Ja?$r:Nr)*wn*Kr);return Math.log(Math.sqrt(qa*qa+1)-qa)}function na(Ja){return(Math.exp(Ja)-Math.exp(-Ja))/2}function Vn(Ja){return(Math.exp(Ja)+Math.exp(-Ja))/2}function Va(Ja){return na(Ja)/Vn(Ja)}var za=jn(0),Si=function(Ja){return Vn(za)/Vn(za+Fr*Ja)},ii=function(Ja){return Nr*((Vn(za)*Va(za+Fr*Ja)-na(za))/wn)/Kr},Ni=(jn(1)-za)/Fr;if(Math.abs(Kr)<1e-6||!isFinite(Ni)){if(Math.abs(Nr-$r)<1e-6)return this.easeTo(W,ce);var wi=$rW.maxDuration&&(W.duration=0),this._zooming=!0,this._rotating=Je!==Ot,this._pitching=Ut!==lt,this._padding=!$e.isPaddingEqual(jt),this._prepareEase(ce,!1),this._ease(function(Ja){var qa=Ja*Ni,Bs=1/Si(qa);$e.zoom=Ja===1?xt:Ye+$e.scaleZoom(Bs),Me._rotating&&($e.bearing=a.number(Je,Ot,Ja)),Me._pitching&&($e.pitch=a.number(lt,Ut,Ja)),Me._padding&&($e.interpolatePadding(_t,jt,Ja),Nt=$e.centerPoint.add(zt));var El=Ja===1?dr:$e.unproject(wr.add(Ur.mult(ii(qa))).mult(Bs));$e.setLocationAtPoint($e.renderWorldCopies?El.wrap():El,Nt),Me._fireMoveEvents(ce)},function(){return Me._afterEase(ce)},W),this},H.prototype.isEasing=function(){return!!this._easeFrameId},H.prototype.stop=function(){return this._stop()},H.prototype._stop=function(W,ce){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Me=this._onEaseEnd;delete this._onEaseEnd,Me.call(this,ce)}if(!W){var ze=this.handlers;ze&&ze.stop(!1)}return this},H.prototype._ease=function(W,ce,Me){Me.animate===!1||Me.duration===0?(W(1),ce()):(this._easeStart=a.browser.now(),this._easeOptions=Me,this._onEaseFrame=W,this._onEaseEnd=ce,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},H.prototype._renderFrameCallback=function(){var W=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(W)),W<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},H.prototype._normalizeBearing=function(W,ce){W=a.wrap(W,-180,180);var Me=Math.abs(W-ce);return Math.abs(W-360-ce)180?-360:Me<-180?360:0}},H})(a.Evented),vn=function(H){H===void 0&&(H={}),this.options=H,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};vn.prototype.getDefaultPosition=function(){return"bottom-right"},vn.prototype.onAdd=function(H){var ie=this.options&&this.options.compact;return this._map=H,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=i.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ie&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ie===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},vn.prototype.onRemove=function(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},vn.prototype._setElementTitle=function(H,ie){var W=this._map._getUIString("AttributionControl."+ie);H.title=W,H.setAttribute("aria-label",W)},vn.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},vn.prototype._updateEditLink=function(){var H=this._editLink;H||(H=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ie=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(H){var W=ie.reduce(function(ce,Me,ze){return Me.value&&(ce+=Me.key+"="+Me.value+(ze=0)return!1;return!0});var $e=H.join(" | ");$e!==this._attribHTML&&(this._attribHTML=$e,H.length?(this._innerContainer.innerHTML=$e,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},vn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var kn=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};kn.prototype.onAdd=function(H){this._map=H,this._container=i.create("div","mapboxgl-ctrl");var ie=i.create("a","mapboxgl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://www.mapbox.com/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},kn.prototype.onRemove=function(){i.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},kn.prototype.getDefaultPosition=function(){return"bottom-left"},kn.prototype._updateLogo=function(H){(!H||H.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},kn.prototype._logoRequired=function(){if(this._map.style){var H=this._map.style.sourceCaches;for(var ie in H){var W=H[ie].getSource();if(W.mapbox_logo)return!0}return!1}},kn.prototype._updateCompact=function(){var H=this._container.children;if(H.length){var ie=H[0];this._map.getCanvasContainer().offsetWidth<250?ie.classList.add("mapboxgl-compact"):ie.classList.remove("mapboxgl-compact")}};var Rn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Rn.prototype.add=function(H){var ie=++this._id,W=this._queue;return W.push({callback:H,id:ie,cancelled:!1}),ie},Rn.prototype.remove=function(H){for(var ie=this._currentlyRunning,W=ie?this._queue.concat(ie):this._queue,ce=0,Me=W;ceW.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(W.minPitch!=null&&W.maxPitch!=null&&W.minPitch>W.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(W.minPitch!=null&&W.minPitchla)throw new Error("maxPitch must be less than or equal to "+la);var Me=new di(W.minZoom,W.maxZoom,W.minPitch,W.maxPitch,W.renderWorldCopies);if(ue.call(this,Me,W),this._interactive=W.interactive,this._maxTileCacheSize=W.maxTileCacheSize,this._failIfMajorPerformanceCaveat=W.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=W.preserveDrawingBuffer,this._antialias=W.antialias,this._trackResize=W.trackResize,this._bearingSnap=W.bearingSnap,this._refreshExpiredTiles=W.refreshExpiredTiles,this._fadeDuration=W.fadeDuration,this._crossSourceCollisions=W.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=W.collectResourceTiming,this._renderTaskQueue=new Rn,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},ma,W.locale),this._clickTolerance=W.clickTolerance,this._requestManager=new a.RequestManager(W.transformRequest,W.accessToken),typeof W.container=="string"){if(this._container=a.window.document.getElementById(W.container),!this._container)throw new Error("Container '"+W.container+"' not found.")}else if(W.container instanceof Ra)this._container=W.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(W.maxBounds&&this.setMaxBounds(W.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return ce._update(!1)}),this.on("moveend",function(){return ce._update(!1)}),this.on("zoom",function(){return ce._update(!0)}),typeof a.window<"u"&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ir(this,W);var ze=typeof W.hash=="string"&&W.hash||void 0;this._hash=W.hash&&new Gf(ze).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:W.center,zoom:W.zoom,bearing:W.bearing,pitch:W.pitch}),W.bounds&&(this.resize(),this.fitBounds(W.bounds,a.extend({},W.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=W.localIdeographFontFamily,W.style&&this.setStyle(W.style,{localIdeographFontFamily:W.localIdeographFontFamily}),W.attributionControl&&this.addControl(new vn({customAttribution:W.customAttribution})),this.addControl(new kn,W.logoPosition),this.on("style.load",function(){ce.transform.unmodified&&ce.jumpTo(ce.style.stylesheet)}),this.on("data",function($e){ce._update($e.dataType==="style"),ce.fire(new a.Event($e.dataType+"data",$e))}),this.on("dataloading",function($e){ce.fire(new a.Event($e.dataType+"dataloading",$e))})}ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H;var ie={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return H.prototype._getMapId=function(){return this._mapId},H.prototype.addControl=function(ce,Me){if(Me===void 0&&(ce.getDefaultPosition?Me=ce.getDefaultPosition():Me="top-right"),!ce||!ce.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ze=ce.onAdd(this);this._controls.push(ce);var $e=this._controlPositions[Me];return Me.indexOf("bottom")!==-1?$e.insertBefore(ze,$e.firstChild):$e.appendChild(ze),this},H.prototype.removeControl=function(ce){if(!ce||!ce.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Me=this._controls.indexOf(ce);return Me>-1&&this._controls.splice(Me,1),ce.onRemove(this),this},H.prototype.hasControl=function(ce){return this._controls.indexOf(ce)>-1},H.prototype.resize=function(ce){var Me=this._containerDimensions(),ze=Me[0],$e=Me[1];this._resizeCanvas(ze,$e),this.transform.resize(ze,$e),this.painter.resize(ze,$e);var Ye=!this._moving;return Ye&&(this.stop(),this.fire(new a.Event("movestart",ce)).fire(new a.Event("move",ce))),this.fire(new a.Event("resize",ce)),Ye&&this.fire(new a.Event("moveend",ce)),this},H.prototype.getBounds=function(){return this.transform.getBounds()},H.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},H.prototype.setMaxBounds=function(ce){return this.transform.setMaxBounds(a.LngLatBounds.convert(ce)),this._update()},H.prototype.setMinZoom=function(ce){if(ce=ce??bn,ce>=bn&&ce<=this.transform.maxZoom)return this.transform.minZoom=ce,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ce,this._update(),this.getZoom()>ce&&this.setZoom(ce),this;throw new Error("maxZoom must be greater than the current minZoom")},H.prototype.getMaxZoom=function(){return this.transform.maxZoom},H.prototype.setMinPitch=function(ce){if(ce=ce??on,ce=on&&ce<=this.transform.maxPitch)return this.transform.minPitch=ce,this._update(),this.getPitch()la)throw new Error("maxPitch must be less than or equal to "+la);if(ce>=this.transform.minPitch)return this.transform.maxPitch=ce,this._update(),this.getPitch()>ce&&this.setPitch(ce),this;throw new Error("maxPitch must be greater than the current minPitch")},H.prototype.getMaxPitch=function(){return this.transform.maxPitch},H.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},H.prototype.setRenderWorldCopies=function(ce){return this.transform.renderWorldCopies=ce,this._update()},H.prototype.project=function(ce){return this.transform.locationPoint(a.LngLat.convert(ce))},H.prototype.unproject=function(ce){return this.transform.pointLocation(a.Point.convert(ce))},H.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},H.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},H.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},H.prototype._createDelegatedListener=function(ce,Me,ze){var $e=this,Ye;if(ce==="mouseenter"||ce==="mouseover"){var Je=!1,lt=function(Mt){var zt=$e.getLayer(Me)?$e.queryRenderedFeatures(Mt.point,{layers:[Me]}):[];zt.length?Je||(Je=!0,ze.call($e,new St(ce,$e,Mt.originalEvent,{features:zt}))):Je=!1},_t=function(){Je=!1};return{layer:Me,listener:ze,delegates:{mousemove:lt,mouseout:_t}}}else if(ce==="mouseleave"||ce==="mouseout"){var xt=!1,Ot=function(Mt){var zt=$e.getLayer(Me)?$e.queryRenderedFeatures(Mt.point,{layers:[Me]}):[];zt.length?xt=!0:xt&&(xt=!1,ze.call($e,new St(ce,$e,Mt.originalEvent)))},Ut=function(Mt){xt&&(xt=!1,ze.call($e,new St(ce,$e,Mt.originalEvent)))};return{layer:Me,listener:ze,delegates:{mousemove:Ot,mouseout:Ut}}}else{var jt=function(Mt){var zt=$e.getLayer(Me)?$e.queryRenderedFeatures(Mt.point,{layers:[Me]}):[];zt.length&&(Mt.features=zt,ze.call($e,Mt),delete Mt.features)};return{layer:Me,listener:ze,delegates:(Ye={},Ye[ce]=jt,Ye)}}},H.prototype.on=function(ce,Me,ze){if(ze===void 0)return ue.prototype.on.call(this,ce,Me);var $e=this._createDelegatedListener(ce,Me,ze);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ce]=this._delegatedListeners[ce]||[],this._delegatedListeners[ce].push($e);for(var Ye in $e.delegates)this.on(Ye,$e.delegates[Ye]);return this},H.prototype.once=function(ce,Me,ze){if(ze===void 0)return ue.prototype.once.call(this,ce,Me);var $e=this._createDelegatedListener(ce,Me,ze);for(var Ye in $e.delegates)this.once(Ye,$e.delegates[Ye]);return this},H.prototype.off=function(ce,Me,ze){var $e=this;if(ze===void 0)return ue.prototype.off.call(this,ce,Me);var Ye=function(Je){for(var lt=Je[ce],_t=0;_t180;){var ze=ie.locationPoint(ue);if(ze.x>=0&&ze.y>=0&&ze.x<=ie.width&&ze.y<=ie.height)break;ue.lng>ie.center.lng?ue.lng-=360:ue.lng+=360}return ue}var Fi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Wi(ue,H,ie){var W=ue.classList;for(var ce in Fi)W.remove("mapboxgl-"+ie+"-anchor-"+ce);W.add("mapboxgl-"+ie+"-anchor-"+H)}var ss=(function(ue){function H(ie,W){if(ue.call(this),(ie instanceof a.window.HTMLElement||W)&&(ie=a.extend({element:ie},W)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ie&&ie.anchor||"center",this._color=ie&&ie.color||"#3FB1CE",this._scale=ie&&ie.scale||1,this._draggable=ie&&ie.draggable||!1,this._clickTolerance=ie&&ie.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=ie&&ie.rotation||0,this._rotationAlignment=ie&&ie.rotationAlignment||"auto",this._pitchAlignment=ie&&ie.pitchAlignment&&ie.pitchAlignment!=="auto"?ie.pitchAlignment:this._rotationAlignment,!ie||!ie.element){this._defaultMarker=!0,this._element=i.create("div"),this._element.setAttribute("aria-label","Map marker");var ce=i.createNS("http://www.w3.org/2000/svg","svg"),Me=41,ze=27;ce.setAttributeNS(null,"display","block"),ce.setAttributeNS(null,"height",Me+"px"),ce.setAttributeNS(null,"width",ze+"px"),ce.setAttributeNS(null,"viewBox","0 0 "+ze+" "+Me);var $e=i.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"stroke","none"),$e.setAttributeNS(null,"stroke-width","1"),$e.setAttributeNS(null,"fill","none"),$e.setAttributeNS(null,"fill-rule","evenodd");var Ye=i.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"fill-rule","nonzero");var Je=i.createNS("http://www.w3.org/2000/svg","g");Je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Je.setAttributeNS(null,"fill","#000000");for(var lt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],_t=0,xt=lt;_t=ce}this._isDragging&&(this._pos=W.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.Event("dragstart"))),this.fire(new a.Event("drag")))},H.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.Event("dragend")),this._state="inactive"},H.prototype._addDragHandler=function(W){this._element.contains(W.originalEvent.target)&&(W.preventDefault(),this._positionDelta=W.point.sub(this._pos).add(this._offset),this._pointerdownPos=W.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},H.prototype.setDraggable=function(W){return this._draggable=!!W,this._map&&(W?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},H.prototype.isDraggable=function(){return this._draggable},H.prototype.setRotation=function(W){return this._rotation=W||0,this._update(),this},H.prototype.getRotation=function(){return this._rotation},H.prototype.setRotationAlignment=function(W){return this._rotationAlignment=W||"auto",this._update(),this},H.prototype.getRotationAlignment=function(){return this._rotationAlignment},H.prototype.setPitchAlignment=function(W){return this._pitchAlignment=W&&W!=="auto"?W:this._rotationAlignment,this._update(),this},H.prototype.getPitchAlignment=function(){return this._pitchAlignment},H})(a.Evented),Ri={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Es;function co(ue){Es!==void 0?ue(Es):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then(function(H){Es=H.state!=="denied",ue(Es)}):(Es=!!a.window.navigator.geolocation,ue(Es))}var ks=0,Js=!1,Qs=(function(ue){function H(ie){ue.call(this),this.options=a.extend({},Ri,ie),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.onAdd=function(W){return this._map=W,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),co(this._setupUI),this._container},H.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ks=0,Js=!1},H.prototype._isOutOfMapMaxBounds=function(W){var ce=this._map.getMaxBounds(),Me=W.coords;return ce&&(Me.longitudece.getEast()||Me.latitudece.getNorth())},H.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},H.prototype._onSuccess=function(W){if(this._map){if(this._isOutOfMapMaxBounds(W)){this._setErrorState(),this.fire(new a.Event("outofmaxbounds",W)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=W,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(W),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(W),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",W)),this._finish()}},H.prototype._updateCamera=function(W){var ce=new a.LngLat(W.coords.longitude,W.coords.latitude),Me=W.coords.accuracy,ze=this._map.getBearing(),$e=a.extend({bearing:ze},this.options.fitBoundsOptions);this._map.fitBounds(ce.toBounds(Me),$e,{geolocateSource:!0})},H.prototype._updateMarker=function(W){if(W){var ce=new a.LngLat(W.coords.longitude,W.coords.latitude);this._accuracyCircleMarker.setLngLat(ce).addTo(this._map),this._userLocationDotMarker.setLngLat(ce).addTo(this._map),this._accuracy=W.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},H.prototype._updateCircleRadius=function(){var W=this._map._container.clientHeight/2,ce=this._map.unproject([0,W]),Me=this._map.unproject([1,W]),ze=ce.distanceTo(Me),$e=Math.ceil(2*this._accuracy/ze);this._circleElement.style.width=$e+"px",this._circleElement.style.height=$e+"px"},H.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},H.prototype._onError=function(W){if(this._map){if(this.options.trackUserLocation)if(W.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ce=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ce,this._geolocateButton.setAttribute("aria-label",ce),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(W.code===3&&Js)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",W)),this._finish()}},H.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},H.prototype._setupUI=function(W){var ce=this;if(this._container.addEventListener("contextmenu",function($e){return $e.preventDefault()}),this._geolocateButton=i.create("button","mapboxgl-ctrl-geolocate",this._container),i.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",W===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Me=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Me,this._geolocateButton.setAttribute("aria-label",Me)}else{var ze=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ze,this._geolocateButton.setAttribute("aria-label",ze)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ss(this._dotElement),this._circleElement=i.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ss({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function($e){var Ye=$e.originalEvent&&$e.originalEvent.type==="resize";!$e.geolocateSource&&ce._watchState==="ACTIVE_LOCK"&&!Ye&&(ce._watchState="BACKGROUND",ce._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ce._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ce.fire(new a.Event("trackuserlocationend")))})},H.prototype.trigger=function(){if(!this._setup)return a.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ks--,Js=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new a.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ks++;var W;ks>1?(W={maximumAge:6e5,timeout:0},Js=!0):(W=this.options.positionOptions,Js=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,W)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},H.prototype._clearWatch=function(){a.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},H})(a.Evented),qu={maxWidth:100,unit:"metric"},rs=function(H){this.options=a.extend({},qu,H),a.bindAll(["_onMove","setUnit"],this)};rs.prototype.getDefaultPosition=function(){return"bottom-left"},rs.prototype._onMove=function(){Fs(this._map,this._container,this.options)},rs.prototype.onAdd=function(H){return this._map=H,this._container=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",H.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},rs.prototype.onRemove=function(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},rs.prototype.setUnit=function(H){this.options.unit=H,Fs(this._map,this._container,this.options)};function Fs(ue,H,ie){var W=ie&&ie.maxWidth||100,ce=ue._container.clientHeight/2,Me=ue.unproject([0,ce]),ze=ue.unproject([W,ce]),$e=Me.distanceTo(ze);if(ie&&ie.unit==="imperial"){var Ye=3.2808*$e;if(Ye>5280){var Je=Ye/5280;Ka(H,W,Je,ue._getUIString("ScaleControl.Miles"))}else Ka(H,W,Ye,ue._getUIString("ScaleControl.Feet"))}else if(ie&&ie.unit==="nautical"){var lt=$e/1852;Ka(H,W,lt,ue._getUIString("ScaleControl.NauticalMiles"))}else $e>=1e3?Ka(H,W,$e/1e3,ue._getUIString("ScaleControl.Kilometers")):Ka(H,W,$e,ue._getUIString("ScaleControl.Meters"))}function Ka(ue,H,ie,W){var ce=Po(ie),Me=ce/ie;ue.style.width=H*Me+"px",ue.innerHTML=ce+" "+W}function nu(ue){var H=Math.pow(10,Math.ceil(-Math.log(ue)/Math.LN10));return Math.round(ue*H)/H}function Po(ue){var H=Math.pow(10,(""+Math.floor(ue)).length-1),ie=ue/H;return ie=ie>=10?10:ie>=5?5:ie>=3?3:ie>=2?2:ie>=1?1:nu(ie),H*ie}var Bo=function(H){this._fullscreen=!1,H&&H.container&&(H.container instanceof a.window.HTMLElement?this._container=H.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};Bo.prototype.onAdd=function(H){return this._map=H,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Bo.prototype.onRemove=function(){i.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Bo.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},Bo.prototype._setupUI=function(){var H=this._fullscreenButton=i.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);i.create("span","mapboxgl-ctrl-icon",H).setAttribute("aria-hidden",!0),H.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Bo.prototype._updateTitle=function(){var H=this._getTitle();this._fullscreenButton.setAttribute("aria-label",H),this._fullscreenButton.title=H},Bo.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Bo.prototype._isFullscreen=function(){return this._fullscreen},Bo.prototype._changeIcon=function(){var H=a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement;H===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Bo.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Ns={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ol=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),mi=(function(ue){function H(ie){ue.call(this),this.options=a.extend(Object.create(Ns),ie),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ue&&(H.__proto__=ue),H.prototype=Object.create(ue&&ue.prototype),H.prototype.constructor=H,H.prototype.addTo=function(W){return this._map&&this.remove(),this._map=W,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new a.Event("open")),this},H.prototype.isOpen=function(){return!!this._map},H.prototype.remove=function(){return this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new a.Event("close")),this},H.prototype.getLngLat=function(){return this._lngLat},H.prototype.setLngLat=function(W){return this._lngLat=a.LngLat.convert(W),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},H.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},H.prototype.getElement=function(){return this._container},H.prototype.setText=function(W){return this.setDOMContent(a.window.document.createTextNode(W))},H.prototype.setHTML=function(W){var ce=a.window.document.createDocumentFragment(),Me=a.window.document.createElement("body"),ze;for(Me.innerHTML=W;ze=Me.firstChild,!!ze;)ce.appendChild(ze);return this.setDOMContent(ce)},H.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},H.prototype.setMaxWidth=function(W){return this.options.maxWidth=W,this._update(),this},H.prototype.setDOMContent=function(W){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(W),this._createCloseButton(),this._update(),this._focusFirstElement(),this},H.prototype.addClassName=function(W){this._container&&this._container.classList.add(W)},H.prototype.removeClassName=function(W){this._container&&this._container.classList.remove(W)},H.prototype.setOffset=function(W){return this.options.offset=W,this._update(),this},H.prototype.toggleClassName=function(W){if(this._container)return this._container.classList.toggle(W)},H.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=i.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},H.prototype._onMouseUp=function(W){this._update(W.point)},H.prototype._onMouseMove=function(W){this._update(W.point)},H.prototype._onDrag=function(W){this._update(W.point)},H.prototype._update=function(W){var ce=this,Me=this._lngLat||this._trackPointer;if(!(!this._map||!Me||!this._content)&&(this._container||(this._container=i.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=i.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ot){return ce._container.classList.add(Ot)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=si(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!W))){var ze=this._pos=this._trackPointer&&W?W:this._map.project(this._lngLat),$e=this.options.anchor,Ye=Xi(this.options.offset);if(!$e){var Je=this._container.offsetWidth,lt=this._container.offsetHeight,_t;ze.y+Ye.bottom.ythis._map.transform.height-lt?_t=["bottom"]:_t=[],ze.xthis._map.transform.width-Je/2&&_t.push("right"),_t.length===0?$e="bottom":$e=_t.join("-")}var xt=ze.add(Ye[$e]).round();i.setTransform(this._container,Fi[$e]+" translate("+xt.x+"px,"+xt.y+"px)"),Wi(this._container,$e,"popup")}},H.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var W=this._container.querySelector(Ol);W&&W.focus()}},H.prototype._onClose=function(){this.remove()},H})(a.Evented);function Xi(ue){if(ue)if(typeof ue=="number"){var H=Math.round(Math.sqrt(.5*Math.pow(ue,2)));return{center:new a.Point(0,0),top:new a.Point(0,ue),"top-left":new a.Point(H,H),"top-right":new a.Point(-H,H),bottom:new a.Point(0,-ue),"bottom-left":new a.Point(H,-H),"bottom-right":new a.Point(-H,-H),left:new a.Point(ue,0),right:new a.Point(-ue,0)}}else if(ue instanceof a.Point||Array.isArray(ue)){var ie=a.Point.convert(ue);return{center:ie,top:ie,"top-left":ie,"top-right":ie,bottom:ie,"bottom-left":ie,"bottom-right":ie,left:ie,right:ie}}else return{center:a.Point.convert(ue.center||[0,0]),top:a.Point.convert(ue.top||[0,0]),"top-left":a.Point.convert(ue["top-left"]||[0,0]),"top-right":a.Point.convert(ue["top-right"]||[0,0]),bottom:a.Point.convert(ue.bottom||[0,0]),"bottom-left":a.Point.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(ue["bottom-right"]||[0,0]),left:a.Point.convert(ue.left||[0,0]),right:a.Point.convert(ue.right||[0,0])};else return Xi(new a.Point(0,0))}var pi={version:a.version,supported:f,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:La,NavigationControl:Pa,GeolocateControl:Qs,AttributionControl:vn,ScaleControl:rs,FullscreenControl:Bo,Popup:mi,Marker:ss,Style:dh,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:Xt,clearPrewarmedResources:$t,get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(ue){a.config.ACCESS_TOKEN=ue},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(ue){a.config.API_URL=ue},get workerCount(){return Rt.workerCount},set workerCount(ue){Rt.workerCount=ue},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ue){a.config.MAX_PARALLEL_IMAGE_REQUESTS=ue},clearStorage:function(H){a.clearTileCache(H)},workerUrl:""};return pi}),o}))})(C3)),C3.exports}var uq,Lye;function yXe(){if(Lye)return uq;Lye=1;var e=rr(),t=ns().sanitizeHTML,r=a5e(),n=xy();function o(l,u){this.subplot=l,this.uid=l.uid+"-"+u,this.index=u,this.idSource="source-"+this.uid,this.idLayer=n.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;s.update=function(u){this.visible?this.needsNewImage(u)?this.updateImage(u):this.needsNewSource(u)?(this.removeLayer(),this.updateSource(u),this.updateLayer(u)):this.needsNewLayer(u)?this.updateLayer(u):this.updateStyle(u):(this.updateSource(u),this.updateLayer(u)),this.visible=a(u)},s.needsNewImage=function(l){var u=this.subplot.map;return u.getSource(this.idSource)&&this.sourceType==="image"&&l.sourcetype==="image"&&(this.source!==l.source||JSON.stringify(this.coordinates)!==JSON.stringify(l.coordinates))},s.needsNewSource=function(l){return this.sourceType!==l.sourcetype||JSON.stringify(this.source)!==JSON.stringify(l.source)||this.layerType!==l.type},s.needsNewLayer=function(l){return this.layerType!==l.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(l){var u=this.subplot.map;u.getSource(this.idSource).updateImage({url:l.source,coordinates:l.coordinates});var c=this.findFollowingMapboxLayerId(this.lookupBelow());c!==null&&this.subplot.map.moveLayer(this.idLayer,c)},s.updateSource=function(l){var u=this.subplot.map;if(u.getSource(this.idSource)&&u.removeSource(this.idSource),this.sourceType=l.sourcetype,this.source=l.source,!!a(l)){var c=i(l);u.addSource(this.idSource,c)}},s.findFollowingMapboxLayerId=function(l){if(l==="traces")for(var u=this.subplot.getMapLayers(),c=0;c0){for(var c=0;c0}function f(l){var u={},c={};switch(l.type){case"circle":e.extendFlat(c,{"circle-radius":l.circle.radius,"circle-color":l.color,"circle-opacity":l.opacity});break;case"line":e.extendFlat(c,{"line-width":l.line.width,"line-color":l.color,"line-opacity":l.opacity,"line-dasharray":l.line.dash});break;case"fill":e.extendFlat(c,{"fill-color":l.color,"fill-outline-color":l.fill.outlinecolor,"fill-opacity":l.opacity});break;case"symbol":var h=l.symbol,d=r(h.textposition,h.iconsize);e.extendFlat(u,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":d.anchor,"text-offset":d.offset,"symbol-placement":h.placement}),e.extendFlat(c,{"icon-color":l.color,"text-color":h.textfont.color,"text-opacity":l.opacity});break;case"raster":e.extendFlat(c,{"raster-fade-duration":0,"raster-opacity":l.opacity});break}return{layout:u,paint:c}}function i(l){var u=l.sourcetype,c=l.source,h={type:u},d;return u==="geojson"?d="data":u==="vector"?d=typeof c=="string"?"url":"tiles":u==="raster"?(d="tiles",h.tileSize=256):u==="image"&&(d="url",h.coordinates=l.coordinates),h[d]=c,l.sourceattribution&&(h.attribution=t(l.sourceattribution)),h}return uq=function(u,c,h){var d=new o(u,c);return d.update(h),d},uq}var fq,Pye;function mXe(){if(Pye)return fq;Pye=1;var e=i5e(),t=rr(),r=K2(),n=ga(),o=Ia(),s=Gh(),a=yl(),f=p0(),i=f.drawMode,l=f.selectMode,u=Yu().prepSelect,c=Yu().clearOutline,h=Yu().clearSelectionsCache,d=Yu().selectOnClick,v=xy(),p=yXe();function m(A,M){this.id=M,this.gd=A;var w=A._fullLayout,C=A._context;this.container=w._glcontainer.node(),this.isStatic=C.staticPlot,this.uid=w._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(w),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var y=m.prototype;y.plot=function(A,M,w){var C=this,x=M[C.id];C.map&&x.accesstoken!==C.accessToken&&(C.map.remove(),C.map=null,C.styleObj=null,C.traceHash={},C.layerList=[]);var _;C.map?_=new Promise(function(k,E){C.updateMap(A,M,k,E)}):_=new Promise(function(k,E){C.createMap(A,M,k,E)}),w.push(_)},y.createMap=function(A,M,w,C){var x=this,_=M[x.id],k=x.styleObj=g(_.style,M);x.accessToken=_.accesstoken;var E=_.bounds,I=E?[[E.west,E.south],[E.east,E.north]]:null,F=x.map=new e.Map({container:x.div,style:k.style,center:S(_.center),zoom:_.zoom,bearing:_.bearing,pitch:_.pitch,maxBounds:I,interactive:!x.isStatic,preserveDrawingBuffer:x.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new e.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",x.rejectOnError(C),x.isStatic||x.initFx(A,M);var D=[];D.push(new Promise(function(z){F.once("load",z)})),D=D.concat(r.fetchTraceGeoData(A)),Promise.all(D).then(function(){x.fillBelowLookup(A,M),x.updateData(A),x.updateLayout(M),x.resolveOnRender(w)}).catch(C)},y.updateMap=function(A,M,w,C){var x=this,_=x.map,k=M[this.id];x.rejectOnError(C);var E=[],I=g(k.style,M);JSON.stringify(x.styleObj)!==JSON.stringify(I)&&(x.styleObj=I,_.setStyle(I.style),x.traceHash={},E.push(new Promise(function(F){_.once("styledata",F)}))),E=E.concat(r.fetchTraceGeoData(A)),Promise.all(E).then(function(){x.fillBelowLookup(A,M),x.updateData(A),x.updateLayout(M),x.resolveOnRender(w)}).catch(C)},y.fillBelowLookup=function(A,M){var w=M[this.id],C=w.layers,x,_,k=this.belowLookup={},E=!1;for(x=0;x1)for(x=0;x-1&&d(I.originalEvent,C,[w.xaxis],[w.yaxis],w.id,E),F.indexOf("event")>-1&&a.click(C,I.originalEvent)}}},y.updateFx=function(A){var M=this,w=M.map,C=M.gd;if(M.isStatic)return;function x(I){var F=M.map.unproject(I);return[F.lng,F.lat]}var _=A.dragmode,k;k=function(I,F){if(F.isRect){var D=I.range={};D[M.id]=[x([F.xmin,F.ymin]),x([F.xmax,F.ymax])]}else{var z=I.lassoPoints={};z[M.id]=F.map(x)}};var E=M.dragOptions;M.dragOptions=t.extendDeep(E||{},{dragmode:A.dragmode,element:M.div,gd:C,plotinfo:{id:M.id,domain:A[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis,fillRangeItems:k},xaxes:[M.xaxis],yaxes:[M.yaxis],subplot:M.id}),w.off("click",M.onClickInPanHandler),l(_)||i(_)?(w.dragPan.disable(),w.on("zoomstart",M.clearOutline),M.dragOptions.prepFn=function(I,F,D){u(I,F,D,M.dragOptions,_)},s.init(M.dragOptions)):(w.dragPan.enable(),w.off("zoomstart",M.clearOutline),M.div.onmousedown=null,M.div.ontouchstart=null,M.div.removeEventListener("touchstart",M.div._ontouchstart),M.onClickInPanHandler=M.onClickInPanFn(M.dragOptions),w.on("click",M.onClickInPanHandler))},y.updateFramework=function(A){var M=A[this.id].domain,w=A._size,C=this.div.style;C.width=w.w*(M.x[1]-M.x[0])+"px",C.height=w.h*(M.y[1]-M.y[0])+"px",C.left=w.l+M.x[0]*w.w+"px",C.top=w.t+(1-M.y[1])*w.h+"px",this.xaxis._offset=w.l+M.x[0]*w.w,this.xaxis._length=w.w*(M.x[1]-M.x[0]),this.yaxis._offset=w.t+(1-M.y[1])*w.h,this.yaxis._length=w.h*(M.y[1]-M.y[0])},y.updateLayers=function(A){var M=A[this.id],w=M.layers,C=this.layerList,x;if(w.length!==C.length){for(x=0;xF/2){var D=_.split("|").join("
");E.text(D).attr("data-unformatted",D).call(i.convertToTspans,v),I=f.bBox(E.node())}E.attr("transform",r(-3,-I.height+8)),k.insert("rect",".static-attribution").attr({x:-I.width-6,y:-I.height-3,width:I.width+6,height:I.height+3,fill:"rgba(255, 255, 255, 0.75)"});var z=1;I.width+6>F&&(z=F/(I.width+6));var N=[y.l+y.w*T.x[1],y.t+y.h*(1-T.y[0])];k.attr("transform",r(N[0],N[1])+n(z))}};function h(v,p){var m=v._fullLayout,y=v._context;if(y.mapboxAccessToken==="")return"";for(var b=[],g=[],T=!1,S=!1,A=0;A1&&t.warn(c.multipleTokensErrorMsg),b[0]):(g.length&&t.log(["Listed mapbox access token(s)",g.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function d(v){return typeof v=="string"&&(c.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}return Ph.updateFx=function(v){for(var p=v._fullLayout,m=p._subplots[u],y=0;y=0;f--)s.removeLayer(a[f][1])},o.dispose=function(){var s=this.subplot.map;this._removeLayers(),s.removeSource(this.sourceId)},yq=function(a,f){var i=f[0].trace,l=new n(a,i.uid),u=l.sourceId,c=e(f),h=l.below=a.belowLookup["trace-"+i.uid];return a.map.addSource(u,{type:"geojson",data:c.geojson}),l._addLayers(c,h),f[0].trace._glTrace=l,l},yq}var mq,Uye;function AXe(){return Uye||(Uye=1,mq={attributes:o5e(),supplyDefaults:wXe(),colorbar:Zx(),calc:fCe(),plot:TXe(),hoverPoints:cCe(),eventData:hCe(),selectPoints:dCe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var o=r[n].id;if(typeof o=="string"&&o.indexOf("water")===0){for(var s=n+1;s0?+p[d]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:T})}}var A=n.extractOpts(i),M=A.reversescale?n.flipScale(A.colorscale):A.colorscale,w=M[0][1],C=r.opacity(w)<1?w:r.addOpacity(w,0),x=["interpolate",["linear"],["heatmap-density"],0,C];for(d=1;d=0;a--)o.removeLayer(s[a][1])},n.dispose=function(){var o=this.subplot.map;this._removeLayers(),o.removeSource(this.sourceId)},Aq=function(s,a){var f=a[0].trace,i=new r(s,f.uid),l=i.sourceId,u=e(a),c=i.below=s.belowLookup["trace-"+f.uid];return s.map.addSource(l,{type:"geojson",data:u.geojson}),i._addLayers(u,c),i},Aq}var Sq,Xye;function RXe(){if(Xye)return Sq;Xye=1;var e=Ia(),t=jV().hoverPoints,r=jV().getExtraText;return Sq=function(o,s,a){var f=t(o,s,a);if(f){var i=f[0],l=i.cd,u=l[0].trace,c=l[i.index];if(delete i.color,"z"in c){var h=i.subplot.mockAxis;i.z=c.z,i.zLabel=e.tickText(h,h.c2l(c.z),"hover").text}return i.extraText=r(u,c,l[0].t.labels),[i]}},Sq}var Mq,Zye;function LXe(){return Zye||(Zye=1,Mq=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}),Mq}var Eq,Kye;function PXe(){return Kye||(Kye=1,Eq={attributes:s5e(),supplyDefaults:MXe(),colorbar:Zx(),formatLabels:n5e(),calc:EXe(),plot:CXe(),hoverPoints:RXe(),eventData:LXe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n0;){y=g[g.length-1];var T=t[y];if(a[y]=0&&i[y].push(f[A])}a[y]=S}else{if(o[y]===n[y]){for(var M=[],w=[],C=0,S=b.length-1;S>=0;--S){var x=b[S];if(s[x]=!1,M.push(x),w.push(i[x]),C+=i[x].length,f[x]=c.length,x===y){b.length=S;break}}c.push(M);for(var _=new Array(C),S=0;SA&&(A=u.source[b]),u.target[b]>A&&(A=u.target[b]);var M=A+1;i.node._count=M;var w,C=i.node.groups,x={};for(b=0;b0&&o(D,M)&&o(z,M)&&!(x.hasOwnProperty(D)&&x.hasOwnProperty(z)&&x[D]===x[z])){x.hasOwnProperty(z)&&(z=x[z]),x.hasOwnProperty(D)&&(D=x[D]),D=+D,z=+z,p[D]=p[z]=!0;var N="";u.label&&u.label[b]&&(N=u.label[b]);var q=null;N&&m.hasOwnProperty(N)&&(q=m[N]),c.push({pointNumber:b,label:N,color:h?u.color[b]:u.color,hovercolor:d?u.hovercolor[b]:u.hovercolor,customdata:v?u.customdata[b]:u.customdata,concentrationscale:q,source:D,target:z,value:+F}),I.source.push(D),I.target.push(z)}}var P=M+C.length,B=n(l.color),$=n(l.customdata),Q=[];for(b=0;bM-1,childrenNodes:[],pointNumber:b,label:J,color:B?l.color[b]:l.color,customdata:$?l.customdata[b]:l.customdata})}var ne=!1;return f(P,I.source,I.target)&&(ne=!0),{circular:ne,links:c,nodes:Q,groups:C,groupLookup:x}}function f(i,l,u){for(var c=t.init2dArray(i,0),h=0;h1})}return Pq=function(l,u){var c=a(u);return r({circular:c.circular,_nodes:c.nodes,_links:c.links,_groups:c.groups,_groupLookup:c.groupLookup})},Pq}function zXe(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var o,s=r.length,a,f=0,i=0;for(o=0;o=(c=(f+l)/2))?f=c:l=c,(m=r>=(h=(i+u)/2))?i=h:u=h,o=s,!(s=s[y=m<<1|p]))return o[y]=a,e;if(d=+e._x.call(null,s.data),v=+e._y.call(null,s.data),t===d&&r===v)return a.next=s,o?o[y]=a:e._root=a,e;do o=o?o[y]=new Array(4):e._root=new Array(4),(p=t>=(c=(f+l)/2))?f=c:l=c,(m=r>=(h=(i+u)/2))?i=h:u=h;while((y=m<<1|p)===(b=(v>=h)<<1|d>=c));return o[b]=s,o[y]=a,e}function NXe(e){var t,r,n=e.length,o,s,a=new Array(n),f=new Array(n),i=1/0,l=1/0,u=-1/0,c=-1/0;for(r=0;ru&&(u=o),sc&&(c=s));if(i>u||l>c)return this;for(this.cover(i,l).cover(u,c),r=0;re||e>=o||n>t||t>=s;)switch(l=(tu||(f=v.y0)>c||(i=v.x1)=y)<<1|e>=m)&&(v=h[h.length-1],h[h.length-1]=h[h.length-1-p],h[h.length-1-p]=v)}else{var b=e-+this._x.call(null,d.data),g=t-+this._y.call(null,d.data),T=b*b+g*g;if(T=(h=(a+i)/2))?a=h:i=h,(p=c>=(d=(f+l)/2))?f=d:l=d,t=r,!(r=r[m=p<<1|v]))return this;if(!r.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(n=t,y=m)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,o?(s?o.next=s:delete o.next,this):t?(s?t[m]=s:delete t[m],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=s,this)}function GXe(e){for(var t=0,r=e.length;tc.index){var x=h-M.x-M.vx,_=d-M.y-M.vy,k=x*x+_*_;kh+C||Sd+C||Ai.r&&(i.r=i[l].r)}function f(){if(t){var i,l=t.length,u;for(r=new Array(l),i=0;i=e.length)return r!=null&&f.sort(r),n!=null?n(f):f;for(var c=-1,h=f.length,d=e[i++],v,p,m=by(),y,b=l();++ce.length)return f;var l,u=t[i-1];return n!=null&&i>=e.length?l=f.entries():(l=[],f.each(function(c,h){l.push({key:h,values:a(c,i)})})),u!=null?l.sort(function(c,h){return u(c.key,h.key)}):l}return o={object:function(f){return s(f,0,rZe,nZe)},map:function(f){return s(f,0,ame,ime)},entries:function(f){return a(s(f,0,ame,ime),0)},key:function(f){return e.push(f),o},sortKeys:function(f){return t[e.length-1]=f,o},sortValues:function(f){return r=f,o},rollup:function(f){return n=f,o}}}function rZe(){return{}}function nZe(e,t,r){e[t]=r}function ame(){return by()}function ime(e,t,r){e.set(t,r)}function ome(){}var Wy=by.prototype;ome.prototype={constructor:ome,has:Wy.has,add:function(e){return e+="",this[bv+e]=e,this},remove:Wy.remove,clear:Wy.clear,values:Wy.keys,size:Wy.size,empty:Wy.empty,each:Wy.each};function aZe(e){return e.index}function sme(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function iZe(e){var t=aZe,r=u,n,o=xf(30),s,a,f,i,l=1;e==null&&(e=[]);function u(p){return 1/Math.min(f[p.source.index],f[p.target.index])}function c(p){for(var m=0,y=e.length;m=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}R3.prototype=h5e.prototype={constructor:R3,on:function(e,t){var r=this._,n=sZe(e+"",r),o,s=-1,a=n.length;if(arguments.length<2){for(;++s0)for(var r=new Array(o),n=0,o,s;n=0&&e._call.call(null,t),e=e._next;--Cx}function ume(){wm=(zA=v2.now())+HM,Cx=B_=0;try{fZe()}finally{Cx=0,hZe(),wm=0}}function cZe(){var e=v2.now(),t=e-zA;t>d5e&&(HM-=t,zA=e)}function hZe(){for(var e,t=OA,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:OA=r);q_=e,HV(n)}function HV(e){if(!Cx){B_&&(B_=clearTimeout(B_));var t=e-wm;t>24?(e<1/0&&(B_=setTimeout(ume,e-v2.now()-HM)),b_&&(b_=clearInterval(b_))):(b_||(zA=v2.now(),b_=setInterval(cZe,d5e)),Cx=1,v5e(ume))}}function dZe(e){return e.x}function vZe(e){return e.y}var pZe=10,gZe=Math.PI*(3-Math.sqrt(5));function yZe(e){var t,r=1,n=.001,o=1-Math.pow(n,1/300),s=0,a=.6,f=by(),i=g5e(u),l=h5e("tick","end");e==null&&(e=[]);function u(){c(),l.call("tick",t),r1?(p==null?f.remove(v):f.set(v,d(p)),t):f.get(v)},find:function(v,p,m){var y=0,b=e.length,g,T,S,A,M;for(m==null?m=1/0:m*=m,y=0;y1?(l.on(v,p),t):l.on(v)}}}function mZe(){var e,t,r,n=xf(-30),o,s=1,a=1/0,f=.81;function i(h){var d,v=e.length,p=jX(e,dZe,vZe).visitAfter(u);for(r=h,d=0;d=a)return;(h.data!==t||h.next)&&(m===0&&(m=Kg(),g+=m*m),y===0&&(y=Kg(),g+=y*y),g0;--S)w(T*=.99),C(),M(T),C();function A(){var x=dA(g,function(E){return E.length}),_=c*(n-t)/(x-1);s>_&&(s=_);var k=sb(g,function(E){return(n-t-(E.length-1)*s)/Jp(E,__)});g.forEach(function(E){E.forEach(function(I,F){I.y1=(I.y0=F)+I.value*k})}),b.links.forEach(function(E){E.width=E.value*k})}function M(x){g.forEach(function(_){_.forEach(function(k){if(k.targetLinks.length){var E=(Jp(k.targetLinks,RZe)/Jp(k.targetLinks,__)-FA(k))*x;k.y0+=E,k.y1+=E}})})}function w(x){g.slice().reverse().forEach(function(_){_.forEach(function(k){if(k.sourceLinks.length){var E=(Jp(k.sourceLinks,LZe)/Jp(k.sourceLinks,__)-FA(k))*x;k.y0+=E,k.y1+=E}})})}function C(){g.forEach(function(x){var _,k,E=t,I=x.length,F;for(x.sort(HX),F=0;F0&&(_.y0+=k,_.y1+=k),E=_.y1+s;if(k=E-s-n,k>0)for(E=_.y0-=k,_.y1-=k,F=I-2;F>=0;--F)_=x[F],k=_.y1+s-E,k>0&&(_.y0-=k,_.y1-=k),E=_.y0})}}function y(b){b.nodes.forEach(function(g){g.sourceLinks.sort(CZe),g.targetLinks.sort(kZe)}),b.nodes.forEach(function(g){var T=g.y0,S=T;g.sourceLinks.forEach(function(A){A.y0=T+A.width/2,T+=A.width}),g.targetLinks.forEach(function(A){A.y1=S+A.width/2,S+=A.width})})}return h}var GV=Math.PI,VV=2*GV,em=1e-6,zZe=VV-em;function YV(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function m5e(){return new YV}YV.prototype=m5e.prototype={constructor:YV,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,o,s){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+s)},arcTo:function(e,t,r,n,o){e=+e,t=+t,r=+r,n=+n,o=+o;var s=this._x1,a=this._y1,f=r-e,i=n-t,l=s-e,u=a-t,c=l*l+u*u;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(c>em)if(!(Math.abs(u*f-i*l)>em)||!o)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=r-s,d=n-a,v=f*f+i*i,p=h*h+d*d,m=Math.sqrt(v),y=Math.sqrt(c),b=o*Math.tan((GV-Math.acos((v+c-p)/(2*m*y)))/2),g=b/y,T=b/m;Math.abs(g-1)>em&&(this._+="L"+(e+g*l)+","+(t+g*u)),this._+="A"+o+","+o+",0,0,"+ +(u*h>l*d)+","+(this._x1=e+T*f)+","+(this._y1=t+T*i)}},arc:function(e,t,r,n,o,s){e=+e,t=+t,r=+r,s=!!s;var a=r*Math.cos(n),f=r*Math.sin(n),i=e+a,l=t+f,u=1^s,c=s?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+i+","+l:(Math.abs(this._x1-i)>em||Math.abs(this._y1-l)>em)&&(this._+="L"+i+","+l),r&&(c<0&&(c=c%VV+VV),c>zZe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-f)+"A"+r+","+r+",0,1,"+u+","+(this._x1=i)+","+(this._y1=l):c>em&&(this._+="A"+r+","+r+",0,"+ +(c>=GV)+","+u+","+(this._x1=e+r*Math.cos(o))+","+(this._y1=t+r*Math.sin(o))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function cme(e){return function(){return e}}function FZe(e){return e[0]}function NZe(e){return e[1]}var BZe=Array.prototype.slice;function qZe(e){return e.source}function jZe(e){return e.target}function UZe(e){var t=qZe,r=jZe,n=FZe,o=NZe,s=null;function a(){var f,i=BZe.call(arguments),l=t.apply(this,i),u=r.apply(this,i);if(s||(s=f=m5e()),e(s,+n.apply(this,(i[0]=l,i)),+o.apply(this,i),+n.apply(this,(i[0]=u,i)),+o.apply(this,i)),f)return s=null,f+""||null}return a.source=function(f){return arguments.length?(t=f,a):t},a.target=function(f){return arguments.length?(r=f,a):r},a.x=function(f){return arguments.length?(n=typeof f=="function"?f:cme(+f),a):n},a.y=function(f){return arguments.length?(o=typeof f=="function"?f:cme(+f),a):o},a.context=function(f){return arguments.length?(s=f??null,a):s},a}function HZe(e,t,r,n,o){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,o,n,o)}function x5e(){return UZe(HZe)}function GZe(e){return[e.source.x1,e.y0]}function VZe(e){return[e.target.x0,e.y1]}function YZe(){return x5e().source(GZe).target(VZe)}const $Ze=Object.freeze(Object.defineProperty({__proto__:null,sankey:OZe,sankeyCenter:EZe,sankeyJustify:y5e,sankeyLeft:SZe,sankeyLinkHorizontal:YZe,sankeyRight:MZe},Symbol.toStringTag,{value:"Module"})),WZe=$d($Ze);var Dq,hme;function XZe(){if(hme)return Dq;hme=1;var e=u5e();return Dq=function(r,n){var o=[],s=[],a=[],f={},i=[],l;function u(T){a[T]=!1,f.hasOwnProperty(T)&&Object.keys(f[T]).forEach(function(S){delete f[T][S],a[S]&&u(S)})}function c(T){var S=!1;s.push(T),a[T]=!0;var A,M;for(A=0;A=T})}function v(T){d(T);for(var S=r,A=e(S),M=A.components.filter(function(I){return I.length>1}),w=1/0,C,x=0;x"u"?"undefined":dme(x))!=="object"&&(x=w.source=vme(M,x)),(typeof _>"u"?"undefined":dme(_))!=="object"&&(_=w.target=vme(M,_)),x.sourceLinks.push(w),_.targetLinks.push(w)}),A}function m(A){A.nodes.forEach(function(M){M.partOfCycle=!1,M.value=Math.max(Jp(M.sourceLinks,Iq),Jp(M.targetLinks,Iq)),M.sourceLinks.forEach(function(w){w.circular&&(M.partOfCycle=!0,M.circularLinkType=w.circularLinkType)}),M.targetLinks.forEach(function(w){w.circular&&(M.partOfCycle=!0,M.circularLinkType=w.circularLinkType)})})}function y(A){var M=0,w=0,C=0,x=0,_=dA(A.nodes,function(k){return k.column});return A.links.forEach(function(k){k.circular&&(k.circularLinkType=="top"?M=M+k.width:w=w+k.width,k.target.column==0&&(x=x+k.width),k.source.column==_&&(C=C+k.width))}),M=M>0?M+Jg+Bd:M,w=w>0?w+Jg+Bd:w,C=C>0?C+Jg+Bd:C,x=x>0?x+Jg+Bd:x,{top:M,bottom:w,left:x,right:C}}function b(A,M){var w=dA(A.nodes,function(F){return F.column}),C=r-e,x=n-t,_=C+M.right+M.left,k=x+M.top+M.bottom,E=C/_,I=x/k;return e=e*E+M.left,r=M.right==0?r:r*E,t=t*I+M.top,n=n*I,A.nodes.forEach(function(F){F.x0=e+F.column*((r-e-o)/w),F.x1=F.x0+o}),I}function g(A){var M,w,C;for(M=A.nodes,w=[],C=0;M.length;++C,M=w,w=[])M.forEach(function(x){x.depth=C,x.sourceLinks.forEach(function(_){w.indexOf(_.target)<0&&!_.circular&&w.push(_.target)})});for(M=A.nodes,w=[],C=0;M.length;++C,M=w,w=[])M.forEach(function(x){x.height=C,x.targetLinks.forEach(function(_){w.indexOf(_.source)<0&&!_.circular&&w.push(_.source)})});A.nodes.forEach(function(x){x.column=Math.floor(f.call(null,x,C))})}function T(A,M,w){var C=c5e().key(function(F){return F.column}).sortKeys(_M).entries(A.nodes).map(function(F){return F.values});k(w),I();for(var x=1,_=M;_>0;--_)E(x*=.99,w),I();function k(F){if(h){var D=1/0;C.forEach(function(P){var B=n*h/(P.length+1);D=B0))if(P==0&&q==1)$=B.y1-B.y0,B.y0=n/2-$/2,B.y1=n/2+$/2;else if(P==z-1&&q==1)$=B.y1-B.y0,B.y0=n/2-$/2,B.y1=n/2+$/2;else{var Q=0,J=Gde(B.sourceLinks,iKe),ne=Gde(B.targetLinks,aKe);J&&ne?Q=(J+ne)/2:Q=J||ne;var te=(Q-VX(B))*F;B.y0+=te,B.y1+=te}})})}function I(){C.forEach(function(F){var D,z,N=t,q=F.length,P;for(F.sort(GX),P=0;P0&&(D.y0+=z,D.y1+=z),N=D.y1+s;if(z=N-s-n,z>0)for(N=D.y0-=z,D.y1-=z,P=q-2;P>=0;--P)D=F[P],z=D.y1+s-N,z>0&&(D.y0-=z,D.y1-=z),N=D.y0})}}function S(A){A.nodes.forEach(function(M){M.sourceLinks.sort(nKe),M.targetLinks.sort(rKe)}),A.nodes.forEach(function(M){var w=M.y0,C=w,x=M.y1,_=x;M.sourceLinks.forEach(function(k){k.circular?(k.y0=x-k.width/2,x=x-k.width):(k.y0=w+k.width/2,w+=k.width)}),M.targetLinks.forEach(function(k){k.circular?(k.y1=_-k.width/2,_=_-k.width):(k.y1=C+k.width/2,C+=k.width)})})}return v}function cKe(e,t,r){var n=0;if(r===null){for(var o=[],s=0;st.source.column)}function gme(e,t){var r=0;e.sourceLinks.forEach(function(o){r=o.circular&&!p2(o,t)?r+1:r});var n=0;return e.targetLinks.forEach(function(o){n=o.circular&&!p2(o,t)?n+1:n}),r+n}function w5e(e){var t=e.source.sourceLinks,r=0;t.forEach(function(s){r=s.circular?r+1:r});var n=e.target.targetLinks,o=0;return n.forEach(function(s){o=s.circular?o+1:o}),!(r>1||o>1)}function yme(e,t,r){return e.sort(vKe),e.forEach(function(n,o){var s=0;if(p2(n,r)&&w5e(n))n.circularPathData.verticalBuffer=s+n.width/2;else{var a=0;for(a;as?f:s}n.circularPathData.verticalBuffer=s+n.width/2}}),e}function mme(e,t,r,n){var o=5,s=sb(e.links,function(i){return i.source.y0});e.links.forEach(function(i){i.circular&&(i.circularPathData={})});var a=e.links.filter(function(i){return i.circularLinkType=="top"});yme(a,t,n);var f=e.links.filter(function(i){return i.circularLinkType=="bottom"});yme(f,t,n),e.links.forEach(function(i){if(i.circular){if(i.circularPathData.arcRadius=i.width+Bd,i.circularPathData.leftNodeBuffer=o,i.circularPathData.rightNodeBuffer=o,i.circularPathData.sourceWidth=i.source.x1-i.source.x0,i.circularPathData.sourceX=i.source.x0+i.circularPathData.sourceWidth,i.circularPathData.targetX=i.target.x0,i.circularPathData.sourceY=i.y0,i.circularPathData.targetY=i.y1,p2(i,n)&&w5e(i))i.circularPathData.leftSmallArcRadius=Bd+i.width/2,i.circularPathData.leftLargeArcRadius=Bd+i.width/2,i.circularPathData.rightSmallArcRadius=Bd+i.width/2,i.circularPathData.rightLargeArcRadius=Bd+i.width/2,i.circularLinkType=="bottom"?(i.circularPathData.verticalFullExtent=i.source.y1+Jg+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=i.source.y0-Jg-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius);else{var l=i.source.column,u=i.circularLinkType,c=e.links.filter(function(v){return v.source.column==l&&v.circularLinkType==u});i.circularLinkType=="bottom"?c.sort(A5e):c.sort(T5e);var h=0;c.forEach(function(v,p){v.circularLinkID==i.circularLinkID&&(i.circularPathData.leftSmallArcRadius=Bd+i.width/2+h,i.circularPathData.leftLargeArcRadius=Bd+i.width/2+p*t+h),h=h+v.width}),l=i.target.column,c=e.links.filter(function(v){return v.target.column==l&&v.circularLinkType==u}),i.circularLinkType=="bottom"?c.sort(gKe):c.sort(pKe),h=0,c.forEach(function(v,p){v.circularLinkID==i.circularLinkID&&(i.circularPathData.rightSmallArcRadius=Bd+i.width/2+h,i.circularPathData.rightLargeArcRadius=Bd+i.width/2+p*t+h),h=h+v.width}),i.circularLinkType=="bottom"?(i.circularPathData.verticalFullExtent=Math.max(r,i.source.y1,i.target.y1)+Jg+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=s-Jg-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius)}i.circularPathData.leftInnerExtent=i.circularPathData.sourceX+i.circularPathData.leftNodeBuffer,i.circularPathData.rightInnerExtent=i.circularPathData.targetX-i.circularPathData.rightNodeBuffer,i.circularPathData.leftFullExtent=i.circularPathData.sourceX+i.circularPathData.leftLargeArcRadius+i.circularPathData.leftNodeBuffer,i.circularPathData.rightFullExtent=i.circularPathData.targetX-i.circularPathData.rightLargeArcRadius-i.circularPathData.rightNodeBuffer}if(i.circular)i.path=dKe(i);else{var d=x5e().source(function(v){var p=v.source.x0+(v.source.x1-v.source.x0),m=v.y0;return[p,m]}).target(function(v){var p=v.target.x0,m=v.y1;return[p,m]});i.path=d(i)}})}function dKe(e){var t="";return e.circularLinkType=="top"?t="M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:t="M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY,t}function vKe(e,t){return e3(e)==e3(t)?e.circularLinkType=="bottom"?A5e(e,t):T5e(e,t):e3(t)-e3(e)}function T5e(e,t){return e.y0-t.y0}function A5e(e,t){return t.y0-e.y0}function pKe(e,t){return e.y1-t.y1}function gKe(e,t){return t.y1-e.y1}function e3(e){return e.target.column-e.source.column}function S5e(e){return e.target.x0-e.source.x1}function xme(e,t){var r=_5e(e),n=S5e(t)/Math.tan(r),o=NA(e)=="up"?e.y1+n:e.y1-n;return o}function bme(e,t){var r=_5e(e),n=S5e(t)/Math.tan(r),o=NA(e)=="up"?e.y1-n:e.y1+n;return o}function yKe(e,t,r,n){e.links.forEach(function(o){if(!o.circular&&o.target.column-o.source.column>1){var s=o.source.column+1,a=o.target.column-1,f=1,i=a-s+1;for(f=1;s<=a;s++,f++)e.nodes.forEach(function(l){if(l.column==s){var u=f/(i+1),c=Math.pow(1-u,3),h=3*u*Math.pow(1-u,2),d=3*Math.pow(u,2)*(1-u),v=Math.pow(u,3),p=c*o.y0+h*o.y0+d*o.y1+v*o.y1,m=p-o.width/2,y=p+o.width/2,b;m>l.y0&&ml.y0&&yl.y1&&Q1(g,b,t,r)})):ml.y1&&(b=y-l.y0+10,l=Q1(l,b,t,r),e.nodes.forEach(function(g){oh(g,n)==oh(l,n)||g.column!=l.column||g.y0l.y1&&Q1(g,b,t,r)}))}})}})}function mKe(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1}function Q1(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach(function(o){o.y1=o.y1+t}),e.sourceLinks.forEach(function(o){o.y0=o.y0+t})),e}function Oq(e,t,r,n){e.nodes.forEach(function(o){n&&o.y+(o.y1-o.y0)>t&&(o.y=o.y-(o.y+(o.y1-o.y0)-t));var s=e.links.filter(function(i){return oh(i.source,r)==oh(o,r)}),a=s.length;a>1&&s.sort(function(i,l){if(!i.circular&&!l.circular){if(i.target.column==l.target.column)return i.y1-l.y1;if(M5e(i,l)){if(i.target.column>l.target.column){var u=bme(l,i);return i.y1-u}if(l.target.column>i.target.column){var c=bme(i,l);return c-l.y1}}else return i.y1-l.y1}if(i.circular&&!l.circular)return i.circularLinkType=="top"?-1:1;if(l.circular&&!i.circular)return l.circularLinkType=="top"?1:-1;if(i.circular&&l.circular)return i.circularLinkType===l.circularLinkType&&i.circularLinkType=="top"?i.target.column===l.target.column?i.target.y1-l.target.y1:l.target.column-i.target.column:i.circularLinkType===l.circularLinkType&&i.circularLinkType=="bottom"?i.target.column===l.target.column?l.target.y1-i.target.y1:i.target.column-l.target.column:i.circularLinkType=="top"?-1:1});var f=o.y0;s.forEach(function(i){i.y0=f+i.width/2,f=f+i.width}),s.forEach(function(i,l){if(i.circularLinkType=="bottom"){var u=l+1,c=0;for(u;u1&&o.sort(function(f,i){if(!f.circular&&!i.circular){if(f.source.column==i.source.column)return f.y0-i.y0;if(M5e(f,i)){if(i.source.column0?"up":"down"}function p2(e,t){return oh(e.source,t)==oh(e.target,t)}function xKe(e,t,r){var n=e.nodes,o=e.links,s=!1,a=!1;if(o.forEach(function(h){h.circularLinkType=="top"?s=!0:h.circularLinkType=="bottom"&&(a=!0)}),s==!1||a==!1){var f=sb(n,function(h){return h.y0}),i=dA(n,function(h){return h.y1}),l=i-f,u=r-t,c=u/l;n.forEach(function(h){var d=(h.y1-h.y0)*c;h.y0=(h.y0-f)*c,h.y1=h.y0+d}),o.forEach(function(h){h.y0=(h.y0-f)*c,h.y1=(h.y1-f)*c,h.width=h.width*c})}}const bKe=Object.freeze(Object.defineProperty({__proto__:null,sankeyCenter:tKe,sankeyCircular:fKe,sankeyJustify:b5e,sankeyLeft:QZe,sankeyRight:eKe},Symbol.toStringTag,{value:"Module"})),_Ke=$d(bKe);var Fq,_me;function E5e(){return _me||(_me=1,Fq={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}),Fq}var Nq,wme;function wKe(){if(wme)return Nq;wme=1;var e=TZe,t=_x.interpolateNumber,r=ya(),n=WZe,o=_Ke,s=E5e(),a=wf(),f=va(),i=Ba(),l=rr(),u=l.strTranslate,c=l.strRotate,h=Z0(),d=h.keyFun,v=h.repeat,p=h.unwrap,m=ns(),y=ga(),b=Zu(),g=b.CAP_SHIFT,T=b.LINE_SPACING,S=3;function A(G,j,Y){var K=p(j),X=K.trace,ee=X.domain,le=X.orientation==="h",oe=X.node.pad,fe=X.node.thickness,de={justify:n.sankeyJustify,left:n.sankeyLeft,right:n.sankeyRight,center:n.sankeyCenter}[X.node.align],_e=G.width*(ee.x[1]-ee.x[0]),we=G.height*(ee.y[1]-ee.y[0]),Oe=K._nodes,be=K._links,Te=K.circular,ke;Te?ke=o.sankeyCircular().circularLinkGap(0):ke=n.sankey(),ke.iterations(s.sankeyIterations).size(le?[_e,we]:[we,_e]).nodeWidth(fe).nodePadding(oe).nodeId(function(Ht){return Ht.pointNumber}).nodeAlign(de).nodes(Oe).links(be);var Ee=ke();ke.nodePadding()=rt||(Tt=rt-Jt.y0,Tt>1e-6&&(Jt.y0+=Tt,Jt.y1+=Tt)),rt=Jt.y1+oe})}function st(Ht){var Et=Ht.map(function(Ie,je){return{x0:Ie.x0,index:je}}).sort(function(Ie,je){return Ie.x0-je.x0}),Jt=[],Tt=-1,rt,gt=-1/0,mt;for(Le=0;Legt+fe&&(Tt+=1,rt=He.x0),gt=He.x0,Jt[Tt]||(Jt[Tt]=[]),Jt[Tt].push(He),mt=rt-He.x0,He.x0+=mt,He.x1+=mt}return Jt}if(X.node.x.length&&X.node.y.length){for(Le=0;Le0?"L"+X.targetX+" "+X.targetY:"")+"Z":Y="M "+(X.targetX-j)+" "+(X.targetY-K)+" L"+(X.rightInnerExtent-j)+" "+(X.targetY-K)+"A"+(X.rightLargeArcRadius+K)+" "+(X.rightSmallArcRadius+K)+" 0 0 0 "+(X.rightFullExtent-K-j)+" "+(X.targetY+X.rightSmallArcRadius)+"L"+(X.rightFullExtent-K-j)+" "+X.verticalRightInnerExtent+"A"+(X.rightLargeArcRadius+K)+" "+(X.rightLargeArcRadius+K)+" 0 0 0 "+(X.rightInnerExtent-j)+" "+(X.verticalFullExtent+K)+"L"+X.leftInnerExtent+" "+(X.verticalFullExtent+K)+"A"+(X.leftLargeArcRadius+K)+" "+(X.leftLargeArcRadius+K)+" 0 0 0 "+(X.leftFullExtent+K)+" "+X.verticalLeftInnerExtent+"L"+(X.leftFullExtent+K)+" "+(X.sourceY+X.leftSmallArcRadius)+"A"+(X.leftLargeArcRadius+K)+" "+(X.leftSmallArcRadius+K)+" 0 0 0 "+X.leftInnerExtent+" "+(X.sourceY-K)+"L"+X.sourceX+" "+(X.sourceY-K)+"L"+X.sourceX+" "+(X.sourceY+K)+"L"+X.leftInnerExtent+" "+(X.sourceY+K)+"A"+(X.leftLargeArcRadius-K)+" "+(X.leftSmallArcRadius-K)+" 0 0 1 "+(X.leftFullExtent-K)+" "+(X.sourceY+X.leftSmallArcRadius)+"L"+(X.leftFullExtent-K)+" "+X.verticalLeftInnerExtent+"A"+(X.leftLargeArcRadius-K)+" "+(X.leftLargeArcRadius-K)+" 0 0 1 "+X.leftInnerExtent+" "+(X.verticalFullExtent-K)+"L"+(X.rightInnerExtent-j)+" "+(X.verticalFullExtent-K)+"A"+(X.rightLargeArcRadius-K)+" "+(X.rightLargeArcRadius-K)+" 0 0 1 "+(X.rightFullExtent+K-j)+" "+X.verticalRightInnerExtent+"L"+(X.rightFullExtent+K-j)+" "+(X.targetY+X.rightSmallArcRadius)+"A"+(X.rightLargeArcRadius-K)+" "+(X.rightSmallArcRadius-K)+" 0 0 1 "+(X.rightInnerExtent-j)+" "+(X.targetY+K)+"L"+(X.targetX-j)+" "+(X.targetY+K)+(j>0?"L"+X.targetX+" "+X.targetY:"")+"Z",Y}function C(){var G=.5;function j(Y){var K=Y.linkArrowLength;if(Y.link.circular)return w(Y.link,K);var X=Math.abs((Y.link.target.x0-Y.link.source.x1)/2);K>X&&(K=X);var ee=Y.link.source.x1,le=Y.link.target.x0-K,oe=t(ee,le),fe=oe(G),de=oe(1-G),_e=Y.link.y0-Y.link.width/2,we=Y.link.y0+Y.link.width/2,Oe=Y.link.y1-Y.link.width/2,be=Y.link.y1+Y.link.width/2,Te="M"+ee+","+_e,ke="C"+fe+","+_e+" "+de+","+Oe+" "+le+","+Oe,Ee="C"+de+","+be+" "+fe+","+we+" "+ee+","+we,Le=K>0?"L"+(le+K)+","+(Oe+Y.link.width/2):"";return Le+="L"+le+","+be,Te+ke+Le+Ee+"Z"}return j}function x(G,j){var Y=a(j.color),K=s.nodePadAcross,X=G.nodePad/2;j.dx=j.x1-j.x0,j.dy=j.y1-j.y0;var ee=j.dx,le=Math.max(.5,j.dy),oe="node_"+j.pointNumber;return j.group&&(oe=l.randstr()),j.trace=G.trace,j.curveNumber=G.trace.index,{index:j.pointNumber,key:oe,partOfGroup:j.partOfGroup||!1,group:j.group,traceId:G.key,trace:G.trace,node:j,nodePad:G.nodePad,nodeLineColor:G.nodeLineColor,nodeLineWidth:G.nodeLineWidth,textFont:G.textFont,size:G.horizontal?G.height:G.width,visibleWidth:Math.ceil(ee),visibleHeight:le,zoneX:-K,zoneY:-X,zoneWidth:ee+2*K,zoneHeight:le+2*X,labelY:G.horizontal?j.dy/2+1:j.dx/2+1,left:j.originalLayer===1,sizeAcross:G.width,forceLayouts:G.forceLayouts,horizontal:G.horizontal,darkBackground:Y.getBrightness()<=128,tinyColorHue:f.tinyRGB(Y),tinyColorAlpha:Y.getAlpha(),valueFormat:G.valueFormat,valueSuffix:G.valueSuffix,sankey:G.sankey,graph:G.graph,arrangement:G.arrangement,uniqueNodeLabelPathId:[G.guid,G.key,oe].join("_"),interactionState:G.interactionState,figure:G}}function _(G){G.attr("transform",function(j){return u(j.node.x0.toFixed(3),j.node.y0.toFixed(3))})}function k(G){G.call(_)}function E(G,j){G.call(k),j.attr("d",C())}function I(G){G.attr("width",function(j){return j.node.x1-j.node.x0}).attr("height",function(j){return j.visibleHeight})}function F(G){return G.link.width>1||G.linkLineWidth>0}function D(G){var j=u(G.translateX,G.translateY);return j+(G.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(G,j,Y){G.on(".basic",null).on("mouseover.basic",function(K){!K.interactionState.dragInProgress&&!K.partOfGroup&&(Y.hover(this,K,j),K.interactionState.hovered=[this,K])}).on("mousemove.basic",function(K){!K.interactionState.dragInProgress&&!K.partOfGroup&&(Y.follow(this,K),K.interactionState.hovered=[this,K])}).on("mouseout.basic",function(K){!K.interactionState.dragInProgress&&!K.partOfGroup&&(Y.unhover(this,K,j),K.interactionState.hovered=!1)}).on("click.basic",function(K){K.interactionState.hovered&&(Y.unhover(this,K,j),K.interactionState.hovered=!1),!K.interactionState.dragInProgress&&!K.partOfGroup&&Y.select(this,K,j)})}function N(G,j,Y,K){var X=r.behavior.drag().origin(function(ee){return{x:ee.node.x0+ee.visibleWidth/2,y:ee.node.y0+ee.visibleHeight/2}}).on("dragstart",function(ee){if(ee.arrangement!=="fixed"&&(l.ensureSingle(K._fullLayout._infolayer,"g","dragcover",function(oe){K._fullLayout._dragCover=oe}),l.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,J(ee.node),ee.interactionState.hovered&&(Y.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var le=ee.traceId+"|"+ee.key;ee.forceLayouts[le]?ee.forceLayouts[le].alpha(1):q(G,le,ee),P(G,j,ee,le,K)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var le=r.event.x,oe=r.event.y;ee.arrangement==="snap"?(ee.node.x0=le-ee.visibleWidth/2,ee.node.x1=le+ee.visibleWidth/2,ee.node.y0=oe-ee.visibleHeight/2,ee.node.y1=oe+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=le-ee.visibleWidth/2,ee.node.x1=le+ee.visibleWidth/2),oe=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,oe)),ee.node.y0=oe-ee.visibleHeight/2,ee.node.y1=oe+ee.visibleHeight/2),J(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),E(G.filter(ne(ee)),j))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var le=0;le0)window.requestAnimationFrame(ee);else{var fe=Y.node.originalX;Y.node.x0=fe-Y.visibleWidth/2,Y.node.x1=fe+Y.visibleWidth/2,$(Y,X)}})}function B(G,j,Y,K){return function(){for(var ee=0,le=0;le0&&K.forceLayouts[j].alpha(0)}}function $(G,j){for(var Y=[],K=[],X=0;X"),color:b(te,"bgcolor")||s.addOpacity(K.color,1),borderColor:b(te,"bordercolor"),fontFamily:b(te,"font.family"),fontSize:b(te,"font.size"),fontColor:b(te,"font.color"),nameLength:b(te,"namelength"),textAlign:b(te,"align"),idealAlign:e.event.x"),color:b(te,"bgcolor")||ne.tinyColorHue,borderColor:b(te,"bordercolor"),fontFamily:b(te,"font.family"),fontSize:b(te,"font.size"),fontColor:b(te,"font.color"),nameLength:b(te,"namelength"),textAlign:b(te,"align"),idealAlign:"left",hovertemplate:te.hovertemplate,hovertemplateLabels:ee,eventData:[ne.node]},{container:A._hoverlayer.node(),outerContainer:A._paper.node(),gd:T});u(fe,.85),c(fe)}}},Q=function(J,ne,te){T._fullLayout.hovermode!==!1&&(e.select(J).call(p,ne,te),ne.node.trace.node.hoverinfo!=="skip"&&(ne.node.fullData=ne.node.trace,T.emit("plotly_unhover",{event:e.event,points:[ne.node]})),o.loneUnhover(A._hoverlayer.node()))};n(T,M,S,{width:w.w,height:w.h,margin:{t:w.t,r:w.r,b:w.b,l:w.l}},{linkEvents:{hover:k,follow:N,unhover:q,select:_},nodeEvents:{hover:B,follow:$,unhover:Q,select:P}})},Bq}var qq={},Ame;function TKe(){return Ame||(Ame=1,(function(e){var t=ws().overrideAll,r=cc().getModuleCalcData,n=k5e(),o=uy(),s=v0(),a=Gh(),f=Yu().prepSelect,i=rr(),l=ga(),u="sankey";e.name=u,e.baseLayoutAttrOverrides=t({hoverlabel:o.hoverlabel},"plot","nested"),e.plot=function(h){var d=r(h.calcdata,u)[0];n(h,d),e.updateFx(h)},e.clean=function(h,d,v,p){var m=p._has&&p._has(u),y=d._has&&d._has(u);m&&!y&&(p._paperdiv.selectAll(".sankey").remove(),p._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(h){for(var d=0;d0}Xq=function(F,D,z,N){var q=F._fullLayout,P;g(z)&&N&&(P=N()),n.makeTraceGroups(q._indicatorlayer,D,"trace").each(function(B){var $=B[0],Q=$.trace,J=e.select(this),ne=Q._hasGauge,te=Q._isAngular,Z=Q._isBullet,G=Q.domain,j={w:q._size.w*(G.x[1]-G.x[0]),h:q._size.h*(G.y[1]-G.y[0]),l:q._size.l+q._size.w*G.x[0],r:q._size.r+q._size.w*(1-G.x[1]),t:q._size.t+q._size.h*(1-G.y[1]),b:q._size.b+q._size.h*G.y[0]},Y=j.l+j.w/2,K=j.t+j.h/2,X=Math.min(j.w/2,j.h),ee=l.innerRadius*X,le,oe,fe,de=Q.align||"center";if(oe=K,!ne)le=j.l+y[de]*j.w,fe=function(qe){return x(qe,j.w,j.h)};else if(te&&(le=Y,oe=K+X/2,fe=function(qe){return _(qe,.9*ee)}),Z){var _e=l.bulletPadding,we=1-l.bulletNumberDomainSize+_e;le=j.l+(we+(1-we)*y[de])*j.w,fe=function(qe){return x(qe,(l.bulletNumberDomainSize-_e)*j.w,j.h)}}A(F,J,B,{numbersX:le,numbersY:oe,numbersScaler:fe,transitionOpts:z,onComplete:P});var Oe,be;ne&&(Oe={range:Q.gauge.axis.range,color:Q.gauge.bgcolor,line:{color:Q.gauge.bordercolor,width:0},thickness:1},be={range:Q.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:Q.gauge.bordercolor,width:Q.gauge.borderwidth},thickness:1});var Te=J.selectAll("g.angular").data(te?B:[]);Te.exit().remove();var ke=J.selectAll("g.angularaxis").data(te?B:[]);ke.exit().remove(),te&&S(F,J,B,{radius:X,innerRadius:ee,gauge:Te,layer:ke,size:j,gaugeBg:Oe,gaugeOutline:be,transitionOpts:z,onComplete:P});var Ee=J.selectAll("g.bullet").data(Z?B:[]);Ee.exit().remove();var Le=J.selectAll("g.bulletaxis").data(Z?B:[]);Le.exit().remove(),Z&&T(F,J,B,{gauge:Ee,layer:Le,size:j,gaugeBg:Oe,gaugeOutline:be,transitionOpts:z,onComplete:P});var Fe=J.selectAll("text.title").data(B);Fe.exit().remove(),Fe.enter().append("text").classed("title",!0),Fe.attr("text-anchor",function(){return Z?m.right:m[Q.title.align]}).text(Q.title.text).call(i.font,Q.title.font).call(u.convertToTspans,F),Fe.attr("transform",function(){var qe=j.l+j.w*y[Q.title.align],We,Qe=l.titlePadding,De=i.bBox(Fe.node());if(ne){if(te)if(Q.gauge.axis.visible){var me=i.bBox(ke.node());We=me.top-Qe-De.bottom}else We=j.t+j.h/2-X/2-De.bottom-Qe;Z&&(We=oe-(De.top+De.bottom)/2,qe=j.l-l.bulletPadding*j.w)}else We=Q._numbersTop-Qe-De.bottom;return s(qe,We)})})};function T(I,F,D,z){var N=D[0].trace,q=z.gauge,P=z.layer,B=z.gaugeBg,$=z.gaugeOutline,Q=z.size,J=N.domain,ne=z.transitionOpts,te=z.onComplete,Z,G,j,Y,K;q.enter().append("g").classed("bullet",!0),q.attr("transform",s(Q.l,Q.t)),P.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),P.selectAll("g.xbulletaxistick,path,text").remove();var X=Q.h,ee=N.gauge.bar.thickness*X,le=J.x[0],oe=J.x[0]+(J.x[1]-J.x[0])*(N._hasNumber||N._hasDelta?1-l.bulletNumberDomainSize:1);Z=C(I,N.gauge.axis),Z._id="xbulletaxis",Z.domain=[le,oe],Z.setScale(),G=c.calcTicks(Z),j=c.makeTransTickFn(Z),Y=c.getTickSigns(Z)[2],K=Q.t+Q.h,Z.visible&&(c.drawTicks(I,Z,{vals:Z.ticks==="inside"?c.clipEnds(Z,G):G,layer:P,path:c.makeTickPath(Z,K,Y),transFn:j}),c.drawLabels(I,Z,{vals:G,layer:P,transFn:j,labelFns:c.makeLabelFns(Z,K)}));function fe(ke){ke.attr("width",function(Ee){return Math.max(0,Z.c2p(Ee.range[1])-Z.c2p(Ee.range[0]))}).attr("x",function(Ee){return Z.c2p(Ee.range[0])}).attr("y",function(Ee){return .5*(1-Ee.thickness)*X}).attr("height",function(Ee){return Ee.thickness*X})}var de=[B].concat(N.gauge.steps),_e=q.selectAll("g.bg-bullet").data(de);_e.enter().append("g").classed("bg-bullet",!0).append("rect"),_e.select("rect").call(fe).call(M),_e.exit().remove();var we=q.selectAll("g.value-bullet").data([N.gauge.bar]);we.enter().append("g").classed("value-bullet",!0).append("rect"),we.select("rect").attr("height",ee).attr("y",(X-ee)/2).call(M),g(ne)?we.select("rect").transition().duration(ne.duration).ease(ne.easing).each("end",function(){te&&te()}).each("interrupt",function(){te&&te()}).attr("width",Math.max(0,Z.c2p(Math.min(N.gauge.axis.range[1],D[0].y)))):we.select("rect").attr("width",typeof D[0].y=="number"?Math.max(0,Z.c2p(Math.min(N.gauge.axis.range[1],D[0].y))):0),we.exit().remove();var Oe=D.filter(function(){return N.gauge.threshold.value||N.gauge.threshold.value===0}),be=q.selectAll("g.threshold-bullet").data(Oe);be.enter().append("g").classed("threshold-bullet",!0).append("line"),be.select("line").attr("x1",Z.c2p(N.gauge.threshold.value)).attr("x2",Z.c2p(N.gauge.threshold.value)).attr("y1",(1-N.gauge.threshold.thickness)/2*X).attr("y2",(1-(1-N.gauge.threshold.thickness)/2)*X).call(p.stroke,N.gauge.threshold.line.color).style("stroke-width",N.gauge.threshold.line.width),be.exit().remove();var Te=q.selectAll("g.gauge-outline").data([$]);Te.enter().append("g").classed("gauge-outline",!0).append("rect"),Te.select("rect").call(fe).call(M),Te.exit().remove()}function S(I,F,D,z){var N=D[0].trace,q=z.size,P=z.radius,B=z.innerRadius,$=z.gaugeBg,Q=z.gaugeOutline,J=[q.l+q.w/2,q.t+q.h/2+P/2],ne=z.gauge,te=z.layer,Z=z.transitionOpts,G=z.onComplete,j=Math.PI/2;function Y(Ce){var et=N.gauge.axis.range[0],st=N.gauge.axis.range[1],ot=(Ce-et)/(st-et)*Math.PI-j;return ot<-j?-j:ot>j?j:ot}function K(Ce){return e.svg.arc().innerRadius((B+P)/2-Ce/2*(P-B)).outerRadius((B+P)/2+Ce/2*(P-B)).startAngle(-j)}function X(Ce){Ce.attr("d",function(et){return K(et.thickness).startAngle(Y(et.range[0])).endAngle(Y(et.range[1]))()})}var ee,le,oe,fe;ne.enter().append("g").classed("angular",!0),ne.attr("transform",s(J[0],J[1])),te.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),te.selectAll("g.xangularaxistick,path,text").remove(),ee=C(I,N.gauge.axis),ee.type="linear",ee.range=N.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var de=function(Ce){return(ee.range[0]-Ce.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},_e={},we=c.makeLabelFns(ee,0),Oe=we.labelStandoff;_e.xFn=function(Ce){var et=de(Ce);return Math.cos(et)*Oe},_e.yFn=function(Ce){var et=de(Ce),st=Math.sin(et)>0?.2:1;return-Math.sin(et)*(Oe+Ce.fontSize*st)+Math.abs(Math.cos(et))*(Ce.fontSize*f)},_e.anchorFn=function(Ce){var et=de(Ce),st=Math.cos(et);return Math.abs(st)<.1?"middle":st>0?"start":"end"},_e.heightFn=function(Ce,et,st){var ot=de(Ce);return-.5*(1+Math.sin(ot))*st};var be=function(Ce){return s(J[0]+P*Math.cos(Ce),J[1]-P*Math.sin(Ce))};oe=function(Ce){return be(de(Ce))};var Te=function(Ce){var et=de(Ce);return be(et)+"rotate("+-a(et)+")"};if(le=c.calcTicks(ee),fe=c.getTickSigns(ee)[2],ee.visible){fe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;c.drawTicks(I,ee,{vals:le,layer:te,path:"M"+fe*ke+",0h"+fe*ee.ticklen,transFn:Te}),c.drawLabels(I,ee,{vals:le,layer:te,transFn:oe,labelFns:_e})}var Ee=[$].concat(N.gauge.steps),Le=ne.selectAll("g.bg-arc").data(Ee);Le.enter().append("g").classed("bg-arc",!0).append("path"),Le.select("path").call(X).call(M),Le.exit().remove();var Fe=K(N.gauge.bar.thickness),qe=ne.selectAll("g.value-arc").data([N.gauge.bar]);qe.enter().append("g").classed("value-arc",!0).append("path");var We=qe.select("path");g(Z)?(We.transition().duration(Z.duration).ease(Z.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attrTween("d",w(Fe,Y(D[0].lastY),Y(D[0].y))),N._lastValue=D[0].y):We.attr("d",typeof D[0].y=="number"?Fe.endAngle(Y(D[0].y)):"M0,0Z"),We.call(M),qe.exit().remove(),Ee=[];var Qe=N.gauge.threshold.value;(Qe||Qe===0)&&Ee.push({range:[Qe,Qe],color:N.gauge.threshold.color,line:{color:N.gauge.threshold.line.color,width:N.gauge.threshold.line.width},thickness:N.gauge.threshold.thickness});var De=ne.selectAll("g.threshold-arc").data(Ee);De.enter().append("g").classed("threshold-arc",!0).append("path"),De.select("path").call(X).call(M),De.exit().remove();var me=ne.selectAll("g.gauge-outline").data([Q]);me.enter().append("g").classed("gauge-outline",!0).append("path"),me.select("path").call(X).call(M),me.exit().remove()}function A(I,F,D,z){var N=D[0].trace,q=z.numbersX,P=z.numbersY,B=N.align||"center",$=m[B],Q=z.transitionOpts,J=z.onComplete,ne=n.ensureSingle(F,"g","numbers"),te,Z,G,j=[];N._hasNumber&&j.push("number"),N._hasDelta&&(j.push("delta"),N.delta.position==="left"&&j.reverse());var Y=ne.selectAll("text").data(j);Y.enter().append("text"),Y.attr("text-anchor",function(){return $}).attr("class",function(be){return be}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function K(be,Te,ke,Ee){if(be.match("s")&&ke>=0!=Ee>=0&&!Te(ke).slice(-1).match(b)&&!Te(Ee).slice(-1).match(b)){var Le=be.slice().replace("s","f").replace(/\d+/,function(qe){return parseInt(qe)-1}),Fe=C(I,{tickformat:Le});return function(qe){return Math.abs(qe)<1?c.tickText(Fe,qe).text:Te(qe)}}else return Te}function X(){var be=C(I,{tickformat:N.number.valueformat},N._range);be.setScale(),c.prepTicks(be);var Te=function(qe){return c.tickText(be,qe).text},ke=N.number.suffix,Ee=N.number.prefix,Le=ne.select("text.number");function Fe(){var qe=typeof D[0].y=="number"?Ee+Te(D[0].y)+ke:"-";Le.text(qe).call(i.font,N.number.font).call(u.convertToTspans,I)}return g(Q)?Le.transition().duration(Q.duration).ease(Q.easing).each("end",function(){Fe(),J&&J()}).each("interrupt",function(){Fe(),J&&J()}).attrTween("text",function(){var qe=e.select(this),We=r(D[0].lastY,D[0].y);N._lastValue=D[0].y;var Qe=K(N.number.valueformat,Te,D[0].lastY,D[0].y);return function(De){qe.text(Ee+Qe(We(De))+ke)}}):Fe(),te=k(Ee+Te(D[0].y)+ke,N.number.font,$,I),Le}function ee(){var be=C(I,{tickformat:N.delta.valueformat},N._range);be.setScale(),c.prepTicks(be);var Te=function(De){return c.tickText(be,De).text},ke=N.delta.suffix,Ee=N.delta.prefix,Le=function(De){var me=N.delta.relative?De.relativeDelta:De.delta;return me},Fe=function(De,me){return De===0||typeof De!="number"||isNaN(De)?"-":(De>0?N.delta.increasing.symbol:N.delta.decreasing.symbol)+Ee+me(De)+ke},qe=function(De){return De.delta>=0?N.delta.increasing.color:N.delta.decreasing.color};N._deltaLastValue===void 0&&(N._deltaLastValue=Le(D[0]));var We=ne.select("text.delta");We.call(i.font,N.delta.font).call(p.fill,qe({delta:N._deltaLastValue}));function Qe(){We.text(Fe(Le(D[0]),Te)).call(p.fill,qe(D[0])).call(u.convertToTspans,I)}return g(Q)?We.transition().duration(Q.duration).ease(Q.easing).tween("text",function(){var De=e.select(this),me=Le(D[0]),Ce=N._deltaLastValue,et=K(N.delta.valueformat,Te,Ce,me),st=r(Ce,me);return N._deltaLastValue=me,function(ot){De.text(Fe(st(ot),et)),De.call(p.fill,qe({delta:st(ot)}))}}).each("end",function(){Qe(),J&&J()}).each("interrupt",function(){Qe(),J&&J()}):Qe(),Z=k(Fe(Le(D[0]),Te),N.delta.font,$,I),We}var le=N.mode+N.align,oe;if(N._hasDelta&&(oe=ee(),le+=N.delta.position+N.delta.font.size+N.delta.font.family+N.delta.valueformat,le+=N.delta.increasing.symbol+N.delta.decreasing.symbol,G=Z),N._hasNumber&&(X(),le+=N.number.font.size+N.number.font.family+N.number.valueformat+N.number.suffix+N.number.prefix,G=te),N._hasDelta&&N._hasNumber){var fe=[(te.left+te.right)/2,(te.top+te.bottom)/2],de=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],_e,we,Oe=.75*N.delta.font.size;N.delta.position==="left"&&(_e=E(N,"deltaPos",0,-1*(te.width*y[N.align]+Z.width*(1-y[N.align])+Oe),le,Math.min),we=fe[1]-de[1],G={width:te.width+Z.width+Oe,height:Math.max(te.height,Z.height),left:Z.left+_e,right:te.right,top:Math.min(te.top,Z.top+we),bottom:Math.max(te.bottom,Z.bottom+we)}),N.delta.position==="right"&&(_e=E(N,"deltaPos",0,te.width*(1-y[N.align])+Z.width*y[N.align]+Oe,le,Math.max),we=fe[1]-de[1],G={width:te.width+Z.width+Oe,height:Math.max(te.height,Z.height),left:te.left,right:Z.right+_e,top:Math.min(te.top,Z.top+we),bottom:Math.max(te.bottom,Z.bottom+we)}),N.delta.position==="bottom"&&(_e=null,we=Z.height,G={width:Math.max(te.width,Z.width),height:te.height+Z.height,left:Math.min(te.left,Z.left),right:Math.max(te.right,Z.right),top:te.bottom-te.height,bottom:te.bottom+Z.height}),N.delta.position==="top"&&(_e=null,we=te.top,G={width:Math.max(te.width,Z.width),height:te.height+Z.height,left:Math.min(te.left,Z.left),right:Math.max(te.right,Z.right),top:te.bottom-te.height-Z.height,bottom:te.bottom}),oe.attr({dx:_e,dy:we})}(N._hasNumber||N._hasDelta)&&ne.attr("transform",function(){var be=z.numbersScaler(G);le+=be[2];var Te=E(N,"numbersScale",1,be[0],le,Math.min),ke;N._scaleNumbers||(Te=1),N._isAngular?ke=P-Te*G.bottom:ke=P-Te*(G.top+G.bottom)/2,N._numbersTop=Te*G.top+ke;var Ee=G[B];B==="center"&&(Ee=(G.left+G.right)/2);var Le=q-Te*Ee;return Le=E(N,"numbersTranslate",0,Le,le,Math.max),s(Le,ke)+o(Te)})}function M(I){I.each(function(F){p.stroke(e.select(this),F.line.color)}).each(function(F){p.fill(e.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function w(I,F,D){return function(){var z=t(F,D);return function(N){return I.endAngle(z(N))()}}}function C(I,F,D){var z=I._fullLayout,N=n.extendFlat({type:"linear",ticks:"outside",range:D,showline:!0},F),q={type:"linear",_id:"x"+F._id},P={letter:"x",font:z.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function B($,Q){return n.coerce(N,q,v,$,Q)}return h(N,q,B,P,z),d(N,q,B,P),q}function x(I,F,D){var z=Math.min(F/I.width,D/I.height);return[z,I,F+"x"+D]}function _(I,F){var D=Math.sqrt(I.width/2*(I.width/2)+I.height*I.height),z=F/D;return[z,I,F]}function k(I,F,D,z){var N=document.createElementNS("http://www.w3.org/2000/svg","text"),q=e.select(N);return q.text(I).attr("x",0).attr("y",0).attr("text-anchor",D).attr("data-unformatted",I).call(u.convertToTspans,z).call(i.font,F),i.bBox(q.node())}function E(I,F,D,z,N,q){var P="_cache"+F;I[P]&&I[P].key===N||(I[P]={key:N,value:D});var B=n.aggNums(q,null,[I[P].value,z],2);return I[P].value=B,B}return Xq}var Zq,Ime;function LKe(){return Ime||(Ime=1,Zq={moduleType:"trace",name:"indicator",basePlotModule:EKe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:C5e(),supplyDefaults:kKe().supplyDefaults,calc:CKe().calc,plot:RKe(),meta:{description:["An indicator is used to visualize a single `value` along with some","contextual information such as `steps` or a `threshold`, using a","combination of three visual elements: a number, a delta, and/or a gauge.","Deltas are taken with respect to a `reference`.","Gauges can be either angular or bullet (aka linear) gauges."].join(" ")}}),Zq}var Kq,Ome;function PKe(){return Ome||(Ome=1,Kq=LKe()),Kq}var Jq={exports:{}},zme;function L5e(){if(zme)return Jq.exports;zme=1;var e=Gx(),t=ja().extendFlat,r=ws().overrideAll,n=Gs(),o=Vs().attributes,s=ll().descriptionOnlyNumbers,a=Jq.exports=r({domain:o({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null,description:["The width of columns expressed as a ratio. Columns fill the available width","in proportion of their specified column widths."].join(" ")},columnorder:{valType:"data_array",description:["Specifies the rendered order of the data columns; for example, a value `2` at position `0`","means that column index `0` in the data will be rendered as the","third column, as columns have an index base of zero."].join(" ")},header:{values:{valType:"data_array",dflt:[],description:["Header cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:28,description:"The height of cells."},align:t({},e.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:t({},n({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[],description:["Cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:20,description:"The height of cells."},align:t({},e.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:t({},n({arrayOk:!0}))}},"calc","from-root");return a.transforms=void 0,Jq.exports}var Qq,Fme;function DKe(){if(Fme)return Qq;Fme=1;var e=rr(),t=L5e(),r=Vs().defaults;function n(o,s){for(var a=o.columnorder||[],f=o.header.values.length,i=a.slice(0,f),l=i.slice().sort(function(h,d){return h-d}),u=i.map(function(h){return l.indexOf(h)}),c=u.length;c",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}),tj}var rj,qme;function OKe(){if(qme)return rj;qme=1;var e=P5e(),t=ja().extendFlat,r=Ua(),n=lh().isTypedArray,o=lh().isArrayOrTypedArray;rj=function(v,p){var m=f(p.cells.values),y=function($){return $.slice(p.header.values.length,$.length)},b=f(p.header.values);b.length&&!b[0].length&&(b[0]=[""],b=f(b));var g=b.concat(y(m).map(function(){return i((b[0]||[""]).length)})),T=p.domain,S=Math.floor(v._fullLayout._size.w*(T.x[1]-T.x[0])),A=Math.floor(v._fullLayout._size.h*(T.y[1]-T.y[0])),M=p.header.values.length?g[0].map(function(){return p.header.height}):[e.emptyHeaderHeight],w=m.length?m[0].map(function(){return p.cells.height}):[],C=M.reduce(a,0),x=A-C,_=x+e.uplift,k=c(w,_),E=c(M,C),I=u(E,[]),F=u(k,I),D={},z=p._fullInput.columnorder;o(z)&&(z=Array.from(z)),z=z.concat(y(m.map(function($,Q){return Q})));var N=g.map(function($,Q){var J=o(p.columnwidth)?p.columnwidth[Math.min(Q,p.columnwidth.length-1)]:p.columnwidth;return r(J)?Number(J):1}),q=N.reduce(a,0);N=N.map(function($){return $/q*S});var P=Math.max(s(p.header.line.width),s(p.cells.line.width)),B={key:p.uid+v._context.staticPlot,translateX:T.x[0]*v._fullLayout._size.w,translateY:v._fullLayout._size.h*(1-T.y[1]),size:v._fullLayout._size,width:S,maxLineWidth:P,height:A,columnOrder:z,groupHeight:A,rowBlocks:F,headerRowBlocks:I,scrollY:0,cells:t({},p.cells,{values:m}),headerCells:t({},p.header,{values:g}),gdColumns:g.map(function($){return $[0]}),gdColumnsOriginalOrder:g.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function($,Q){var J=D[$];D[$]=(J||0)+1;var ne=$+"__"+D[$];return{key:ne,label:$,specIndex:Q,xIndex:z[Q],xScale:l,x:void 0,calcdata:void 0,columnWidth:N[Q]}})};return B.columns.forEach(function($){$.calcdata=B,$.x=l($)}),B};function s(d){if(o(d)){for(var v=0,p=0;p=v||A===d.length-1)&&(p[y]=g,g.key=S++,g.firstRowIndex=T,g.lastRowIndex=A,g=h(),y+=b,T=A+1,b=0);return p}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}return rj}var t3={},jme;function zKe(){if(jme)return t3;jme=1;var e=ja().extendFlat;t3.splitToPanels=function(r){var n=[0,0],o=e({},r,{key:"header",type:"header",page:0,prevPages:n,currentRepaint:[null,null],dragHandle:!0,values:r.calcdata.headerCells.values[r.specIndex],rowBlocks:r.calcdata.headerRowBlocks,calcdata:e({},r.calcdata,{cells:r.calcdata.headerCells})}),s=e({},r,{key:"cells1",type:"cells",page:0,prevPages:n,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks}),a=e({},r,{key:"cells2",type:"cells",page:1,prevPages:n,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks});return[s,a,o]},t3.splitToCells=function(r){var n=t(r);return(r.values||[]).slice(n[0],n[1]).map(function(o,s){var a=typeof o=="string"&&o.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:s+a,key:n[0]+s,column:r,calcdata:r.calcdata,page:r.page,rowBlocks:r.rowBlocks,value:o}})};function t(r){var n=r.rowBlocks[r.page],o=n?n.rows[0].rowIndex:0,s=n?o+n.rows.length:0;return[o,s]}return t3}var nj,Ume;function D5e(){if(Ume)return nj;Ume=1;var e=P5e(),t=ya(),r=rr(),n=r.numberFormat,o=Z0(),s=Ba(),a=ns(),f=rr().raiseToTop,i=rr().strTranslate,l=rr().cancelTransition,u=OKe(),c=zKe(),h=va();nj=function(le,oe){var fe=!le._context.staticPlot,de=le._fullLayout._paper.selectAll("."+e.cn.table).data(oe.map(function(me){var Ce=o.unwrap(me),et=Ce.trace;return u(le,et)}),o.keyFun);de.exit().remove(),de.enter().append("g").classed(e.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),de.attr("width",function(me){return me.width+me.size.l+me.size.r}).attr("height",function(me){return me.height+me.size.t+me.size.b}).attr("transform",function(me){return i(me.translateX,me.translateY)});var _e=de.selectAll("."+e.cn.tableControlView).data(o.repeat,o.keyFun),we=_e.enter().append("g").classed(e.cn.tableControlView,!0).style("box-sizing","content-box");if(fe){var Oe="onwheel"in document?"wheel":"mousewheel";we.on("mousemove",function(me){_e.filter(function(Ce){return me===Ce}).call(y,le)}).on(Oe,function(me){if(!me.scrollbarState.wheeling){me.scrollbarState.wheeling=!0;var Ce=me.scrollY+t.event.deltaY,et=$(le,_e,null,Ce)(me);et||(t.event.stopPropagation(),t.event.preventDefault()),me.scrollbarState.wheeling=!1}}).call(y,le,!0)}_e.attr("transform",function(me){return i(me.size.l,me.size.t)});var be=_e.selectAll("."+e.cn.scrollBackground).data(o.repeat,o.keyFun);be.enter().append("rect").classed(e.cn.scrollBackground,!0).attr("fill","none"),be.attr("width",function(me){return me.width}).attr("height",function(me){return me.height}),_e.each(function(me){s.setClipUrl(t.select(this),v(le,me),le)});var Te=_e.selectAll("."+e.cn.yColumn).data(function(me){return me.columns},o.keyFun);Te.enter().append("g").classed(e.cn.yColumn,!0),Te.exit().remove(),Te.attr("transform",function(me){return i(me.x,0)}),fe&&Te.call(t.behavior.drag().origin(function(me){var Ce=t.select(this);return D(Ce,me,-e.uplift),f(this),me.calcdata.columnDragInProgress=!0,y(_e.filter(function(et){return me.calcdata.key===et.key}),le),me}).on("drag",function(me){var Ce=t.select(this),et=function(ut){return(me===ut?t.event.x:ut.x)+ut.columnWidth/2};me.x=Math.max(-e.overdrag,Math.min(me.calcdata.width+e.overdrag-me.columnWidth,t.event.x));var st=m(Te).filter(function(ut){return ut.calcdata.key===me.calcdata.key}),ot=st.sort(function(ut,ht){return et(ut)-et(ht)});ot.forEach(function(ut,ht){ut.xIndex=ht,ut.x=me===ut?ut.x:ut.xScale(ut)}),Te.filter(function(ut){return me!==ut}).transition().ease(e.transitionEase).duration(e.transitionDuration).attr("transform",function(ut){return i(ut.x,0)}),Ce.call(l).attr("transform",i(me.x,-e.uplift))}).on("dragend",function(me){var Ce=t.select(this),et=me.calcdata;me.x=me.xScale(me),me.calcdata.columnDragInProgress=!1,D(Ce,me,0),I(le,et,et.columns.map(function(st){return st.xIndex}))})),Te.each(function(me){s.setClipUrl(t.select(this),p(le,me),le)});var ke=Te.selectAll("."+e.cn.columnBlock).data(c.splitToPanels,o.keyFun);ke.enter().append("g").classed(e.cn.columnBlock,!0).attr("id",function(me){return me.key}),ke.style("cursor",function(me){return me.dragHandle?"ew-resize":me.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ee=ke.filter(N),Le=ke.filter(z);fe&&Le.call(t.behavior.drag().origin(function(me){return t.event.stopPropagation(),me}).on("drag",$(le,_e,-1)).on("dragend",function(){})),b(le,_e,Ee,ke),b(le,_e,Le,ke);var Fe=_e.selectAll("."+e.cn.scrollAreaClip).data(o.repeat,o.keyFun);Fe.enter().append("clipPath").classed(e.cn.scrollAreaClip,!0).attr("id",function(me){return v(le,me)});var qe=Fe.selectAll("."+e.cn.scrollAreaClipRect).data(o.repeat,o.keyFun);qe.enter().append("rect").classed(e.cn.scrollAreaClipRect,!0).attr("x",-e.overdrag).attr("y",-e.uplift).attr("fill","none"),qe.attr("width",function(me){return me.width+2*e.overdrag}).attr("height",function(me){return me.height+e.uplift});var We=Te.selectAll("."+e.cn.columnBoundary).data(o.repeat,o.keyFun);We.enter().append("g").classed(e.cn.columnBoundary,!0);var Qe=Te.selectAll("."+e.cn.columnBoundaryClippath).data(o.repeat,o.keyFun);Qe.enter().append("clipPath").classed(e.cn.columnBoundaryClippath,!0),Qe.attr("id",function(me){return p(le,me)});var De=Qe.selectAll("."+e.cn.columnBoundaryRect).data(o.repeat,o.keyFun);De.enter().append("rect").classed(e.cn.columnBoundaryRect,!0).attr("fill","none"),De.attr("width",function(me){return me.columnWidth+2*d(me)}).attr("height",function(me){return me.calcdata.height+2*d(me)+e.uplift}).attr("x",function(me){return-d(me)}).attr("y",function(me){return-d(me)}),B(null,Le,_e)};function d(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function v(ee,le){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+le.key}function p(ee,le){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+le.calcdata.key+"_"+le.specIndex}function m(ee){return[].concat.apply([],ee.map(function(le){return le})).map(function(le){return le.__data__})}function y(ee,le,oe){function fe(Te){var ke=Te.rowBlocks;return G(ke,ke.length-1)+(ke.length?j(ke[ke.length-1],1/0):1)}var de=ee.selectAll("."+e.cn.scrollbarKit).data(o.repeat,o.keyFun);de.enter().append("g").classed(e.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),de.each(function(Te){var ke=Te.scrollbarState;ke.totalHeight=fe(Te),ke.scrollableAreaHeight=Te.groupHeight-q(Te),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,e.goldenRatio*e.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Te.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Te){var ke=Te.width+e.scrollbarWidth/2+e.scrollbarOffset;return i(ke,q(Te))});var _e=de.selectAll("."+e.cn.scrollbar).data(o.repeat,o.keyFun);_e.enter().append("g").classed(e.cn.scrollbar,!0);var we=_e.selectAll("."+e.cn.scrollbarSlider).data(o.repeat,o.keyFun);we.enter().append("g").classed(e.cn.scrollbarSlider,!0),we.attr("transform",function(Te){return i(0,Te.scrollbarState.topY||0)});var Oe=we.selectAll("."+e.cn.scrollbarGlyph).data(o.repeat,o.keyFun);Oe.enter().append("line").classed(e.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",e.scrollbarWidth).attr("stroke-linecap","round").attr("y1",e.scrollbarWidth/2),Oe.attr("y2",function(Te){return Te.scrollbarState.barLength-e.scrollbarWidth/2}).attr("stroke-opacity",function(Te){return Te.columnDragInProgress||!Te.scrollbarState.barWiggleRoom||oe?0:.4}),Oe.transition().delay(0).duration(0),Oe.transition().delay(e.scrollbarHideDelay).duration(e.scrollbarHideDuration).attr("stroke-opacity",0);var be=_e.selectAll("."+e.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);be.enter().append("line").classed(e.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",e.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Te){var ke=t.event.y,Ee=this.getBoundingClientRect(),Le=Te.scrollbarState,Fe=ke-Ee.top,qe=t.scale.linear().domain([0,Le.scrollableAreaHeight]).range([0,Le.totalHeight]).clamp(!0);Le.topY<=Fe&&Fe<=Le.bottomY||$(le,ee,null,qe(Fe-Le.barLength/2))(Te)}).call(t.behavior.drag().origin(function(Te){return t.event.stopPropagation(),Te.scrollbarState.scrollbarScrollInProgress=!0,Te}).on("drag",$(le,ee)).on("dragend",function(){})),be.attr("y2",function(Te){return Te.scrollbarState.scrollableAreaHeight}),le._context.staticPlot&&(Oe.remove(),be.remove())}function b(ee,le,oe,fe){var de=g(oe),_e=T(de);w(_e);var we=S(_e);x(we);var Oe=M(_e),be=A(Oe);C(be),_(be,le,fe,ee),Z(_e)}function g(ee){var le=ee.selectAll("."+e.cn.columnCells).data(o.repeat,o.keyFun);return le.enter().append("g").classed(e.cn.columnCells,!0),le.exit().remove(),le}function T(ee){var le=ee.selectAll("."+e.cn.columnCell).data(c.splitToCells,function(oe){return oe.keyWithinBlock});return le.enter().append("g").classed(e.cn.columnCell,!0),le.exit().remove(),le}function S(ee){var le=ee.selectAll("."+e.cn.cellRect).data(o.repeat,function(oe){return oe.keyWithinBlock});return le.enter().append("rect").classed(e.cn.cellRect,!0),le}function A(ee){var le=ee.selectAll("."+e.cn.cellText).data(o.repeat,function(oe){return oe.keyWithinBlock});return le.enter().append("text").classed(e.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){t.event.stopPropagation()}),le}function M(ee){var le=ee.selectAll("."+e.cn.cellTextHolder).data(o.repeat,function(oe){return oe.keyWithinBlock});return le.enter().append("g").classed(e.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),le}function w(ee){ee.each(function(le,oe){var fe=le.calcdata.cells.font,de=le.column.specIndex,_e={size:F(fe.size,de,oe),color:F(fe.color,de,oe),family:F(fe.family,de,oe)};le.rowNumber=le.key,le.align=F(le.calcdata.cells.align,de,oe),le.cellBorderWidth=F(le.calcdata.cells.line.width,de,oe),le.font=_e})}function C(ee){ee.each(function(le){s.font(t.select(this),le.font)})}function x(ee){ee.attr("width",function(le){return le.column.columnWidth}).attr("stroke-width",function(le){return le.cellBorderWidth}).each(function(le){var oe=t.select(this);h.stroke(oe,F(le.calcdata.cells.line.color,le.column.specIndex,le.rowNumber)),h.fill(oe,F(le.calcdata.cells.fill.color,le.column.specIndex,le.rowNumber))})}function _(ee,le,oe,fe){ee.text(function(de){var _e=de.column.specIndex,we=de.rowNumber,Oe=de.value,be=typeof Oe=="string",Te=be&&Oe.match(/
/i),ke=!be||Te;de.mayHaveMarkup=be&&Oe.match(/[<&>]/);var Ee=k(Oe);de.latex=Ee;var Le=Ee?"":F(de.calcdata.cells.prefix,_e,we)||"",Fe=Ee?"":F(de.calcdata.cells.suffix,_e,we)||"",qe=Ee?null:F(de.calcdata.cells.format,_e,we)||null,We=Le+(qe?n(qe)(de.value):de.value)+Fe,Qe;de.wrappingNeeded=!de.wrapped&&!ke&&!Ee&&(Qe=E(We)),de.cellHeightMayIncrease=Te||Ee||de.mayHaveMarkup||(Qe===void 0?E(We):Qe),de.needsConvertToTspans=de.mayHaveMarkup||de.wrappingNeeded||de.latex;var De;if(de.wrappingNeeded){var me=e.wrapSplitCharacter===" "?We.replace(/de&&fe.push(_e),de+=be}return fe}function B(ee,le,oe){var fe=m(le)[0];if(fe!==void 0){var de=fe.rowBlocks,_e=fe.calcdata,we=G(de,de.length),Oe=fe.calcdata.groupHeight-q(fe),be=_e.scrollY=Math.max(0,Math.min(we-Oe,_e.scrollY)),Te=P(de,be,Oe);Te.length===1&&(Te[0]===de.length-1?Te.unshift(Te[0]-1):Te.push(Te[0]+1)),Te[0]%2&&Te.reverse(),le.each(function(ke,Ee){ke.page=Te[Ee],ke.scrollY=be}),le.attr("transform",function(ke){var Ee=G(ke.rowBlocks,ke.page)-ke.scrollY;return i(0,Ee)}),ee&&(Q(ee,oe,le,Te,fe.prevPages,fe,0),Q(ee,oe,le,Te,fe.prevPages,fe,1),y(oe,ee))}}function $(ee,le,oe,fe){return function(_e){var we=_e.calcdata?_e.calcdata:_e,Oe=le.filter(function(Ee){return we.key===Ee.key}),be=oe||we.scrollbarState.dragMultiplier,Te=we.scrollY;we.scrollY=fe===void 0?we.scrollY+be*t.event.dy:fe;var ke=Oe.selectAll("."+e.cn.yColumn).selectAll("."+e.cn.columnBlock).filter(z);return B(ee,ke,Oe),we.scrollY===Te}}function Q(ee,le,oe,fe,de,_e,we){var Oe=fe[we]!==de[we];Oe&&(clearTimeout(_e.currentRepaint[we]),_e.currentRepaint[we]=setTimeout(function(){var be=oe.filter(function(Te,ke){return ke===we&&fe[ke]!==de[ke]});b(ee,le,be,oe),de[we]=fe[we]}))}function J(ee,le,oe,fe){return function(){var _e=t.select(le.parentNode);_e.each(function(we){var Oe=we.fragments;_e.selectAll("tspan.line").each(function(We,Qe){Oe[Qe].width=this.getComputedTextLength()});var be=Oe[Oe.length-1].width,Te=Oe.slice(0,-1),ke=[],Ee,Le,Fe=0,qe=we.column.columnWidth-2*e.cellPad;for(we.value="";Te.length;)Ee=Te.shift(),Le=Ee.width+be,Fe+Le>qe&&(we.value+=ke.join(e.wrapSpacer)+e.lineBreaker,ke=[],Fe=0),ke.push(Ee.text),Fe+=Le;Fe&&(we.value+=ke.join(e.wrapSpacer)),we.wrapped=!0}),_e.selectAll("tspan.line").remove(),_(_e.select("."+e.cn.cellText),oe,ee,fe),t.select(le.parentNode.parentNode).call(Z)}}function ne(ee,le,oe,fe,de){return function(){if(!de.settledY){var we=t.select(le.parentNode),Oe=K(de),be=de.key-Oe.firstRowIndex,Te=Oe.rows[be].rowHeight,ke=de.cellHeightMayIncrease?le.parentNode.getBoundingClientRect().height+2*e.cellPad:Te,Ee=Math.max(ke,Te),Le=Ee-Oe.rows[be].rowHeight;Le&&(Oe.rows[be].rowHeight=Ee,ee.selectAll("."+e.cn.columnCell).call(Z),B(null,ee.filter(z),0),y(oe,fe,!0)),we.attr("transform",function(){var Fe=this,qe=Fe.parentNode,We=qe.getBoundingClientRect(),Qe=t.select(Fe.parentNode).select("."+e.cn.cellRect).node().getBoundingClientRect(),De=Fe.transform.baseVal.consolidate(),me=Qe.top-We.top+(De?De.matrix.f:e.cellPad);return i(te(de,t.select(Fe.parentNode).select("."+e.cn.cellTextHolder).node().getBoundingClientRect().width),me)}),de.settledY=!0}}}function te(ee,le){switch(ee.align){case"left":return e.cellPad;case"right":return ee.column.columnWidth-(le||0)-e.cellPad;case"center":return(ee.column.columnWidth-(le||0))/2;default:return e.cellPad}}function Z(ee){ee.attr("transform",function(le){var oe=le.rowBlocks[0].auxiliaryBlocks.reduce(function(we,Oe){return we+j(Oe,1/0)},0),fe=K(le),de=j(fe,le.key),_e=de+oe;return i(0,_e)}).selectAll("."+e.cn.cellRect).attr("height",function(le){return X(K(le),le.key).rowHeight})}function G(ee,le){for(var oe=0,fe=le-1;fe>=0;fe--)oe+=Y(ee[fe]);return oe}function j(ee,le){for(var oe=0,fe=0;fen.length&&(r=r.slice(0,n.length)):r=[],s=0;s90&&(v-=180,l=-l),{angle:v,flip:l,p:t.c2p(o,r,n),offsetMultplier:u}}),vj}var pj,t1e;function YKe(){if(t1e)return pj;t1e=1;var e=ya(),t=Ba(),r=I5e(),n=O5e(),o=VKe(),s=ns(),a=rr(),f=a.strRotate,i=a.strTranslate,l=Zu();pj=function(b,g,T,S){var A=b._context.staticPlot,M=g.xaxis,w=g.yaxis,C=b._fullLayout,x=C._clips;a.makeTraceGroups(S,T,"trace").each(function(_){var k=e.select(this),E=_[0],I=E.trace,F=I.aaxis,D=I.baxis,z=a.ensureSingle(k,"g","minorlayer"),N=a.ensureSingle(k,"g","majorlayer"),q=a.ensureSingle(k,"g","boundarylayer"),P=a.ensureSingle(k,"g","labellayer");k.style("opacity",I.opacity),c(M,w,N,F,"a",F._gridlines,!0),c(M,w,N,D,"b",D._gridlines,!0),c(M,w,z,F,"a",F._minorgridlines,!0),c(M,w,z,D,"b",D._minorgridlines,!0),c(M,w,q,F,"a-boundary",F._boundarylines,A),c(M,w,q,D,"b-boundary",D._boundarylines,A);var B=h(b,M,w,I,E,P,F._labels,"a-label"),$=h(b,M,w,I,E,P,D._labels,"b-label");d(b,P,I,E,M,w,B,$),u(I,E,x,M,w)})};function u(y,b,g,T,S){var A,M,w,C,x=g.select("#"+y._clipPathId);x.size()||(x=g.append("clipPath").classed("carpetclip",!0));var _=a.ensureSingle(x,"path","carpetboundary"),k=b.clipsegments,E=[];for(C=0;C0?"start":"end","data-notex":1}).call(t.font,k.font).text(k.text).call(s.convertToTspans,y),N=t.bBox(this);z.attr("transform",i(I.p[0],I.p[1])+f(I.angle)+i(k.axis.labelpadding*D,N.height*.3)),x=Math.max(x,N.width+k.axis.labelpadding)}),C.exit().remove(),_.maxExtent=x,_}function d(y,b,g,T,S,A,M,w){var C,x,_,k,E=a.aggNums(Math.min,null,g.a),I=a.aggNums(Math.max,null,g.a),F=a.aggNums(Math.min,null,g.b),D=a.aggNums(Math.max,null,g.b);C=.5*(E+I),x=F,_=g.ab2xy(C,x,!0),k=g.dxyda_rough(C,x),M.angle===void 0&&a.extendFlat(M,o(g,S,A,_,g.dxydb_rough(C,x))),m(y,b,g,T,_,k,g.aaxis,S,A,M,"a-title"),C=E,x=.5*(F+D),_=g.ab2xy(C,x,!0),k=g.dxydb_rough(C,x),w.angle===void 0&&a.extendFlat(w,o(g,S,A,_,g.dxyda_rough(C,x))),m(y,b,g,T,_,k,g.baxis,S,A,w,"b-title")}var v=l.LINE_SPACING,p=(1-l.MID_SHIFT)/v+1;function m(y,b,g,T,S,A,M,w,C,x,_){var k=[];M.title.text&&k.push(M.title.text);var E=b.selectAll("text."+_).data(k),I=x.maxExtent;E.enter().append("text").classed(_,!0),E.each(function(){var F=o(g,w,C,S,A);["start","both"].indexOf(M.showticklabels)===-1&&(I=0);var D=M.title.font.size;I+=D+M.title.offset;var z=x.angle+(x.flip<0?180:0),N=(z-F.angle+450)%360,q=N>90&&N<270,P=e.select(this);P.text(M.title.text).call(s.convertToTspans,y),q&&(I=(-s.lineCount(P)+p)*v*D-I),P.attr("transform",i(F.p[0],F.p[1])+f(F.angle)+i(0,I)).attr("text-anchor","middle").call(t.font,M.title.font)}),E.exit().remove()}return pj}var gj,r1e;function $Ke(){if(r1e)return gj;r1e=1;var e=rr().isArrayOrTypedArray;return gj=function(t,r,n){var o,s,a,f,i,l,u=[],c=e(t)?t.length:t,h=e(r)?r.length:r,d=e(t)?t:null,v=e(r)?r:null;d&&(a=(d.length-1)/(d[d.length-1]-d[0])/(c-1)),v&&(f=(v.length-1)/(v[v.length-1]-v[0])/(h-1));var p,m=1/0,y=-1/0;for(s=0;s=10)return null;for(var o=1/0,s=-1/0,a=r.length,f=0;f0&&(j=n.dxydi([],B-1,Q,0,J),ee.push(ne[0]+j[0]/3),le.push(ne[1]+j[1]/3),Y=n.dxydi([],B-1,Q,1,J),ee.push(G[0]-Y[0]/3),le.push(G[1]-Y[1]/3)),ee.push(G[0]),le.push(G[1]),ne=G;else for(B=n.a2i(P),te=Math.floor(Math.max(0,Math.min(F-2,B))),Z=B-te,oe.length=F,oe.crossLength=D,oe.xy=function(fe){return n.evalxy([],B,fe)},oe.dxy=function(fe,de){return n.dxydj([],te,fe,Z,de)},$=0;$0&&(K=n.dxydj([],te,$-1,Z,0),ee.push(ne[0]+K[0]/3),le.push(ne[1]+K[1]/3),X=n.dxydj([],te,$-1,Z,1),ee.push(G[0]-X[0]/3),le.push(G[1]-X[1]/3)),ee.push(G[0]),le.push(G[1]),ne=G;return oe.axisLetter=o,oe.axis=S,oe.crossAxis=x,oe.value=P,oe.constvar=s,oe.index=d,oe.x=ee,oe.y=le,oe.smoothing=x.smoothing,oe}function q(P){var B,$,Q,J,ne,te=[],Z=[],G={};if(G.length=T.length,G.crossLength=C.length,o==="b")for(Q=Math.max(0,Math.min(D-2,P)),ne=Math.min(1,Math.max(0,P-Q)),G.xy=function(j){return n.evalxy([],j,P)},G.dxy=function(j,Y){return n.dxydi([],j,Q,Y,ne)},B=0;BT.length-1)&&A.push(t(q(f),{color:S.gridcolor,width:S.gridwidth,dash:S.griddash}));for(d=c;dT.length-1)&&!(m<0||m>T.length-1))for(y=T[i],b=T[m],a=0;aT[T.length-1])&&M.push(t(N(p),{color:S.minorgridcolor,width:S.minorgridwidth,dash:S.minorgriddash})));S.startline&&w.push(t(q(0),{color:S.startlinecolor,width:S.startlinewidth})),S.endline&&w.push(t(q(T.length-1),{color:S.endlinecolor,width:S.endlinewidth}))}else{for(l=5e-15,u=[Math.floor((T[T.length-1]-S.tick0)/S.dtick*(1+l)),Math.ceil((T[0]-S.tick0)/S.dtick/(1+l))].sort(function(P,B){return P-B}),c=u[0],h=u[1],d=c;d<=h;d++)v=S.tick0+S.dtick*d,A.push(t(N(v),{color:S.gridcolor,width:S.gridwidth,dash:S.griddash}));for(d=c-1;dT[T.length-1])&&M.push(t(N(p),{color:S.minorgridcolor,width:S.minorgridwidth,dash:S.minorgriddash}));S.startline&&w.push(t(N(T[0]),{color:S.startlinecolor,width:S.startlinewidth})),S.endline&&w.push(t(N(T[T.length-1]),{color:S.endlinecolor,width:S.endlinewidth}))}},mj}var xj,i1e;function ZKe(){if(i1e)return xj;i1e=1;var e=Ia(),t=ja().extendFlat;return xj=function(n,o){var s,a,f,i,l,u=o._labels=[],c=o._gridlines;for(s=0;s=0;s--)a[c-s]=t[h][s],f[c-s]=r[h][s];for(i.push({x:a,y:f,bicubic:l}),s=h,a=[],f=[];s>=0;s--)a[h-s]=t[s][0],f[h-s]=r[s][0];return i.push({x:a,y:f,bicubic:u}),i}),bj}var _j,s1e;function JKe(){if(s1e)return _j;s1e=1;var e=rr();return _j=function(r,n,o){var s,a,f,i=[],l=[],u=r[0].length,c=r.length;function h($,Q){var J=0,ne,te=0;return $>0&&(ne=r[Q][$-1])!==void 0&&(te++,J+=ne),$0&&(ne=r[Q-1][$])!==void 0&&(te++,J+=ne),Q0&&a0&&sC);return e.log("Smoother converged to",x,"after",k,"iterations"),r},_j}var wj,l1e;function QKe(){return l1e||(l1e=1,wj={RELATIVE_CULL_TOLERANCE:1e-6}),wj}var Tj,u1e;function eJe(){if(u1e)return Tj;u1e=1;var e=.5;return Tj=function(r,n,o,s){var a=r[0]-n[0],f=r[1]-n[1],i=o[0]-n[0],l=o[1]-n[1],u=Math.pow(a*a+f*f,e/2),c=Math.pow(i*i+l*l,e/2),h=(c*c*a-u*u*i)*s,d=(c*c*f-u*u*l)*s,v=c*(u+c)*3,p=u*(u+c)*3;return[[n[0]+(v&&h/v),n[1]+(v&&d/v)],[n[0]-(p&&h/p),n[1]-(p&&d/p)]]},Tj}var Aj,f1e;function tJe(){if(f1e)return Aj;f1e=1;var e=eJe(),t=rr().ensureArray;function r(n,o,s){var a=-.5*s[0]+1.5*o[0],f=-.5*s[1]+1.5*o[1];return[(2*a+n[0])/3,(2*f+n[1])/3]}return Aj=function(o,s,a,f,i,l){var u,c,h,d,v,p,m,y,b,g,T=a[0].length,S=a.length,A=i?3*T-2:T,M=l?3*S-2:S;for(o=t(o,M),s=t(s,M),h=0;hv&&Am&&Mp||My},f.setScale=function(){var A=f._x,M=f._y,w=r(f._xctrl,f._yctrl,A,M,h.smoothing,d.smoothing);f._xctrl=w[0],f._yctrl=w[1],f.evalxy=n([f._xctrl,f._yctrl],u,c,h.smoothing,d.smoothing),f.dxydi=o([f._xctrl,f._yctrl],h.smoothing,d.smoothing),f.dxydj=s([f._xctrl,f._yctrl],h.smoothing,d.smoothing)},f.i2a=function(A){var M=Math.max(0,Math.floor(A[0]),u-2),w=A[0]-M;return(1-w)*i[M]+w*i[M+1]},f.j2b=function(A){var M=Math.max(0,Math.floor(A[1]),u-2),w=A[1]-M;return(1-w)*l[M]+w*l[M+1]},f.ij2ab=function(A){return[f.i2a(A[0]),f.j2b(A[1])]},f.a2i=function(A){var M=Math.max(0,Math.min(t(A,i),u-2)),w=i[M],C=i[M+1];return Math.max(0,Math.min(u-1,M+(A-w)/(C-w)))},f.b2j=function(A){var M=Math.max(0,Math.min(t(A,l),c-2)),w=l[M],C=l[M+1];return Math.max(0,Math.min(c-1,M+(A-w)/(C-w)))},f.ab2ij=function(A){return[f.a2i(A[0]),f.b2j(A[1])]},f.i2c=function(A,M){return f.evalxy([],A,M)},f.ab2xy=function(A,M,w){if(!w&&(Ai[u-1]|Ml[c-1]))return[!1,!1];var C=f.a2i(A),x=f.b2j(M),_=f.evalxy([],C,x);if(w){var k=0,E=0,I=[],F,D,z,N;Ai[u-1]?(F=u-2,D=1,k=(A-i[u-1])/(i[u-1]-i[u-2])):(F=Math.max(0,Math.min(u-2,Math.floor(C))),D=C-F),Ml[c-1]?(z=c-2,N=1,E=(M-l[c-1])/(l[c-1]-l[c-2])):(z=Math.max(0,Math.min(c-2,Math.floor(x))),N=x-z),k&&(f.dxydi(I,F,z,D,N),_[0]+=I[0]*k,_[1]+=I[1]*k),E&&(f.dxydj(I,F,z,D,N),_[0]+=I[0]*E,_[1]+=I[1]*E)}return _},f.c2p=function(A,M,w){return[M.c2p(A[0]),w.c2p(A[1])]},f.p2x=function(A,M,w){return[M.p2c(A[0]),w.p2c(A[1])]},f.dadi=function(A){var M=Math.max(0,Math.min(i.length-2,A));return i[M+1]-i[M]},f.dbdj=function(A){var M=Math.max(0,Math.min(l.length-2,A));return l[M+1]-l[M]},f.dxyda=function(A,M,w,C){var x=f.dxydi(null,A,M,w,C),_=f.dadi(A,w);return[x[0]/_,x[1]/_]},f.dxydb=function(A,M,w,C){var x=f.dxydj(null,A,M,w,C),_=f.dbdj(M,C);return[x[0]/_,x[1]/_]},f.dxyda_rough=function(A,M,w){var C=b*(w||.1),x=f.ab2xy(A+C,M,!0),_=f.ab2xy(A-C,M,!0);return[(x[0]-_[0])*.5/C,(x[1]-_[1])*.5/C]},f.dxydb_rough=function(A,M,w){var C=g*(w||.1),x=f.ab2xy(A,M+C,!0),_=f.ab2xy(A,M-C,!0);return[(x[0]-_[0])*.5/C,(x[1]-_[1])*.5/C]},f.dpdx=function(A){return A._m},f.dpdy=function(A){return A._m}},kj}var Cj,p1e;function oJe(){if(p1e)return Cj;p1e=1;var e=Ia(),t=rr().isArray1D,r=$Ke(),n=WKe(),o=XKe(),s=ZKe(),a=KKe(),f=R$(),i=JKe(),l=C$(),u=iJe();return Cj=function(h,d){var v=e.getFromId(h,d.xaxis),p=e.getFromId(h,d.yaxis),m=d.aaxis,y=d.baxis,b=d.x,g=d.y,T=[];b&&t(b)&&T.push("x"),g&&t(g)&&T.push("y"),T.length&&l(d,m,y,"a","b",T);var S=d._a=d._a||d.a,A=d._b=d._b||d.b;b=d._x||d.x,g=d._y||d.y;var M={};if(d._cheater){var w=m.cheatertype==="index"?S.length:S,C=y.cheatertype==="index"?A.length:A;b=r(w,C,d.cheaterslope)}d._x=b=f(b),d._y=g=f(g),i(b,S,A),i(g,S,A),u(d),d.setScale();var x=n(b),_=n(g),k=.5*(x[1]-x[0]),E=.5*(x[1]+x[0]),I=.5*(_[1]-_[0]),F=.5*(_[1]+_[0]),D=1.3;return x=[E-k*D,E+k*D],_=[F-I*D,F+I*D],d._extremes[v._id]=e.findExtremes(v,x,{padded:!0}),d._extremes[p._id]=e.findExtremes(p,_,{padded:!0}),o(d,"a","b"),o(d,"b","a"),s(d,m),s(d,y),M.clipsegments=a(d._xctrl,d._yctrl,m,y),M.x=b,M.y=g,M.a=S,M.b=A,[M]},Cj}var Rj,g1e;function sJe(){return g1e||(g1e=1,Rj={attributes:YX(),supplyDefaults:GKe(),plot:YKe(),calc:oJe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:$l(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{description:["The data describing carpet axis layout is set in `y` and (optionally)","also `x`. If only `y` is present, `x` the plot is interpreted as a","cheater plot and is filled in using the `y` values.","`x` and `y` may either be 2D arrays matching with each dimension matching","that of `a` and `b`, or they may be 1D arrays with total length equal to","that of `a` and `b`."].join(" ")}}),Rj}var Lj,y1e;function lJe(){return y1e||(y1e=1,Lj=sJe()),Lj}var Pj,m1e;function z5e(){if(m1e)return Pj;m1e=1;var e=og(),t=Yl(),r=qo(),n=bi().hovertemplateAttrs,o=bi().texttemplateAttrs,s=os(),a=ja().extendFlat,f=t.marker,i=t.line,l=f.line;return Pj={carpet:{valType:"string",editType:"calc",description:["An identifier for this carpet, so that `scattercarpet` and","`contourcarpet` traces can specify a carpet plot on which","they lie"].join(" ")},a:{valType:"data_array",editType:"calc",description:"Sets the a-axis coordinates."},b:{valType:"data_array",editType:"calc",description:"Sets the b-axis coordinates."},mode:a({},t.mode,{dflt:"markers"}),text:a({},t.text,{description:["Sets text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:a({},t.hovertext,{description:["Sets hover text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:a({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,fill:a({},t.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:e(),marker:a({symbol:f.symbol,opacity:f.opacity,maxdisplayed:f.maxdisplayed,angle:f.angle,angleref:f.angleref,standoff:f.standoff,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,line:a({width:l.width,editType:"calc"},s("marker.line")),gradient:f.gradient,editType:"calc"},s("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:a({},r.hoverinfo,{flags:["a","b","text","name"]}),hoveron:t.hoveron,hovertemplate:n()},Pj}var Dj,x1e;function uJe(){if(x1e)return Dj;x1e=1;var e=rr(),t=ig(),r=As(),n=gp(),o=y0(),s=O2(),a=m0(),f=sg(),i=z5e();return Dj=function(u,c,h,d){function v(S,A){return e.coerce(u,c,i,S,A)}v("carpet"),c.xaxis="x",c.yaxis="y";var p=v("a"),m=v("b"),y=Math.min(p.length,m.length);if(!y){c.visible=!1;return}c._length=y,v("text"),v("texttemplate"),v("hovertext");var b=y0?M=S.labelprefix.replace(/ = $/,""):M=S._hovertitle,y.push(M+": "+A.toFixed(3)+S.labelsuffix)}if(!v.hovertemplate){var g=d.hi||v.hoverinfo,T=g.split("+");T.indexOf("all")!==-1&&(T=["a","b","text"]),T.indexOf("a")!==-1&&b(p.aaxis,d.a),T.indexOf("b")!==-1&&b(p.baxis,d.b),y.push("y: "+i.yLabel),T.indexOf("text")!==-1&&t(d,v,y),i.extraText=y.join("
")}return f},Nj}var Bj,S1e;function vJe(){return S1e||(S1e=1,Bj=function(t,r,n,o,s){var a=o[s];return t.a=a.a,t.b=a.b,t.y=a.y,t}),Bj}var qj,M1e;function pJe(){return M1e||(M1e=1,qj={attributes:z5e(),supplyDefaults:uJe(),colorbar:fh(),formatLabels:fJe(),calc:cJe(),plot:hJe(),style:yd().style,styleOnSelect:yd().styleOnSelect,hoverPoints:dJe(),selectPoints:B2(),eventData:vJe(),moduleType:"trace",name:"scattercarpet",basePlotModule:$l(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{hrName:"scatter_carpet",description:["Plots a scatter trace on either the first carpet axis or the","carpet axis with a matching `carpet` attribute."].join(" ")}}),qj}var jj,E1e;function gJe(){return E1e||(E1e=1,jj=pJe()),jj}var Uj,k1e;function F5e(){if(k1e)return Uj;k1e=1;var e=Xx(),t=eM(),r=os(),n=ja().extendFlat,o=t.contours;return Uj=n({carpet:{valType:"string",editType:"calc",description:["The `carpet` of the carpet axes on which this contour trace lies"].join(" ")},z:e.z,a:e.x,a0:e.x0,da:e.dx,b:e.y,b0:e.y0,db:e.dy,text:e.text,hovertext:e.hovertext,transpose:e.transpose,atype:e.xtype,btype:e.ytype,fillcolor:t.fillcolor,autocontour:t.autocontour,ncontours:t.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:t.line.color,width:t.line.width,dash:t.line.dash,smoothing:t.line.smoothing,editType:"plot"},transforms:void 0},r("",{cLetter:"z",autoColorDflt:!1})),Uj}var Hj,C1e;function N5e(){if(C1e)return Hj;C1e=1;var e=rr(),t=ZS(),r=F5e(),n=CSe(),o=q$(),s=j$();return Hj=function(f,i,l,u){function c(p,m){return e.coerce(f,i,r,p,m)}function h(p){return e.coerce2(f,i,r,p)}if(c("carpet"),f.a&&f.b){var d=t(f,i,c,u,"a","b");if(!d){i.visible=!1;return}c("text");var v=c("contours.type")==="constraint";v?n(f,i,c,u,l,{hasHover:!1}):(o(f,i,c,h),s(f,i,c,u,{hasHover:!1}))}else i._defaultColor=l,i._length=null},Hj}var Gj,R1e;function yJe(){if(R1e)return Gj;R1e=1;var e=md(),t=rr(),r=C$(),n=R$(),o=L$(),s=P$(),a=dSe(),f=N5e(),i=$X(),l=bSe();Gj=function(h,d){var v=d._carpetTrace=i(h,d);if(!(!v||!v.visible||v.visible==="legendonly")){if(!d.a||!d.b){var p=h.data[v.index],m=h.data[d.index];m.a||(m.a=p.a),m.b||(m.b=p.b),f(m,d,d._defaultColor,h._fullLayout)}var y=u(h,d);return l(d,d._z),y}};function u(c,h){var d=h._carpetTrace,v=d.aaxis,p=d.baxis,m,y,b,g,T,S,A;v._minDtick=0,p._minDtick=0,t.isArray1D(h.z)&&r(h,v,p,"a","b",["z"]),m=h._a=h._a||h.a,g=h._b=h._b||h.b,m=m?v.makeCalcdata(h,"_a"):[],g=g?p.makeCalcdata(h,"_b"):[],y=h.a0||0,b=h.da||1,T=h.b0||0,S=h.db||1,A=h._z=n(h._z||h.z,h.transpose),h._emptypoints=s(A),o(A,h._emptypoints);var M=t.maxRowLength(A),w=h.xtype==="scaled"?"":m,C=a(h,w,y,b,M,v),x=h.ytype==="scaled"?"":g,_=a(h,x,T,S,A.length,p),k={a:C,b:_,z:A};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&e(c,h,{vals:A,containerStr:"",cLetter:"z"}),[k]}return Gj}var Vj,L1e;function mJe(){if(L1e)return Vj;L1e=1;var e=rr().isArrayOrTypedArray;return Vj=function(t,r,n,o){var s,a,f,i,l,u,c,h,d,v,p,m,y,b=e(n)?"a":"b",g=b==="a"?t.aaxis:t.baxis,T=g.smoothing,S=b==="a"?t.a2i:t.b2j,A=b==="a"?n:o,M=b==="a"?o:n,w=b==="a"?r.a.length:r.b.length,C=b==="a"?r.b.length:r.a.length,x=Math.floor(b==="a"?t.b2j(M):t.a2i(M)),_=b==="a"?function(Q){return t.evalxy([],Q,x)}:function(Q){return t.evalxy([],x,Q)};T&&(f=Math.max(0,Math.min(C-2,x)),i=x-f,a=b==="a"?function(Q,J){return t.dxydi([],Q,f,J,i)}:function(Q,J){return t.dxydj([],f,Q,i,J)});var k=S(A[0]),E=S(A[1]),I=k0?Math.floor:Math.ceil,z=I>0?Math.ceil:Math.floor,N=I>0?Math.min:Math.max,q=I>0?Math.max:Math.min,P=D(k+F),B=z(E-F);c=_(k);var $=[[c]];for(s=P;s*I=0;oe--)X=q.clipsegments[oe],ee=t([],X.x,k.c2p),le=t([],X.y,E.c2p),ee.reverse(),le.reverse(),fe.push(r(ee,le,X.bicubic));var de="M"+fe.join("L")+"Z";T(F,q.clipsegments,k,E,J,te),S(z,F,k,E,K,G,Z,N,q,te,de),p(F,Q,w,D,$,C,N),n.setClipUrl(F,N._clipPathId,w)})};function v(M,w){var C,x,_,k,E,I,F,D,z;for(C=0;CQ&&(x.max=Q),x.len=x.max-x.min}function y(M,w,C){var x=M.getPointAtLength(w),_=M.getPointAtLength(C),k=_.x-x.x,E=_.y-x.y,I=Math.sqrt(k*k+E*E);return[k/I,E/I]}function b(M){var w=Math.sqrt(M[0]*M[0]+M[1]*M[1]);return[M[0]/w,M[1]/w]}function g(M,w){var C=Math.abs(M[0]*w[0]+M[1]*w[1]),x=Math.sqrt(1-C*C);return x/C}function T(M,w,C,x,_,k){var E,I,F,D,z=o.ensureSingle(M,"g","contourbg"),N=z.selectAll("path").data(k==="fill"&&!_?[0]:[]);N.enter().append("path"),N.exit().remove();var q=[];for(D=0;D=0&&(P=ee,$=Q):Math.abs(q[1]-P[1])=0&&(P=ee,$=Q):o.log("endpt to newendpt is not vert. or horz.",q,P,ee)}if($>=0)break;D+=K(q,P),q=P}if($===w.edgepaths.length){o.log("unclosed perimeter path");break}F=$,N=z.indexOf(F)===-1,N&&(F=z[0],D+=K(q,P)+"Z",q=null)}for(F=0;FA):S=I>_,A=I;var F=v(_,k,E,I);F.pos=x,F.yc=(_+I)/2,F.i=C,F.dir=S?"increasing":"decreasing",F.x=F.pos,F.y=[E,k],M&&(F.orig_p=c[C]),g&&(F.tx=u.text[C]),T&&(F.htx=u.hovertext[C]),w.push(F)}else w.push({pos:x,empty:!0})}return u._extremes[d._id]=r.findExtremes(d,e.concat(y,m),{padded:!0}),w.length&&(w[0].t={labels:{open:t(l,"open:")+" ",high:t(l,"high:")+" ",low:t(l,"low:")+" ",close:t(l,"close:")+" "}}),w}function i(l,u,c){var h=c._minDiff;if(!h){var d=l._fullData,v=[];h=1/0;var p;for(p=0;p"+b.labels[I]+e.hoverLabelText(m,F,y.yhoverformat)):(z=t.extendFlat({},T),z.y0=z.y1=D,z.yLabelVal=F,z.yLabel=b.labels[I]+e.hoverLabelText(m,F,y.yhoverformat),z.name="",g.push(z),k[F]=z)}return g}function u(c,h,d,v){var p=c.cd,m=c.ya,y=p[0].trace,b=p[0].t,g=i(c,h,d,v);if(!g)return[];var T=g.index,S=p[T],A=g.index=S.i,M=S.dir;function w(F){return b.labels[F]+e.hoverLabelText(m,y[F][A],y.yhoverformat)}var C=S.hi||y.hoverinfo,x=C.split("+"),_=C==="all",k=_||x.indexOf("y")!==-1,E=_||x.indexOf("text")!==-1,I=k?[w("open"),w("high"),w("low"),w("close")+" "+a[M]]:[];return E&&o(S,y,I),g.extraText=I.join("
"),g.y0=g.y1=m.c2p(S.yc,!0),[g]}return tU={hoverPoints:f,hoverSplit:l,hoverOnPoints:u},tU}var rU,U1e;function U5e(){return U1e||(U1e=1,rU=function(t,r){var n=t.cd,o=t.xaxis,s=t.yaxis,a=[],f,i=n[0].t.bPos||0;if(r===!1)for(f=0;fh?function(y){return y<=0}:function(y){return y>=0};i.c2g=function(y){var b=i.c2l(y)-c;return(m(b)?b:0)+p},i.g2c=function(y){return i.l2c(y+c-p)},i.g2p=function(y){return y*v},i.c2p=function(y){return i.g2p(i.c2g(y))}}}function s(i,l){return l==="degrees"?r(i):i}function a(i,l){return l==="degrees"?n(i):i}function f(i,l){var u=i.type;if(u==="linear"){var c=i.d2c,h=i.c2d;i.d2c=function(d,v){return s(c(d),v)},i.c2d=function(d,v){return h(a(d,v))}}i.makeCalcdata=function(d,v){var p=d[v],m=d._length,y,b,g=function(w){return i.d2c(w,d.thetaunit)};if(p)for(y=new Array(m),b=0;b0?w:1/0},S=r(g,T),A=e.mod(S+1,g.length);return[g[S],g[A]]}function v(b){return Math.abs(b)>1e-10?b:0}function p(b,g,T){g=g||0,T=T||0;for(var S=b.length,A=new Array(S),M=0;M0?1:0}function t(a){var f=a[0],i=a[1];if(!isFinite(f)||!isFinite(i))return[1,0];var l=(f+1)*(f+1)+i*i;return[(f*f+i*i-1)/l,2*i/l]}function r(a,f){var i=f[0],l=f[1];return[i*a.radius+a.cx,-l*a.radius+a.cy]}function n(a,f){return f*a.radius}function o(a,f,i,l){var u=r(a,t([i,f])),c=u[0],h=u[1],d=r(a,t([l,f])),v=d[0],p=d[1];if(f===0)return["M"+c+","+h,"L"+v+","+p].join(" ");var m=n(a,1/Math.abs(f));return["M"+c+","+h,"A"+m+","+m+" 0 0,"+(f<0?1:0)+" "+v+","+p].join(" ")}function s(a,f,i,l){var u=n(a,1/(f+1)),c=r(a,t([f,i])),h=c[0],d=c[1],v=r(a,t([f,l])),p=v[0],m=v[1];if(e(i)!==e(l)){var y=r(a,t([f,0])),b=y[0],g=y[1];return["M"+h+","+d,"A"+u+","+u+" 0 0,"+(0be?(Te=le,ke=le*be,Fe=(oe-ke)/j.h/2,Ee=[X[0],X[1]],Le=[ee[0]+Fe,ee[1]-Fe]):(Te=oe/be,ke=oe,Fe=(le-Te)/j.w/2,Ee=[X[0]+Fe,X[1]-Fe],Le=[ee[0],ee[1]]),Z.xLength2=Te,Z.yLength2=ke,Z.xDomain2=Ee,Z.yDomain2=Le;var qe=Z.xOffset2=j.l+j.w*Ee[0],We=Z.yOffset2=j.t+j.h*(1-Le[1]),Qe=Z.radius=Te/_e,De=Z.innerRadius=Z.getHole(te)*Qe,me=Z.cx=qe-Qe*de[0],Ce=Z.cy=We+Qe*de[3],et=Z.cxx=me-qe,st=Z.cyy=Ce-We,ot=Y.side,ut;ot==="counterclockwise"?(ut=ot,ot="top"):ot==="clockwise"&&(ut=ot,ot="bottom"),Z.radialAxis=Z.mockAxis(ne,te,Y,{_id:"x",side:ot,_trueSide:ut,domain:[De/j.w,Qe/j.w]}),Z.angularAxis=Z.mockAxis(ne,te,K,{side:"right",domain:[0,Math.PI],autorange:!1}),Z.doAutoRange(ne,te),Z.updateAngularAxis(ne,te),Z.updateRadialAxis(ne,te),Z.updateRadialAxisTitle(ne,te),Z.xaxis=Z.mockCartesianAxis(ne,te,{_id:"x",domain:Ee}),Z.yaxis=Z.mockCartesianAxis(ne,te,{_id:"y",domain:Le});var ht=Z.pathSubplot();Z.clipPaths.forTraces.select("path").attr("d",ht).attr("transform",s(et,st)),G.frontplot.attr("transform",s(qe,We)).call(f.setClipUrl,Z._hasClipOnAxisFalse?null:Z.clipIds.forTraces,Z.gd),G.bg.attr("d",ht).attr("transform",s(me,Ce)).call(a.fill,te.bgcolor)},P.mockAxis=function(ne,te,Z,G){var j=n.extendFlat({},Z,G);return c(j,te,ne),j},P.mockCartesianAxis=function(ne,te,Z){var G=this,j=G.isSmith,Y=Z._id,K=n.extendFlat({type:"linear"},Z);u(K,ne);var X={x:[0,2],y:[1,3]};return K.setRange=function(){var ee=G.sectorBBox,le=X[Y],oe=G.radialAxis._rl,fe=(oe[1]-oe[0])/(1-G.getHole(te));K.range=[ee[le[0]]*fe,ee[le[1]]*fe]},K.isPtWithinRange=Y==="x"&&!j?function(ee){return G.isPtInside(ee)}:function(){return!0},K.setRange(),K.setScale(),K},P.doAutoRange=function(ne,te){var Z=this,G=Z.gd,j=Z.radialAxis,Y=Z.getRadial(te);h(G,j);var K=j.range;if(Y.range=K.slice(),Y._input.range=K.slice(),j._rl=[j.r2l(K[0],null,"gregorian"),j.r2l(K[1],null,"gregorian")],j.minallowed!==void 0){var X=j.r2l(j.minallowed);j._rl[0]>j._rl[1]?j._rl[1]=Math.max(j._rl[1],X):j._rl[0]=Math.max(j._rl[0],X)}if(j.maxallowed!==void 0){var ee=j.r2l(j.maxallowed);j._rl[0]90&&oe<=270&&(fe.tickangle=180);var we=_e?function(Qe){var De=I(Z,_([Qe.x,0]));return s(De[0]-X,De[1]-ee)}:function(Qe){return s(fe.l2p(Qe.x)+K,0)},Oe=_e?function(Qe){return E(Z,Qe.x,-1/0,1/0)}:function(Qe){return Z.pathArc(fe.r2p(Qe.x)+K)},be=B(le);if(Z.radialTickLayout!==be&&(j["radial-axis"].selectAll(".xtick").remove(),Z.radialTickLayout=be),de){fe.setScale();var Te=0,ke=_e?(fe.tickvals||[]).filter(function(Qe){return Qe>=0}).map(function(Qe){return l.tickText(fe,Qe,!0,!1)}):l.calcTicks(fe),Ee=_e?ke:l.clipEnds(fe,ke),Le=l.getTickSigns(fe)[2];_e&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(Le=-Le),fe.ticks==="top"&&fe.side==="top"&&(Te=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(Te=fe.ticklen)),l.drawTicks(G,fe,{vals:ke,layer:j["radial-axis"],path:l.makeTickPath(fe,0,Le),transFn:we,crisp:!1}),l.drawGrid(G,fe,{vals:Ee,layer:j["radial-grid"],path:Oe,transFn:n.noop,crisp:!1}),l.drawLabels(G,fe,{vals:ke,layer:j["radial-axis"],transFn:we,labelFns:l.makeLabelFns(fe,Te)})}var Fe=Z.radialAxisAngle=Z.vangles?N(Q(z(le.angle),Z.vangles)):le.angle,qe=s(X,ee),We=qe+o(-Fe);J(j["radial-axis"],de&&(le.showticklabels||le.ticks),{transform:We}),J(j["radial-grid"],de&&le.showgrid,{transform:_e?"":qe}),J(j["radial-line"].select("line"),de&&le.showline,{x1:_e?-Y:K,y1:0,x2:Y,y2:0,transform:We}).attr("stroke-width",le.linewidth).call(a.stroke,le.linecolor)},P.updateRadialAxisTitle=function(ne,te,Z){if(!this.isSmith){var G=this,j=G.gd,Y=G.radius,K=G.cx,X=G.cy,ee=G.getRadial(te),le=G.id+"title",oe=0;if(ee.title){var fe=f.bBox(G.layers["radial-axis"].node()).height,de=ee.title.font.size,_e=ee.side;oe=_e==="top"?de:_e==="counterclockwise"?-(fe+de*.4):fe+de*.8}var we=Z!==void 0?Z:G.radialAxisAngle,Oe=z(we),be=Math.cos(Oe),Te=Math.sin(Oe),ke=K+Y/2*be+oe*Te,Ee=X-Y/2*Te+oe*be;G.layers["radial-axis-title"]=m.draw(j,le,{propContainer:ee,propName:G.id+".radialaxis.title",placeholder:F(j,"Click to enter radial axis title"),attributes:{x:ke,y:Ee,"text-anchor":"middle"},transform:{rotate:-we}})}},P.updateAngularAxis=function(ne,te){var Z=this,G=Z.gd,j=Z.layers,Y=Z.radius,K=Z.innerRadius,X=Z.cx,ee=Z.cy,le=Z.getAngular(te),oe=Z.angularAxis,fe=Z.isSmith;fe||(Z.fillViewInitialKey("angularaxis.rotation",le.rotation),oe.setGeometry(),oe.setScale());var de=fe?function(De){var me=I(Z,_([0,De.x]));return Math.atan2(me[0]-X,me[1]-ee)-Math.PI/2}:function(De){return oe.t2g(De.x)};oe.type==="linear"&&oe.thetaunit==="radians"&&(oe.tick0=N(oe.tick0),oe.dtick=N(oe.dtick));var _e=function(De){return s(X+Y*Math.cos(De),ee-Y*Math.sin(De))},we=fe?function(De){var me=I(Z,_([0,De.x]));return s(me[0],me[1])}:function(De){return _e(de(De))},Oe=fe?function(De){var me=I(Z,_([0,De.x])),Ce=Math.atan2(me[0]-X,me[1]-ee)-Math.PI/2;return s(me[0],me[1])+o(-N(Ce))}:function(De){var me=de(De);return _e(me)+o(-N(me))},be=fe?function(De){return k(Z,De.x,0,1/0)}:function(De){var me=de(De),Ce=Math.cos(me),et=Math.sin(me);return"M"+[X+K*Ce,ee-K*et]+"L"+[X+Y*Ce,ee-Y*et]},Te=l.makeLabelFns(oe,0),ke=Te.labelStandoff,Ee={};Ee.xFn=function(De){var me=de(De);return Math.cos(me)*ke},Ee.yFn=function(De){var me=de(De),Ce=Math.sin(me)>0?.2:1;return-Math.sin(me)*(ke+De.fontSize*Ce)+Math.abs(Math.cos(me))*(De.fontSize*M)},Ee.anchorFn=function(De){var me=de(De),Ce=Math.cos(me);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},Ee.heightFn=function(De,me,Ce){var et=de(De);return-.5*(1+Math.sin(et))*Ce};var Le=B(le);Z.angularTickLayout!==Le&&(j["angular-axis"].selectAll("."+oe._id+"tick").remove(),Z.angularTickLayout=Le);var Fe=fe?[1/0].concat(oe.tickvals||[]).map(function(De){return l.tickText(oe,De,!0,!1)}):l.calcTicks(oe);fe&&(Fe[0].text="∞",Fe[0].fontSize*=1.75);var qe;if(te.gridshape==="linear"?(qe=Fe.map(de),n.angleDelta(qe[0],qe[1])<0&&(qe=qe.slice().reverse())):qe=null,Z.vangles=qe,oe.type==="category"&&(Fe=Fe.filter(function(De){return n.isAngleInsideSector(de(De),Z.sectorInRad)})),oe.visible){var We=oe.ticks==="inside"?-1:1,Qe=(oe.linewidth||1)/2;l.drawTicks(G,oe,{vals:Fe,layer:j["angular-axis"],path:"M"+We*Qe+",0h"+We*oe.ticklen,transFn:Oe,crisp:!1}),l.drawGrid(G,oe,{vals:Fe,layer:j["angular-grid"],path:be,transFn:n.noop,crisp:!1}),l.drawLabels(G,oe,{vals:Fe,layer:j["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:Ee})}J(j["angular-line"].select("path"),le.showline,{d:Z.pathSubplot(),transform:s(X,ee)}).attr("stroke-width",le.linewidth).call(a.stroke,le.linecolor)},P.updateFx=function(ne,te){if(!this.gd._context.staticPlot){var Z=!this.isSmith;Z&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,te,0),this.updateRadialDrag(ne,te,1)),this.updateHoverAndMainDrag(ne)}},P.updateHoverAndMainDrag=function(ne){var te=this,Z=te.isSmith,G=te.gd,j=te.layers,Y=ne._zoomlayer,K=w.MINZOOM,X=w.OFFEDGE,ee=te.radius,le=te.innerRadius,oe=te.cx,fe=te.cy,de=te.cxx,_e=te.cyy,we=te.sectorInRad,Oe=te.vangles,be=te.radialAxis,Te=C.clampTiny,ke=C.findXYatLength,Ee=C.findEnclosingVertexAngles,Le=w.cornerHalfWidth,Fe=w.cornerLen/2,qe,We,Qe=d.makeDragger(j,"path","maindrag",ne.dragmode===!1?"none":"crosshair");e.select(Qe).attr("d",te.pathSubplot()).attr("transform",s(oe,fe)),Qe.onmousemove=function(Bt){p.hover(G,Bt,te.id),G._fullLayout._lasthover=Qe,G._fullLayout._hoversubplot=te.id},Qe.onmouseout=function(Bt){G._dragging||v.unhover(G,Bt)};var De={element:Qe,gd:G,subplot:te.id,plotinfo:{id:te.id,xaxis:te.xaxis,yaxis:te.yaxis},xaxes:[te.xaxis],yaxes:[te.yaxis]},me,Ce,et,st,ot,ut,ht,Ht,Et;function Jt(Bt,It){return Math.sqrt(Bt*Bt+It*It)}function Tt(Bt,It){return Jt(Bt-de,It-_e)}function rt(Bt,It){return Math.atan2(_e-It,Bt-de)}function gt(Bt,It){return[Bt*Math.cos(It),Bt*Math.sin(-It)]}function mt(Bt,It){if(Bt===0)return te.pathSector(2*Le);var qt=Fe/Bt,pr=It-qt,_r=It+qt,Rr=Math.max(0,Math.min(Bt,ee)),an=Rr-Le,Br=Rr+Le;return"M"+gt(an,pr)+"A"+[an,an]+" 0,0,0 "+gt(an,_r)+"L"+gt(Br,_r)+"A"+[Br,Br]+" 0,0,1 "+gt(Br,pr)+"Z"}function He(Bt,It,qt){if(Bt===0)return te.pathSector(2*Le);var pr=gt(Bt,It),_r=gt(Bt,qt),Rr=Te((pr[0]+_r[0])/2),an=Te((pr[1]+_r[1])/2),Br,Gr;if(Rr&&an){var en=an/Rr,cn=-1/en,hn=ke(Le,en,Rr,an);Br=ke(Fe,cn,hn[0][0],hn[0][1]),Gr=ke(Fe,cn,hn[1][0],hn[1][1])}else{var Wr,bt;an?(Wr=Fe,bt=Le):(Wr=Le,bt=Fe),Br=[[Rr-Wr,an-bt],[Rr+Wr,an-bt]],Gr=[[Rr-Wr,an+bt],[Rr+Wr,an+bt]]}return"M"+Br.join("L")+"L"+Gr.reverse().join("L")+"Z"}function Ie(){et=null,st=null,ot=te.pathSubplot(),ut=!1;var Bt=G._fullLayout[te.id];ht=t(Bt.bgcolor).getLuminance(),Ht=d.makeZoombox(Y,ht,oe,fe,ot),Ht.attr("fill-rule","evenodd"),Et=d.makeCorners(Y,oe,fe),g(G)}function je(Bt,It){return It=Math.max(Math.min(It,ee),le),BtK?(Bt-1&&Bt===1&&b(It,G,[te.xaxis],[te.yaxis],te.id,De),qt.indexOf("event")>-1&&p.click(G,It,te.id)}De.prepFn=function(Bt,It,qt){var pr=G._fullLayout.dragmode,_r=Qe.getBoundingClientRect();G._fullLayout._calcInverseTransform(G);var Rr=G._fullLayout._invTransform;qe=G._fullLayout._invScaleX,We=G._fullLayout._invScaleY;var an=n.apply3DTransform(Rr)(It-_r.left,qt-_r.top);if(me=an[0],Ce=an[1],Oe){var Br=C.findPolygonOffset(ee,we[0],we[1],Oe);me+=de+Br[0],Ce+=_e+Br[1]}switch(pr){case"zoom":De.clickFn=Pt,Z||(Oe?De.moveFn=Pe:De.moveFn=ye,De.doneFn=it,Ie());break;case"select":case"lasso":y(Bt,It,qt,De,pr);break}},v.init(De)},P.updateRadialDrag=function(ne,te,Z){var G=this,j=G.gd,Y=G.layers,K=G.radius,X=G.innerRadius,ee=G.cx,le=G.cy,oe=G.radialAxis,fe=w.radialDragBoxSize,de=fe/2;if(!oe.visible)return;var _e=z(G.radialAxisAngle),we=oe._rl,Oe=we[0],be=we[1],Te=we[Z],ke=.75*(we[1]-we[0])/(1-G.getHole(te))/K,Ee,Le,Fe;Z?(Ee=ee+(K+de)*Math.cos(_e),Le=le-(K+de)*Math.sin(_e),Fe="radialdrag"):(Ee=ee+(X-de)*Math.cos(_e),Le=le-(X-de)*Math.sin(_e),Fe="radialdrag-inner");var qe=d.makeRectDragger(Y,Fe,"crosshair",-de,-de,fe,fe),We={element:qe,gd:j};ne.dragmode===!1&&(We.dragmode=!1),J(e.select(qe),oe.visible&&X0!=(Z?me>Oe:me=90||j>90&&Y>=450?_e=1:X<=0&&le<=0?_e=0:_e=Math.max(X,le),j<=180&&Y>=180||j>180&&Y>=540?oe=-1:K>=0&&ee>=0?oe=0:oe=Math.min(K,ee),j<=270&&Y>=270||j>270&&Y>=630?fe=-1:X>=0&&le>=0?fe=0:fe=Math.min(X,le),Y>=360?de=1:K<=0&&ee<=0?de=0:de=Math.max(K,ee),[oe,fe,de,_e]}function Q(ne,te){var Z=function(j){return n.angleDist(ne,j)},G=n.findIndexOfMin(te,Z);return te[G]}function J(ne,te,Z){return te?(ne.attr("display",null),ne.attr(Z)):ne&&ne.attr("display","none"),ne}return vU}var pU,txe;function $5e(){if(txe)return pU;txe=1;var e=Cu(),t=hc(),r=Vs().attributes,n=rr().extendFlat,o=ws().overrideAll,s=o({color:t.color,showline:n({},t.showline,{dflt:!0}),linecolor:t.linecolor,linewidth:t.linewidth,showgrid:n({},t.showgrid,{dflt:!0}),gridcolor:t.gridcolor,gridwidth:t.gridwidth,griddash:t.griddash},"plot","from-root"),a=o({tickmode:t.minor.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,ticklabelstep:t.ticklabelstep,showticklabels:t.showticklabels,labelalias:t.labelalias,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,showexponent:t.showexponent,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,tickformatstops:t.tickformatstops,layer:t.layer},"plot","from-root"),f={visible:n({},t.visible,{dflt:!0}),type:n({},t.type,{values:["-","linear","log","date","category"]}),autotypenumbers:t.autotypenumbers,autorangeoptions:{minallowed:t.autorangeoptions.minallowed,maxallowed:t.autorangeoptions.maxallowed,clipmin:t.autorangeoptions.clipmin,clipmax:t.autorangeoptions.clipmax,include:t.autorangeoptions.include,editType:"plot"},autorange:n({},t.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc",description:["If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","If *normal*, the range is computed in relation to the extrema","of the input data (same behavior as for cartesian axes)."].join(" ")},minallowed:n({},t.minallowed,{editType:"plot"}),maxallowed:n({},t.maxallowed,{editType:"plot"}),range:n({},t.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:t.categoryorder,categoryarray:t.categoryarray,angle:{valType:"angle",editType:"plot",description:["Sets the angle (in degrees) from which the radial axis is drawn.","Note that by default, radial axis line on the theta=0 line","corresponds to a line pointing right (like what mathematicians prefer).","Defaults to the first `polar.sector` angle."].join(" ")},autotickangles:t.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot",description:["Determines on which side of radial axis line","the tick and tick labels appear."].join(" ")},title:{text:n({},t.title.text,{editType:"plot",dflt:""}),font:n({},t.title.font,{editType:"plot"}),editType:"plot"},hoverformat:t.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, `angle`, and `title` if in `editable: true` configuration.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc",_deprecated:{title:t._deprecated.title,titlefont:t._deprecated.titlefont}};n(f,s,a);var i={visible:n({},t.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the angular axis type.","If *linear*, set `thetaunit` to determine the unit in which axis value are shown.","If *category, use `period` to set the number of integer coordinates around polar axis."].join(" ")},autotypenumbers:t.autotypenumbers,categoryorder:t.categoryorder,categoryarray:t.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc",description:["Sets the format unit of the formatted *theta* values.","Has an effect only when `angularaxis.type` is *linear*."].join(" ")},period:{valType:"number",editType:"calc",min:0,description:["Set the angular period.","Has an effect only when `angularaxis.type` is *category*."].join(" ")},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc",description:["Sets the direction corresponding to positive angles."].join(" ")},rotation:{valType:"angle",editType:"calc",description:["Sets that start position (in degrees) of the angular axis","By default, polar subplots with `direction` set to *counterclockwise*","get a `rotation` of *0*","which corresponds to due East (like what mathematicians prefer).","In turn, polar with `direction` set to *clockwise* get a rotation of *90*","which corresponds to due North (like on a compass),"].join(" ")},hoverformat:t.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `rotation`.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc"};return n(i,s,a),pU={domain:r({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot",description:["Sets angular span of this polar subplot with two angles (in degrees).","Sector are assumed to be spanned in the counterclockwise direction","with *0* corresponding to rightmost limit of the polar subplot."].join(" ")},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the fraction of the radius to cut out of the polar subplot."].join(" ")},bgcolor:{valType:"color",editType:"plot",dflt:e.background,description:"Set the background color of the subplot"},radialaxis:f,angularaxis:i,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot",description:["Determines if the radial axis grid lines and angular axis line are drawn","as *circular* sectors or as *linear* (polygon) sectors.","Has an effect only when the angular axis has `type` *category*.","Note that `radialaxis.angle` is snapped to the angle of the closest","vertex when `gridshape` is *circular*","(so that radial axis scale is the same as the data scale)."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis attributes,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc"},pU}var gU,rxe;function LJe(){if(rxe)return gU;rxe=1;var e=rr(),t=va(),r=go(),n=Kx(),o=cc().getSubplotData,s=Ux(),a=L2(),f=zm(),i=Fm(),l=m$(),u=GS(),c=gAe(),h=P2(),d=$5e(),v=G5e(),p=XX(),m=p.axisNames;function y(g,T,S,A){var M=S("bgcolor");A.bgColor=t.combine(M,A.paper_bgcolor);var w=S("sector");S("hole");var C=o(A.fullData,p.name,A.id),x=A.layoutOut,_;function k(Y,K){return S(_+"."+Y,K)}for(var E=0;E")}}return TU={hoverPoints:t,makeHoverPointText:r},TU}var AU,fxe;function IJe(){return fxe||(fxe=1,AU={moduleType:"trace",name:"scatterpolar",basePlotModule:KX(),categories:["polar","symbols","showLegend","scatter-like"],attributes:GM(),supplyDefaults:JX().supplyDefaults,colorbar:fh(),formatLabels:QX(),calc:PJe(),plot:DJe(),style:yd().style,styleOnSelect:yd().styleOnSelect,hoverPoints:eZ().hoverPoints,selectPoints:B2(),meta:{hrName:"scatter_polar",description:["The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts","in polar coordinates.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}),AU}var SU,cxe;function OJe(){return cxe||(cxe=1,SU=IJe()),SU}var MU,hxe;function W5e(){if(hxe)return MU;hxe=1;var e=GM(),t=NM(),r=bi().texttemplateAttrs;return MU={mode:e.mode,r:e.r,theta:e.theta,r0:e.r0,dr:e.dr,theta0:e.theta0,dtheta:e.dtheta,thetaunit:e.thetaunit,text:e.text,texttemplate:r({editType:"plot"},{keys:["r","theta","text"]}),hovertext:e.hovertext,hovertemplate:e.hovertemplate,line:{color:t.line.color,width:t.line.width,dash:t.line.dash,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,fill:t.fill,fillcolor:t.fillcolor,textposition:t.textposition,textfont:t.textfont,hoverinfo:e.hoverinfo,selected:e.selected,unselected:e.unselected},MU}var EU,dxe;function zJe(){if(dxe)return EU;dxe=1;var e=rr(),t=As(),r=JX().handleRThetaDefaults,n=gp(),o=y0(),s=m0(),a=sg(),f=ig().PTS_LINESONLY,i=W5e();return EU=function(u,c,h,d){function v(m,y){return e.coerce(u,c,i,m,y)}var p=r(u,c,d,v);if(!p){c.visible=!1;return}v("thetaunit"),v("mode",p=a&&(A.marker.cluster=b.tree),A.marker&&(A.markerSel.positions=A.markerUnsel.positions=A.marker.positions=x),A.line&&x.length>1&&s.extendFlat(A.line,o.linePositions(l,y,x)),A.text&&(s.extendFlat(A.text,{positions:x},o.textPosition(l,y,A.text,A.marker)),s.extendFlat(A.textSel,{positions:x},o.textPosition(l,y,A.text,A.markerSel)),s.extendFlat(A.textUnsel,{positions:x},o.textPosition(l,y,A.text,A.markerUnsel))),A.fill&&!v.fill2d&&(v.fill2d=!0),A.marker&&!v.scatter2d&&(v.scatter2d=!0),A.line&&!v.line2d&&(v.line2d=!0),A.text&&!v.glText&&(v.glText=!0),v.lineOptions.push(A.line),v.fillOptions.push(A.fill),v.markerOptions.push(A.marker),v.markerSelectedOptions.push(A.markerSel),v.markerUnselectedOptions.push(A.markerUnsel),v.textOptions.push(A.text),v.textSelectedOptions.push(A.textSel),v.textUnselectedOptions.push(A.textUnsel),v.selectBatch.push([]),v.unselectBatch.push([]),b.x=_,b.y=k,b.rawx=_,b.rawy=k,b.r=T,b.theta=S,b.positions=x,b._scene=v,b.index=v.count,v.count++}}),r(l,u,c)}},r3.exports.reglPrecompiled=f,r3.exports}var PU,xxe;function UJe(){if(xxe)return PU;xxe=1;var e=qJe();return e.plot=jJe(),PU=e,PU}var DU,bxe;function HJe(){return bxe||(bxe=1,DU=UJe()),DU}var IU,_xe;function X5e(){if(_xe)return IU;_xe=1;var e=bi().hovertemplateAttrs,t=ja().extendFlat,r=GM(),n=ug();IU={r:r.r,theta:r.theta,r0:r.r0,dr:r.dr,theta0:r.theta0,dtheta:r.dtheta,thetaunit:r.thetaunit,base:t({},n.base,{description:["Sets where the bar base is drawn (in radial axis units).","In *stack* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")}),offset:t({},n.offset,{description:["Shifts the angular position where the bar is drawn","(in *thetatunit* units)."].join(" ")}),width:t({},n.width,{description:["Sets the bar angular width (in *thetaunit* units)."].join(" ")}),text:t({},n.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:t({},n.hovertext,{description:"Same as `text`."}),marker:o(),hoverinfo:r.hoverinfo,hovertemplate:e(),selected:n.selected,unselected:n.unselected};function o(){var s=t({},n.marker);return delete s.cornerradius,s}return IU}var OU,wxe;function Z5e(){return wxe||(wxe=1,OU={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc",description:["Sets the gap between bars of","adjacent location coordinates.","Values are unitless, they represent fractions of the minimum difference","in bar positions in the data."].join(" ")}}),OU}var zU,Txe;function GJe(){if(Txe)return zU;Txe=1;var e=rr(),t=JX().handleRThetaDefaults,r=A$(),n=X5e();return zU=function(s,a,f,i){function l(c,h){return e.coerce(s,a,n,c,h)}var u=t(s,a,i,l);if(!u){a.visible=!1;return}l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),r(s,a,l,f,i),e.coerceSelectionMarkerOpacity(a,l)},zU}var FU,Axe;function VJe(){if(Axe)return FU;Axe=1;var e=rr(),t=Z5e();return FU=function(r,n,o){var s={},a;function f(u,c){return e.coerce(r[a]||{},n[a],t,u,c)}for(var i=0;i0?(d=c,v=h):(d=h,v=c);var p=o.findEnclosingVertexAngles(d,a.vangles)[0],m=o.findEnclosingVertexAngles(v,a.vangles)[1],y=[p,(d+v)/2,m];return o.pathPolygonAnnulus(l,u,d,v,y,f,i)}:function(l,u,c,h){return r.pathAnnulus(l,u,c,h,f,i)}}return BU}var qU,kxe;function $Je(){if(kxe)return qU;kxe=1;var e=yl(),t=rr(),r=q2().getTraceColor,n=t.fillText,o=eZ().makeHoverPointText,s=ZX().isPtInsidePolygon;return qU=function(f,i,l){var u=f.cd,c=u[0].trace,h=f.subplot,d=h.radialAxis,v=h.angularAxis,p=h.vangles,m=p?s:t.isPtInsideSector,y=f.maxHoverDistance,b=v._period||2*Math.PI,g=Math.abs(d.g2p(Math.sqrt(i*i+l*l))),T=Math.atan2(l,i);d.range[0]>d.range[1]&&(T+=Math.PI);var S=function(C){return m(g,T,[C.rp0,C.rp1],[C.thetag0,C.thetag1],p)?y+Math.min(1,Math.abs(C.thetag1-C.thetag0)/b)-1+(C.rp1-g)/(C.rp1-C.rp0)-1:1/0};if(e.getClosest(u,S,f),f.index!==!1){var A=f.index,M=u[A];f.x0=f.x1=M.ct[0],f.y0=f.y1=M.ct[1];var w=t.extendFlat({},M,{r:M.s,theta:M.p});return n(M,c,f),o(w,c,h,f),f.hovertemplate=c.hovertemplate,f.color=r(c,M),f.xLabelVal=f.yLabelVal=void 0,M.s<0&&(f.idealAlign="left"),[f]}},qU}var jU,Cxe;function WJe(){return Cxe||(Cxe=1,jU={moduleType:"trace",name:"barpolar",basePlotModule:KX(),categories:["polar","bar","showLegend"],attributes:X5e(),layoutAttributes:Z5e(),supplyDefaults:GJe(),supplyLayoutDefaults:VJe(),calc:Mxe().calc,crossTraceCalc:Mxe().crossTraceCalc,plot:YJe(),colorbar:fh(),formatLabels:QX(),style:dp().style,styleOnSelect:dp().styleOnSelect,hoverPoints:$Je(),selectPoints:j2(),meta:{hrName:"bar_polar",description:["The data visualized by the radial span of the bars is set in `r`"].join(" ")}}),jU}var UU,Rxe;function XJe(){return Rxe||(Rxe=1,UU=WJe()),UU}var HU,Lxe;function K5e(){return Lxe||(Lxe=1,HU={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}),HU}var GU,Pxe;function J5e(){if(Pxe)return GU;Pxe=1;var e=Cu(),t=hc(),r=Vs().attributes,n=rr().extendFlat,o=ws().overrideAll,s=o({color:t.color,showline:n({},t.showline,{dflt:!0}),linecolor:t.linecolor,linewidth:t.linewidth,showgrid:n({},t.showgrid,{dflt:!0}),gridcolor:t.gridcolor,gridwidth:t.gridwidth,griddash:t.griddash},"plot","from-root"),a=o({ticklen:t.ticklen,tickwidth:n({},t.tickwidth,{dflt:2}),tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,tickfont:t.tickfont,tickformat:t.tickformat,hoverformat:t.hoverformat,layer:t.layer},"plot","from-root"),f=n({visible:n({},t.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot",description:"Sets the values at which ticks on this axis appear."},tickangle:n({},t.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *top* (*bottom*), this axis' are drawn above (below)","the axis line."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of real axis line","the tick and tick labels appear."].join(" ")},editType:"calc"},s,a),i=n({visible:n({},t.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot",description:["Sets the values at which ticks on this axis appear.","Defaults to `realaxis.tickvals` plus the same as negatives and zero."].join(" ")},ticks:t.ticks,editType:"calc"},s,a);return GU={domain:r({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:e.background,description:"Set the background color of the subplot"},realaxis:f,imaginaryaxis:i,editType:"calc"},GU}var VU,Dxe;function ZJe(){if(Dxe)return VU;Dxe=1;var e=rr(),t=va(),r=go(),n=Kx(),o=cc().getSubplotData,s=Fm(),a=zm(),f=GS(),i=ag(),l=J5e(),u=K5e(),c=u.axisNames,h=v(function(p){return e.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(m){return-m}).concat([0]).concat(p)},String);function d(p,m,y,b){var g=y("bgcolor");b.bgColor=t.combine(g,b.paper_bgcolor);var T=o(b.fullData,u.name,b.id),S=b.layoutOut,A;function M(P,B){return y(A+"."+P,B)}for(var w=0;w")}}return JU={hoverPoints:t,makeHoverPointText:r},JU}var QU,jxe;function nQe(){return jxe||(jxe=1,QU={moduleType:"trace",name:"scattersmith",basePlotModule:KJe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Q5e(),supplyDefaults:JJe(),colorbar:fh(),formatLabels:QJe(),calc:eQe(),plot:tQe(),style:yd().style,styleOnSelect:yd().styleOnSelect,hoverPoints:rQe().hoverPoints,selectPoints:B2(),meta:{hrName:"scatter_smith",description:["The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts","in smith coordinates.","The data visualized as scatter point or lines is set in","`real` and `imag` (imaginary) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}),QU}var eH,Uxe;function aQe(){return Uxe||(Uxe=1,eH=nQe()),eH}var Xy={},tH={},Hxe;function VM(){return Hxe||(Hxe=1,tH.pointsAccessorFunction=function(e,t){for(var r,n,o=0;oT&&(T=w,S=M)}}return T?m(S):o};case"rms":return function(y,b){for(var g=0,T=0,S=0;S* keeps items greater than `value`","*>=* keeps items greater than or equal to `value`","*[]* keeps items inside `value[0]` to `value[1]` including both bounds","*()* keeps items inside `value[0]` to `value[1]` excluding both bounds","*[)* keeps items inside `value[0]` to `value[1]` including `value[0]` but excluding `value[1]","*(]* keeps items inside `value[0]` to `value[1]` excluding `value[0]` but including `value[1]","*][* keeps items outside `value[0]` to `value[1]` and equal to both bounds","*)(* keeps items outside `value[0]` to `value[1]`","*](* keeps items outside `value[0]` to `value[1]` and equal to `value[0]`","*)[* keeps items outside `value[0]` to `value[1]` and equal to `value[1]`","*{}* keeps items present in a set of values","*}{* keeps items not present in a set of values"].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values by which to filter.","Values are expected to be in the same type as the data linked","to `target`.","When `operation` is set to one of","the comparison values ("+a+")","`value` is expected to be a number or a string.","When `operation` is set to one of the interval values","("+f+")","`value` is expected to be 2-item array where the first item","is the lower bound and the second item is the upper bound.","When `operation`, is set to one of the set values","("+i+")","`value` is expected to be an array with as many items as","the desired set elements."].join(" ")},preservegaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps in data arrays produced by the filter operation","are preserved.","Setting this to *true* might be useful when plotting a line chart","with `connectgaps` set to *false*."].join(" ")},editType:"calc"},e.supplyDefaults=function(u){var c={};function h(m,y){return t.coerce(u,c,e.attributes,m,y)}var d=h("enabled");if(d){var v=h("target");if(t.isArrayOrTypedArray(v)&&v.length===0)return c.enabled=!1,c;h("preservegaps"),h("operation"),h("value");var p=r.getComponentMethod("calendars","handleDefaults");p(u,c,"valuecalendar",null),p(u,c,"targetcalendar",null)}return c},e.calcTransform=function(u,c,h){if(!h.enabled)return;var d=t.getTargetArray(c,h);if(!d)return;var v=h.target,p=d.length;c._length&&(p=Math.min(p,c._length));var m=h.targetcalendar,y=c._arrayAttrs,b=h.preservegaps;if(typeof v=="string"){var g=t.nestedProperty(c,v+"calendar").get();g&&(m=g)}var T=n.getDataToCoordFunc(u,c,v,d),S=l(h,T,m),A={},M={},w=0;function C(F,D){for(var z=0;z":return function(T){return b(T)>g};case">=":return function(T){return b(T)>=g};case"[]":return function(T){var S=b(T);return S>=g[0]&&S<=g[1]};case"()":return function(T){var S=b(T);return S>g[0]&&S=g[0]&&Sg[0]&&S<=g[1]};case"][":return function(T){var S=b(T);return S<=g[0]||S>=g[1]};case")(":return function(T){var S=b(T);return Sg[1]};case"](":return function(T){var S=b(T);return S<=g[0]||S>g[1]};case")[":return function(T){var S=b(T);return S=g[1]};case"{}":return function(T){return g.indexOf(b(T))!==-1};case"}{":return function(T){return g.indexOf(b(T))===-1}}}})(nH)),nH}var aH,$xe;function lQe(){return $xe||($xe=1,aH=sQe()),aH}var iH={},Wxe;function uQe(){return Wxe||(Wxe=1,(function(e){var t=rr(),r=Im(),n=Ts(),o=VM().pointsAccessorFunction;e.moduleType="transform",e.name="groupby",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this group-by transform is enabled or disabled."].join(" ")},groups:{valType:"data_array",dflt:[],editType:"calc",description:["Sets the groups in which the trace data will be split.","For example, with `x` set to *[1, 2, 3, 4]* and","`groups` set to *['a', 'b', 'a', 'b']*,","the groupby transform with split in one trace","with `x` [1, 3] and one trace with `x` [2, 4]."].join(" ")},nameformat:{valType:"string",editType:"calc",description:["Pattern by which grouped traces are named. If only one trace is present,",'defaults to the group name (`"%{group}"`), otherwise defaults to the group name','with trace name (`"%{group} (%{trace})"`). Available escape sequences are `%{group}`, which',"inserts the group name, and `%{trace}`, which inserts the trace name. If grouping","GDP data by country when more than one trace is present, for example, the",'default "%{group} (%{trace})" would return "Monaco (GDP per capita)".'].join(" ")},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc",description:["The group value which receives these styles."].join(" ")},value:{valType:"any",dflt:{},editType:"calc",description:["Sets each group styles.","For example, with `groups` set to *['a', 'b', 'a', 'b']*","and `styles` set to *[{target: 'a', value: { marker: { color: 'red' } }}]","marker points in group *'a'* will be drawn in red."].join(" "),_compareAsJSON:!0},editType:"calc"},editType:"calc"},e.supplyDefaults=function(a,f,i){var l,u={};function c(y,b){return t.coerce(a,u,e.attributes,y,b)}var h=c("enabled");if(!h)return u;c("groups"),c("nameformat",i._dataLength>1?"%{group} (%{trace})":"%{group}");var d=a.styles,v=u.styles=[];if(d)for(l=0;l0;){var h=l%10;u=(h===0?"":f[h]+i[c])+u,c++,l=Math.floor(l/10)}return u.indexOf(f[1]+i[1])===0&&(u=u.substr(1)),u||f[0]}}});function r(f,i,l,u){if(this._calendar=f,this._year=i,this._month=l,this._day=u,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function n(f,i){return f=""+f,"000000".substring(0,i-f.length)+f}e(r.prototype,{newDate:function(f,i,l){return this._calendar.newDate(f??this,i,l)},year:function(f){return arguments.length===0?this._year:this.set(f,"y")},month:function(f){return arguments.length===0?this._month:this.set(f,"m")},day:function(f){return arguments.length===0?this._day:this.set(f,"d")},date:function(f,i,l){if(!this._calendar.isValid(f,i,l))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=f,this._month=i,this._day=l,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(f,i){return this._calendar.add(this,f,i)},set:function(f,i){return this._calendar.set(this,f,i)},compareTo:function(f){if(this._calendar.name!==f._calendar.name)throw(a.local.differentCalendars||a.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,f._calendar.local.name);var i=this._year!==f._year?this._year-f._year:this._month!==f._month?this.monthOfYear()-f.monthOfYear():this._day-f._day;return i===0?0:i<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(f){return this._calendar.fromJD(f)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(f){return this._calendar.fromJSDate(f)},toString:function(){return(this.year()<0?"-":"")+n(Math.abs(this.year()),4)+"-"+n(this.month(),2)+"-"+n(this.day(),2)}});function o(){this.shortYearCutoff="+10"}e(o.prototype,{_validateLevel:0,newDate:function(f,i,l){return f==null?this.today():(f.year&&(this._validate(f,i,l,a.local.invalidDate||a.regionalOptions[""].invalidDate),l=f.day(),i=f.month(),f=f.year()),new r(this,f,i,l))},today:function(){return this.fromJSDate(new Date)},epoch:function(f){var i=this._validate(f,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return i.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(f){var i=this._validate(f,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return(i.year()<0?"-":"")+n(Math.abs(i.year()),4)},monthsInYear:function(f){return this._validate(f,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear),12},monthOfYear:function(f,i){var l=this._validate(f,i,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth);return(l.month()+this.monthsInYear(l)-this.firstMonth)%this.monthsInYear(l)+this.minMonth},fromMonthOfYear:function(f,i){var l=(i+this.firstMonth-2*this.minMonth)%this.monthsInYear(f)+this.minMonth;return this._validate(f,l,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth),l},daysInYear:function(f){var i=this._validate(f,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return this.leapYear(i)?366:365},dayOfYear:function(f,i,l){var u=this._validate(f,i,l,a.local.invalidDate||a.regionalOptions[""].invalidDate);return u.toJD()-this.newDate(u.year(),this.fromMonthOfYear(u.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(f,i,l){var u=this._validate(f,i,l,a.local.invalidDate||a.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(u))+2)%this.daysInWeek()},extraInfo:function(f,i,l){return this._validate(f,i,l,a.local.invalidDate||a.regionalOptions[""].invalidDate),{}},add:function(f,i,l){return this._validate(f,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate),this._correctAdd(f,this._add(f,i,l),i,l)},_add:function(f,i,l){if(this._validateLevel++,l==="d"||l==="w"){var u=f.toJD()+i*(l==="w"?this.daysInWeek():1),c=f.calendar().fromJD(u);return this._validateLevel--,[c.year(),c.month(),c.day()]}try{var h=f.year()+(l==="y"?i:0),d=f.monthOfYear()+(l==="m"?i:0),c=f.day(),v=function(y){for(;db-1+y.minMonth;)h++,d-=b,b=y.monthsInYear(h)};l==="y"?(f.month()!==this.fromMonthOfYear(h,d)&&(d=this.newDate(h,f.month(),this.minDay).monthOfYear()),d=Math.min(d,this.monthsInYear(h)),c=Math.min(c,this.daysInMonth(h,this.fromMonthOfYear(h,d)))):l==="m"&&(v(this),c=Math.min(c,this.daysInMonth(h,this.fromMonthOfYear(h,d))));var p=[h,this.fromMonthOfYear(h,d),c];return this._validateLevel--,p}catch(m){throw this._validateLevel--,m}},_correctAdd:function(f,i,l,u){if(!this.hasYearZero&&(u==="y"||u==="m")&&(i[0]===0||f.year()>0!=i[0]>0)){var c={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[u],h=l<0?-1:1;i=this._add(f,l*c[0]+h*c[1],c[2])}return f.date(i[0],i[1],i[2])},set:function(f,i,l){this._validate(f,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate);var u=l==="y"?i:f.year(),c=l==="m"?i:f.month(),h=l==="d"?i:f.day();return(l==="y"||l==="m")&&(h=Math.min(h,this.daysInMonth(u,c))),f.date(u,c,h)},isValid:function(f,i,l){this._validateLevel++;var u=this.hasYearZero||f!==0;if(u){var c=this.newDate(f,i,this.minDay);u=i>=this.minMonth&&i-this.minMonth=this.minDay&&l-this.minDay13.5?13:1),m=c-(p>2.5?4716:4715);return m<=0&&m--,this.newDate(m,p,v)},toJSDate:function(f,i,l){var u=this._validate(f,i,l,a.local.invalidDate||a.regionalOptions[""].invalidDate),c=new Date(u.year(),u.month()-1,u.day());return c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),c.setHours(c.getHours()>12?c.getHours()+2:0),c},fromJSDate:function(f){return this.newDate(f.getFullYear(),f.getMonth()+1,f.getDate())}});var a=uH.exports=new t;return a.cdate=r,a.baseCalendar=o,a.calendars.gregorian=s,uH.exports}var Qxe={},ebe;function dQe(){if(ebe)return Qxe;ebe=1;var e=Eu(),t=hh();return e(t.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(r,n){return typeof r!="string"&&(n=r,r=""),this._calendar.formatDate(r||"",this,n)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(r,n,o){if(typeof r!="string"&&(o=n,n=r,r=""),!n)return"";if(n.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;r=r||this.local.dateFormat,o=o||{};var s=o.dayNamesShort||this.local.dayNamesShort,a=o.dayNames||this.local.dayNames,f=o.monthNumbers||this.local.monthNumbers,i=o.monthNamesShort||this.local.monthNamesShort,l=o.monthNames||this.local.monthNames;o.calculateWeek||this.local.calculateWeek;for(var u=function(S,A){for(var M=1;T+M1},c=function(S,A,M,w){var C=""+A;if(u(S,w))for(;C.length1},T=function(I,F){var D=g(I,F),z=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],N=new RegExp("^-?\\d{1,"+z+"}"),q=n.substring(x).match(N);if(!q)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,x);return x+=q[0].length,parseInt(q[0],10)},S=this,A=function(){if(typeof l=="function"){g("m");var I=l.call(S,n.substring(x));return x+=I.length,I}return T("m")},M=function(I,F,D,z){for(var N=g(I,z)?D:F,q=0;q-1){v=1,p=m;for(var E=this.daysInMonth(d,v);p>E;E=this.daysInMonth(d,v))v++,p-=E}return h>-1?this.fromJD(h):this.newDate(d,v,p)},determineDate:function(r,n,o,s,a){o&&typeof o!="object"&&(a=s,s=o,o=null),typeof s!="string"&&(a=s,s="");var f=this,i=function(l){try{return f.parseDate(s,l,a)}catch{}l=l.toLowerCase();for(var u=(l.match(/^c/)&&o?o.newDate():null)||f.today(),c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,h=c.exec(l);h;)u.add(parseInt(h[1],10),h[2]||"d"),h=c.exec(l);return u};return n=n?n.newDate():null,r=r==null?n:typeof r=="string"?i(r):typeof r=="number"?isNaN(r)||r===1/0||r===-1/0?n:f.today().add(r,"d"):f.newDate(r),r}}),Qxe}var tbe={},rbe;function vQe(){if(rbe)return tbe;rbe=1;var e=hh(),t=Eu(),r=e.instance();function n(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(h,d){if(typeof h=="string"){var v=h.match(s);return v?v[0]:""}var p=this._validateYear(h),m=h.month(),y=""+this.toChineseMonth(p,m);return d&&y.length<2&&(y="0"+y),this.isIntercalaryMonth(p,m)&&(y+="i"),y},monthNames:function(h){if(typeof h=="string"){var d=h.match(a);return d?d[0]:""}var v=this._validateYear(h),p=h.month(),m=this.toChineseMonth(v,p),y=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][m-1];return this.isIntercalaryMonth(v,p)&&(y="闰"+y),y},monthNamesShort:function(h){if(typeof h=="string"){var d=h.match(f);return d?d[0]:""}var v=this._validateYear(h),p=h.month(),m=this.toChineseMonth(v,p),y=["一","二","三","四","五","六","七","八","九","十","十一","十二"][m-1];return this.isIntercalaryMonth(v,p)&&(y="闰"+y),y},parseMonth:function(h,d){h=this._validateYear(h);var v=parseInt(d),p;if(isNaN(v))d[0]==="闰"&&(p=!0,d=d.substring(1)),d[d.length-1]==="月"&&(d=d.substring(0,d.length-1)),v=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(d);else{var m=d[d.length-1];p=m==="i"||m==="I"}var y=this.toMonthIndex(h,v,p);return y},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(h,d){if(h.year&&(h=h.year()),typeof h!="number"||h<1888||h>2111)throw d.replace(/\{0\}/,this.local.name);return h},toMonthIndex:function(h,d,v){var p=this.intercalaryMonth(h),m=v&&d!==p;if(m||d<1||d>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return p?!v&&d<=p?y=d-1:y=d:y=d-1,y},toChineseMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var v=this.intercalaryMonth(h),p=v?12:11;if(d<0||d>p)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return v?d>13;return v},isIntercalaryMonth:function(h,d){h.year&&(h=h.year(),d=h.month());var v=this.intercalaryMonth(h);return!!v&&v===d},leapYear:function(h){return this.intercalaryMonth(h)!==0},weekOfYear:function(h,d,v){var p=this._validateYear(h,e.local.invalidyear),m=l[p-l[0]],y=m>>9&4095,b=m>>5&15,g=m&31,T;T=r.newDate(y,b,g),T.add(4-(T.dayOfWeek()||7),"d");var S=this.toJD(h,d,v)-T.toJD();return 1+Math.floor(S/7)},monthsInYear:function(h){return this.leapYear(h)?13:12},daysInMonth:function(h,d){h.year&&(d=h.month(),h=h.year()),h=this._validateYear(h);var v=i[h-i[0]],p=v>>13,m=p?12:11;if(d>m)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);var y=v&1<<12-d?30:29;return y},weekDay:function(h,d,v){return(this.dayOfWeek(h,d,v)||7)<6},toJD:function(h,d,v){var p=this._validate(h,y,v,e.local.invalidDate);h=this._validateYear(p.year()),d=p.month(),v=p.day();var m=this.isIntercalaryMonth(h,d),y=this.toChineseMonth(h,d),b=c(h,y,v,m);return r.toJD(b.year,b.month,b.day)},fromJD:function(h){var d=r.fromJD(h),v=u(d.year(),d.month(),d.day()),p=this.toMonthIndex(v.year,v.month,v.isIntercalary);return this.newDate(v.year,p,v.day)},fromString:function(h){var d=h.match(o),v=this._validateYear(+d[1]),p=+d[2],m=!!d[3],y=this.toMonthIndex(v,p,m),b=+d[4];return this.newDate(v,y,b)},add:function(h,d,v){var p=h.year(),m=h.month(),y=this.isIntercalaryMonth(p,m),b=this.toChineseMonth(p,m),g=Object.getPrototypeOf(n.prototype).add.call(this,h,d,v);if(v==="y"){var T=g.year(),S=g.month(),A=this.isIntercalaryMonth(T,b),M=y&&A?this.toMonthIndex(T,b,!0):this.toMonthIndex(T,b,!1);M!==S&&g.month(M)}return g}});var o=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,s=/^\d?\d[iI]?/m,a=/^闰?十?[一二三四五六七八九]?月/m,f=/^闰?十?[一二三四五六七八九]?/m;e.calendars.chinese=n;var i=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],l=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function u(h,d,v,p){var m,y;if(typeof h=="object")m=h,y=d||{};else{var b=typeof h=="number"&&h>=1888&&h<=2111;if(!b)throw new Error("Solar year outside range 1888-2111");var g=typeof d=="number"&&d>=1&&d<=12;if(!g)throw new Error("Solar month outside range 1 - 12");var T=typeof v=="number"&&v>=1&&v<=31;if(!T)throw new Error("Solar day outside range 1 - 31");m={year:h,month:d,day:v},y={}}var S=l[m.year-l[0]],A=m.year<<9|m.month<<5|m.day;y.year=A>=S?m.year:m.year-1,S=l[y.year-l[0]];var M=S>>9&4095,w=S>>5&15,C=S&31,x,_=new Date(M,w-1,C),k=new Date(m.year,m.month-1,m.day);x=Math.round((k-_)/(24*3600*1e3));var E=i[y.year-i[0]],I;for(I=0;I<13;I++){var F=E&1<<12-I?30:29;if(x>13;return!D||I=1888&&h<=2111;if(!g)throw new Error("Lunar year outside range 1888-2111");var T=typeof d=="number"&&d>=1&&d<=12;if(!T)throw new Error("Lunar month outside range 1 - 12");var S=typeof v=="number"&&v>=1&&v<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var A;typeof p=="object"?(A=!1,y=p):(A=!!p,y={}),b={year:h,month:d,day:v,isIntercalary:A}}var M;M=b.day-1;var w=i[b.year-i[0]],C=w>>13,x;C&&(b.month>C||b.isIntercalary)?x=b.month:x=b.month-1;for(var _=0;_>9&4095,F=E>>5&15,D=E&31,z=new Date(I,F-1,D+M);return y.year=z.getFullYear(),y.month=1+z.getMonth(),y.day=z.getDate(),y}return tbe}var nbe={},abe;function pQe(){if(abe)return nbe;abe=1;var e=hh(),t=Eu();function r(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=o.year()+(o.year()<0?1:0);return s%4===3||s%4===-1},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(n,o,s){var a=this.newDate(n,o,s);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(n,o){var s=this._validate(n,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===13&&this.leapYear(s.year())?1:0)},weekDay:function(n,o,s){return(this.dayOfWeek(n,o,s)||7)<6},toJD:function(n,o,s){var a=this._validate(n,o,s,e.local.invalidDate);return n=a.year(),n<0&&n++,a.day()+(a.month()-1)*30+(n-1)*365+Math.floor(n/4)+this.jdEpoch-1},fromJD:function(n){var o=Math.floor(n)+.5-this.jdEpoch,s=Math.floor((o-Math.floor((o+366)/1461))/365)+1;s<=0&&s--,o=Math.floor(n)+.5-this.newDate(s,1,1).toJD();var a=Math.floor(o/30)+1,f=o-(a-1)*30+1;return this.newDate(s,a,f)}}),e.calendars.coptic=r,nbe}var ibe={},obe;function gQe(){if(obe)return ibe;obe=1;var e=hh(),t=Eu();function r(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(o,s,a){var f=this.newDate(o,s,a);return f.add(-f.dayOfWeek(),"d"),Math.floor((f.dayOfYear()-1)/8)+1},daysInMonth:function(o,s){var a=this._validate(o,s,this.minDay,e.local.invalidMonth);return this.daysPerMonth[a.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);return(f.day()+1)%8},weekDay:function(o,s,a){var f=this.dayOfWeek(o,s,a);return f>=2&&f<=6},extraInfo:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);return{century:n[Math.floor((f.year()-1)/100)+1]||""}},toJD:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);return o=f.year()+(f.year()<0?1:0),s=f.month(),a=f.day(),a+(s>1?16:0)+(s>2?(s-2)*32:0)+(o-1)*400+this.jdEpoch-1},fromJD:function(o){o=Math.floor(o+.5)-Math.floor(this.jdEpoch)-1;var s=Math.floor(o/400)+1;o-=(s-1)*400,o+=o>15?16:0;var a=Math.floor(o/32)+1,f=o-(a-1)*32+1;return this.newDate(s<=0?s-1:s,a,f)}});var n={20:"Fruitbat",21:"Anchovy"};return e.calendars.discworld=r,ibe}var sbe={},lbe;function yQe(){if(lbe)return sbe;lbe=1;var e=hh(),t=Eu();function r(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=o.year()+(o.year()<0?1:0);return s%4===3||s%4===-1},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(n,o,s){var a=this.newDate(n,o,s);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(n,o){var s=this._validate(n,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===13&&this.leapYear(s.year())?1:0)},weekDay:function(n,o,s){return(this.dayOfWeek(n,o,s)||7)<6},toJD:function(n,o,s){var a=this._validate(n,o,s,e.local.invalidDate);return n=a.year(),n<0&&n++,a.day()+(a.month()-1)*30+(n-1)*365+Math.floor(n/4)+this.jdEpoch-1},fromJD:function(n){var o=Math.floor(n)+.5-this.jdEpoch,s=Math.floor((o-Math.floor((o+366)/1461))/365)+1;s<=0&&s--,o=Math.floor(n)+.5-this.newDate(s,1,1).toJD();var a=Math.floor(o/30)+1,f=o-(a-1)*30+1;return this.newDate(s,a,f)}}),e.calendars.ethiopian=r,sbe}var ube={},fbe;function mQe(){if(fbe)return ube;fbe=1;var e=hh(),t=Eu();function r(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(s.year())},_leapYear:function(o){return o=o<0?o+1:o,n(o*7+1,19)<7},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(o.year?o.year():o)?13:12},weekOfYear:function(o,s,a){var f=this.newDate(o,s,a);return f.add(-f.dayOfWeek(),"d"),Math.floor((f.dayOfYear()-1)/7)+1},daysInYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);return o=s.year(),this.toJD(o===-1?1:o+1,7,1)-this.toJD(o,7,1)},daysInMonth:function(o,s){return o.year&&(s=o.month(),o=o.year()),this._validate(o,s,this.minDay,e.local.invalidMonth),s===12&&this.leapYear(o)||s===8&&n(this.daysInYear(o),10)===5?30:s===9&&n(this.daysInYear(o),10)===3?29:this.daysPerMonth[s-1]},weekDay:function(o,s,a){return this.dayOfWeek(o,s,a)!==6},extraInfo:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);return{yearType:(this.leapYear(f)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(f)%10-3]}},toJD:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);o=f.year(),s=f.month(),a=f.day();var i=o<=0?o+1:o,l=this.jdEpoch+this._delay1(i)+this._delay2(i)+a+1;if(s<7){for(var u=7;u<=this.monthsInYear(o);u++)l+=this.daysInMonth(o,u);for(var u=1;u=this.toJD(s===-1?1:s+1,7,1);)s++;for(var a=othis.toJD(s,a,this.daysInMonth(s,a));)a++;var f=o-this.toJD(s,a,1)+1;return this.newDate(s,a,f)}});function n(o,s){return o-s*Math.floor(o/s)}return e.calendars.hebrew=r,ube}var cbe={},hbe;function xQe(){if(hbe)return cbe;hbe=1;var e=hh(),t=Eu();function r(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(n){var o=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear);return(o.year()*11+14)%30<11},weekOfYear:function(n,o,s){var a=this.newDate(n,o,s);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(n){return this.leapYear(n)?355:354},daysInMonth:function(n,o){var s=this._validate(n,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(n,o,s){return this.dayOfWeek(n,o,s)!==5},toJD:function(n,o,s){var a=this._validate(n,o,s,e.local.invalidDate);return n=a.year(),o=a.month(),s=a.day(),n=n<=0?n+1:n,s+Math.ceil(29.5*(o-1))+(n-1)*354+Math.floor((3+11*n)/30)+this.jdEpoch-1},fromJD:function(n){n=Math.floor(n)+.5;var o=Math.floor((30*(n-this.jdEpoch)+10646)/10631);o=o<=0?o-1:o;var s=Math.min(12,Math.ceil((n-29-this.toJD(o,1,1))/29.5)+1),a=n-this.toJD(o,s,1)+1;return this.newDate(o,s,a)}}),e.calendars.islamic=r,cbe}var dbe={},vbe;function bQe(){if(vbe)return dbe;vbe=1;var e=hh(),t=Eu();function r(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(s){var o=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),s=o.year()<0?o.year()+1:o.year();return s%4===0},weekOfYear:function(n,o,s){var a=this.newDate(n,o,s);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(n,o){var s=this._validate(n,o,this.minDay,e.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(n,o,s){return(this.dayOfWeek(n,o,s)||7)<6},toJD:function(n,o,s){var a=this._validate(n,o,s,e.local.invalidDate);return n=a.year(),o=a.month(),s=a.day(),n<0&&n++,o<=2&&(n--,o+=12),Math.floor(365.25*(n+4716))+Math.floor(30.6001*(o+1))+s-1524.5},fromJD:function(n){var o=Math.floor(n+.5),s=o+1524,a=Math.floor((s-122.1)/365.25),f=Math.floor(365.25*a),i=Math.floor((s-f)/30.6001),l=i-Math.floor(i<14?1:13),u=a-Math.floor(l>2?4716:4715),c=s-f-Math.floor(30.6001*i);return u<=0&&u--,this.newDate(u,l,c)}}),e.calendars.julian=r,dbe}var pbe={},gbe;function _Qe(){if(gbe)return pbe;gbe=1;var e=hh(),t=Eu();function r(s){this.local=this.regionalOptions[s||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(s){return this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(s){var a=this._validate(s,this.minMonth,this.minDay,e.local.invalidYear);s=a.year();var f=Math.floor(s/400);s=s%400,s+=s<0?400:0;var i=Math.floor(s/20);return f+"."+i+"."+s%20},forYear:function(s){if(s=s.split("."),s.length<3)throw"Invalid Mayan year";for(var a=0,f=0;f19||f>0&&i<0)throw"Invalid Mayan year";a=a*20+i}return a},monthsInYear:function(s){return this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(s,a,f){return this._validate(s,a,f,e.local.invalidDate),0},daysInYear:function(s){return this._validate(s,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(s,a){return this._validate(s,a,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(s,a,f){var i=this._validate(s,a,f,e.local.invalidDate);return i.day()},weekDay:function(s,a,f){return this._validate(s,a,f,e.local.invalidDate),!0},extraInfo:function(s,a,f){var i=this._validate(s,a,f,e.local.invalidDate),l=i.toJD(),u=this._toHaab(l),c=this._toTzolkin(l);return{haabMonthName:this.local.haabMonths[u[0]-1],haabMonth:u[0],haabDay:u[1],tzolkinDayName:this.local.tzolkinMonths[c[0]-1],tzolkinDay:c[0],tzolkinTrecena:c[1]}},_toHaab:function(s){s-=this.jdEpoch;var a=n(s+8+340,365);return[Math.floor(a/20)+1,n(a,20)]},_toTzolkin:function(s){return s-=this.jdEpoch,[o(s+20,20),o(s+4,13)]},toJD:function(s,a,f){var i=this._validate(s,a,f,e.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(s){s=Math.floor(s)+.5-this.jdEpoch;var a=Math.floor(s/360);s=s%360,s+=s<0?360:0;var f=Math.floor(s/20),i=s%20;return this.newDate(a,f,i)}});function n(s,a){return s-a*Math.floor(s/a)}function o(s,a){return n(s-1,a)+1}return e.calendars.mayan=r,pbe}var ybe={},mbe;function wQe(){if(mbe)return ybe;mbe=1;var e=hh(),t=Eu();function r(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var n=e.instance("gregorian");return t(r.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return n.leapYear(s.year()+(s.year()<1?1:0)+1469)},weekOfYear:function(o,s,a){var f=this.newDate(o,s,a);return f.add(1-(f.dayOfWeek()||7),"d"),Math.floor((f.dayOfYear()-1)/7)+1},daysInMonth:function(o,s){var a=this._validate(o,s,this.minDay,e.local.invalidMonth);return this.daysPerMonth[a.month()-1]+(a.month()===12&&this.leapYear(a.year())?1:0)},weekDay:function(o,s,a){return(this.dayOfWeek(o,s,a)||7)<6},toJD:function(i,s,a){var f=this._validate(i,s,a,e.local.invalidMonth),i=f.year();i<0&&i++;for(var l=f.day(),u=1;u=this.toJD(s+1,1,1);)s++;for(var a=o-Math.floor(this.toJD(s,1,1)+.5)+1,f=1;a>this.daysInMonth(s,f);)a-=this.daysInMonth(s,f),f++;return this.newDate(s,f,a)}}),e.calendars.nanakshahi=r,ybe}var xbe={},bbe;function TQe(){if(bbe)return xbe;bbe=1;var e=hh(),t=Eu();function r(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(n){return this.daysInYear(n)!==this.daysPerYear},weekOfYear:function(n,o,s){var a=this.newDate(n,o,s);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(n){var o=this._validate(n,this.minMonth,this.minDay,e.local.invalidYear);if(n=o.year(),typeof this.NEPALI_CALENDAR_DATA[n]>"u")return this.daysPerYear;for(var s=0,a=this.minMonth;a<=12;a++)s+=this.NEPALI_CALENDAR_DATA[n][a];return s},daysInMonth:function(n,o){return n.year&&(o=n.month(),n=n.year()),this._validate(n,o,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[n]>"u"?this.daysPerMonth[o-1]:this.NEPALI_CALENDAR_DATA[n][o]},weekDay:function(n,o,s){return this.dayOfWeek(n,o,s)!==6},toJD:function(n,o,s){var a=this._validate(n,o,s,e.local.invalidDate);n=a.year(),o=a.month(),s=a.day();var f=e.instance(),i=0,l=o,u=n;this._createMissingCalendarData(n);var c=n-(l>9||l===9&&s>=this.NEPALI_CALENDAR_DATA[u][0]?56:57);for(o!==9&&(i=s,l--);l!==9;)l<=0&&(l=12,u--),i+=this.NEPALI_CALENDAR_DATA[u][l],l--;return o===9?(i+=s-this.NEPALI_CALENDAR_DATA[u][0],i<0&&(i+=f.daysInYear(c))):i+=this.NEPALI_CALENDAR_DATA[u][9]-this.NEPALI_CALENDAR_DATA[u][0],f.newDate(c,1,1).add(i,"d").toJD()},fromJD:function(n){var o=e.instance(),s=o.fromJD(n),a=s.year(),f=s.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var l=9,u=this.NEPALI_CALENDAR_DATA[i][0],c=this.NEPALI_CALENDAR_DATA[i][l]-u+1;f>c;)l++,l>12&&(l=1,i++),c+=this.NEPALI_CALENDAR_DATA[i][l];var h=this.NEPALI_CALENDAR_DATA[i][l]-(c-f);return this.newDate(i,l,h)},_createMissingCalendarData:function(n){var o=this.daysPerMonth.slice(0);o.unshift(17);for(var s=n-1;s"u"&&(this.NEPALI_CALENDAR_DATA[s]=o)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),e.calendars.nepali=r,xbe}var _be={},wbe;function AQe(){if(wbe)return _be;wbe=1;var e=hh(),t=Eu();function r(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}function n(o){var s=o-475;o<0&&s++;var a=.242197,f=a*s,i=a*(s+1),l=f-Math.floor(f),u=i-Math.floor(i);return l>u}return r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);return n(s.year())},weekOfYear:function(o,s,a){var f=this.newDate(o,s,a);return f.add(-((f.dayOfWeek()+1)%7),"d"),Math.floor((f.dayOfYear()-1)/7)+1},daysInMonth:function(o,s){var a=this._validate(o,s,this.minDay,e.local.invalidMonth);return this.daysPerMonth[a.month()-1]+(a.month()===12&&this.leapYear(a.year())?1:0)},weekDay:function(o,s,a){return this.dayOfWeek(o,s,a)!==5},toJD:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate);o=f.year(),s=f.month(),a=f.day();var i=0;if(o>0)for(var l=1;l0?o-1:o)*365+i+this.jdEpoch-1},fromJD:function(o){o=Math.floor(o)+.5;var s=475+(o-this.toJD(475,1,1))/365.242197,a=Math.floor(s);a<=0&&a--,o>this.toJD(a,12,n(a)?30:29)&&(a++,a===0&&a++);var f=o-this.toJD(a,1,1)+1,i=f<=186?Math.ceil(f/31):Math.ceil((f-6)/30),l=o-this.toJD(a,i,1)+1;return this.newDate(a,i,l)}}),e.calendars.persian=r,e.calendars.jalali=r,_be}var Tbe={},Abe;function SQe(){if(Abe)return Tbe;Abe=1;var e=hh(),t=Eu(),r=e.instance();function n(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}return n.prototype=new e.baseCalendar,t(n.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(a){var s=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear),a=this._t2gYear(s.year());return r.leapYear(a)},weekOfYear:function(i,s,a){var f=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),i=this._t2gYear(f.year());return r.weekOfYear(i,f.month(),f.day())},daysInMonth:function(o,s){var a=this._validate(o,s,this.minDay,e.local.invalidMonth);return this.daysPerMonth[a.month()-1]+(a.month()===2&&this.leapYear(a.year())?1:0)},weekDay:function(o,s,a){return(this.dayOfWeek(o,s,a)||7)<6},toJD:function(i,s,a){var f=this._validate(i,s,a,e.local.invalidDate),i=this._t2gYear(f.year());return r.toJD(i,f.month(),f.day())},fromJD:function(o){var s=r.fromJD(o),a=this._g2tYear(s.year());return this.newDate(a,s.month(),s.day())},_t2gYear:function(o){return o+this.yearsOffset+(o>=-this.yearsOffset&&o<=-1?1:0)},_g2tYear:function(o){return o-this.yearsOffset-(o>=1&&o<=this.yearsOffset?1:0)}}),e.calendars.taiwan=n,Tbe}var Sbe={},Mbe;function MQe(){if(Mbe)return Sbe;Mbe=1;var e=hh(),t=Eu(),r=e.instance();function n(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}return n.prototype=new e.baseCalendar,t(n.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(a){var s=this._validate(a,this.minMonth,this.minDay,e.local.invalidYear),a=this._t2gYear(s.year());return r.leapYear(a)},weekOfYear:function(i,s,a){var f=this._validate(i,this.minMonth,this.minDay,e.local.invalidYear),i=this._t2gYear(f.year());return r.weekOfYear(i,f.month(),f.day())},daysInMonth:function(o,s){var a=this._validate(o,s,this.minDay,e.local.invalidMonth);return this.daysPerMonth[a.month()-1]+(a.month()===2&&this.leapYear(a.year())?1:0)},weekDay:function(o,s,a){return(this.dayOfWeek(o,s,a)||7)<6},toJD:function(i,s,a){var f=this._validate(i,s,a,e.local.invalidDate),i=this._t2gYear(f.year());return r.toJD(i,f.month(),f.day())},fromJD:function(o){var s=r.fromJD(o),a=this._g2tYear(s.year());return this.newDate(a,s.month(),s.day())},_t2gYear:function(o){return o-this.yearsOffset-(o>=1&&o<=this.yearsOffset?1:0)},_g2tYear:function(o){return o+this.yearsOffset+(o>=-this.yearsOffset&&o<=-1?1:0)}}),e.calendars.thai=n,Sbe}var Ebe={},kbe;function EQe(){if(kbe)return Ebe;kbe=1;var e=hh(),t=Eu();function r(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(o){var s=this._validate(o,this.minMonth,this.minDay,e.local.invalidYear);return this.daysInYear(s.year())===355},weekOfYear:function(o,s,a){var f=this.newDate(o,s,a);return f.add(-f.dayOfWeek(),"d"),Math.floor((f.dayOfYear()-1)/7)+1},daysInYear:function(o){for(var s=0,a=1;a<=12;a++)s+=this.daysInMonth(o,a);return s},daysInMonth:function(o,s){for(var a=this._validate(o,s,this.minDay,e.local.invalidMonth),f=a.toJD()-24e5+.5,i=0,l=0;lf)return n[i]-n[i-1];i++}return 30},weekDay:function(o,s,a){return this.dayOfWeek(o,s,a)!==5},toJD:function(o,s,a){var f=this._validate(o,s,a,e.local.invalidDate),i=12*(f.year()-1)+f.month()-15292,l=f.day()+n[i-1]-1;return l+24e5-.5},fromJD:function(o){for(var s=o-24e5+.5,a=0,f=0;fs);f++)a++;var i=a+15292,l=Math.floor((i-1)/12),u=l+1,c=i-12*l,h=s-n[a-1]+1;return this.newDate(u,c,h)},isValid:function(o,s,a){var f=e.baseCalendar.prototype.isValid.apply(this,arguments);return f&&(o=o.year!=null?o.year:o,f=o>=1276&&o<=1500),f},_validate:function(o,s,a,f){var i=e.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw f.replace(/\{0\}/,this.local.name);return i}}),e.calendars.ummalqura=r;var n=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990];return Ebe}var fH,Cbe;function kQe(){return Cbe||(Cbe=1,fH=hh(),dQe(),vQe(),pQe(),gQe(),yQe(),mQe(),xQe(),bQe(),_Qe(),wQe(),TQe(),AQe(),SQe(),MQe(),EQe()),fH}var cH,Rbe;function CQe(){if(Rbe)return cH;Rbe=1;var e=kQe(),t=rr(),r=Pi(),n=r.EPOCHJD,o=r.ONEDAY,s={valType:"enumerated",values:t.sortObjectKeys(e.calendars),editType:"calc",dflt:"gregorian"},a=function(A,M,w,C){var x={};return x[w]=s,t.coerce(A,M,x,w,C)},f=function(A,M,w,C){for(var x=0;x{const e=Vt.useRef(null);return Vt.useEffect(()=>{if(!e.current)return;const t=80,r=.22,n=[];for(let v=0;vv.x),f=n.map(v=>v.y),i=n.map(v=>v.connections),l={x:o,y:s,mode:"lines",line:{width:.5,color:"#4b5563"},hoverinfo:"none",type:"scatter"},u={x:a,y:f,mode:"markers",hoverinfo:"none",marker:{showscale:!1,colorscale:"Viridis",color:i,size:8,line:{width:0}},type:"scatter"},c={showlegend:!1,hovermode:!1,margin:{b:0,l:0,r:0,t:0},xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,range:[-.05,1.05],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,range:[-.05,1.05],fixedrange:!0},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",autosize:!0,dragmode:!1},h={staticPlot:!0,displayModeBar:!1,responsive:!0};L3.newPlot(e.current,[l,u],c,h);const d=new ResizeObserver(()=>{e.current&&L3.Plots.resize(e.current)});return d.observe(e.current),()=>{d.disconnect(),e.current&&L3.purge(e.current)}},[]),ct.jsx("div",{ref:e,className:"w-full h-full"})},IQe=({onStart:e})=>{const[t,r]=Vt.useState(0);return Vt.useEffect(()=>{const n=setInterval(()=>{r(o=>o===0?1:0)},6e3);return()=>clearInterval(n)},[]),ct.jsxs("section",{className:"relative min-h-[90vh] flex flex-col items-center justify-center pt-32 pb-20 overflow-hidden",children:[ct.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[500px] bg-purple-900/10 rounded-full blur-[120px] pointer-events-none"}),ct.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-6 w-full grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[ct.jsxs("div",{className:"space-y-8 relative h-[400px]",children:[ct.jsxs("div",{className:`absolute top-0 left-0 w-full transition-all duration-1000 ease-in-out transform ${t===0?"opacity-100 translate-y-0":"opacity-0 -translate-y-10 pointer-events-none"}`,children:[ct.jsxs("h1",{className:"text-5xl md:text-7xl font-bold leading-tight",children:["User Simulation ",ct.jsx("span",{className:"text-gray-400",children:"API"})," for Developers"]}),ct.jsx("p",{className:"text-xl text-gray-400 mt-6 max-w-lg",children:"Programmatically test your UX decisions. Integrate accurate user simulation into your CI/CD pipeline. Free for developers."}),ct.jsxs("div",{className:"flex flex-wrap gap-4 mt-8",children:[ct.jsx(sh,{variant:"primary",size:"lg",onClick:e,children:"HF Space Demo"}),ct.jsx(sh,{variant:"outline",size:"lg",onClick:()=>window.location.href="#docs",children:"Read the Docs"})]})]}),ct.jsxs("div",{className:`absolute top-0 left-0 w-full transition-all duration-1000 ease-in-out transform ${t===1?"opacity-100 translate-y-0":"opacity-0 translate-y-10 pointer-events-none"}`,children:[ct.jsxs("h1",{className:"text-5xl md:text-7xl font-bold leading-tight",children:["Stop guessing. ",ct.jsx("span",{className:"bg-gradient-to-r from-purple-400 to-pink-600 bg-clip-text text-transparent",children:"Start simulating."})]}),ct.jsx("p",{className:"text-xl text-gray-400 mt-6 max-w-lg",children:"Validate features with AI-generated user societies before writing a single line of frontend code. The open standard for agentic UX testing."}),ct.jsxs("div",{className:"flex flex-wrap gap-4 mt-8",children:[ct.jsx(sh,{variant:"primary",size:"lg",onClick:e,children:"Start Building"}),ct.jsx(sh,{variant:"outline",size:"lg",onClick:()=>window.location.href="#docs",children:"Documentation"})]})]})]}),ct.jsxs("div",{className:"relative h-[500px] w-full flex items-center justify-center",children:[ct.jsx("div",{className:"w-full h-full opacity-80",style:{maskImage:"linear-gradient(to bottom, black 0%, black 70%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, black 70%, transparent 100%)"},children:ct.jsx(DQe,{})}),ct.jsx("div",{className:"absolute inset-0 pointer-events-none bg-gradient-to-t from-black via-transparent to-transparent"})]})]})]})},OQe=()=>{const e=[{icon:ct.jsx(p3e,{size:20}),category:"Task Success Rate",question:"Do users complete their goals?",outcome:"Identify drop-off points in critical flows."},{icon:ct.jsx(BIe,{size:20}),category:"Time-on-Task",question:"How quickly do they finish?",outcome:"Benchmark efficiency against previous versions."},{icon:ct.jsx(j6e,{size:20}),category:"Session Duration",question:"How long do they stay engaged?",outcome:"Balance retention with efficient task completion."},{icon:ct.jsx(N6e,{size:20}),category:"System Usability Scale",question:"Is the product usable?",outcome:"Standardized scoring for overall usability."},{icon:ct.jsx(PIe,{size:20}),category:"Customer Satisfaction",question:"Are users happy with the experience?",outcome:"Predict long-term retention and loyalty."},{icon:ct.jsx(K6e,{size:20}),category:"Customer Effort Score",question:"Is it easy to get things done?",outcome:"Reduce friction to increase conversion."}];return ct.jsx("section",{className:"py-24 border-t border-gray-800 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[ct.jsx("h3",{className:"text-center text-3xl md:text-4xl font-semibold text-white mb-6",children:"Quantify your UX quality programmatically."}),ct.jsx("p",{className:"text-center text-gray-400 mb-16 max-w-2xl mx-auto text-lg",children:"Developers use SyncUsers to predict performance on core metrics without waiting for live traffic data."}),ct.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-24",children:e.map((t,r)=>ct.jsxs("div",{className:"group p-8 rounded-2xl border border-gray-800 bg-gray-900/20 hover:border-teal-900/50 hover:bg-gray-900/40 transition-all duration-300",children:[ct.jsxs("div",{className:"flex items-center gap-3 mb-5 text-gray-500 group-hover:text-teal-400 transition-colors",children:[t.icon,ct.jsx("span",{className:"text-xs font-mono uppercase tracking-widest",children:t.category})]}),ct.jsx("div",{className:"text-xl font-medium text-white mb-3 group-hover:translate-x-1 transition-transform duration-300",children:t.question}),ct.jsx("p",{className:"text-sm text-gray-500 leading-relaxed group-hover:text-gray-400 transition-colors",children:t.outcome})]},r))}),ct.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:[{value:"2,000+",label:"Persona Database ready",color:"border-blue-900"},{value:"REST & GraphQL",label:"API Available",color:"border-teal-900"}].map((t,r)=>ct.jsxs("div",{className:`relative flex flex-col items-center justify-center py-16 rounded-full border border-t-2 ${t.color} bg-gradient-to-b from-gray-900 to-black`,children:[ct.jsx("h4",{className:"text-4xl md:text-5xl font-bold text-white mb-2",children:t.value}),ct.jsx("p",{className:"text-gray-400",children:t.label})]},r))})]})})},zQe=()=>{const e=[{icon:ct.jsx(OIe,{className:"w-6 h-6"}),title:"Targeted",desc:"Accurately model even hard-to-reach audiences via API."},{icon:ct.jsx(hIe,{className:"w-6 h-6"}),title:"Scalable",desc:"Run thousands of concurrent simulations."},{icon:ct.jsx(WY,{className:"w-6 h-6"}),title:"Low Latency",desc:"Get actionable insights in your pipeline in seconds."},{icon:ct.jsx(H6e,{className:"w-6 h-6"}),title:"Free for Devs",desc:"Generous free tier to build and test your integration."}];return ct.jsx("section",{id:"features",className:"py-24 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[ct.jsx("div",{className:"flex justify-center mb-8",children:ct.jsx("span",{className:"px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300",children:"Product Overview"})}),ct.jsx("h2",{className:"text-3xl md:text-5xl font-semibold text-center max-w-4xl mx-auto leading-tight mb-20",children:"Create realistic simulations of your target audience to instantly test messages, content, or ideas"}),ct.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>ct.jsxs("div",{className:"p-8 border border-gray-800 rounded-2xl hover:border-gray-600 transition-colors bg-gray-900/20",children:[ct.jsx("div",{className:"w-12 h-12 rounded-full border border-gray-700 flex items-center justify-center mb-6 text-white",children:t.icon}),ct.jsx("h3",{className:"text-xl font-medium mb-3",children:t.title}),ct.jsx("p",{className:"text-gray-400 leading-relaxed",children:t.desc})]},r))})]})})},FQe="modulepreload",NQe=function(e){return"/"+e},Dbe={},Ibe=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let a=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),i=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=a(r.map(l=>{if(l=NQe(l),l in Dbe)return;Dbe[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":FQe,u||(h.as="script"),h.crossOrigin="",h.href=l,i&&h.setAttribute("nonce",i),document.head.appendChild(h),u)return new Promise((d,v)=>{h.addEventListener("load",d),h.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=a,window.dispatchEvent(f),!f.defaultPrevented)throw a}return o.then(a=>{for(const f of a||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})},BQe="host",e4e="queue/data",qQe="queue/join",Obe="upload",jQe="login",n3="config",UQe="info",HQe="runtime",GQe="sleeptime",VQe="heartbeat",YQe="component_server",$Qe="reset",WQe="cancel",XQe="app_id",t4e="This application is currently busy. Please try again. ",aw="Connection errored out. ",Yg="Could not resolve app config. ",ZQe="Could not get space status. ",KQe="Could not get API info. ",tZ="Space metadata could not be loaded. ",JQe="Invalid URL. A full URL path is required.",QQe="Not authorized to access this space. ",r4e="Invalid credentials. Could not login. ",eet="Login credentials are required to access this space.",tet="File system access is only available in Node.js environments",n4e="Root URL not found in client config",ret="Error uploading file";async function zbe(e,t,r){try{return(await(await fetch(`https://huggingface.co/api/spaces/${e}/jwt`,{headers:{Authorization:`Bearer ${t}`,...r?{Cookie:r}:{}}})).json()).token||!1}catch{return!1}}function net(e){let t={};return e.forEach(({api_name:r,id:n})=>{r&&(t[r]=n)}),t}async function aet(e){const t=this.options.token?{Authorization:`Bearer ${this.options.token}`}:{};if(t["Content-Type"]="application/json",typeof window<"u"&&window.gradio_config&&location.origin!=="http://localhost:9876"){if(window.gradio_config.current_page&&(e=e.substring(0,e.lastIndexOf("/"))),window.gradio_config.dev_mode||typeof window<"u"&&(window==null?void 0:window.BUILD_MODE)==="dev"){let r=$V(e,this.deep_link?n3+"?deep_link="+this.deep_link:n3);const n=await this.fetch(r,{headers:t,credentials:"include"}),o=await Fbe(n,!!this.options.auth);o.root=e||o.root,window.gradio_config={...o,current_page:window.gradio_config.current_page}}return{...window.gradio_config}}else if(e){let r=$V(e,this.deep_link?n3+"?deep_link="+this.deep_link:n3);const n=await this.fetch(r,{headers:t,credentials:"include"}),o=await Fbe(n,!!this.options.auth);return o.root||(o.root=e),o}throw new Error(Yg)}async function Fbe(e,t){var r,n,o;if((e==null?void 0:e.status)===401&&!t){const s=(n=(r=await e.json())==null?void 0:r.detail)==null?void 0:n.auth_message;throw new Error(s||eet)}else if((e==null?void 0:e.status)===401&&t)throw new Error(r4e);if((e==null?void 0:e.status)===200){let s=await e.json();return(o=s.dependencies)==null||o.forEach((a,f)=>{a.id===void 0&&(a.id=f)}),s}else if((e==null?void 0:e.status)===401)throw new Error(QQe);throw new Error(Yg)}async function iet(){const{http_protocol:e,host:t}=await nZ(this.app_reference,this.options.token);try{if(this.options.auth){const r=await a4e(e,t,this.options.auth,this.fetch,this.options.token);r&&this.set_cookies(r)}}catch(r){throw Error(r.message)}}async function a4e(e,t,r,n,o){const s=new FormData;s.append("username",r==null?void 0:r[0]),s.append("password",r==null?void 0:r[1]);let a={};o&&(a.Authorization=`Bearer ${o}`);const f=await n(`${e}//${t}/${jQe}`,{headers:a,method:"POST",body:s,credentials:"include"});if(f.status===200)return f.headers.get("set-cookie");throw f.status===401?new Error(r4e):new Error(tZ)}function vH(e){if(e.startsWith("http")){const{protocol:t,host:r,pathname:n}=new URL(e);return{ws_protocol:t==="https:"?"wss":"ws",http_protocol:t,host:r+(n!=="/"?n:"")}}return{ws_protocol:"wss",http_protocol:"https:",host:new URL(e).host}}const i4e=e=>{let t=[];return e.split(/,(?=\s*[^\s=;]+=[^\s=;]+)/).forEach(r=>{const[n,o]=r.split(";")[0].split("=");n&&o&&t.push(`${n.trim()}=${o.trim()}`)}),t},rZ=/^[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+$/,oet=/.*hf\.space\/{0,1}.*$/;async function nZ(e,t){const r={};t&&(r.Authorization=`Bearer ${t}`);const n=e.trim().replace(/\/$/,"");if(rZ.test(n))try{const o=(await(await fetch(`https://huggingface.co/api/spaces/${n}/${BQe}`,{headers:r})).json()).host;return{space_id:e,...vH(o)}}catch{throw new Error(tZ)}if(oet.test(n)){const{ws_protocol:o,http_protocol:s,host:a}=vH(n);return{space_id:a.split("/")[0].replace(".hf.space",""),ws_protocol:o,http_protocol:s,host:a}}return{space_id:!1,...vH(n)}}const $V=(...e)=>{try{return e.reduce((t,r)=>(t=t.replace(/\/+$/,""),r=r.replace(/^\/+/,""),new URL(r,t+"/").toString()))}catch{throw new Error(JQe)}};function set(e,t,r){const n={named_endpoints:{},unnamed_endpoints:{}};return Object.keys(e).forEach(o=>{(o==="named_endpoints"||o==="unnamed_endpoints")&&(n[o]={},Object.entries(e[o]).forEach(([s,{parameters:a,returns:f}])=>{var c,h,d,v;const i=((c=t.dependencies.find(p=>p.api_name===s||p.api_name===s.replace("/","")))==null?void 0:c.id)||r[s.replace("/","")]||-1,l=i!==-1?(h=t.dependencies.find(p=>p.id==i))==null?void 0:h.types:{generator:!1,cancel:!1};if(i!==-1&&((v=(d=t.dependencies.find(p=>p.id==i))==null?void 0:d.inputs)==null?void 0:v.length)!==a.length){const p=t.dependencies.find(m=>m.id==i).inputs.map(m=>{var y;return(y=t.components.find(b=>b.id===m))==null?void 0:y.type});try{p.forEach((m,y)=>{if(m==="state"){const b={component:"state",example:null,parameter_default:null,parameter_has_default:!0,parameter_name:null,hidden:!0};a.splice(y,0,b)}})}catch(m){console.error(m)}}const u=(p,m,y,b)=>({...p,description:fet(p==null?void 0:p.type,y),type:uet(p==null?void 0:p.type,m,y,b)||""});n[o][s]={parameters:a.map(p=>u(p,p==null?void 0:p.component,p==null?void 0:p.serializer,"parameter")),returns:f.map(p=>u(p,p==null?void 0:p.component,p==null?void 0:p.serializer,"return")),type:l}}))}),n}function uet(e,t,r,n){if(t==="Api")return e.type;switch(e==null?void 0:e.type){case"string":return"string";case"boolean":return"boolean";case"number":return"number"}if(r==="JSONSerializable"||r==="StringSerializable")return"any";if(r==="ListStringSerializable")return"string[]";if(t==="Image")return n==="parameter"?"Blob | File | Buffer":"string";if(r==="FileSerializable")return(e==null?void 0:e.type)==="array"?n==="parameter"?"(Blob | File | Buffer)[]":"{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}[]":n==="parameter"?"Blob | File | Buffer":"{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}";if(r==="GallerySerializable")return n==="parameter"?"[(Blob | File | Buffer), (string | null)][]":"[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]"}function fet(e,t){return t==="GallerySerializable"?"array of [file, label] tuples":t==="ListStringSerializable"?"array of strings":t==="FileSerializable"?"array of files or single file":e==null?void 0:e.description}function Nbe(e,t){switch(e.msg){case"send_data":return{type:"data"};case"send_hash":return{type:"hash"};case"queue_full":return{type:"update",status:{queue:!0,message:t4e,stage:"error",code:e.code,success:e.success}};case"heartbeat":return{type:"heartbeat"};case"unexpected_error":return{type:"unexpected_error",status:{queue:!0,message:e.message,session_not_found:e.session_not_found,stage:"error",success:!1}};case"broken_connection":return{type:"broken_connection",status:{queue:!0,message:e.message,stage:"error",success:!1}};case"estimation":return{type:"update",status:{queue:!0,stage:t||"pending",code:e.code,size:e.queue_size,position:e.rank,eta:e.rank_eta,success:e.success}};case"progress":return{type:"update",status:{queue:!0,stage:"pending",code:e.code,progress_data:e.progress_data,success:e.success}};case"log":return{type:"log",data:e};case"process_generating":return{type:"generating",status:{queue:!0,message:e.success?null:e.output.error,stage:e.success?"generating":"error",code:e.code,progress_data:e.progress_data,eta:e.average_duration,changed_state_ids:e.success?e.output.changed_state_ids:void 0},data:e.success?e.output:null};case"process_streaming":return{type:"streaming",status:{queue:!0,message:e.output.error,stage:"streaming",time_limit:e.time_limit,code:e.code,progress_data:e.progress_data,eta:e.eta},data:e.output};case"process_completed":return"error"in e.output?{type:"update",status:{queue:!0,title:e.output.title??"Error",message:e.output.error??"An error occurred",visible:e.output.visible,duration:e.output.duration,stage:"error",code:e.code,success:e.success}}:{type:"complete",status:{queue:!0,message:e.success?void 0:e.output.error,stage:e.success?"complete":"error",code:e.code,progress_data:e.progress_data,changed_state_ids:e.success?e.output.changed_state_ids:void 0},data:e.success?e.output:null};case"process_starts":return{type:"update",status:{queue:!0,stage:"pending",code:e.code,size:e.rank,position:0,success:e.success,eta:e.eta},original_msg:"process_starts"}}return{type:"none",status:{stage:"error",queue:!0}}}const cet=(e=[],t)=>{const r=t?t.parameters:[];if(Array.isArray(e))return t&&r.length>0&&e.length>r.length&&console.warn("Too many arguments provided for the endpoint."),e;const n=[],o=Object.keys(e);return r.forEach((s,a)=>{if(e.hasOwnProperty(s.parameter_name))n[a]=e[s.parameter_name];else if(s.parameter_has_default)n[a]=s.parameter_default;else throw new Error(`No value provided for required parameter: ${s.parameter_name}`)}),o.forEach(s=>{if(!r.some(a=>a.parameter_name===s))throw new Error(`Parameter \`${s}\` is not a valid keyword argument. Please refer to the API for usage.`)}),n.forEach((s,a)=>{if(s===void 0&&!r[a].parameter_has_default)throw new Error(`No value provided for required parameter: ${r[a].parameter_name}`)}),n};async function het(){if(this.api_info)return this.api_info;const{token:e}=this.options,{config:t}=this,r={"Content-Type":"application/json"};if(e&&(r.Authorization=`Bearer ${e}`),!!t)try{let n,o;if(typeof window<"u"&&window.gradio_api_info)o=window.gradio_api_info;else{const s=$V(t.root,this.api_prefix,UQe);if(n=await this.fetch(s,{headers:r,credentials:"include"}),!n.ok)throw new Error(aw);o=await n.json()}return"api"in o&&(o=o.api),o.named_endpoints["/predict"]&&!o.unnamed_endpoints[0]&&(o.unnamed_endpoints[0]=o.named_endpoints["/predict"]),set(o,t,this.api_map)}catch(n){throw new Error("Could not get API info. "+n.message)}}async function det(e,t,r){var f;const n={};(f=this==null?void 0:this.options)!=null&&f.token&&(n.Authorization=`Bearer ${this.options.token}`);const o=1e3,s=[];let a;for(let i=0;i{u.append("files",h)});try{const h=r?`${e}${this.api_prefix}/${Obe}?upload_id=${r}`:`${e}${this.api_prefix}/${Obe}`;a=await this.fetch(h,{method:"POST",body:u,headers:n,credentials:"include"})}catch(h){throw new Error(aw+h.message)}if(!a.ok){const h=await a.text();return{error:`HTTP ${a.status}: ${h}`}}const c=await a.json();c&&s.push(...c)}return{files:s}}const vet={radix:1e3,unit:["b","kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"]},pet={radix:1024,unit:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"]},get={radix:1024,unit:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"]},Bbe={si:vet,iec:pet,jedec:get};function yet(e,t=1,r="jedec"){e=Math.abs(e);const{radix:n,unit:o}=Bbe[r]||Bbe.jedec;let s=0;for(;e>=n;)e/=n,++s;return`${e.toFixed(t)} ${o[s]}`}async function met(e,t,r,n){let o=(Array.isArray(e)?e:[e]).map(a=>a.blob);const s=o.filter(a=>a.size>(n??1/0));if(s.length)throw new Error(`File(s) exceed the maximum allowed size of ${yet(n||1/0)}: ${s.map(a=>`"${a.name}"`).join(", ")}`);return await Promise.all(await this.upload_files(t,o,r).then(async a=>{if(a.error)throw new Error(a.error);return a.files?a.files.map((f,i)=>new aZ({...e[i],path:f,url:`${t}${this.api_prefix}/file=${f}`})):[]}))}class aZ{constructor({path:t,url:r,orig_name:n,size:o,blob:s,is_stream:a,mime_type:f,alt_text:i,b64:l}){Ui(this,"path");Ui(this,"url");Ui(this,"orig_name");Ui(this,"size");Ui(this,"blob");Ui(this,"is_stream");Ui(this,"mime_type");Ui(this,"alt_text");Ui(this,"b64");Ui(this,"meta",{_type:"gradio.FileData"});this.path=t,this.url=r,this.orig_name=n,this.size=o,this.blob=r?void 0:s,this.is_stream=a,this.mime_type=f,this.alt_text=i,this.b64=l}}class xet{constructor(t,r){Ui(this,"type");Ui(this,"command");Ui(this,"meta");Ui(this,"fileData");this.type="command",this.command=t,this.meta=r}}typeof Ya<"u"&&Ya.versions&&Ya.versions.node;function qbe(e,t,r){for(;r.length>1;){const o=r.shift();if(typeof o=="string"||typeof o=="number")e=e[o];else throw new Error("Invalid key type")}const n=r.shift();if(typeof n=="string"||typeof n=="number")e[n]=t;else throw new Error("Invalid key type")}async function WV(e,t=void 0,r=[],n=!1,o=void 0){if(Array.isArray(e)){let s=[];return await Promise.all(e.map(async(a,f)=>{var u;let i=r.slice();i.push(String(f));const l=await WV(e[f],n?((u=o==null?void 0:o.parameters[f])==null?void 0:u.component)||void 0:t,i,!1,o);s=s.concat(l)})),s}else{if(globalThis.Buffer&&e instanceof globalThis.Buffer||e instanceof Blob)return[{path:r,blob:new Blob([e]),type:t}];if(typeof e=="object"&&e!==null){let s=[];for(const a of Object.keys(e)){const f=[...r,a],i=e[a];s=s.concat(await WV(i,void 0,f,!1,o))}return s}}return[]}function bet(e,t){var n,o;let r=(o=(n=t==null?void 0:t.dependencies)==null?void 0:n.find(s=>s.id==e))==null?void 0:o.queue;return r!=null?!r:!t.enable_queue}function _et(e,t){return new Promise((r,n)=>{const o=new MessageChannel;o.port1.onmessage=(({data:s})=>{o.port1.close(),r(s)}),window.parent.postMessage(e,t,[o.port2])})}function a3(e,t,r,n,o=!1){var i;if(n==="input"&&!o)throw new Error("Invalid code path. Cannot skip state inputs for input.");if(n==="output"&&o)return e;let s=[],a=0;const f=n==="input"?t.inputs:t.outputs;for(let l=0;lc.id===u))==null?void 0:i.type)==="state"){if(o)if(e.length===f.length){const c=e[a];s.push(c),a++}else s.push(null);else{a++;continue}continue}else{const c=e[a];s.push(c),a++}}return s}async function wet(e,t,r){const n=this;await Tet(n,t);const o=await WV(t,void 0,[],!0,r);return(await Promise.all(o.map(async({path:s,blob:a,type:f})=>{if(!a)return{path:s,type:f};const i=await n.upload_files(e,[a]),l=i.files&&i.files[0];return{path:s,file_url:l,type:f,name:typeof File<"u"&&a instanceof File?a==null?void 0:a.name:void 0}}))).forEach(({path:s,file_url:a,type:f,name:i})=>{if(f==="Gallery")qbe(t,a,s);else if(a){const l=new aZ({path:a,orig_name:i});qbe(t,l,s)}}),t}async function Tet(e,t){var r,n;if(!((r=e.config)!=null&&r.root||(n=e.config)!=null&&n.root_url))throw new Error(n4e);await o4e(e,t)}async function o4e(e,t,r=[]){for(const n in t)t[n]instanceof xet?await Aet(e,t,n):typeof t[n]=="object"&&t[n]!==null&&await o4e(e,t[n],[...r,n])}async function Aet(e,t,r){var s,a;let n=t[r];const o=((s=e.config)==null?void 0:s.root)||((a=e.config)==null?void 0:a.root_url);if(!o)throw new Error(n4e);try{let f,i;if(typeof Ya<"u"&&Ya.versions&&Ya.versions.node){const h=await Ibe(()=>import("./__vite-browser-external-DYxpcVy9-BIHI7g3E.js"),[]);i=(await Ibe(async()=>{const{resolve:d}=await import("./__vite-browser-external-DYxpcVy9-BIHI7g3E.js");return{resolve:d}},[])).resolve(Ya.cwd(),n.meta.path),f=await h.readFile(i)}else throw new Error(tet);const l=new Blob([f],{type:"application/octet-stream"}),u=await e.upload_files(o,[l]),c=u.files&&u.files[0];if(c){const h=new aZ({path:c,orig_name:n.meta.name||""});t[r]=h}}catch(f){console.error(ret,f)}}async function Met(e,t,r){const n={"Content-Type":"application/json"};this.options.token&&(n.Authorization=`Bearer ${this.options.token}`);try{var o=await this.fetch(e,{method:"POST",body:JSON.stringify(t),headers:{...n,...r},credentials:"include"})}catch{return[{error:aw},500]}let s,a;try{s=await o.json(),a=o.status}catch(f){s={error:`Could not parse server response: ${f}`},a=500}return[s,a]}async function Eet(e,t={}){let r=!1,n=!1;if(!this.config)throw new Error("Could not resolve app config");if(typeof e=="number")this.config.dependencies.find(o=>o.id==e);else{const o=e.replace(/^\//,"");this.config.dependencies.find(s=>s.id==this.api_map[o])}return new Promise(async(o,s)=>{const a=this.submit(e,t,null,null,!0);let f;for await(const i of a)i.type==="data"&&(n&&o(f),r=!0,f=i),i.type==="status"&&(i.stage==="error"&&s(i),i.stage==="complete"&&(n=!0,r&&o(f)))})}async function J_(e,t,r){let n=t==="subdomain"?`https://huggingface.co/api/spaces/by-subdomain/${e}`:`https://huggingface.co/api/spaces/${e}`,o,s;try{if(o=await fetch(n),s=o.status,s!==200)throw new Error;o=await o.json()}catch{r({status:"error",load_status:"error",message:ZQe,detail:"NOT_FOUND"});return}if(!o||s!==200)return;const{runtime:{stage:a},id:f}=o;switch(a){case"STOPPED":case"SLEEPING":r({status:"sleeping",load_status:"pending",message:"Space is asleep. Waking it up...",detail:a}),setTimeout(()=>{J_(e,t,r)},1e3);break;case"PAUSED":r({status:"paused",load_status:"error",message:"This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",detail:a,discussions_enabled:await jbe(f)});break;case"RUNNING":case"RUNNING_BUILDING":r({status:"running",load_status:"complete",message:"Space is running.",detail:a});break;case"BUILDING":r({status:"building",load_status:"pending",message:"Space is building...",detail:a}),setTimeout(()=>{J_(e,t,r)},1e3);break;case"APP_STARTING":r({status:"starting",load_status:"pending",message:"Space is starting...",detail:a}),setTimeout(()=>{J_(e,t,r)},1e3);break;default:r({status:"space_error",load_status:"error",message:"This space is experiencing an issue.",detail:a,discussions_enabled:await jbe(f)});break}}const s4e=async(e,t)=>{let r=0;const n=12,o=5e3;return new Promise(s=>{J_(e,rZ.test(e)?"space_name":"subdomain",a=>{t(a),a.status==="running"||a.status==="error"||a.status==="paused"||a.status==="space_error"?s():(a.status==="sleeping"||a.status==="building")&&(r{s4e(e,t).then(s)},o)):s())})})},ket=/^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;async function jbe(e){try{const t=await fetch(`https://huggingface.co/api/spaces/${e}/discussions`,{method:"HEAD"}),r=t.headers.get("x-error-message");return!(!t.ok||r&&ket.test(r))}catch{return!1}}async function Cet(e,t){const r={};t&&(r.Authorization=`Bearer ${t}`);try{const n=await fetch(`https://huggingface.co/api/spaces/${e}/${HQe}`,{headers:r});if(n.status!==200)throw new Error("Space hardware could not be obtained.");const{hardware:o}=await n.json();return o.current}catch(n){throw new Error(n.message)}}async function Ret(e,t,r){const n={};r&&(n.Authorization=`Bearer ${r}`);const o={seconds:t};try{const s=await fetch(`https://huggingface.co/api/spaces/${e}/${GQe}`,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(o)});if(s.status!==200)throw new Error("Could not set sleep timeout on duplicated Space. Please visit *ADD HF LINK TO SETTINGS* to set a timeout manually to reduce billing charges.");return await s.json()}catch(s){throw new Error(s.message)}}const Ube=["cpu-basic","cpu-upgrade","cpu-xl","t4-small","t4-medium","a10g-small","a10g-large","a10g-largex2","a10g-largex4","a100-large","zero-a10g","h100","h100x8"];async function Let(e,t){const{token:r,private:n,hardware:o,timeout:s,auth:a}=t;if(o&&!Ube.includes(o))throw new Error(`Invalid hardware type provided. Valid types are: ${Ube.map(m=>`"${m}"`).join(",")}.`);const{http_protocol:f,host:i}=await nZ(e,r);let l=null;if(a){const m=await a4e(f,i,a,fetch);m&&(l=i4e(m))}const u={Authorization:`Bearer ${r}`,"Content-Type":"application/json",...l?{Cookie:l.join("; ")}:{}},c=(await(await fetch("https://huggingface.co/api/whoami-v2",{headers:u})).json()).name,h=e.split("/")[1],d={repository:`${c}/${h}`};n&&(d.private=!0);let v;try{o||(v=await Cet(e,r))}catch(m){throw Error(tZ+m.message)}const p=o||v||"cpu-basic";d.hardware=p;try{const m=await fetch(`https://huggingface.co/api/spaces/${e}/duplicate`,{method:"POST",headers:u,body:JSON.stringify(d)});if(m.status===409)try{return await XV.connect(`${c}/${h}`,t)}catch(b){throw console.error("Failed to connect Client instance:",b),b}else if(m.status!==200)throw new Error(m.statusText);const y=await m.json();return await Ret(`${c}/${h}`,s||300,r),await XV.connect(Pet(y.url),t)}catch(m){throw new Error(m)}}function Pet(e){const t=/https:\/\/huggingface.co\/spaces\/([^/]+\/[^/]+)/,r=e.match(t);if(r)return r[1]}var q0;class Det extends TransformStream{constructor(r={allowCR:!1}){super({transform:(n,o)=>{for(n=H1(this,q0)+n;;){const s=n.indexOf(` +`),a=r.allowCR?n.indexOf("\r"):-1;if(a!==-1&&a!==n.length-1&&(s===-1||s-1>a)){o.enqueue(n.slice(0,a)),n=n.slice(a+1);continue}if(s===-1)break;const f=n[s-1]==="\r"?s-1:s;o.enqueue(n.slice(0,f)),n=n.slice(s+1)}eJ(this,q0,n)},flush:n=>{if(H1(this,q0)==="")return;const o=r.allowCR&&H1(this,q0).endsWith("\r")?H1(this,q0).slice(0,-1):H1(this,q0);n.enqueue(o)}});QK(this,q0,"")}}q0=new WeakMap;function Iet(e){let t=new TextDecoderStream,r=new Det({allowCR:!0});return e.pipeThrough(t).pipeThrough(r)}function Oet(e){let t=/[:]\s*/.exec(e),r=t&&t.index;if(r)return[e.substring(0,r),e.substring(r+t[0].length)]}function Hbe(e,t,r){e.get(t)||e.set(t,r)}async function*zet(e,t){if(!e.body)return;let r=Iet(e.body),n,o=r.getReader(),s;for(;;){if(t&&t.aborted)return o.cancel();if(n=await o.read(),n.done)return;if(!n.value){s&&(yield s),s=void 0;continue}let[a,f]=Oet(n.value)||[];a==="data"?(s||(s={}),s[a]=s[a]?s[a]+` +`+f:f):a==="event"?(s||(s={}),s[a]=f):a==="id"?(s||(s={}),s[a]=String(+f)===f?+f:f):a==="retry"&&(s||(s={}),s[a]=+f||void 0)}}async function Fet(e,t){let r=new Request(e,t);Hbe(r.headers,"Accept","text/event-stream"),Hbe(r.headers,"Content-Type","application/json");let n=await fetch(r);if(!n.ok)throw n;return zet(n,r.signal)}async function Net(){let{event_callbacks:e,unclosed_events:t,pending_stream_messages:r,stream_status:n,config:o,jwt:s}=this;const a=this;if(!o)throw new Error("Could not resolve app config");n.open=!0;let f=null,i=new URLSearchParams({session_hash:this.session_hash}).toString(),l=new URL(`${o.root}${this.api_prefix}/${e4e}?${i}`);if(s&&l.searchParams.set("__sign",s),f=this.stream(l),!f){console.warn("Cannot connect to SSE endpoint: "+l.toString());return}f.onmessage=async function(u){let c=JSON.parse(u.data);if(c.msg==="close_stream"){iZ(n,a.abort_controller);return}const h=c.event_id;if(!h)await Promise.all(Object.keys(e).map(d=>e[d](c)));else if(e[h]&&o){c.msg==="process_completed"&&["sse","sse_v1","sse_v2","sse_v2.1","sse_v3"].includes(o.protocol)&&t.delete(h);let d=e[h];typeof window<"u"&&typeof document<"u"?setTimeout(d,0,c):d(c)}else r[h]||(r[h]=[]),r[h].push(c)},f.onerror=async function(u){console.error(u),await Promise.all(Object.keys(e).map(c=>e[c]({msg:"broken_connection",message:aw})))}}function iZ(e,t){e&&(e.open=!1,t==null||t.abort())}function Bet(e,t,r){e[t]?r.data.forEach((n,o)=>{let s=qet(e[t][o],n);e[t][o]=s,r.data[o]=s}):(e[t]=[],r.data.forEach((n,o)=>{e[t][o]=n}))}function qet(e,t){return t.forEach(([r,n,o])=>{e=jet(e,n,r,o)}),e}function jet(e,t,r,n){if(t.length===0){if(r==="replace")return n;if(r==="append")return e+n;throw new Error(`Unsupported action: ${r}`)}let o=e;for(let a=0;a{console.warn("Method not implemented.")},onerror:null,onmessage:null,onopen:null,readyState:0,url:e.toString(),withCredentials:!1,CONNECTING:0,OPEN:1,CLOSED:2,addEventListener:()=>{throw new Error("Method not implemented.")},dispatchEvent:()=>{throw new Error("Method not implemented.")},removeEventListener:()=>{throw new Error("Method not implemented.")}};return Fet(e,t).then(async n=>{r.readyState=r.OPEN;try{for await(const o of n)r.onmessage&&r.onmessage(o);r.readyState=r.CLOSED}catch(o){r.onerror&&r.onerror(o),r.readyState=r.CLOSED}}).catch(n=>{console.error(n),r.onerror&&r.onerror(n),r.readyState=r.CLOSED}),r}function Het(e,t={},r,n,o,s){var a;try{let f=function(de){(o||G[de.type])&&c(de)},i=function(){for(ee=!0;oe.length>0;)oe.shift()({value:void 0,done:!0})},l=function(de){oe.length>0?oe.shift()(de):le.push(de)},u=function(de){l(Get(de)),i()},c=function(de){l({value:de,done:!1})},h=function(){return le.length>0?Promise.resolve(le.shift()):new Promise(de=>oe.push(de))};const{token:d}=this.options,{fetch:v,app_reference:p,config:m,session_hash:y,api_info:b,api_map:g,stream_status:T,pending_stream_messages:S,pending_diff_streams:A,event_callbacks:M,unclosed_events:w,post_data:C,options:x,api_prefix:_}=this,k=s||{"x-gradio-user":"api"},E=this;if(!b)throw new Error("No API found");if(!m)throw new Error("Could not resolve app config");let{fn_index:I,endpoint_info:F,dependency:D}=Vet(b,e,g,m),z=cet(t,F),N,q=m.protocol??"ws";if(q==="ws")throw new Error("WebSocket protocol is not supported in this version");let P="",B=()=>P;const $=typeof e=="number"?"/predict":e;let Q,J=null,ne=!1,te={},Z=typeof window<"u"&&typeof document<"u"?new URLSearchParams(window.location.search).toString():"";const G=((a=x==null?void 0:x.events)==null?void 0:a.reduce((de,_e)=>(de[_e]=!0,de),{}))||{};async function j(){let de={},_e={};de={event_id:J},_e={event_id:J,session_hash:y,fn_index:I};try{if(!m)throw new Error("Could not resolve app config");"event_id"in _e&&await v(`${m.root}${_}/${WQe}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(_e)}),await v(`${m.root}${_}/${$Qe}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(de)})}catch{console.warn("The `/reset` endpoint could not be called. Subsequent endpoint results may be unreliable.")}}const Y=async de=>{await this._resolve_heartbeat(de)};async function K(de){if(!m)return;let _e=de.render_id;m.components=[...m.components.filter(be=>be.props.rendered_in!==_e),...de.components],m.dependencies=[...m.dependencies.filter(be=>be.rendered_in!==_e),...de.dependencies];const we=m.components.some(be=>be.type==="state"),Oe=m.dependencies.some(be=>be.targets.some(Te=>Te[1]==="unload"));m.connect_heartbeat=we||Oe,await Y(m),f({type:"render",data:de,endpoint:$,fn_index:I})}const X=this.handle_blob(m.root,z,F).then(async de=>{var we;if(Q={data:a3(de,D,m.components,"input",!0)||[],event_data:r,fn_index:I,trigger_id:n},bet(I,m))f({type:"status",endpoint:$,stage:"pending",queue:!1,fn_index:I,time:new Date}),C(`${m.root}${_}/run${$.startsWith("/")?$:`/${$}`}${Z?"?"+Z:""}`,{...Q,session_hash:y},k).then(async([Oe,be])=>{const Te=Oe.data;be==200?(f({type:"data",endpoint:$,fn_index:I,data:a3(Te,D,m.components,"output",x.with_null_state),time:new Date,event_data:r,trigger_id:n}),Oe.render_config&&await K(Oe.render_config),f({type:"status",endpoint:$,fn_index:I,stage:"complete",eta:Oe.average_duration,queue:!1,time:new Date})):f({type:"status",stage:"error",endpoint:$,fn_index:I,message:Oe.error,queue:!1,time:new Date})}).catch(Oe=>{f({type:"status",stage:"error",message:Oe.message,endpoint:$,fn_index:I,queue:!1,time:new Date})});else if(q=="sse"){f({type:"status",stage:"pending",queue:!0,endpoint:$,fn_index:I,time:new Date});var _e=new URLSearchParams({fn_index:I.toString(),session_hash:y}).toString();let Oe=new URL(`${m.root}${_}/${e4e}?${Z?Z+"&":""}${_e}`);if(this.jwt&&Oe.searchParams.set("__sign",this.jwt),N=this.stream(Oe),!N)return Promise.reject(new Error("Cannot connect to SSE endpoint: "+Oe.toString()));N.onmessage=async function(be){const Te=JSON.parse(be.data),{type:ke,status:Ee,data:Le}=Nbe(Te,te[I]);if(ke==="update"&&Ee&&!ne)f({type:"status",endpoint:$,fn_index:I,time:new Date,...Ee}),Ee.stage==="error"&&(N==null||N.close(),i());else if(ke==="data"){let[Fe,qe]=await C(`${m.root}${_}/queue/data`,{...Q,session_hash:y,event_id:J});qe!==200&&(f({type:"status",stage:"error",message:aw,queue:!0,endpoint:$,fn_index:I,time:new Date}),N==null||N.close(),i())}else ke==="complete"?ne=Ee:ke==="log"?f({type:"log",title:Le.title,log:Le.log,level:Le.level,endpoint:$,duration:Le.duration,visible:Le.visible,fn_index:I}):(ke==="generating"||ke==="streaming")&&f({type:"status",time:new Date,...Ee,stage:Ee==null?void 0:Ee.stage,queue:!0,endpoint:$,fn_index:I});Le&&(f({type:"data",time:new Date,data:a3(Le.data,D,m.components,"output",x.with_null_state),endpoint:$,fn_index:I,event_data:r,trigger_id:n}),ne&&(f({type:"status",time:new Date,...ne,stage:Ee==null?void 0:Ee.stage,queue:!0,endpoint:$,fn_index:I}),N==null||N.close(),i()))}}else if(q=="sse_v1"||q=="sse_v2"||q=="sse_v2.1"||q=="sse_v3"){f({type:"status",stage:"pending",queue:!0,endpoint:$,fn_index:I,time:new Date});let Oe="";typeof window<"u"&&typeof document<"u"&&(Oe=(we=window==null?void 0:window.location)==null?void 0:we.hostname);const be=Oe.includes(".dev.")?`https://moon-${Oe.split(".")[1]}.dev.spaces.huggingface.tech`:"https://huggingface.co";return(typeof window<"u"&&typeof document<"u"&&window.parent!=window&&window.supports_zerogpu_headers?_et("zerogpu-headers",be):Promise.resolve(null)).then(Te=>{const ke={...k,...Te||{}};return C(`${m.root}${_}/${qQe}?${Z}`,{...Q,session_hash:y},ke)}).then(async([Te,ke])=>{if(Te.event_id&&(P=Te.event_id),ke===503)f({type:"status",stage:"error",message:t4e,queue:!0,endpoint:$,fn_index:I,time:new Date,visible:!0});else if(ke===422)f({type:"status",stage:"error",message:Te.detail,queue:!0,endpoint:$,fn_index:I,code:"validation_error",time:new Date,visible:!0}),i();else if(ke!==200)f({type:"status",stage:"error",broken:!1,message:Te.detail,queue:!0,endpoint:$,fn_index:I,time:new Date,visible:!0});else{J=Te.event_id,P=J;let Ee=async function(Le){try{const{type:Fe,status:qe,data:We,original_msg:Qe}=Nbe(Le,te[I]);if(Fe=="heartbeat")return;if(Fe==="update"&&qe&&!ne)f({type:"status",endpoint:$,fn_index:I,time:new Date,original_msg:Qe,...qe});else if(Fe==="complete")ne=qe;else if(Fe=="unexpected_error"||Fe=="broken_connection"){console.error("Unexpected error",qe==null?void 0:qe.message);const De=Fe==="broken_connection";f({type:"status",stage:"error",message:(qe==null?void 0:qe.message)||"An Unexpected Error Occurred!",queue:!0,endpoint:$,broken:De,session_not_found:qe==null?void 0:qe.session_not_found,fn_index:I,time:new Date})}else if(Fe==="log"){f({type:"log",title:We.title,log:We.log,level:We.level,endpoint:$,duration:We.duration,visible:We.visible,fn_index:I});return}else(Fe==="generating"||Fe==="streaming")&&(f({type:"status",time:new Date,...qe,stage:qe==null?void 0:qe.stage,queue:!0,endpoint:$,fn_index:I}),We&&D.connection!=="stream"&&["sse_v2","sse_v2.1","sse_v3"].includes(q)&&Bet(A,J,We));We&&(f({type:"data",time:new Date,data:a3(We.data,D,m.components,"output",x.with_null_state),endpoint:$,fn_index:I}),We.render_config&&await K(We.render_config),ne&&(f({type:"status",time:new Date,...ne,stage:qe==null?void 0:qe.stage,queue:!0,endpoint:$,fn_index:I}),i())),((qe==null?void 0:qe.stage)==="complete"||(qe==null?void 0:qe.stage)==="error")&&(M[J]&&delete M[J],J in A&&delete A[J])}catch(Fe){console.error("Unexpected client exception",Fe),f({type:"status",stage:"error",message:"An Unexpected Error Occurred!",queue:!0,endpoint:$,fn_index:I,time:new Date}),["sse_v2","sse_v2.1","sse_v3"].includes(q)&&(iZ(T,E.abort_controller),T.open=!1,i())}};J in S&&(S[J].forEach(Le=>Ee(Le)),delete S[J]),M[J]=Ee,w.add(J),T.open||await this.open_stream()}})}});let ee=!1;const le=[],oe=[],fe={[Symbol.asyncIterator]:()=>fe,next:h,throw:async de=>(u(de),h()),return:async()=>(i(),{value:void 0,done:!0}),cancel:j,send_chunk:de=>{this.post_data(`${m.root}${_}/stream/${P}`,{...de,session_hash:this.session_hash})},close_stream:()=>{this.post_data(`${m.root}${_}/stream/${P}/close`,{}),i()},event_id:()=>P,wait_for_id:async()=>(await X,J)};return fe}catch(f){throw console.error("Submit function encountered an error:",f),f}}function Get(e){return{then:(t,r)=>r(e)}}function Vet(e,t,r,n){let o,s,a;if(typeof t=="number")o=t,s=e.unnamed_endpoints[o],a=n.dependencies.find(f=>f.id==t);else{const f=t.replace(/^\//,"");o=r[f],s=e.named_endpoints[t.trim()],a=n.dependencies.find(i=>i.id==r[f])}if(typeof o!="number")throw new Error("There is no endpoint matching that name of fn_index matching that number.");return{fn_index:o,endpoint_info:s,dependency:a}}class XV{constructor(t,r={events:["data"]}){Ui(this,"app_reference");Ui(this,"options");Ui(this,"deep_link",null);Ui(this,"config");Ui(this,"api_prefix","");Ui(this,"api_info");Ui(this,"api_map",{});Ui(this,"session_hash",Math.random().toString(36).substring(2));Ui(this,"jwt",!1);Ui(this,"last_status",{});Ui(this,"cookies",null);Ui(this,"stream_status",{open:!1});Ui(this,"closed",!1);Ui(this,"pending_stream_messages",{});Ui(this,"pending_diff_streams",{});Ui(this,"event_callbacks",{});Ui(this,"unclosed_events",new Set);Ui(this,"heartbeat_event",null);Ui(this,"abort_controller",null);Ui(this,"stream_instance",null);Ui(this,"current_payload");Ui(this,"view_api");Ui(this,"upload_files");Ui(this,"upload");Ui(this,"handle_blob");Ui(this,"post_data");Ui(this,"submit");Ui(this,"predict");Ui(this,"open_stream");Ui(this,"resolve_config");Ui(this,"resolve_cookies");var n;this.app_reference=t,this.deep_link=((n=r.query_params)==null?void 0:n.deep_link)||null,r.events||(r.events=["data"]),this.options=r,this.current_payload={},r.cookies&&(this.cookies=r.cookies),this.view_api=het.bind(this),this.upload_files=det.bind(this),this.handle_blob=wet.bind(this),this.post_data=Met.bind(this),this.submit=Het.bind(this),this.predict=Eet.bind(this),this.open_stream=Net.bind(this),this.resolve_config=aet.bind(this),this.resolve_cookies=iet.bind(this),this.upload=met.bind(this),this.fetch=this.fetch.bind(this),this.handle_space_success=this.handle_space_success.bind(this),this.stream=this.stream.bind(this)}get_url_config(t=null){if(!this.config)throw new Error(Yg);t===null&&(t=window.location.href);const r=a=>a.replace(/^\/+|\/+$/g,"");let n=r(new URL(this.config.root).pathname),o=r(new URL(t).pathname),s;return o.startsWith(n)?s=r(o.substring(n.length)):s="",this.get_page_config(s)}get_page_config(t){if(!this.config)throw new Error(Yg);let r=this.config;return t in r.page||(t=""),{...r,current_page:t,layout:r.page[t].layout,components:r.components.filter(n=>r.page[t].components.includes(n.id)),dependencies:this.config.dependencies.filter(n=>r.page[t].dependencies.includes(n.id))}}fetch(t,r){const n=new Headers((r==null?void 0:r.headers)||{});return this&&this.cookies&&n.append("Cookie",this.cookies),this&&this.options.headers&&new Headers(this.options.headers).forEach((o,s)=>{n.append(s,o)}),fetch(t,{...r,headers:n})}stream(t){const r=new Headers;return this&&this.cookies&&r.append("Cookie",this.cookies),this&&this.options.headers&&new Headers(this.options.headers).forEach((n,o)=>{r.append(o,n)}),this&&this.options.token&&r.append("Authorization",`Bearer ${this.options.token}`),this.abort_controller=new AbortController,this.stream_instance=Uet(t.toString(),{credentials:"include",headers:r,signal:this.abort_controller.signal}),this.stream_instance}async init(){var t;this.options.auth&&await this.resolve_cookies(),await this._resolve_config().then(({config:r})=>this._resolve_heartbeat(r)),this.api_info=await this.view_api(),this.api_map=net(((t=this.config)==null?void 0:t.dependencies)||[])}async _resolve_heartbeat(t){if(t&&(this.config=t,this.api_prefix=t.api_prefix||"",this.config&&this.config.connect_heartbeat&&this.config.space_id&&this.options.token&&(this.jwt=await zbe(this.config.space_id,this.options.token,this.cookies))),t.space_id&&this.options.token&&(this.jwt=await zbe(t.space_id,this.options.token)),this.config&&this.config.connect_heartbeat){const r=new URL(`${this.config.root}${this.api_prefix}/${VQe}/${this.session_hash}`);this.jwt&&r.searchParams.set("__sign",this.jwt),this.heartbeat_event||(this.heartbeat_event=this.stream(r))}}static async connect(t,r={events:["data"]}){const n=new this(t,r);return r.session_hash&&(n.session_hash=r.session_hash),await n.init(),n}async reconnect(){const t=new URL(`${this.config.root}${this.api_prefix}/${XQe}`);let r;try{const n=await this.fetch(t);if(!n.ok)throw new Error;r=(await n.json()).app_id}catch{return"broken"}return r!==this.config.app_id?"changed":"connected"}close(){this.closed=!0,iZ(this.stream_status,this.abort_controller)}set_current_payload(t){this.current_payload=t}static async duplicate(t,r={events:["data"]}){return Let(t,r)}async _resolve_config(){const{http_protocol:t,host:r,space_id:n}=await nZ(this.app_reference,this.options.token),{status_callback:o}=this.options;n&&o&&await s4e(n,o);let s;try{let a=`${t}//${r}`;if(s=await this.resolve_config(a),!s)throw new Error(Yg);return this.config_success(s)}catch(a){if(n&&o)J_(n,rZ.test(n)?"space_name":"subdomain",this.handle_space_success);else throw o&&o({status:"error",message:"Could not load this space.",load_status:"error",detail:"NOT_FOUND"}),Error(a)}}async config_success(t){if(this.config=t,this.api_prefix=t.api_prefix||"",this.config.auth_required)return this.prepare_return_obj();try{this.api_info=await this.view_api()}catch(r){console.error(KQe+r.message)}return this.prepare_return_obj()}async handle_space_success(t){var n;if(!this)throw new Error(Yg);const{status_callback:r}=this.options;if(r&&r(t),t.status==="running")try{if(this.config=await this._resolve_config(),this.api_prefix=((n=this==null?void 0:this.config)==null?void 0:n.api_prefix)||"",!this.config)throw new Error(Yg);return await this.config_success(this.config)}catch(o){throw r&&r({status:"error",message:"Could not load this space.",load_status:"error",detail:"NOT_FOUND"}),o}}async component_server(t,r,n){var u;if(!this.config)throw new Error(Yg);const o={},{token:s}=this.options,{session_hash:a}=this;s&&(o.Authorization=`Bearer ${this.options.token}`);let f,i=this.config.components.find(c=>c.id===t);(u=i==null?void 0:i.props)!=null&&u.root_url?f=i.props.root_url:f=this.config.root;let l;if("binary"in n){l=new FormData;for(const c in n.data)c!=="binary"&&l.append(c,n.data[c]);l.set("component_id",t.toString()),l.set("fn_name",r),l.set("session_hash",a)}else l=JSON.stringify({data:n,component_id:t,fn_name:r,session_hash:a}),o["Content-Type"]="application/json";s&&(o.Authorization=`Bearer ${s}`);try{const c=await this.fetch(`${f}${this.api_prefix}/${YQe}/`,{method:"POST",body:l,headers:o,credentials:"include"});if(!c.ok)throw new Error("Could not connect to component server: "+c.statusText);return await c.json()}catch(c){console.warn(c)}}set_cookies(t){this.cookies=i4e(t).join("; ")}prepare_return_obj(){return{config:this.config,predict:this.predict,submit:this.submit,view_api:this.view_api,component_server:this.component_server}}}const Yet="AUXteam/tiny_factory";class $et{constructor(){this.client=XV.connect(Yet)}async generatePersonas(t,r,n=1,o=null){return(await(await this.client).predict("/generate_personas",{business_description:t,customer_profile:r,num_personas:n,blablador_api_key:o})).data[0]}async identifyPersonas(t){return(await(await this.client).predict("/identify_personas",{context:t})).data[0]}async findBestPersona(t){return(await(await this.client).predict("/find_best_persona",{criteria:t})).data[0]}async generateSocialNetwork(t,r=10,n="scale_free",o=null){return(await(await this.client).predict("/generate_social_network",{name:t,persona_count:r,network_type:n,focus_group_name:o})).data[0]}async predictEngagement(t,r,n="text"){return(await(await this.client).predict("/predict_engagement",{simulation_id:t,content_text:r,format:n})).data[0]}async startSimulationAsync(t,r,n="text"){return(await(await this.client).predict("/start_simulation_async",{simulation_id:t,content_text:r,format:n})).data[0]}async getSimulationStatus(t){return(await(await this.client).predict("/get_simulation_status",{simulation_id:t})).data[0]}async sendChatMessage(t,r,n="User"){return(await(await this.client).predict("/send_chat_message",{simulation_id:t,sender:n,message:r})).data[0]}async getChatHistory(t){return(await(await this.client).predict("/get_chat_history",{simulation_id:t})).data[0]}async generateVariants(t,r=5){return(await(await this.client).predict("/generate_variants",{content_text:t,num_variants:r})).data[0]}async listSimulations(){return(await(await this.client).predict("/list_simulations",{})).data[0]}async listPersonas(t){return(await(await this.client).predict("/list_personas",{simulation_id:t})).data[0]}async getPersona(t,r){return(await(await this.client).predict("/get_persona",{simulation_id:t,persona_name:r})).data[0]}async deleteSimulation(t){return(await(await this.client).predict("/delete_simulation",{simulation_id:t})).data[0]}async exportSimulation(t){return(await(await this.client).predict("/export_simulation",{simulation_id:t})).data[0]}async getNetworkGraph(t){return(await(await this.client).predict("/get_network_graph",{simulation_id:t})).data[0]}async listFocusGroups(){return(await(await this.client).predict("/list_focus_groups",{})).data[0]}async saveFocusGroup(t,r){return(await(await this.client).predict("/save_focus_group",{name:t,simulation_id:r})).data[0]}}const ac=new $et,YM=({className:e=""})=>{const t=[{cx:"20%",cy:"20%",r:4,fill:"#14b8a6"},{cx:"50%",cy:"10%",r:6,fill:"#a855f7"},{cx:"80%",cy:"30%",r:5,fill:"#f97316"},{cx:"30%",cy:"50%",r:7,fill:"#3b82f6"},{cx:"70%",cy:"60%",r:6,fill:"#ec4899"},{cx:"10%",cy:"70%",r:5,fill:"#ef4444"},{cx:"40%",cy:"80%",r:4,fill:"#14b8a6"},{cx:"90%",cy:"80%",r:5,fill:"#8b5cf6"},{cx:"60%",cy:"40%",r:3,fill:"#eab308"},{cx:"25%",cy:"90%",r:6,fill:"#3b82f6"}];return ct.jsx("div",{className:`absolute inset-0 overflow-hidden pointer-events-none opacity-30 ${e}`,children:ct.jsxs("svg",{className:"w-full h-full",children:[ct.jsx("line",{x1:"20%",y1:"20%",x2:"50%",y2:"10%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"50%",y1:"10%",x2:"80%",y2:"30%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"20%",y1:"20%",x2:"30%",y2:"50%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"30%",y1:"50%",x2:"70%",y2:"60%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"70%",y1:"60%",x2:"80%",y2:"30%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"30%",y1:"50%",x2:"10%",y2:"70%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"40%",y1:"80%",x2:"10%",y2:"70%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"70%",y1:"60%",x2:"90%",y2:"80%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"50%",y1:"10%",x2:"60%",y2:"40%",stroke:"#374151",strokeWidth:"1"}),ct.jsx("line",{x1:"25%",y1:"90%",x2:"40%",y2:"80%",stroke:"#374151",strokeWidth:"1"}),t.map((r,n)=>ct.jsx("circle",{...r,className:"animate-pulse",style:{animationDelay:`${n*.5}s`}},n))]})})},$M=({number:e,title:t,description:r,visual:n})=>ct.jsx("section",{className:"py-24 border-t border-gray-900 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[ct.jsxs("div",{className:"order-2 lg:order-1",children:[ct.jsx("div",{className:"w-12 h-12 rounded-full border border-gray-700 flex items-center justify-center mb-8 text-xl font-mono text-white",children:e}),ct.jsx("h2",{className:"text-4xl md:text-5xl font-semibold mb-6 text-white",children:t}),ct.jsx("div",{className:"text-xl text-gray-400 leading-relaxed max-w-lg",children:r})]}),ct.jsx("div",{className:"order-1 lg:order-2 relative h-[500px] bg-gray-900/20 border border-gray-800 rounded-3xl overflow-hidden flex items-center justify-center",children:ct.jsx("div",{className:"absolute inset-0 w-full h-full flex items-center justify-center p-0",children:n})})]})}),Wet=({onPersonasGenerated:e})=>{const[t,r]=Vt.useState("input"),[n,o]=Vt.useState("AI-focused startup founders in Europe"),[s,a]=Vt.useState(""),[f,i]=Vt.useState(0),l=async()=>{r("creating");try{const u=await ac.identifyPersonas(n);i(Array.isArray(u)?u.length:0),e(u),r("ready")}catch(u){console.error("Failed to identify personas:",u),a(u.message||"Failed to identify personas. Please try again."),r("error")}};return ct.jsx($M,{number:"1",title:"Assemble Any Focus Group",description:ct.jsxs("div",{className:"space-y-6",children:[ct.jsx("p",{children:"Describe your target audience, and our system will identify the most relevant personas from our curated Tresor and example agent database."}),ct.jsxs("div",{className:"space-y-2 pt-2",children:[ct.jsx("p",{className:"text-base font-medium text-gray-300",children:"Personalize your experience with your own LinkedIn network database."}),ct.jsx("p",{className:"text-sm text-gray-500",children:"LinkedIn and X data are going into the persona simulator."})]})]}),visual:ct.jsxs(ct.Fragment,{children:[ct.jsx("div",{className:`transition-opacity duration-1000 ${t==="ready"?"opacity-100":"opacity-30"}`,children:ct.jsx(YM,{className:"opacity-100"})}),ct.jsx("div",{className:`transition-all duration-500 absolute w-full max-w-sm z-20 ${t==="input"?"opacity-100 scale-100":"opacity-0 scale-95 pointer-events-none"}`,children:ct.jsxs("div",{className:"bg-black border border-gray-800 rounded-xl p-6 shadow-2xl",children:[ct.jsxs("div",{className:"flex justify-between items-center mb-6",children:[ct.jsx("span",{className:"text-gray-400 text-sm",children:"Target Audience"}),ct.jsx("button",{className:"text-gray-500 hover:text-white",children:ct.jsx(ey,{size:16})})]}),ct.jsx("h4",{className:"text-xl mb-4 text-center",children:"Who would you like to simulate?"}),ct.jsxs("div",{className:"relative mb-6",children:[ct.jsx("input",{type:"text",value:n,onChange:u=>o(u.target.value),className:"w-full bg-gray-900 border border-gray-700 rounded-lg py-3 px-4 text-white focus:outline-none focus:border-teal-500"}),ct.jsx("span",{className:"absolute right-3 top-3.5 w-0.5 h-5 bg-teal-500 animate-blink"})]}),ct.jsxs(sh,{className:"w-full py-3",onClick:l,children:["Assemble Focus Group from Tresor ",ct.jsx(vm,{size:16,className:"ml-2"})]})]})}),ct.jsx("div",{className:`transition-all duration-500 absolute w-full max-w-sm z-20 ${t==="error"?"opacity-100 scale-100":"opacity-0 scale-95 pointer-events-none"}`,children:ct.jsxs("div",{className:"bg-black border border-red-900/50 rounded-xl p-6 shadow-2xl",children:[ct.jsxs("div",{className:"flex items-center gap-2 text-red-400 mb-4",children:[ct.jsx(YY,{size:20}),ct.jsx("span",{className:"font-semibold",children:"Error"})]}),ct.jsx("p",{className:"text-gray-300 text-sm mb-6",children:s}),ct.jsx(sh,{variant:"outline",className:"w-full border-gray-700",onClick:()=>r("input"),children:"Try Again"})]})}),ct.jsx("div",{className:`transition-all duration-500 absolute z-20 ${t==="creating"?"opacity-100 scale-100":"opacity-0 scale-95 pointer-events-none"}`,children:ct.jsxs("div",{className:"bg-black/80 backdrop-blur-md border border-gray-700 rounded-full px-8 py-4 flex items-center gap-3 shadow-2xl",children:[ct.jsx(vm,{className:"text-teal-400 animate-pulse"}),ct.jsx("span",{className:"text-lg font-medium",children:"Identifying relevant personas..."})]})}),ct.jsxs("div",{className:`transition-all duration-1000 absolute inset-0 flex items-end justify-center pb-8 ${t==="ready"?"opacity-100":"opacity-0 pointer-events-none"}`,children:[ct.jsxs("div",{className:"bg-black/80 backdrop-blur border border-gray-800 rounded-full pl-3 pr-6 py-2 flex items-center gap-3 shadow-2xl pointer-events-auto",children:[ct.jsx("div",{className:"bg-green-500/20 rounded-full p-1",children:ct.jsx(L6e,{className:"w-4 h-4 text-green-500"})}),ct.jsxs("span",{className:"text-sm font-medium text-white whitespace-nowrap",children:["Found ",f," relevant personas. Your Focus Group is Ready"]})]}),ct.jsx("div",{className:"absolute bottom-2 text-center pointer-events-auto",children:ct.jsx("button",{onClick:()=>r("input"),className:"text-xs text-gray-500 hover:text-white transition-colors",children:"Start Over"})})]})]})})},Xet=({simulationId:e,onSimulationComplete:t})=>{const[r,n]=Vt.useState(!1),[o,s]=Vt.useState("We just secured $5.3M to build AI-native tools..."),a=async()=>{if(!e){alert("Please generate a focus group first (Step 1).");return}n(!0);try{await ac.startSimulationAsync(e,o);let f=!1,i=null;for(;!f;){await new Promise(u=>setTimeout(u,2e3));const l=await ac.getSimulationStatus(e);(l.status==="completed"||l.status==="error")&&(f=!0,i=l)}t(i)}catch(f){console.error("Simulation failed:",f)}finally{n(!1)}};return ct.jsx($M,{number:"2",title:"Run Rapid Experiments",description:"Execute simulations in minutes to find the optimal form of your content or idea.",visual:ct.jsxs(ct.Fragment,{children:[ct.jsx(YM,{}),ct.jsxs("div",{className:"w-full max-w-sm relative z-10",children:[ct.jsxs("div",{className:`bg-black border border-gray-800 rounded-xl p-6 shadow-2xl transition-all duration-500 ${r?"opacity-40 blur-sm scale-95":"opacity-100 scale-100"}`,children:[ct.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[ct.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-700"}),ct.jsxs("div",{children:[ct.jsx("div",{className:"w-24 h-3 bg-gray-700 rounded mb-1"}),ct.jsx("div",{className:"w-16 h-2 bg-gray-800 rounded"})]})]}),ct.jsxs("div",{className:"space-y-2 mb-6",children:[ct.jsx("div",{className:"w-full h-2 bg-gray-800 rounded"}),ct.jsx("div",{className:"w-full h-2 bg-gray-800 rounded"}),ct.jsx("div",{className:"w-3/4 h-2 bg-gray-800 rounded"})]}),ct.jsx("div",{className:"bg-gray-900 rounded-lg p-4 mb-4 border border-gray-800",children:ct.jsx("textarea",{value:o,onChange:f=>s(f.target.value),className:"w-full bg-transparent text-gray-300 text-sm focus:outline-none resize-none h-16"})}),ct.jsxs(sh,{className:"w-full flex items-center justify-center gap-2",onClick:a,children:["Simulate Post ",ct.jsx(w3e,{size:16})]})]}),ct.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-all duration-300 ${r?"opacity-100 scale-100":"opacity-0 scale-90 pointer-events-none"}`,children:ct.jsxs("div",{className:"bg-black/90 backdrop-blur border border-gray-700 rounded-2xl p-6 shadow-2xl flex flex-col items-center gap-4 min-w-[200px]",children:[ct.jsxs("div",{className:"relative",children:[ct.jsx("div",{className:"w-12 h-12 rounded-full border-2 border-gray-800 border-t-teal-500 animate-spin"}),ct.jsx(vm,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-teal-500 w-5 h-5"})]}),ct.jsx("span",{className:"text-white font-medium",children:"Simulating reactions..."})]})})]})]})})},Zet=({insights:e})=>ct.jsx($M,{number:"3",title:"Get Instant Insights",description:"Evaluate the performance of your experiment with scores, comments, and summaries.",visual:ct.jsxs(ct.Fragment,{children:[ct.jsx(YM,{}),ct.jsxs("div",{className:"w-full max-w-sm space-y-4 relative z-10",children:[ct.jsxs("div",{className:"bg-black border border-gray-800 rounded-xl p-6 shadow-2xl hover:border-gray-600 transition-colors cursor-default group",children:[ct.jsxs("div",{className:"flex justify-between items-start mb-6",children:[ct.jsxs("div",{children:[ct.jsx("span",{className:"text-xs text-gray-400 uppercase tracking-wider",children:"Impact Score"}),ct.jsxs("div",{className:"text-3xl font-bold text-white mt-1",children:[(e==null?void 0:e.score)||88,ct.jsx("span",{className:"text-base font-normal text-gray-500",children:"/100"})]})]}),ct.jsx("div",{className:"bg-green-500/10 text-green-400 text-xs px-2 py-1 rounded border border-green-500/20",children:(e==null?void 0:e.verdict)||"Exceptional"})]}),ct.jsxs("div",{className:"space-y-4",children:[ct.jsxs("div",{children:[ct.jsxs("div",{className:"flex justify-between text-xs text-gray-400 mb-1",children:[ct.jsx("span",{children:"Attention"}),ct.jsxs("span",{children:[(e==null?void 0:e.attention)||80,"%"]})]}),ct.jsx("div",{className:"h-1.5 bg-gray-800 rounded-full overflow-hidden",children:ct.jsx("div",{className:"h-full bg-green-500 rounded-full group-hover:bg-green-400 transition-colors",style:{width:`${(e==null?void 0:e.attention)||80}%`}})})]}),ct.jsxs("div",{children:[ct.jsxs("div",{className:"flex justify-between text-xs text-gray-400 mb-1",children:[ct.jsx("span",{children:"Relevance"}),ct.jsxs("span",{children:[(e==null?void 0:e.relevance)||92,"%"]})]}),ct.jsx("div",{className:"h-1.5 bg-gray-800 rounded-full overflow-hidden",children:ct.jsx("div",{className:"h-full bg-teal-500 rounded-full group-hover:bg-teal-400 transition-colors",style:{width:`${(e==null?void 0:e.relevance)||92}%`}})})]})]})]}),ct.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 backdrop-blur-sm animate-fade-in-up",style:{animationDelay:"0.2s"},children:[ct.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[ct.jsx(b3e,{size:14,className:"text-purple-400"}),ct.jsx("span",{className:"text-xs font-medium text-purple-200",children:"Key Insight"})]}),ct.jsxs("p",{className:"text-sm text-gray-300 leading-relaxed italic",children:['"',(e==null?void 0:e.insight)||"Founders in the EU region responded strongly to the 'no-code' angle, seeing it as a major time-saver.",'"']})]})]})]})}),Ket=({originalContent:e,simulationId:t})=>{var i,l,u;const[r,n]=Vt.useState(0),[o,s]=Vt.useState([{label:"Original",score:48,text:e||"We just secured $5.3M to build AI-native tools..."}]),[a,f]=Vt.useState(!1);return Vt.useEffect(()=>{(async()=>{if(e){f(!0);try{const h=await ac.generateVariants(e,2),d=await Promise.all(h.map(async(p,m)=>{let y=Math.floor(Math.random()*40)+55;if(t)try{const b=await ac.predictEngagement(t,p.text);b&&b.engagement_probability!==void 0&&(y=Math.round(b.engagement_probability*100))}catch(b){console.error("Engagement prediction failed for variant:",b)}return{label:`Variant ${m+1}`,score:y,text:p.text}})),v=[{label:"Original",score:48,text:e},...d];s(v)}catch(h){console.error("Failed to generate variants:",h)}finally{f(!1)}}})()},[e]),ct.jsx($M,{number:"4",title:"Forecast Every Outcome",description:"SyncUsers uses your style to generate and test variations of your original post every time you run a simulation.",visual:ct.jsxs("div",{className:"relative w-full max-w-lg flex items-center justify-center",children:[ct.jsx(YM,{}),ct.jsxs("div",{className:"w-full max-w-xs bg-black border border-gray-800 rounded-xl p-6 shadow-2xl relative z-10 transition-all duration-300",children:[a?ct.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[150px] gap-3",children:[ct.jsx(vm,{className:"text-teal-400 animate-pulse"}),ct.jsx("span",{className:"text-xs text-gray-500",children:"Generating variants..."})]}):ct.jsxs(ct.Fragment,{children:[ct.jsxs("div",{className:"flex justify-between items-center mb-4",children:[ct.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wide",children:(i=o[r])==null?void 0:i.label}),ct.jsxs("div",{className:`px-2 py-0.5 rounded text-xs font-bold ${r===0?"bg-gray-800 text-gray-400":"bg-green-900 text-green-400"}`,children:["Score: ",(l=o[r])==null?void 0:l.score]})]}),ct.jsx("div",{className:"min-h-[100px]",children:ct.jsx("p",{className:"text-sm text-gray-200 leading-relaxed animate-fade-in",children:(u=o[r])==null?void 0:u.text})})]}),ct.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-800 flex gap-4",children:[ct.jsx("div",{className:"h-2 w-8 bg-gray-800 rounded-full"}),ct.jsx("div",{className:"h-2 w-16 bg-gray-800 rounded-full"})]})]}),ct.jsxs("div",{className:"absolute -right-4 top-1/2 -translate-y-1/2 translate-x-1/2 w-48 bg-gray-900/90 backdrop-blur border border-gray-700 rounded-xl p-2 shadow-2xl z-20",children:[ct.jsx("div",{className:"text-[10px] text-gray-500 uppercase px-2 mb-2 font-bold tracking-wider",children:"Select Variant"}),ct.jsx("div",{className:"space-y-1",children:o.map((c,h)=>ct.jsxs("div",{onMouseEnter:()=>n(h),className:`p-2 rounded cursor-pointer transition-all flex justify-between items-center group ${r===h?"bg-white text-black":"hover:bg-white/10 text-gray-400"}`,children:[ct.jsx("span",{className:"text-xs font-medium",children:c.label}),ct.jsx("span",{className:`text-xs font-bold ${r===h?"text-black":"text-gray-500 group-hover:text-white"}`,children:c.score})]},h))})]}),ct.jsx("div",{className:"absolute right-[50%] top-1/2 w-[30%] h-[1px] bg-gradient-to-r from-transparent to-gray-700 -z-10"})]})})},Jet=()=>{const[e,t]=Vt.useState([]),[r,n]=Vt.useState(null),[o,s]=Vt.useState(null),[a,f]=Vt.useState(""),i=async u=>{t(u);try{const c=await ac.generateSocialNetwork("Demo Simulation",u.length,"scale_free");n(c.id||"demo-sim-id")}catch(c){console.error("Failed to create simulation:",c),n("demo-sim-id")}},l=u=>{s(u),u.content&&f(u.content)};return ct.jsxs("div",{className:"flex flex-col",children:[ct.jsx(Wet,{onPersonasGenerated:i}),ct.jsx(Xet,{simulationId:r,onSimulationComplete:l}),ct.jsx(Zet,{insights:o}),ct.jsx(Ket,{originalContent:a,simulationId:r})]})},Qet=()=>ct.jsx("section",{id:"use-cases",className:"py-24 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[ct.jsx("div",{className:"flex justify-center mb-8",children:ct.jsx("span",{className:"px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300",children:"Use Cases"})}),ct.jsx("h2",{className:"text-3xl md:text-5xl font-semibold text-center mb-20",children:"Optimize any kind of message"}),ct.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:KIe.map((e,t)=>ct.jsxs("div",{className:"group p-8 border border-gray-800 rounded-2xl bg-gradient-to-br from-gray-900/50 to-black hover:border-gray-600 transition-all duration-300 hover:shadow-lg hover:shadow-gray-900/20",children:[ct.jsx("div",{className:"mb-6",children:ct.jsxs("span",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-gray-800 text-xs font-medium text-gray-300 border border-gray-700",children:[ct.jsx("span",{className:`w-2 h-2 rounded-full ${e.color}`}),e.category]})}),ct.jsx("h3",{className:"text-2xl font-semibold mb-3 group-hover:text-white transition-colors",children:e.title}),ct.jsx("p",{className:"text-gray-400 leading-relaxed text-sm",children:e.description})]},t))})]})}),ett=()=>{const e=[{icon:ct.jsx(XG,{}),label:"Persona Creation"},{icon:ct.jsx(RIe,{}),label:"Focus Group Construction"},{icon:ct.jsx($6e,{}),label:"AI-driven Simulations"},{icon:ct.jsx(p3e,{}),label:"Result Generation"},{icon:ct.jsx(EIe,{}),label:"Automatic A/B Testing"}];return ct.jsx("section",{id:"how-it-works",className:"py-24 bg-black border-t border-gray-900",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 text-center",children:[ct.jsx("div",{className:"inline-block px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300 mb-8",children:"How It Works"}),ct.jsx("h2",{className:"text-3xl md:text-5xl font-semibold mb-20",children:"From raw data to real understanding"}),ct.jsx("div",{className:"flex flex-wrap justify-center gap-4 md:gap-8 mb-20",children:e.map((t,r)=>ct.jsx("div",{className:"flex flex-col items-center gap-3 group cursor-default",children:ct.jsxs("div",{className:"w-16 h-12 md:w-auto md:h-auto px-6 py-3 rounded-full border border-gray-700 bg-gray-900/50 flex items-center gap-2 text-gray-400 group-hover:text-white group-hover:border-gray-500 transition-all",children:[t.icon,ct.jsx("span",{className:"text-sm font-medium hidden md:inline",children:t.label})]})},r))}),ct.jsxs("div",{className:"relative h-[400px] w-full max-w-4xl mx-auto border border-gray-800 rounded-3xl bg-black overflow-hidden flex items-center justify-center",children:[ct.jsx("div",{className:"absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/stardust.png')] opacity-20"}),ct.jsxs("div",{className:"relative w-96 h-96",children:[ct.jsx("div",{className:"absolute inset-0 border border-blue-900/30 rounded-full animate-ping duration-[3000ms]"}),ct.jsx("div",{className:"absolute inset-10 border border-blue-800/30 rounded-full"}),ct.jsx("div",{className:"absolute inset-20 border border-blue-700/30 rounded-full"}),ct.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none",children:[ct.jsx("line",{x1:"50%",y1:"50%",x2:"50%",y2:"5%",stroke:"#3b82f6",strokeWidth:"2",strokeOpacity:"0.5"}),ct.jsx("line",{x1:"50%",y1:"50%",x2:"85%",y2:"85%",stroke:"#3b82f6",strokeWidth:"2",strokeOpacity:"0.5"}),ct.jsx("line",{x1:"50%",y1:"50%",x2:"15%",y2:"85%",stroke:"#3b82f6",strokeWidth:"2",strokeOpacity:"0.5"})]}),ct.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-16 h-16 bg-gray-900 rounded-full border-2 border-blue-500 flex items-center justify-center shadow-[0_0_30px_rgba(59,130,246,0.5)] z-10",children:ct.jsx(XG,{className:"text-white w-6 h-6"})}),ct.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-10 h-10 bg-gray-900 border border-gray-600 rounded-full flex items-center justify-center z-10",children:ct.jsx("span",{className:"text-xs font-bold",children:"in"})}),ct.jsx("div",{className:"absolute bottom-10 right-10 w-10 h-10 bg-gray-900 border border-gray-600 rounded-full flex items-center justify-center z-10",children:ct.jsx("span",{className:"text-xs font-bold",children:"X"})}),ct.jsx("div",{className:"absolute bottom-10 left-10 w-10 h-10 bg-gray-900 border border-gray-600 rounded-full flex items-center justify-center z-10",children:ct.jsx(ttt,{})})]})]})]})})},ttt=()=>ct.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[ct.jsx("circle",{cx:"12",cy:"12",r:"10"}),ct.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),ct.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]});function l4e(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{var{children:r,width:n,height:o,viewBox:s,className:a,style:f,title:i,desc:l}=e,u=ott(e,itt),c=s||{width:n,height:o,x:0,y:0},h=ml("recharts-surface",a);return Vt.createElement("svg",ZV({},Cv(u),{className:h,width:n,height:o,style:f,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height),ref:t}),Vt.createElement("title",null,i),Vt.createElement("desc",null,l),r)}),ltt=["children","className"];function KV(){return KV=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,className:n}=e,o=utt(e,ltt),s=ml("recharts-layer",n);return Vt.createElement("g",KV({className:s},Cv(o),{ref:t}),r)}),h4e=d3e(),ctt=Vt.createContext(null);function sl(e){return function(){return e}}const d4e=Math.cos,BA=Math.sin,bp=Math.sqrt,qA=Math.PI,WM=2*qA,JV=Math.PI,QV=2*JV,tm=1e-6,htt=QV-tm;function v4e(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return v4e;const r=10**t;return function(n){this._+=n[0];for(let o=1,s=n.length;otm)if(!(Math.abs(c*i-l*u)>tm)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-a,v=o-f,p=i*i+l*l,m=d*d+v*v,y=Math.sqrt(p),b=Math.sqrt(h),g=s*Math.tan((JV-Math.acos((p+h-m)/(2*y*b)))/2),T=g/b,S=g/y;Math.abs(T-1)>tm&&this._append`L${t+T*u},${r+T*c}`,this._append`A${s},${s},0,0,${+(c*d>u*v)},${this._x1=t+S*i},${this._y1=r+S*l}`}}arc(t,r,n,o,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let f=n*Math.cos(o),i=n*Math.sin(o),l=t+f,u=r+i,c=1^a,h=a?o-s:s-o;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>tm||Math.abs(this._y1-u)>tm)&&this._append`L${l},${u}`,n&&(h<0&&(h=h%QV+QV),h>htt?this._append`A${n},${n},0,1,${c},${t-f},${r-i}A${n},${n},0,1,${c},${this._x1=l},${this._y1=u}`:h>tm&&this._append`A${n},${n},0,${+(h>=JV)},${c},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function lZ(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new vtt(t)}function uZ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function p4e(e){this._context=e}p4e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function XM(e){return new p4e(e)}function g4e(e){return e[0]}function y4e(e){return e[1]}function m4e(e,t){var r=sl(!0),n=null,o=XM,s=null,a=lZ(f);e=typeof e=="function"?e:e===void 0?g4e:sl(e),t=typeof t=="function"?t:t===void 0?y4e:sl(t);function f(i){var l,u=(i=uZ(i)).length,c,h=!1,d;for(n==null&&(s=o(d=a())),l=0;l<=u;++l)!(l=d;--v)f.point(g[v],T[v]);f.lineEnd(),f.areaEnd()}y&&(g[h]=+e(m,h,c),T[h]=+t(m,h,c),f.point(n?+n(m,h,c):g[h],r?+r(m,h,c):T[h]))}if(b)return f=null,b+""||null}function u(){return m4e().defined(o).curve(a).context(s)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:sl(+c),n=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:sl(+c),l):e},l.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:sl(+c),l):n},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:sl(+c),r=null,l):t},l.y0=function(c){return arguments.length?(t=typeof c=="function"?c:sl(+c),l):t},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:sl(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(n).y(t)},l.defined=function(c){return arguments.length?(o=typeof c=="function"?c:sl(!!c),l):o},l.curve=function(c){return arguments.length?(a=c,s!=null&&(f=a(s)),l):a},l.context=function(c){return arguments.length?(c==null?s=f=null:f=a(s=c),l):s},l}class x4e{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ptt(e){return new x4e(e,!0)}function gtt(e){return new x4e(e,!1)}const fZ={draw(e,t){const r=bp(t/qA);e.moveTo(r,0),e.arc(0,0,r,0,WM)}},ytt={draw(e,t){const r=bp(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},b4e=bp(1/3),mtt=b4e*2,xtt={draw(e,t){const r=bp(t/mtt),n=r*b4e;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},btt={draw(e,t){const r=bp(t),n=-r/2;e.rect(n,n,r,r)}},_tt=.8908130915292852,_4e=BA(qA/10)/BA(7*qA/10),wtt=BA(WM/10)*_4e,Ttt=-d4e(WM/10)*_4e,Att={draw(e,t){const r=bp(t*_tt),n=wtt*r,o=Ttt*r;e.moveTo(0,-r),e.lineTo(n,o);for(let s=1;s<5;++s){const a=WM*s/5,f=d4e(a),i=BA(a);e.lineTo(i*r,-f*r),e.lineTo(f*n-i*o,i*n+f*o)}e.closePath()}},pH=bp(3),Stt={draw(e,t){const r=-bp(t/(pH*3));e.moveTo(0,r*2),e.lineTo(-pH*r,-r),e.lineTo(pH*r,-r),e.closePath()}},mv=-.5,xv=bp(3)/2,eY=1/bp(12),Mtt=(eY/2+1)*3,Ett={draw(e,t){const r=bp(t/Mtt),n=r/2,o=r*eY,s=n,a=r*eY+r,f=-s,i=a;e.moveTo(n,o),e.lineTo(s,a),e.lineTo(f,i),e.lineTo(mv*n-xv*o,xv*n+mv*o),e.lineTo(mv*s-xv*a,xv*s+mv*a),e.lineTo(mv*f-xv*i,xv*f+mv*i),e.lineTo(mv*n+xv*o,mv*o-xv*n),e.lineTo(mv*s+xv*a,mv*a-xv*s),e.lineTo(mv*f+xv*i,mv*i-xv*f),e.closePath()}};function ktt(e,t){let r=null,n=lZ(o);e=typeof e=="function"?e:sl(e||fZ),t=typeof t=="function"?t:sl(t===void 0?64:+t);function o(){let s;if(r||(r=s=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),s)return r=null,s+""||null}return o.type=function(s){return arguments.length?(e=typeof s=="function"?s:sl(s),o):e},o.size=function(s){return arguments.length?(t=typeof s=="function"?s:sl(+s),o):t},o.context=function(s){return arguments.length?(r=s??null,o):r},o}function jA(){}function UA(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function w4e(e){this._context=e}w4e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:UA(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:UA(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ctt(e){return new w4e(e)}function T4e(e){this._context=e}T4e.prototype={areaStart:jA,areaEnd:jA,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:UA(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rtt(e){return new T4e(e)}function A4e(e){this._context=e}A4e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:UA(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ltt(e){return new A4e(e)}function S4e(e){this._context=e}S4e.prototype={areaStart:jA,areaEnd:jA,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ptt(e){return new S4e(e)}function Gbe(e){return e<0?-1:1}function Vbe(e,t,r){var n=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(n||o<0&&-0),a=(r-e._y1)/(o||n<0&&-0),f=(s*o+a*n)/(n+o);return(Gbe(s)+Gbe(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(f))||0}function Ybe(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gH(e,t,r){var n=e._x0,o=e._y0,s=e._x1,a=e._y1,f=(s-n)/3;e._context.bezierCurveTo(n+f,o+f*t,s-f,a-f*r,s,a)}function HA(e){this._context=e}HA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gH(this,this._t0,Ybe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,gH(this,Ybe(this,r=Vbe(this,e,t)),r);break;default:gH(this,this._t0,r=Vbe(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function M4e(e){this._context=new E4e(e)}(M4e.prototype=Object.create(HA.prototype)).point=function(e,t){HA.prototype.point.call(this,t,e)};function E4e(e){this._context=e}E4e.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,o,s){this._context.bezierCurveTo(t,e,n,r,s,o)}};function Dtt(e){return new HA(e)}function Itt(e){return new M4e(e)}function k4e(e){this._context=e}k4e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=$be(e),o=$be(t),s=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ztt(e){return new ZM(e,.5)}function Ftt(e){return new ZM(e,0)}function Ntt(e){return new ZM(e,1)}function Tm(e,t){if((a=e.length)>1)for(var r=1,n,o,s=e[t[0]],a,f=s.length;r=0;)r[t]=t;return r}function Btt(e,t){return e[t]}function qtt(e){const t=[];return t.key=e,t}function jtt(){var e=sl([]),t=tY,r=Tm,n=Btt;function o(s){var a=Array.from(e.apply(this,arguments),qtt),f,i=a.length,l=-1,u;for(const c of s)for(f=0,++l;f0){for(var r,n,o=0,s=e[0].length,a;o0){for(var r=0,n=e[t[0]],o,s=n.length;r0)||!((s=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,s,a;n1&&arguments[1]!==void 0?arguments[1]:Xtt,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function uu(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var f=r[a-1];return typeof f=="string"?o+f+s:f!==void 0?o+Qg(f)+s:o+s},"")}var Hd=e=>e===0?0:e>0?1:-1,c0=e=>typeof e=="number"&&e!=+e,Am=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ti=e=>(typeof e=="number"||e instanceof Number)&&!c0(e),h0=e=>Ti(e)||typeof e=="string",Ztt=0,g2=e=>{var t=++Ztt;return"".concat(e||"").concat(t)},vp=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ti(t)&&typeof t!="string")return n;var s;if(Am(t)){if(r==null)return n;var a=t.indexOf("%");s=r*parseFloat(t.slice(0,a))/100}else s=+t;return c0(s)&&(s=n),o&&r!=null&&s>r&&(s=r),s},R4e=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Rx(n,t))===r)}var uc=e=>e===null||typeof e>"u",iw=e=>uc(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function a0(e){return e!=null}function db(){}var Jtt=["type","size","sizeType"];function rY(){return rY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(iw(e));return L4e[t]||fZ},ort=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*art;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},srt=(e,t)=>{L4e["symbol".concat(iw(e))]=t},P4e=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,o=rrt(e,Jtt),s=r_e(r_e({},o),{},{type:t,size:r,sizeType:n}),a="circle";typeof t=="string"&&(a=t);var f=()=>{var h=irt(a),d=ktt().type(h).size(ort(r,n,a)),v=d();if(v!==null)return v},{className:i,cx:l,cy:u}=s,c=Cv(s);return Ti(l)&&Ti(u)&&Ti(r)?Vt.createElement("path",rY({},c,{className:ml("recharts-symbols",i),transform:"translate(".concat(l,", ").concat(u,")"),d:f()})):null};P4e.registerSymbol=srt;var D4e=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,lrt=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(Vt.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(o=>{oZ(o)&&(n[o]=(s=>r[o](r,s)))}),n},urt=(e,t,r)=>n=>(e(t,r,n),null),vZ=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(o=>{var s=e[o];oZ(o)&&typeof s=="function"&&(n||(n={}),n[o]=urt(s,t,r))}),n};function n_e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function frt(e){for(var t=1;t(a[f]===void 0&&n[f]!==void 0&&(a[f]=n[f]),a),r);return s}var AH={},SH={},a_e;function vrt(){return a_e||(a_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const o=new Map;for(let s=0;s=0}e.isLength=t})(RH)),RH}var l_e;function pZ(){return l_e||(l_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=grt();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(CH)),CH}var LH={},u_e;function yrt(){return u_e||(u_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(LH)),LH}var f_e;function mrt(){return f_e||(f_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pZ(),r=yrt();function n(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=n})(kH)),kH}var PH={},DH={},c_e;function xrt(){return c_e||(c_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dZ();function r(n){return function(o){return t.get(o,n)}}e.property=r})(DH)),DH}var IH={},OH={},zH={},FH={},h_e;function O4e(){return h_e||(h_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(FH)),FH}var NH={},d_e;function z4e(){return d_e||(d_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(NH)),NH}var BH={},v_e;function F4e(){return v_e||(v_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(BH)),BH}var p_e;function brt(){return p_e||(p_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=O4e(),r=z4e(),n=F4e();function o(u,c,h){return typeof h!="function"?o(u,c,()=>{}):s(u,c,function d(v,p,m,y,b,g){const T=h(v,p,m,y,b,g);return T!==void 0?!!T:s(v,p,d,g)},new Map)}function s(u,c,h,d){if(c===u)return!0;switch(typeof c){case"object":return a(u,c,h,d);case"function":return Object.keys(c).length>0?s(u,{...c},h,d):n.isEqualsSameValueZero(u,c);default:return t.isObject(u)?typeof c=="string"?c==="":!0:n.isEqualsSameValueZero(u,c)}}function a(u,c,h,d){if(c==null)return!0;if(Array.isArray(c))return i(u,c,h,d);if(c instanceof Map)return f(u,c,h,d);if(c instanceof Set)return l(u,c,h,d);const v=Object.keys(c);if(u==null||r.isPrimitive(u))return v.length===0;if(v.length===0)return!0;if(d!=null&&d.has(c))return d.get(c)===u;d==null||d.set(c,u);try{for(let p=0;p{})}e.isMatch=r})(OH)),OH}var qH={},jH={},UH={},y_e;function _rt(){return y_e||(y_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(UH)),UH}var HH={},m_e;function gZ(){return m_e||(m_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(HH)),HH}var GH={},x_e;function B4e(){return x_e||(x_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",o="[object Boolean]",s="[object Arguments]",a="[object Symbol]",f="[object Date]",i="[object Map]",l="[object Set]",u="[object Array]",c="[object Function]",h="[object ArrayBuffer]",d="[object Object]",v="[object Error]",p="[object DataView]",m="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",g="[object Uint32Array]",T="[object BigUint64Array]",S="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",w="[object BigInt64Array]",C="[object Float32Array]",x="[object Float64Array]";e.argumentsTag=s,e.arrayBufferTag=h,e.arrayTag=u,e.bigInt64ArrayTag=w,e.bigUint64ArrayTag=T,e.booleanTag=o,e.dataViewTag=p,e.dateTag=f,e.errorTag=v,e.float32ArrayTag=C,e.float64ArrayTag=x,e.functionTag=c,e.int16ArrayTag=A,e.int32ArrayTag=M,e.int8ArrayTag=S,e.mapTag=i,e.numberTag=n,e.objectTag=d,e.regexpTag=t,e.setTag=l,e.stringTag=r,e.symbolTag=a,e.uint16ArrayTag=b,e.uint32ArrayTag=g,e.uint8ArrayTag=m,e.uint8ClampedArrayTag=y})(GH)),GH}var VH={},b_e;function wrt(){return b_e||(b_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(VH)),VH}var __e;function q4e(){return __e||(__e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_rt(),r=gZ(),n=B4e(),o=z4e(),s=wrt();function a(u,c){return f(u,void 0,u,new Map,c)}function f(u,c,h,d=new Map,v=void 0){const p=v==null?void 0:v(u,c,h,d);if(p!==void 0)return p;if(o.isPrimitive(u))return u;if(d.has(u))return d.get(u);if(Array.isArray(u)){const m=new Array(u.length);d.set(u,m);for(let y=0;yt.isMatch(s,o)}e.matches=n})(IH)),IH}var YH={},$H={},WH={},A_e;function Srt(){return A_e||(A_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=q4e(),r=gZ(),n=B4e();function o(s,a){return t.cloneDeepWith(s,(f,i,l,u)=>{const c=a==null?void 0:a(f,i,l,u);if(c!==void 0)return c;if(typeof s=="object"){if(r.getTag(s)===n.objectTag&&typeof s.constructor!="function"){const h={};return u.set(s,h),t.copyProperties(h,s,l,u),h}switch(Object.prototype.toString.call(s)){case n.numberTag:case n.stringTag:case n.booleanTag:{const h=new s.constructor(s==null?void 0:s.valueOf());return t.copyProperties(h,s),h}case n.argumentsTag:{const h={};return t.copyProperties(h,s),h.length=s.length,h[Symbol.iterator]=s[Symbol.iterator],h}default:return}}})}e.cloneDeepWith=o})(WH)),WH}var S_e;function Mrt(){return S_e||(S_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Srt();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})($H)),$H}var XH={},ZH={},M_e;function j4e(){return M_e||(M_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,o=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:f;return rG.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rG}var O_e;function zrt(){return O_e||(O_e=1,tG.exports=Ort()),tG.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var z_e;function Frt(){if(z_e)return eG;z_e=1;var e=zx(),t=zrt();function r(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,f=e.useMemo,i=e.useDebugValue;return eG.useSyncExternalStoreWithSelector=function(l,u,c,h,d){var v=s(null);if(v.current===null){var p={hasValue:!1,value:null};v.current=p}else p=v.current;v=f(function(){function y(A){if(!b){if(b=!0,g=A,A=h(A),d!==void 0&&p.hasValue){var M=p.value;if(d(M,A))return T=M}return T=A}if(M=T,n(g,A))return M;var w=h(A);return d!==void 0&&d(M,w)?(g=A,M):(g=A,T=w)}var b=!1,g,T,S=c===void 0?null:c;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,c,h,d]);var m=o(l,v[0],v[1]);return a(function(){p.hasValue=!0,p.value=m},[m]),i(m),m},eG}var F_e;function Nrt(){return F_e||(F_e=1,QH.exports=Frt()),QH.exports}var Brt=Nrt(),yZ=Vt.createContext(null),qrt=e=>e,Ru=()=>{var e=Vt.useContext(yZ);return e?e.store.dispatch:qrt},P3=()=>{},jrt=()=>P3,Urt=(e,t)=>e===t;function Li(e){var t=Vt.useContext(yZ),r=Vt.useMemo(()=>t?n=>{if(n!=null)return e(n)}:P3,[t,e]);return Brt.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:jrt,t?t.store.getState:P3,t?t.store.getState:P3,r,Urt)}function Hrt(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Grt(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Vrt(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var N_e=e=>Array.isArray(e)?e:[e];function Yrt(e){const t=Array.isArray(e[0])?e[0]:e;return Vrt(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $rt(e,t){const r=[],{length:n}=e;for(let o=0;o{r=o3(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Krt(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let s=0,a=0,f,i={},l=o.pop();typeof l=="object"&&(i=l,l=o.pop()),Hrt(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...r,...i},{memoize:c,memoizeOptions:h=[],argsMemoize:d=U4e,argsMemoizeOptions:v=[]}=u,p=N_e(h),m=N_e(v),y=Yrt(o),b=c(function(){return s++,l.apply(null,arguments)},...p),g=d(function(){a++;const S=$rt(y,arguments);return f=b.apply(null,S),f},...m);return Object.assign(g,{resultFunc:l,memoizedResultFunc:b,dependencies:y,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>f,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:c,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Tn=Krt(U4e),Jrt=Object.assign((e,t=Tn)=>{Grt(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(s=>e[s]);return t(n,(...s)=>s.reduce((a,f,i)=>(a[r[i]]=f,a),{}))},{withTypes:()=>Jrt}),nG={},aG={},iG={},q_e;function Qrt(){return q_e||(q_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,o,s)=>{if(n!==o){const a=t(n),f=t(o);if(a===f&&a===0){if(no)return s==="desc"?-1:1}return s==="desc"?f-a:a-f}return 0};e.compareValues=r})(iG)),iG}var oG={},sG={},j_e;function H4e(){return j_e||(j_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(sG)),sG}var U_e;function ent(){return U_e||(U_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H4e(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(s,a){return Array.isArray(s)?!1:typeof s=="number"||typeof s=="boolean"||s==null||t.isSymbol(s)?!0:typeof s=="string"&&(n.test(s)||!r.test(s))||a!=null&&Object.hasOwn(a,s)}e.isKey=o})(oG)),oG}var H_e;function tnt(){return H_e||(H_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qrt(),r=ent(),n=hZ();function o(s,a,f,i){if(s==null)return[];f=i?void 0:f,Array.isArray(s)||(s=Object.values(s)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(f)||(f=f==null?[]:[f]),f=f.map(d=>String(d));const l=(d,v)=>{let p=d;for(let m=0;mv==null||d==null?v:typeof d=="object"&&"key"in d?Object.hasOwn(v,d.key)?v[d.key]:l(v,d.path):typeof d=="function"?d(v):Array.isArray(d)?l(v,d):typeof v=="object"?v[d]:v,c=a.map(d=>(Array.isArray(d)&&d.length===1&&(d=d[0]),d==null||typeof d=="function"||Array.isArray(d)||r.isKey(d)?d:{key:d,path:n.toPath(d)}));return s.map(d=>({original:d,criteria:c.map(v=>u(v,d))})).slice().sort((d,v)=>{for(let p=0;pd.original)}e.orderBy=o})(aG)),aG}var lG={},G_e;function rnt(){return G_e||(G_e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const o=[],s=Math.floor(n),a=(f,i)=>{for(let l=0;l1&&n.isIterateeCall(s,a[0],a[1])?a=[]:f>2&&n.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(s,r.flatten(a),["asc"])}e.sortBy=o})(nG)),nG}var fG,$_e;function ant(){return $_e||($_e=1,fG=nnt().sortBy),fG}var int=ant();const KM=Pv(int);var V4e=e=>e.legend.settings,ont=e=>e.legend.size,snt=e=>e.legend.payload;Tn([snt,V4e],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?KM(n,r):n});var s3=1;function lnt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=Vt.useState({height:0,left:0,top:0,width:0}),n=Vt.useCallback(o=>{if(o!=null){var s=o.getBoundingClientRect(),a={height:s.height,left:s.left,top:s.top,width:s.width};(Math.abs(a.height-t.height)>s3||Math.abs(a.left-t.left)>s3||Math.abs(a.top-t.top)>s3||Math.abs(a.width-t.width)>s3)&&r({height:a.height,left:a.left,top:a.top,width:a.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Ic(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var unt=typeof Symbol=="function"&&Symbol.observable||"@@observable",W_e=unt,cG=()=>Math.random().toString(36).substring(7).split("").join("."),fnt={INIT:`@@redux/INIT${cG()}`,REPLACE:`@@redux/REPLACE${cG()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${cG()}`},GA=fnt;function mZ(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Y4e(e,t,r){if(typeof e!="function")throw new Error(Ic(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ic(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ic(1));return r(Y4e)(e,t)}let n=e,o=t,s=new Map,a=s,f=0,i=!1;function l(){a===s&&(a=new Map,s.forEach((m,y)=>{a.set(y,m)}))}function u(){if(i)throw new Error(Ic(3));return o}function c(m){if(typeof m!="function")throw new Error(Ic(4));if(i)throw new Error(Ic(5));let y=!0;l();const b=f++;return a.set(b,m),function(){if(y){if(i)throw new Error(Ic(6));y=!1,l(),a.delete(b),s=null}}}function h(m){if(!mZ(m))throw new Error(Ic(7));if(typeof m.type>"u")throw new Error(Ic(8));if(typeof m.type!="string")throw new Error(Ic(17));if(i)throw new Error(Ic(9));try{i=!0,o=n(o,m)}finally{i=!1}return(s=a).forEach(b=>{b()}),m}function d(m){if(typeof m!="function")throw new Error(Ic(10));n=m,h({type:GA.REPLACE})}function v(){const m=c;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Ic(11));function b(){const T=y;T.next&&T.next(u())}return b(),{unsubscribe:m(b)}},[W_e](){return this}}}return h({type:GA.INIT}),{dispatch:h,subscribe:c,getState:u,replaceReducer:d,[W_e]:v}}function cnt(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:GA.INIT})>"u")throw new Error(Ic(12));if(typeof r(void 0,{type:GA.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ic(13))})}function $4e(e){const t=Object.keys(e),r={};for(let s=0;s"u")throw f&&f.type,new Error(Ic(14));l[c]=v,i=i||v!==d}return i=i||n.length!==Object.keys(a).length,i?l:a}}function VA(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function hnt(...e){return t=>(r,n)=>{const o=t(r,n);let s=()=>{throw new Error(Ic(15))};const a={getState:o.getState,dispatch:(i,...l)=>s(i,...l)},f=e.map(i=>i(a));return s=VA(...f)(o.dispatch),{...o,dispatch:s}}}function W4e(e){return mZ(e)&&"type"in e&&typeof e.type=="string"}var X4e=Symbol.for("immer-nothing"),X_e=Symbol.for("immer-draftable"),Hh=Symbol.for("immer-state");function lp(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Gd=Object,Lx=Gd.getPrototypeOf,YA="constructor",JM="prototype",nY="configurable",$A="enumerable",D3="writable",y2="value",J0=e=>!!e&&!!e[Hh];function pp(e){var t;return e?Z4e(e)||eE(e)||!!e[X_e]||!!((t=e[YA])!=null&&t[X_e])||tE(e)||rE(e):!1}var dnt=Gd[JM][YA].toString(),Z_e=new WeakMap;function Z4e(e){if(!e||!xZ(e))return!1;const t=Lx(e);if(t===null||t===Gd[JM])return!0;const r=Gd.hasOwnProperty.call(t,YA)&&t[YA];if(r===Object)return!0;if(!ax(r))return!1;let n=Z_e.get(r);return n===void 0&&(n=Function.toString.call(r),Z_e.set(r,n)),n===dnt}function QM(e,t,r=!0){ow(e)===0?(r?Reflect.ownKeys(e):Gd.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ow(e){const t=e[Hh];return t?t.type_:eE(e)?1:tE(e)?2:rE(e)?3:0}var K_e=(e,t,r=ow(e))=>r===2?e.has(t):Gd[JM].hasOwnProperty.call(e,t),aY=(e,t,r=ow(e))=>r===2?e.get(t):e[t],WA=(e,t,r,n=ow(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vnt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var eE=Array.isArray,tE=e=>e instanceof Map,rE=e=>e instanceof Set,xZ=e=>typeof e=="object",ax=e=>typeof e=="function",hG=e=>typeof e=="boolean";function pnt(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var B0=e=>e.copy_||e.base_,bZ=e=>e.modified_?e.copy_:e.base_;function iY(e,t){if(tE(e))return new Map(e);if(rE(e))return new Set(e);if(eE(e))return Array[JM].slice.call(e);const r=Z4e(e);if(t===!0||t==="class_only"&&!r){const n=Gd.getOwnPropertyDescriptors(e);delete n[Hh];let o=Reflect.ownKeys(n);for(let s=0;s1&&Gd.defineProperties(e,{set:l3,add:l3,clear:l3,delete:l3}),Gd.freeze(e),t&&QM(e,(r,n)=>{_Z(n,!0)},!1)),e}function gnt(){lp(2)}var l3={[y2]:gnt};function nE(e){return e===null||!xZ(e)?!0:Gd.isFrozen(e)}var XA="MapSet",oY="Patches",J_e="ArrayMethods",K4e={};function Sm(e){const t=K4e[e];return t||lp(0,e),t}var Q_e=e=>!!K4e[e],m2,J4e=()=>m2,ynt=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Q_e(XA)?Sm(XA):void 0,arrayMethodsPlugin_:Q_e(J_e)?Sm(J_e):void 0});function e2e(e,t){t&&(e.patchPlugin_=Sm(oY),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sY(e){lY(e),e.drafts_.forEach(mnt),e.drafts_=null}function lY(e){e===m2&&(m2=e.parent_)}var t2e=e=>m2=ynt(m2,e);function mnt(e){const t=e[Hh];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function r2e(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Hh].modified_&&(sY(t),lp(4)),pp(e)&&(e=n2e(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[Hh].base_,e,t)}else e=n2e(t,r);return xnt(t,e,!0),sY(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==X4e?e:void 0}function n2e(e,t){if(nE(t))return t;const r=t[Hh];if(!r)return ZA(t,e.handledSet_,e);if(!aE(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);tRe(r,e)}return r.copy_}function xnt(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_Z(t,r)}function Q4e(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var aE=(e,t)=>e.scope_===t,bnt=[];function eRe(e,t,r,n){const o=B0(e),s=e.type_;if(n!==void 0&&aY(o,n,s)===t){WA(o,n,r,s);return}if(!e.draftLocations_){const f=e.draftLocations_=new Map;QM(o,(i,l)=>{if(J0(l)){const u=f.get(l)||[];u.push(i),f.set(l,u)}})}const a=e.draftLocations_.get(t)??bnt;for(const f of a)WA(o,f,r,s)}function _nt(e,t,r){e.callbacks_.push(function(o){var f;const s=t;if(!s||!aE(s,o))return;(f=o.mapSetPlugin_)==null||f.fixSetContents(s);const a=bZ(s);eRe(e,s.draft_??s,a,r),tRe(s,o)})}function tRe(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:o}=t;if(o){const s=o.getPath(e);s&&o.generatePatches_(e,s,t)}Q4e(e)}}function wnt(e,t,r){const{scope_:n}=e;if(J0(r)){const o=r[Hh];aE(o,n)&&o.callbacks_.push(function(){I3(e);const a=bZ(o);eRe(e,r,a,t)})}else pp(r)&&e.callbacks_.push(function(){const s=B0(e);e.type_===3?s.has(r)&&ZA(r,n.handledSet_,n):aY(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ZA(aY(e.copy_,t,e.type_),n.handledSet_,n)})}function ZA(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||J0(e)||t.has(e)||!pp(e)||nE(e)||(t.add(e),QM(e,(n,o)=>{if(J0(o)){const s=o[Hh];if(aE(s,r)){const a=bZ(s);WA(e,n,a,e.type_),Q4e(s)}}else pp(o)&&ZA(o,t,r)})),e}function Tnt(e,t){const r=eE(e),n={type_:r?1:0,scope_:t?t.scope_:J4e(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,s=KA;r&&(o=[n],s=x2);const{revoke:a,proxy:f}=Proxy.revocable(o,s);return n.draft_=f,n.revoke_=a,[f,n]}var KA={get(e,t){if(t===Hh)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=B0(e);if(!K_e(o,t,e.type_))return Ant(e,o,t);const s=o[t];if(e.finalized_||!pp(s)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&pnt(t))return s;if(s===dG(e.base_,t)){I3(e);const a=e.type_===1?+t:t,f=fY(e.scope_,s,e,a);return e.copy_[a]=f}return s},has(e,t){return t in B0(e)},ownKeys(e){return Reflect.ownKeys(B0(e))},set(e,t,r){const n=rRe(B0(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=dG(B0(e),t),s=o==null?void 0:o[Hh];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(vnt(r,o)&&(r!==void 0||K_e(e.base_,t,e.type_)))return!0;I3(e),uY(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),wnt(e,t,r)),!0},deleteProperty(e,t){return I3(e),dG(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),uY(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=B0(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[D3]:!0,[nY]:e.type_!==1||t!=="length",[$A]:n[$A],[y2]:r[t]}},defineProperty(){lp(11)},getPrototypeOf(e){return Lx(e.base_)},setPrototypeOf(){lp(12)}},x2={};for(let e in KA){let t=KA[e];x2[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}x2.deleteProperty=function(e,t){return x2.set.call(this,e,t,void 0)};x2.set=function(e,t,r){return KA.set.call(this,e[0],t,r,e[0])};function dG(e,t){const r=e[Hh];return(r?B0(r):e)[t]}function Ant(e,t,r){var o;const n=rRe(t,r);return n?y2 in n?n[y2]:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function rRe(e,t){if(!(t in e))return;let r=Lx(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Lx(r)}}function uY(e){e.modified_||(e.modified_=!0,e.parent_&&uY(e.parent_))}function I3(e){e.copy_||(e.assigned_=new Map,e.copy_=iY(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Snt=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,o)=>{if(ax(r)&&!ax(n)){const a=n;n=r;const f=this;return function(l=a,...u){return f.produce(l,c=>n.call(this,c,...u))}}ax(n)||lp(6),o!==void 0&&!ax(o)&&lp(7);let s;if(pp(r)){const a=t2e(this),f=fY(a,r,void 0);let i=!0;try{s=n(f),i=!1}finally{i?sY(a):lY(a)}return e2e(a,o),r2e(s,a)}else if(!r||!xZ(r)){if(s=n(r),s===void 0&&(s=r),s===X4e&&(s=void 0),this.autoFreeze_&&_Z(s,!0),o){const a=[],f=[];Sm(oY).generateReplacementPatches_(r,s,{patches_:a,inversePatches_:f}),o(a,f)}return s}else lp(1,r)},this.produceWithPatches=(r,n)=>{if(ax(r))return(f,...i)=>this.produceWithPatches(f,l=>r(l,...i));let o,s;return[this.produce(r,n,(f,i)=>{o=f,s=i}),o,s]},hG(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),hG(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),hG(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){pp(t)||lp(8),J0(t)&&(t=cp(t));const r=t2e(this),n=fY(r,t,void 0);return n[Hh].isManual_=!0,lY(r),n}finishDraft(t,r){const n=t&&t[Hh];(!n||!n.isManual_)&&lp(9);const{scope_:o}=n;return e2e(o,r),r2e(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const s=r[n];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}n>-1&&(r=r.slice(n+1));const o=Sm(oY).applyPatches_;return J0(t)?o(t,r):this.produce(t,s=>o(s,r))}};function fY(e,t,r,n){const[o,s]=tE(t)?Sm(XA).proxyMap_(t,r):rE(t)?Sm(XA).proxySet_(t,r):Tnt(t,r);return((r==null?void 0:r.scope_)??J4e()).drafts_.push(o),s.callbacks_=(r==null?void 0:r.callbacks_)??[],s.key_=n,r&&n!==void 0?_nt(r,s,n):s.callbacks_.push(function(i){var u;(u=i.mapSetPlugin_)==null||u.fixSetContents(s);const{patchPlugin_:l}=i;s.modified_&&l&&l.generatePatches_(s,[],i)}),o}function cp(e){return J0(e)||lp(10,e),nRe(e)}function nRe(e){if(!pp(e)||nE(e))return e;const t=e[Hh];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=iY(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=iY(e,!0);return QM(r,(o,s)=>{WA(r,o,nRe(s))},n),t&&(t.finalized_=!1),r}var Mnt=new Snt,aRe=Mnt.produce;function iRe(e){return({dispatch:r,getState:n})=>o=>s=>typeof s=="function"?s(r,n,e):o(s)}var Ent=iRe(),knt=iRe,Cnt=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?VA:VA.apply(null,arguments)};function Rv(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Vd(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>W4e(n)&&n.type===e,r}var oRe=class j_ extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,j_.prototype)}static get[Symbol.species](){return j_}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new j_(...t[0].concat(this)):new j_(...t.concat(this))}};function a2e(e){return pp(e)?aRe(e,()=>{}):e}function u3(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Rnt(e){return typeof e=="boolean"}var Lnt=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new oRe;return r&&(Rnt(r)?a.push(Ent):a.push(knt(r.extraArgument))),a},sRe="RTK_autoBatch",Cl=()=>e=>({payload:e,meta:{[sRe]:!0}}),i2e=e=>t=>{setTimeout(t,e)},lRe=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,s=!1,a=!1;const f=new Set,i=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:i2e(10):e.type==="callback"?e.queueNotification:i2e(e.timeout),l=()=>{a=!1,s&&(s=!1,f.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const c=()=>o&&u(),h=n.subscribe(c);return f.add(u),()=>{h(),f.delete(u)}},dispatch(u){var c;try{return o=!((c=u==null?void 0:u.meta)!=null&&c[sRe]),s=!o,s&&(a||(a=!0,i(l))),n.dispatch(u)}finally{o=!0}}})},Pnt=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new oRe(e);return n&&o.push(lRe(typeof n=="object"?n:void 0)),o};function Dnt(e){const t=Lnt(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let f;if(typeof r=="function")f=r;else if(mZ(r))f=$4e(r);else throw new Error(Vd(1));let i;typeof n=="function"?i=n(t):i=t();let l=VA;o&&(l=Cnt({trace:!1,...typeof o=="object"&&o}));const u=hnt(...i),c=Pnt(u);let h=typeof a=="function"?a(c):c();const d=l(...h);return Y4e(f,s,d)}function uRe(e){const t={},r=[];let n;const o={addCase(s,a){const f=typeof s=="string"?s:s.type;if(!f)throw new Error(Vd(28));if(f in t)throw new Error(Vd(29));return t[f]=a,o},addAsyncThunk(s,a){return a.pending&&(t[s.pending.type]=a.pending),a.rejected&&(t[s.rejected.type]=a.rejected),a.fulfilled&&(t[s.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:s.settled,reducer:a.settled}),o},addMatcher(s,a){return r.push({matcher:s,reducer:a}),o},addDefaultCase(s){return n=s,o}};return e(o),[t,r,n]}function Int(e){return typeof e=="function"}function Ont(e,t){let[r,n,o]=uRe(t),s;if(Int(e))s=()=>a2e(e());else{const f=a2e(e);s=()=>f}function a(f=s(),i){let l=[r[i.type],...n.filter(({matcher:u})=>u(i)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,c)=>{if(c)if(J0(u)){const d=c(u,i);return d===void 0?u:d}else{if(pp(u))return aRe(u,h=>c(h,i));{const h=c(u,i);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},f)}return a.getInitialState=s,a}var znt="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fnt=(e=21)=>{let t="",r=e;for(;r--;)t+=znt[Math.random()*64|0];return t},Nnt=Symbol.for("rtk-slice-createasyncthunk");function Bnt(e,t){return`${e}/${t}`}function qnt({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Nnt];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(Vd(11));const f=(typeof o.reducers=="function"?o.reducers(Unt()):o.reducers)||{},i=Object.keys(f),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(T,S){const A=typeof T=="string"?T:T.type;if(!A)throw new Error(Vd(12));if(A in l.sliceCaseReducersByType)throw new Error(Vd(13));return l.sliceCaseReducersByType[A]=S,u},addMatcher(T,S){return l.sliceMatchers.push({matcher:T,reducer:S}),u},exposeAction(T,S){return l.actionCreators[T]=S,u},exposeCaseReducer(T,S){return l.sliceCaseReducersByName[T]=S,u}};i.forEach(T=>{const S=f[T],A={reducerName:T,type:Bnt(s,T),createNotation:typeof o.reducers=="function"};Gnt(S)?Ynt(A,S,u,t):Hnt(A,S,u)});function c(){const[T={},S=[],A=void 0]=typeof o.extraReducers=="function"?uRe(o.extraReducers):[o.extraReducers],M={...T,...l.sliceCaseReducersByType};return Ont(o.initialState,w=>{for(let C in M)w.addCase(C,M[C]);for(let C of l.sliceMatchers)w.addMatcher(C.matcher,C.reducer);for(let C of S)w.addMatcher(C.matcher,C.reducer);A&&w.addDefaultCase(A)})}const h=T=>T,d=new Map,v=new WeakMap;let p;function m(T,S){return p||(p=c()),p(T,S)}function y(){return p||(p=c()),p.getInitialState()}function b(T,S=!1){function A(w){let C=w[T];return typeof C>"u"&&S&&(C=u3(v,A,y)),C}function M(w=h){const C=u3(d,S,()=>new WeakMap);return u3(C,w,()=>{const x={};for(const[_,k]of Object.entries(o.selectors??{}))x[_]=jnt(k,w,()=>u3(v,w,y),S);return x})}return{reducerPath:T,getSelectors:M,get selectors(){return M(A)},selectSlice:A}}const g={name:s,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,...b(a),injectInto(T,{reducerPath:S,...A}={}){const M=S??a;return T.inject({reducerPath:M,reducer:m},A),{...g,...b(M,!0)}}};return g}}function jnt(e,t,r,n){function o(s,...a){let f=t(s);return typeof f>"u"&&n&&(f=r()),e(f,...a)}return o.unwrapped=e,o}var xd=qnt();function Unt(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Hnt({type:e,reducerName:t,createNotation:r},n,o){let s,a;if("reducer"in n){if(r&&!Vnt(n))throw new Error(Vd(17));s=n.reducer,a=n.prepare}else s=n;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?Rv(e,a):Rv(e))}function Gnt(e){return e._reducerDefinitionType==="asyncThunk"}function Vnt(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ynt({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Vd(18));const{payloadCreator:s,fulfilled:a,pending:f,rejected:i,settled:l,options:u}=r,c=o(e,s,u);n.exposeAction(t,c),a&&n.addCase(c.fulfilled,a),f&&n.addCase(c.pending,f),i&&n.addCase(c.rejected,i),l&&n.addMatcher(c.settled,l),n.exposeCaseReducer(t,{fulfilled:a||f3,pending:f||f3,rejected:i||f3,settled:l||f3})}function f3(){}var $nt="task",fRe="listener",cRe="completed",wZ="cancelled",Wnt=`task-${wZ}`,Xnt=`task-${cRe}`,cY=`${fRe}-${wZ}`,Znt=`${fRe}-${cRe}`,iE=class{constructor(e){Ui(this,"name","TaskAbortError");Ui(this,"message");this.code=e,this.message=`${$nt} ${wZ} (reason: ${e})`}},TZ=(e,t)=>{if(typeof e!="function")throw new TypeError(Vd(32))},JA=()=>{},hRe=(e,t=JA)=>(e.catch(t),e),dRe=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),cm=e=>{if(e.aborted)throw new iE(e.reason)};function vRe(e,t){let r=JA;return new Promise((n,o)=>{const s=()=>o(new iE(e.reason));if(e.aborted){s();return}r=dRe(e,s),t.finally(()=>r()).then(n,o)}).finally(()=>{r=JA})}var Knt=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof iE?"cancelled":"rejected",error:r}}finally{t==null||t()}},QA=e=>t=>hRe(vRe(e,t).then(r=>(cm(e),r))),pRe=e=>{const t=QA(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:vx}=Object,o2e={},oE="listenerMiddleware",Jnt=(e,t)=>{const r=n=>dRe(e,()=>n.abort(e.reason));return(n,o)=>{TZ(n);const s=new AbortController;r(s);const a=Knt(async()=>{cm(e),cm(s.signal);const f=await n({pause:QA(s.signal),delay:pRe(s.signal),signal:s.signal});return cm(s.signal),f},()=>s.abort(Xnt));return o!=null&&o.autoJoin&&t.push(a.catch(JA)),{result:QA(e)(a),cancel(){s.abort(Wnt)}}}},Qnt=(e,t)=>{const r=async(n,o)=>{cm(t);let s=()=>{};const f=[new Promise((i,l)=>{let u=e({predicate:n,effect:(c,h)=>{h.unsubscribe(),i([c,h.getState(),h.getOriginalState()])}});s=()=>{u(),l()}})];o!=null&&f.push(new Promise(i=>setTimeout(i,o,null)));try{const i=await vRe(t,Promise.race(f));return cm(t),i}finally{s()}};return(n,o)=>hRe(r(n,o))},gRe=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:s}=e;if(t)o=Rv(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(Vd(21));return TZ(s),{predicate:o,type:t,effect:s}},yRe=vx(e=>{const{type:t,predicate:r,effect:n}=gRe(e);return{id:Fnt(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Vd(22))}}},{withTypes:()=>yRe}),s2e=(e,t)=>{const{type:r,effect:n,predicate:o}=gRe(t);return Array.from(e.values()).find(s=>(typeof r=="string"?s.type===r:s.predicate===o)&&s.effect===n)},hY=e=>{e.pending.forEach(t=>{t.abort(cY)})},eat=(e,t)=>()=>{for(const r of t.keys())hY(r);e.clear()},l2e=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},mRe=vx(Rv(`${oE}/add`),{withTypes:()=>mRe}),tat=Rv(`${oE}/removeAll`),xRe=vx(Rv(`${oE}/remove`),{withTypes:()=>xRe}),rat=(...e)=>{console.error(`${oE}/error`,...e)},sw=(e={})=>{const t=new Map,r=new Map,n=d=>{const v=r.get(d)??0;r.set(d,v+1)},o=d=>{const v=r.get(d)??1;v===1?r.delete(d):r.set(d,v-1)},{extra:s,onError:a=rat}=e;TZ(a);const f=d=>(d.unsubscribe=()=>t.delete(d.id),t.set(d.id,d),v=>{d.unsubscribe(),v!=null&&v.cancelActive&&hY(d)}),i=d=>{const v=s2e(t,d)??yRe(d);return f(v)};vx(i,{withTypes:()=>i});const l=d=>{const v=s2e(t,d);return v&&(v.unsubscribe(),d.cancelActive&&hY(v)),!!v};vx(l,{withTypes:()=>l});const u=async(d,v,p,m)=>{const y=new AbortController,b=Qnt(i,y.signal),g=[];try{d.pending.add(y),n(d),await Promise.resolve(d.effect(v,vx({},p,{getOriginalState:m,condition:(T,S)=>b(T,S).then(Boolean),take:b,delay:pRe(y.signal),pause:QA(y.signal),extra:s,signal:y.signal,fork:Jnt(y.signal,g),unsubscribe:d.unsubscribe,subscribe:()=>{t.set(d.id,d)},cancelActiveListeners:()=>{d.pending.forEach((T,S,A)=>{T!==y&&(T.abort(cY),A.delete(T))})},cancel:()=>{y.abort(cY),d.pending.delete(y)},throwIfCancelled:()=>{cm(y.signal)}})))}catch(T){T instanceof iE||l2e(a,T,{raisedBy:"effect"})}finally{await Promise.all(g),y.abort(Znt),o(d),d.pending.delete(y)}},c=eat(t,r);return{middleware:d=>v=>p=>{if(!W4e(p))return v(p);if(mRe.match(p))return i(p.payload);if(tat.match(p)){c();return}if(xRe.match(p))return l(p.payload);let m=d.getState();const y=()=>{if(m===o2e)throw new Error(Vd(23));return m};let b;try{if(b=v(p),t.size>0){const g=d.getState(),T=Array.from(t.values());for(const S of T){let A=!1;try{A=S.predicate(p,g,m)}catch(M){A=!1,l2e(a,M,{raisedBy:"predicate"})}A&&u(S,p,d,y)}}}finally{m=o2e}return b},startListening:i,stopListening:l,clearListeners:c}};function Vd(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var nat={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},bRe=xd({name:"chartLayout",initialState:nat,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,o,s;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(s=t.payload.left)!==null&&s!==void 0?s:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:aat,setLayout:iat,setChartSize:oat,setScale:sat}=bRe.actions,lat=bRe.reducer;function _Re(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ps(e){return Number.isFinite(e)}function sy(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function u2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sx(e){for(var t=1;t{if(t&&r){var{width:n,height:o}=r,{align:s,verticalAlign:a,layout:f}=t;if((f==="vertical"||f==="horizontal"&&a==="middle")&&s!=="center"&&Ti(e[s]))return sx(sx({},e),{},{[s]:e[s]+(n||0)});if((f==="horizontal"||f==="vertical"&&s==="center")&&a!=="middle"&&Ti(e[a]))return sx(sx({},e),{},{[a]:e[a]+(o||0)})}return e},_y=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",dat=(e,t)=>{if(!t||t.length!==2||!Ti(t[0])||!Ti(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Ti(e[0])||e[0]n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o=0?(l[0]=s,s+=h,l[1]=s):(l[0]=a,a+=h,l[1]=a)}}}},pat=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o=0?(i[0]=s,s+=l,i[1]=s):(i[0]=0,i[1]=0)}}}},gat={sign:vat,expand:Utt,none:Tm,silhouette:Htt,wiggle:Gtt,positive:pat},yat=(e,t,r)=>{var n,o=(n=gat[r])!==null&&n!==void 0?n:Tm,s=jtt().keys(t).value((f,i)=>Number(Nc(f,i,0))).order(tY).offset(o),a=s(e);return a.forEach((f,i)=>{f.forEach((l,u)=>{var c=Nc(e[u],t[i],0);Array.isArray(c)&&c.length===2&&Ti(c[0])&&Ti(c[1])&&(l[0]=c[0],l[1]=c[1])})}),a};function mat(e){return e==null?void 0:String(e)}var f2e=e=>{var{axis:t,ticks:r,offset:n,bandSize:o,entry:s,index:a}=e;if(t.type==="category")return r[a]?r[a].coordinate+n:null;var f=Nc(s,t.dataKey,t.scale.domain()[a]);if(uc(f))return null;var i=t.scale.map(f);return Ti(i)?i-o/2+n:null},xat=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return n<=0&&o>=0?0:o<0?o:n}return r[0]},bat=e=>{var t=e.flat(2).filter(Ti);return[Math.min(...t),Math.max(...t)]},_at=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],wat=(e,t,r)=>{if(e!=null)return _at(Object.keys(e).reduce((n,o)=>{var s=e[o];if(!s)return n;var{stackedData:a}=s,f=a.reduce((i,l)=>{var u=_Re(l,t,r),c=bat(u);return!ps(c[0])||!ps(c[1])?i:[Math.min(i[0],c[0]),Math.max(i[1],c[1])]},[1/0,-1/0]);return[Math.min(f[0],n[0]),Math.max(f[1],n[1])]},[1/0,-1/0]))},c2e=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,h2e=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,eS=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var o=KM(t,u=>u.coordinate),s=1/0,a=1,f=o.length;a{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},Aat=(e,t)=>t==="centric"?e.angle:e.radius,hg=e=>e.layout.width,dg=e=>e.layout.height,Sat=e=>e.layout.scale,TRe=e=>e.layout.margin,sE=Tn(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),lE=Tn(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Mat="data-recharts-item-index",Eat="data-recharts-item-id",lw=60;function v2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function c3(e){for(var t=1;te.brush.height;function Pat(e){var t=lE(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:lw;return r+o}return r},0)}function Dat(e){var t=lE(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:lw;return r+o}return r},0)}function Iat(e){var t=sE(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Oat(e){var t=sE(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var dc=Tn([hg,dg,TRe,Lat,Pat,Dat,Iat,Oat,V4e,ont],(e,t,r,n,o,s,a,f,i,l)=>{var u={left:(r.left||0)+o,right:(r.right||0)+s},c={top:(r.top||0)+a,bottom:(r.bottom||0)+f},h=c3(c3({},c),u),d=h.bottom;h.bottom+=n,h=hat(h,i,l);var v=e-h.left-h.right,p=t-h.top-h.bottom;return c3(c3({brushBottom:d},h),{},{width:Math.max(v,0),height:Math.max(p,0)})}),zat=Tn(dc,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),AZ=Tn(hg,dg,(e,t)=>({x:0,y:0,width:e,height:t})),Fat=Vt.createContext(null),Xd=()=>Vt.useContext(Fat)!=null,uE=e=>e.brush,fE=Tn([uE,dc,TRe],(e,t,r)=>({height:e.height,x:Ti(e.x)?e.x:t.left,y:Ti(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ti(e.width)?e.width:t.width})),vG={},pG={},gG={},p2e;function Nat(){return p2e||(p2e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:o,edges:s}={}){let a,f=null;const i=s!=null&&s.includes("leading"),l=s==null||s.includes("trailing"),u=()=>{f!==null&&(r.apply(a,f),a=void 0,f=null)},c=()=>{l&&u(),p()};let h=null;const d=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,c()},n)},v=()=>{h!==null&&(clearTimeout(h),h=null)},p=()=>{v(),a=void 0,f=null},m=()=>{u()},y=function(...b){if(o!=null&&o.aborted)return;a=this,f=b;const g=h==null;d(),i&&g&&u()};return y.schedule=d,y.cancel=p,y.flush=m,o==null||o.addEventListener("abort",p,{once:!0}),y}e.debounce=t})(gG)),gG}var g2e;function Bat(){return g2e||(g2e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nat();function r(n,o=0,s={}){typeof s!="object"&&(s={});const{leading:a=!1,trailing:f=!0,maxWait:i}=s,l=Array(2);a&&(l[0]="leading"),f&&(l[1]="trailing");let u,c=null;const h=t.debounce(function(...p){u=n.apply(this,p),c=null},o,{edges:l}),d=function(...p){return i!=null&&(c===null&&(c=Date.now()),Date.now()-c>=i)?(u=n.apply(this,p),c=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,p),u)},v=()=>(h.flush(),u);return d.cancel=h.cancel,d.flush=v,d}e.debounce=r})(pG)),pG}var y2e;function qat(){return y2e||(y2e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bat();function r(n,o=0,s={}){const{leading:a=!0,trailing:f=!0}=s;return t.debounce(n,o,{leading:a,maxWait:o,trailing:f})}e.throttle=r})(vG)),vG}var yG,m2e;function jat(){return m2e||(m2e=1,yG=qat().throttle),yG}var Uat=jat();const Hat=Pv(Uat);var x2e=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),s=2;so[a++]))}},i0={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ARe=(e,t,r)=>{var{width:n=i0.width,height:o=i0.height,aspect:s,maxHeight:a}=r,f=Am(n)?e:Number(n),i=Am(o)?t:Number(o);return s&&s>0&&(f?i=f/s:i&&(f=i*s),a&&i!=null&&i>a&&(i=a)),{calculatedWidth:f,calculatedHeight:i}},Gat={width:0,height:0,overflow:"visible"},Vat={width:0,overflowX:"visible"},Yat={height:0,overflowY:"visible"},$at={},Wat=e=>{var{width:t,height:r}=e,n=Am(t),o=Am(r);return n&&o?Gat:n?Vat:o?Yat:$at};function Xat(e){var{width:t,height:r,aspect:n}=e,o=t,s=r;return o===void 0&&s===void 0?(o=i0.width,s=i0.height):o===void 0?o=n&&n>0?void 0:i0.width:s===void 0&&(s=n&&n>0?void 0:i0.height),{width:o,height:s}}function dY(){return dY=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:r,height:n}),[r,n]);return Qat(o)?Vt.createElement(SRe.Provider,{value:o},t):null}var SZ=()=>Vt.useContext(SRe),eit=Vt.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=i0.initialDimension,width:o,height:s,minWidth:a=i0.minWidth,minHeight:f,maxHeight:i,children:l,debounce:u=i0.debounce,id:c,className:h,onResize:d,style:v={}}=e,p=Vt.useRef(null),m=Vt.useRef();m.current=d,Vt.useImperativeHandle(t,()=>p.current);var[y,b]=Vt.useState({containerWidth:n.width,containerHeight:n.height}),g=Vt.useCallback((w,C)=>{b(x=>{var _=Math.round(w),k=Math.round(C);return x.containerWidth===_&&x.containerHeight===k?x:{containerWidth:_,containerHeight:k}})},[]);Vt.useEffect(()=>{if(p.current==null||typeof ResizeObserver>"u")return db;var w=k=>{var E,I=k[0];if(I!=null){var{width:F,height:D}=I.contentRect;g(F,D),(E=m.current)===null||E===void 0||E.call(m,F,D)}};u>0&&(w=Hat(w,u,{trailing:!0,leading:!1}));var C=new ResizeObserver(w),{width:x,height:_}=p.current.getBoundingClientRect();return g(x,_),C.observe(p.current),()=>{C.disconnect()}},[g,u]);var{containerWidth:T,containerHeight:S}=y;x2e(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:A,calculatedHeight:M}=ARe(T,S,{width:o,height:s,aspect:r,maxHeight:i});return x2e(A!=null&&A>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,A,M,o,s,a,f,r),Vt.createElement("div",{id:c?"".concat(c):void 0,className:ml("recharts-responsive-container",h),style:_2e(_2e({},v),{},{width:o,height:s,minWidth:a,minHeight:f,maxHeight:i}),ref:p},Vt.createElement("div",{style:Wat({width:o,height:s})},Vt.createElement(MRe,{width:A,height:M},l)))}),tit=Vt.forwardRef((e,t)=>{var r=SZ();if(sy(r.width)&&sy(r.height))return e.children;var{width:n,height:o}=Xat({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:s,calculatedHeight:a}=ARe(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Ti(s)&&Ti(a)?Vt.createElement(MRe,{width:s,height:a},e.children):Vt.createElement(eit,dY({},e,{width:n,height:o,ref:t}))});function MZ(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var cE=()=>{var e,t=Xd(),r=Li(zat),n=Li(fE),o=(e=Li(uE))===null||e===void 0?void 0:e.padding;return!t||!n||!o?r:{width:n.width-o.left-o.right,height:n.height-o.top-o.bottom,x:o.left,y:o.top}},rit={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},nit=()=>{var e;return(e=Li(dc))!==null&&e!==void 0?e:rit},ait=()=>Li(hg),iit=()=>Li(dg),rl=e=>e.layout.layoutType,vb=()=>Li(rl),ERe=()=>{var e=vb();if(e==="horizontal"||e==="vertical")return e},kRe=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},oit=()=>{var e=vb();return e!==void 0},uw=e=>{var t=Ru(),r=Xd(),{width:n,height:o}=e,s=SZ(),a=n,f=o;return s&&(a=s.width>0?s.width:n,f=s.height>0?s.height:o),Vt.useEffect(()=>{!r&&sy(a)&&sy(f)&&t(oat({width:a,height:f}))},[t,r,a,f]),null},CRe=Symbol.for("immer-nothing"),w2e=Symbol.for("immer-draftable"),Yd=Symbol.for("immer-state");function up(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var b2=Object.getPrototypeOf;function Px(e){return!!e&&!!e[Yd]}function Mm(e){var t;return e?RRe(e)||Array.isArray(e)||!!e[w2e]||!!((t=e.constructor)!=null&&t[w2e])||fw(e)||dE(e):!1}var sit=Object.prototype.constructor.toString(),T2e=new WeakMap;function RRe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=T2e.get(r);return n===void 0&&(n=Function.toString.call(r),T2e.set(r,n)),n===sit}function tS(e,t,r=!0){hE(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function hE(e){const t=e[Yd];return t?t.type_:Array.isArray(e)?1:fw(e)?2:dE(e)?3:0}function vY(e,t){return hE(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function LRe(e,t,r){const n=hE(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function lit(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function fw(e){return e instanceof Map}function dE(e){return e instanceof Set}function rm(e){return e.copy_||e.base_}function pY(e,t){if(fw(e))return new Map(e);if(dE(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=RRe(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Yd];let o=Reflect.ownKeys(n);for(let s=0;s1&&Object.defineProperties(e,{set:h3,add:h3,clear:h3,delete:h3}),Object.freeze(e),t&&Object.values(e).forEach(r=>EZ(r,!0))),e}function uit(){up(2)}var h3={value:uit};function vE(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var fit={};function Em(e){const t=fit[e];return t||up(0,e),t}var _2;function PRe(){return _2}function cit(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function A2e(e,t){t&&(Em("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gY(e){yY(e),e.drafts_.forEach(hit),e.drafts_=null}function yY(e){e===_2&&(_2=e.parent_)}function S2e(e){return _2=cit(_2,e)}function hit(e){const t=e[Yd];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function M2e(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Yd].modified_&&(gY(t),up(4)),Mm(e)&&(e=rS(t,e),t.parent_||nS(t,e)),t.patches_&&Em("Patches").generateReplacementPatches_(r[Yd].base_,e,t.patches_,t.inversePatches_)):e=rS(t,r,[]),gY(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==CRe?e:void 0}function rS(e,t,r){if(vE(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[Yd];if(!o)return tS(t,(s,a)=>E2e(e,o,t,s,a,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return nS(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const s=o.copy_;let a=s,f=!1;o.type_===3&&(a=new Set(s),s.clear(),f=!0),tS(a,(i,l)=>E2e(e,o,s,i,l,r,f),n),nS(e,s,!1),r&&e.patches_&&Em("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function E2e(e,t,r,n,o,s,a){if(o==null||typeof o!="object"&&!a)return;const f=vE(o);if(!(f&&!a)){if(Px(o)){const i=s&&t&&t.type_!==3&&!vY(t.assigned_,n)?s.concat(n):void 0,l=rS(e,o,i);if(LRe(r,n,l),Px(l))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(Mm(o)&&!f){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&f)return;rS(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(fw(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&nS(e,o)}}}function nS(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&EZ(t,r)}function dit(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:PRe(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,s=kZ;r&&(o=[n],s=w2);const{revoke:a,proxy:f}=Proxy.revocable(o,s);return n.draft_=f,n.revoke_=a,f}var kZ={get(e,t){if(t===Yd)return e;const r=rm(e);if(!vY(r,t))return vit(e,r,t);const n=r[t];return e.finalized_||!Mm(n)?n:n===mG(e.base_,t)?(xG(e),e.copy_[t]=xY(n,e)):n},has(e,t){return t in rm(e)},ownKeys(e){return Reflect.ownKeys(rm(e))},set(e,t,r){const n=DRe(rm(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=mG(rm(e),t),s=o==null?void 0:o[Yd];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(lit(r,o)&&(r!==void 0||vY(e.base_,t)))return!0;xG(e),mY(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return mG(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xG(e),mY(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=rm(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){up(11)},getPrototypeOf(e){return b2(e.base_)},setPrototypeOf(){up(12)}},w2={};tS(kZ,(e,t)=>{w2[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});w2.deleteProperty=function(e,t){return w2.set.call(this,e,t,void 0)};w2.set=function(e,t,r){return kZ.set.call(this,e[0],t,r,e[0])};function mG(e,t){const r=e[Yd];return(r?rm(r):e)[t]}function vit(e,t,r){var o;const n=DRe(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function DRe(e,t){if(!(t in e))return;let r=b2(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=b2(r)}}function mY(e){e.modified_||(e.modified_=!0,e.parent_&&mY(e.parent_))}function xG(e){e.copy_||(e.copy_=pY(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pit=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const s=r;r=t;const a=this;return function(i=s,...l){return a.produce(i,u=>r.call(this,u,...l))}}typeof r!="function"&&up(6),n!==void 0&&typeof n!="function"&&up(7);let o;if(Mm(t)){const s=S2e(this),a=xY(t,void 0);let f=!0;try{o=r(a),f=!1}finally{f?gY(s):yY(s)}return A2e(s,n),M2e(o,s)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===CRe&&(o=void 0),this.autoFreeze_&&EZ(o,!0),n){const s=[],a=[];Em("Patches").generateReplacementPatches_(t,o,s,a),n(s,a)}return o}else up(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...f)=>this.produceWithPatches(a,i=>t(i,...f));let n,o;return[this.produce(t,r,(a,f)=>{n=a,o=f}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Mm(e)||up(8),Px(e)&&(e=git(e));const t=S2e(this),r=xY(e,void 0);return r[Yd].isManual_=!0,yY(t),r}finishDraft(e,t){const r=e&&e[Yd];(!r||!r.isManual_)&&up(9);const{scope_:n}=r;return A2e(n,t),M2e(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Em("Patches").applyPatches_;return Px(e)?n(e,t):this.produce(e,o=>n(o,t))}};function xY(e,t){const r=fw(e)?Em("MapSet").proxyMap_(e,t):dE(e)?Em("MapSet").proxySet_(e,t):dit(e,t);return(t?t.scope_:PRe()).drafts_.push(r),r}function git(e){return Px(e)||up(10,e),IRe(e)}function IRe(e){if(!Mm(e)||vE(e))return e;const t=e[Yd];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=pY(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=pY(e,!0);return tS(r,(o,s)=>{LRe(r,o,IRe(s))},n),t&&(t.finalized_=!1),r}var yit=new pit;yit.produce;var mit={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},ORe=xd({name:"legend",initialState:mit,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Cl()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,o=cp(e).payload.indexOf(r);o>-1&&(e.payload[o]=n)},prepare:Cl()},removeLegendPayload:{reducer(e,t){var r=cp(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Cl()}}}),{setLegendSize:vgt,setLegendSettings:pgt,addLegendPayload:xit,replaceLegendPayload:bit,removeLegendPayload:_it}=ORe.actions,wit=ORe.reducer;function bY(){return bY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=ex.separator,contentStyle:r,itemStyle:n,labelStyle:o=ex.labelStyle,payload:s,formatter:a,itemSorter:f,wrapperClassName:i,labelClassName:l,label:u,labelFormatter:c,accessibilityLayer:h=ex.accessibilityLayer}=e,d=()=>{if(s&&s.length){var S={padding:0,margin:0},A=(f?KM(s,f):s).map((M,w)=>{if(M.type==="none")return null;var C=M.formatter||a||Mit,{value:x,name:_}=M,k=x,E=_;if(C){var I=C(x,_,M,w,s);if(Array.isArray(I))[k,E]=I;else if(I!=null)k=I;else return null}var F=T_(T_({},ex.itemStyle),{},{color:M.color||ex.itemStyle.color},n);return Vt.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(w),style:F},h0(E)?Vt.createElement("span",{className:"recharts-tooltip-item-name"},E):null,h0(E)?Vt.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,Vt.createElement("span",{className:"recharts-tooltip-item-value"},k),Vt.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return Vt.createElement("ul",{className:"recharts-tooltip-item-list",style:S},A)}return null},v=T_(T_({},ex.contentStyle),r),p=T_({margin:0},o),m=!uc(u),y=m?u:"",b=ml("recharts-default-tooltip",i),g=ml("recharts-tooltip-label",l);m&&c&&s!==void 0&&s!==null&&(y=c(u,s));var T=h?{role:"status","aria-live":"assertive"}:{};return Vt.createElement("div",bY({className:b,style:v},T),Vt.createElement("p",{className:g,style:p},Vt.isValidElement(y)?y:"".concat(y)),d())},A_="recharts-tooltip-wrapper",kit={visibility:"hidden"};function Cit(e){var{coordinate:t,translateX:r,translateY:n}=e;return ml(A_,{["".concat(A_,"-right")]:Ti(r)&&t&&Ti(t.x)&&r>=t.x,["".concat(A_,"-left")]:Ti(r)&&t&&Ti(t.x)&&r=t.y,["".concat(A_,"-top")]:Ti(n)&&t&&Ti(t.y)&&n0?o:0),c=r[n]+o;if(t[n])return a[n]?u:c;var h=i[n];if(h==null)return 0;if(a[n]){var d=u,v=h;return dm?Math.max(u,h):Math.max(c,h)}function Rit(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Lit(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:o,position:s,reverseDirection:a,tooltipBox:f,useTranslate3d:i,viewBox:l}=e,u,c,h;return f.height>0&&f.width>0&&r?(c=C2e({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:s,reverseDirection:a,tooltipDimension:f.width,viewBox:l,viewBoxDimension:l.width}),h=C2e({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:s,reverseDirection:a,tooltipDimension:f.height,viewBox:l,viewBoxDimension:l.height}),u=Rit({translateX:c,translateY:h,useTranslate3d:i})):u=kit,{cssProperties:u,cssClasses:Cit({translateX:c,translateY:h,coordinate:r})}}function R2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function d3(e){for(var t=1;t{if(t.key==="Escape"){var r,n,o,s;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(o=(s=this.props.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:o,children:s,coordinate:a,hasPayload:f,isAnimationActive:i,offset:l,position:u,reverseDirection:c,useTranslate3d:h,viewBox:d,wrapperStyle:v,lastBoundingBox:p,innerRef:m,hasPortalFromProps:y}=this.props,b=typeof l=="number"?l:l.x,g=typeof l=="number"?l:l.y,{cssClasses:T,cssProperties:S}=Lit({allowEscapeViewBox:r,coordinate:a,offsetLeft:b,offsetTop:g,position:u,reverseDirection:c,tooltipBox:{height:p.height,width:p.width},useTranslate3d:h,viewBox:d}),A=y?{}:d3(d3({transition:i&&t?"transform ".concat(n,"ms ").concat(o):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&f?"visible":"hidden",position:"absolute",top:0,left:0}),M=d3(d3({},A),{},{visibility:!this.state.dismissed&&t&&f?"visible":"hidden"},v);return Vt.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:T,style:M,ref:m},s)}}var zRe=()=>{var e;return(e=Li(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function wY(){return wY=Object.assign?Object.assign.bind():function(e){for(var t=1;tps(e.x)&&ps(e.y),I2e=e=>e.base!=null&&aS(e.base)&&aS(e),S_=e=>e.x,M_=e=>e.y,Nit=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(iw(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=D2e["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return D2e[r]||XM},O2e={connectNulls:!1,type:"linear"},Bit=e=>{var{type:t=O2e.type,points:r=[],baseLine:n,layout:o,connectNulls:s=O2e.connectNulls}=e,a=Nit(t,o),f=s?r.filter(aS):r;if(Array.isArray(n)){var i,l=r.map((v,p)=>P2e(P2e({},v),{},{base:n[p]}));o==="vertical"?i=i3().y(M_).x1(S_).x0(v=>v.base.x):i=i3().x(S_).y1(M_).y0(v=>v.base.y);var u=i.defined(I2e).curve(a),c=s?l.filter(I2e):l;return u(c)}var h;o==="vertical"&&Ti(n)?h=i3().y(M_).x1(S_).x0(n):Ti(n)?h=i3().x(S_).y1(M_).y0(n):h=m4e().x(S_).y(M_);var d=h.defined(aS).curve(a);return d(f)},FRe=e=>{var{className:t,points:r,path:n,pathRef:o}=e,s=vb();if((!r||!r.length)&&!n)return null;var a={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||s,connectNulls:e.connectNulls},f=r&&r.length?Bit(a):n;return Vt.createElement("path",wY({},oy(e),lrt(e),{className:ml("recharts-curve",t),d:f===null?void 0:f,ref:o}))},qit=["x","y","top","left","width","height","className"];function TY(){return TY=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(o,"v").concat(n,"M").concat(s,",").concat(t,"h").concat(r),Wit=e=>{var{x:t=0,y:r=0,top:n=0,left:o=0,width:s=0,height:a=0,className:f}=e,i=Vit(e,qit),l=jit({x:t,y:r,top:n,left:o,width:s,height:a},i);return!Ti(t)||!Ti(r)||!Ti(s)||!Ti(a)||!Ti(n)||!Ti(o)?null:Vt.createElement("path",TY({},Cv(l),{className:ml("recharts-cross",f),d:$it(t,r,s,a,n,o)}))};function Xit(e,t,r,n){var o=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-o,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function F2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function N2e(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),NRe=(e,t,r)=>e.map(n=>"".concat(Qit(n)," ").concat(t,"ms ").concat(r)).join(","),eot=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(o=>n.includes(o))),T2=(e,t)=>Object.keys(t).reduce((r,n)=>N2e(N2e({},r),{},{[n]:e(n,t[n])}),{});function B2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function mf(e){for(var t=1;te+(t-e)*r,AY=e=>{var{from:t,to:r}=e;return t!==r},BRe=(e,t,r)=>{var n=T2((o,s)=>{if(AY(s)){var[a,f]=e(s.from,s.to,s.velocity);return mf(mf({},s),{},{from:a,velocity:f})}return s},t);return r<1?T2((o,s)=>AY(s)&&n[o]!=null?mf(mf({},s),{},{velocity:iS(s.velocity,n[o].velocity,r),from:iS(s.from,n[o].from,r)}):s,t):BRe(e,n,r-1)};function aot(e,t,r,n,o,s){var a,f=n.reduce((h,d)=>mf(mf({},h),{},{[d]:{from:e[d],velocity:0,to:t[d]}}),{}),i=()=>T2((h,d)=>d.from,f),l=()=>!Object.values(f).filter(AY).length,u=null,c=h=>{a||(a=h);var d=h-a,v=d/r.dt;f=BRe(r,f,v),o(mf(mf(mf({},e),t),i())),a=h,l()||(u=s.setTimeout(c))};return()=>(u=s.setTimeout(c),()=>{var h;(h=u)===null||h===void 0||h()})}function iot(e,t,r,n,o,s,a){var f=null,i=o.reduce((c,h)=>{var d=e[h],v=t[h];return d==null||v==null?c:mf(mf({},c),{},{[h]:[d,v]})},{}),l,u=c=>{l||(l=c);var h=(c-l)/n,d=T2((p,m)=>iS(...m,r(h)),i);if(s(mf(mf(mf({},e),t),d)),h<1)f=a.setTimeout(u);else{var v=T2((p,m)=>iS(...m,r(1)),i);s(mf(mf(mf({},e),t),v))}};return()=>(f=a.setTimeout(u),()=>{var c;(c=f)===null||c===void 0||c()})}const oot=(e,t,r,n,o,s)=>{var a=eot(e,t);return r==null?()=>(o(mf(mf({},e),t)),()=>{}):r.isStepper===!0?aot(e,t,r,a,o,s):iot(e,t,r,n,a,o,s)};var oS=1e-4,qRe=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],jRe=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),q2e=(e,t)=>r=>{var n=qRe(e,t);return jRe(n,r)},sot=(e,t)=>r=>{var n=qRe(e,t),o=[...n.map((s,a)=>s*a).slice(1),0];return jRe(o,r)},lot=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var o=n.map(s=>parseFloat(s));return[o[0],o[1],o[2],o[3]]},uot=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var o=q2e(e,r),s=q2e(t,n),a=sot(e,r),f=l=>l>1?1:l<0?0:l,i=l=>{for(var u=l>1?1:l,c=u,h=0;h<8;++h){var d=o(c)-u,v=a(c);if(Math.abs(d-u)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:o=17}=t,s=(a,f,i)=>{var l=-(a-f)*r,u=i*n,c=i+(l-u)*o/1e3,h=i*o/1e3+a;return Math.abs(h-f){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return j2e(e);case"spring":return cot();default:if(e.split("(")[0]==="cubic-bezier")return j2e(e)}return typeof e=="function"?e:null};function dot(e){var t,r=()=>null,n=!1,o=null,s=a=>{if(!n){if(Array.isArray(a)){if(!a.length)return;var f=a,[i,...l]=f;if(typeof i=="number"){o=e.setTimeout(s.bind(null,l),i);return}s(i),o=e.setTimeout(s.bind(null,l));return}typeof a=="string"&&(t=a,r(t)),typeof a=="object"&&(t=a,r(t)),typeof a=="function"&&a()}};return{stop:()=>{n=!0},start:a=>{n=!1,o&&(o(),o=null),s(a)},subscribe:a=>(r=a,()=>{r=()=>null}),getTimeoutController:()=>e}}class vot{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),o=null,s=a=>{a-n>=r?t(a):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(s))};return o=requestAnimationFrame(s),()=>{o!=null&&cancelAnimationFrame(o)}}}function pot(){return dot(new vot)}var got=Vt.createContext(pot);function yot(e,t){var r=Vt.useContext(got);return Vt.useMemo(()=>t??r(e),[e,t,r])}var mot=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),pE={isSsr:mot()},xot={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},U2e={t:0},bG={t:1};function CZ(e){var t=Ov(e,xot),{isActive:r,canBegin:n,duration:o,easing:s,begin:a,onAnimationEnd:f,onAnimationStart:i,children:l}=t,u=r==="auto"?!pE.isSsr:r,c=yot(t.animationId,t.animationManager),[h,d]=Vt.useState(u?U2e:bG),v=Vt.useRef(null);return Vt.useEffect(()=>{u||d(bG)},[u]),Vt.useEffect(()=>{if(!u||!n)return db;var p=oot(U2e,bG,hot(s),o,d,c.getTimeoutController()),m=()=>{v.current=p()};return c.start([i,a,m,o,f]),()=>{c.stop(),v.current&&v.current(),f()}},[u,n,o,s,a,i,f,c]),l(h.t)}function RZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=Vt.useRef(g2(t)),n=Vt.useRef(e);return n.current!==e&&(r.current=g2(t),n.current=e),r.current}var bot=["radius"],_ot=["radius"],H2e,G2e,V2e,Y2e,$2e,W2e,X2e,Z2e,K2e,J2e;function Q2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ewe(e){for(var t=1;t{var s=Qg(r),a=Qg(n),f=Math.min(Math.abs(s)/2,Math.abs(a)/2),i=a>=0?1:-1,l=s>=0?1:-1,u=a>=0&&s>=0||a<0&&s<0?1:0,c;if(f>0&&Array.isArray(o)){for(var h=[0,0,0,0],d=0,v=4;df?f:m}c=uu(H2e||(H2e=Yp(["M",",",""])),e,t+i*h[0]),h[0]>0&&(c+=uu(G2e||(G2e=Yp(["A ",",",",0,0,",",",",",""])),h[0],h[0],u,e+l*h[0],t)),c+=uu(V2e||(V2e=Yp(["L ",",",""])),e+r-l*h[1],t),h[1]>0&&(c+=uu(Y2e||(Y2e=Yp(["A ",",",",0,0,",`, + `,",",""])),h[1],h[1],u,e+r,t+i*h[1])),c+=uu($2e||($2e=Yp(["L ",",",""])),e+r,t+n-i*h[2]),h[2]>0&&(c+=uu(W2e||(W2e=Yp(["A ",",",",0,0,",`, + `,",",""])),h[2],h[2],u,e+r-l*h[2],t+n)),c+=uu(X2e||(X2e=Yp(["L ",",",""])),e+l*h[3],t+n),h[3]>0&&(c+=uu(Z2e||(Z2e=Yp(["A ",",",",0,0,",`, + `,",",""])),h[3],h[3],u,e,t+n-i*h[3])),c+="Z"}else if(f>0&&o===+o&&o>0){var y=Math.min(f,o);c=uu(K2e||(K2e=Yp(["M ",",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",","," Z"])),e,t+i*y,y,y,u,e+l*y,t,e+r-l*y,t,y,y,u,e+r,t+i*y,e+r,t+n-i*y,y,y,u,e+r-l*y,t+n,e+l*y,t+n,y,y,u,e,t+n-i*y)}else c=uu(J2e||(J2e=Yp(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return c},nwe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},URe=e=>{var t=Ov(e,nwe),r=Vt.useRef(null),[n,o]=Vt.useState(-1);Vt.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var z=r.current.getTotalLength();z&&o(z)}catch{}},[]);var{x:s,y:a,width:f,height:i,radius:l,className:u}=t,{animationEasing:c,animationDuration:h,animationBegin:d,isAnimationActive:v,isUpdateAnimationActive:p}=t,m=Vt.useRef(f),y=Vt.useRef(i),b=Vt.useRef(s),g=Vt.useRef(a),T=Vt.useMemo(()=>({x:s,y:a,width:f,height:i,radius:l}),[s,a,f,i,l]),S=RZ(T,"rectangle-");if(s!==+s||a!==+a||f!==+f||i!==+i||f===0||i===0)return null;var A=ml("recharts-rectangle",u);if(!p){var M=Cv(t),{radius:w}=M,C=twe(M,bot);return Vt.createElement("path",sS({},C,{x:Qg(s),y:Qg(a),width:Qg(f),height:Qg(i),radius:typeof l=="number"?l:void 0,className:A,d:rwe(s,a,f,i,l)}))}var x=m.current,_=y.current,k=b.current,E=g.current,I="0px ".concat(n===-1?1:n,"px"),F="".concat(n,"px 0px"),D=NRe(["strokeDasharray"],h,typeof c=="string"?c:nwe.animationEasing);return Vt.createElement(CZ,{animationId:S,key:S,canBegin:n>0,duration:h,easing:c,isActive:p,begin:d},z=>{var N=zc(x,f,z),q=zc(_,i,z),P=zc(k,s,z),B=zc(E,a,z);r.current&&(m.current=N,y.current=q,b.current=P,g.current=B);var $;v?z>0?$={transition:D,strokeDasharray:F}:$={strokeDasharray:I}:$={strokeDasharray:F};var Q=Cv(t),{radius:J}=Q,ne=twe(Q,_ot);return Vt.createElement("path",sS({},ne,{radius:typeof l=="number"?l:void 0,className:A,d:rwe(P,B,N,q,l),ref:r,style:ewe(ewe({},$),t.style)}))})};function awe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function iwe(e){for(var t=1;te*180/Math.PI,Fc=(e,t,r,n)=>({x:e+Math.cos(-lS*n)*r,y:t+Math.sin(-lS*n)*r}),Rot=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Lot=(e,t)=>{var{x:r,y:n}=e,{x:o,y:s}=t;return Math.sqrt((r-o)**2+(n-s)**2)},Pot=(e,t)=>{var{x:r,y:n}=e,{cx:o,cy:s}=t,a=Lot({x:r,y:n},{x:o,y:s});if(a<=0)return{radius:a,angle:0};var f=(r-o)/a,i=Math.acos(f);return n>s&&(i=2*Math.PI-i),{radius:a,angle:Cot(i),angleInRadian:i}},Dot=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),o=Math.floor(r/360),s=Math.min(n,o);return{startAngle:t-s*360,endAngle:r-s*360}},Iot=(e,t)=>{var{startAngle:r,endAngle:n}=t,o=Math.floor(r/360),s=Math.floor(n/360),a=Math.min(o,s);return e+a*360},Oot=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:o,angle:s}=Pot({x:r,y:n},t),{innerRadius:a,outerRadius:f}=t;if(of||o===0)return null;var{startAngle:i,endAngle:l}=Dot(t),u=s,c;if(i<=l){for(;u>l;)u-=360;for(;u=i&&u<=l}else{for(;u>i;)u-=360;for(;u=l&&u<=i}return c?iwe(iwe({},t),{},{radius:o,angle:Iot(u,t)}):null};function HRe(e){var{cx:t,cy:r,radius:n,startAngle:o,endAngle:s}=e,a=Fc(t,r,n,o),f=Fc(t,r,n,s);return{points:[a,f],cx:t,cy:r,radius:n,startAngle:o,endAngle:s}}var owe,swe,lwe,uwe,fwe,cwe,hwe;function SY(){return SY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Hd(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},v3=e=>{var{cx:t,cy:r,radius:n,angle:o,sign:s,isExternal:a,cornerRadius:f,cornerIsExternal:i}=e,l=f*(a?1:-1)+n,u=Math.asin(f/l)/lS,c=i?o:o+s*u,h=Fc(t,r,l,c),d=Fc(t,r,n,c),v=i?o-s*u:o,p=Fc(t,r,l*Math.cos(u*lS),v);return{center:h,circleTangency:d,lineTangency:p,theta:u}},GRe=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:s,endAngle:a}=e,f=zot(s,a),i=s+f,l=Fc(t,r,o,s),u=Fc(t,r,o,i),c=uu(owe||(owe=sm(["M ",",",` + A `,",",`,0, + `,",",`, + `,",",` + `])),l.x,l.y,o,o,+(Math.abs(f)>180),+(s>i),u.x,u.y);if(n>0){var h=Fc(t,r,n,s),d=Fc(t,r,n,i);c+=uu(swe||(swe=sm(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),d.x,d.y,n,n,+(Math.abs(f)>180),+(s<=i),h.x,h.y)}else c+=uu(lwe||(lwe=sm(["L ",","," Z"])),t,r);return c},Fot=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,cornerRadius:s,forceCornerRadius:a,cornerIsExternal:f,startAngle:i,endAngle:l}=e,u=Hd(l-i),{circleTangency:c,lineTangency:h,theta:d}=v3({cx:t,cy:r,radius:o,angle:i,sign:u,cornerRadius:s,cornerIsExternal:f}),{circleTangency:v,lineTangency:p,theta:m}=v3({cx:t,cy:r,radius:o,angle:l,sign:-u,cornerRadius:s,cornerIsExternal:f}),y=f?Math.abs(i-l):Math.abs(i-l)-d-m;if(y<0)return a?uu(uwe||(uwe=sm(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),h.x,h.y,s,s,s*2,s,s,-s*2):GRe({cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:i,endAngle:l});var b=uu(fwe||(fwe=sm(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),h.x,h.y,s,s,+(u<0),c.x,c.y,o,o,+(y>180),+(u<0),v.x,v.y,s,s,+(u<0),p.x,p.y);if(n>0){var{circleTangency:g,lineTangency:T,theta:S}=v3({cx:t,cy:r,radius:n,angle:i,sign:u,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),{circleTangency:A,lineTangency:M,theta:w}=v3({cx:t,cy:r,radius:n,angle:l,sign:-u,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),C=f?Math.abs(i-l):Math.abs(i-l)-S-w;if(C<0&&s===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+=uu(cwe||(cwe=sm(["L",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",","Z"])),M.x,M.y,s,s,+(u<0),A.x,A.y,n,n,+(C>180),+(u>0),g.x,g.y,s,s,+(u<0),T.x,T.y)}else b+=uu(hwe||(hwe=sm(["L",",","Z"])),t,r);return b},Not={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},VRe=e=>{var t=Ov(e,Not),{cx:r,cy:n,innerRadius:o,outerRadius:s,cornerRadius:a,forceCornerRadius:f,cornerIsExternal:i,startAngle:l,endAngle:u,className:c}=t;if(s0&&Math.abs(l-u)<360?p=Fot({cx:r,cy:n,innerRadius:o,outerRadius:s,cornerRadius:Math.min(v,d/2),forceCornerRadius:f,cornerIsExternal:i,startAngle:l,endAngle:u}):p=GRe({cx:r,cy:n,innerRadius:o,outerRadius:s,startAngle:l,endAngle:u}),Vt.createElement("path",SY({},Cv(t),{className:h,d:p}))};function Bot(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(D4e(t)){if(e==="centric"){var{cx:n,cy:o,innerRadius:s,outerRadius:a,angle:f}=t,i=Fc(n,o,s,f),l=Fc(n,o,a,f);return[{x:i.x,y:i.y},{x:l.x,y:l.y}]}return HRe(t)}}var _G={},wG={},TG={},dwe;function qot(){return dwe||(dwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H4e();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(TG)),TG}var vwe;function jot(){return vwe||(vwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qot();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(wG)),wG}var pwe;function Uot(){return pwe||(pwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G4e(),r=jot();function n(o,s,a){a&&typeof a!="number"&&t.isIterateeCall(o,s,a)&&(s=a=void 0),o=r.toFinite(o),s===void 0?(s=o,o=0):s=r.toFinite(s),a=a===void 0?ot?1:e>=t?0:NaN}function Vot(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function LZ(e){let t,r,n;e.length!==2?(t=ty,r=(f,i)=>ty(e(f),i),n=(f,i)=>e(f)-i):(t=e===ty||e===Vot?e:Yot,r=e,n=e);function o(f,i,l=0,u=f.length){if(l>>1;r(f[c],i)<0?l=c+1:u=c}while(l>>1;r(f[c],i)<=0?l=c+1:u=c}while(ll&&n(f[c-1],i)>-n(f[c],i)?c-1:c}return{left:o,center:a,right:s}}function Yot(){return 0}function $Re(e){return e===null?NaN:+e}function*$ot(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Wot=LZ(ty),cw=Wot.right;LZ($Re).center;class ywe extends Map{constructor(t,r=Kot){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(mwe(this,t))}has(t){return super.has(mwe(this,t))}set(t,r){return super.set(Xot(this,t),r)}delete(t){return super.delete(Zot(this,t))}}function mwe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Xot({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Zot({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Kot(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Jot(e=ty){if(e===ty)return WRe;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function WRe(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Qot=Math.sqrt(50),est=Math.sqrt(10),tst=Math.sqrt(2);function uS(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),s=n/Math.pow(10,o),a=s>=Qot?10:s>=est?5:s>=tst?2:1;let f,i,l;return o<0?(l=Math.pow(10,-o)/a,f=Math.round(e*l),i=Math.round(t*l),f/lt&&--i,l=-l):(l=Math.pow(10,o)*a,f=Math.round(e/l),i=Math.round(t/l),f*lt&&--i),i0))return[];if(e===t)return[e];const n=t=o))return[];const f=s-o+1,i=new Array(f);if(n)if(a<0)for(let l=0;l=n)&&(r=n);return r}function bwe(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function XRe(e,t,r=0,n=1/0,o){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(o=o===void 0?WRe:Jot(o);n>r;){if(n-r>600){const i=n-r+1,l=t-r+1,u=Math.log(i),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(i-c)/i)*(l-i/2<0?-1:1),d=Math.max(r,Math.floor(t-l*c/i+h)),v=Math.min(n,Math.floor(t+(i-l)*c/i+h));XRe(e,t,d,v,o)}const s=e[t];let a=r,f=n;for(E_(e,r,t),o(e[n],s)>0&&E_(e,r,n);a0;)--f}o(e[r],s)===0?E_(e,r,f):(++f,E_(e,f,n)),f<=t&&(r=f+1),t<=f&&(n=f-1)}return e}function E_(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function rst(e,t,r){if(e=Float64Array.from($ot(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return bwe(e);if(t>=1)return xwe(e);var n,o=(n-1)*t,s=Math.floor(o),a=xwe(XRe(e,s).subarray(0,s+1)),f=bwe(e.subarray(s+1));return a+(f-a)*(o-s)}}function nst(e,t,r=$Re){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,o=(n-1)*t,s=Math.floor(o),a=+r(e[s],s,e),f=+r(e[s+1],s+1,e);return a+(f-a)*(o-s)}}function ast(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++nt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function lst(e,t,r){var n=e[0],o=e[1],s=t[0],a=t[1];return o2?ust:lst,i=l=null,c}function c(h){return h==null||isNaN(h=+h)?s:(i||(i=f(e.map(n),t,r)))(n(a(h)))}return c.invert=function(h){return a(o((l||(l=f(t,e.map(n),op)))(h)))},c.domain=function(h){return arguments.length?(e=Array.from(h,fS),u()):e.slice()},c.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},c.rangeRound=function(h){return t=Array.from(h),r=vM,u()},c.clamp=function(h){return arguments.length?(a=h?!0:Nh,u()):a!==Nh},c.interpolate=function(h){return arguments.length?(r=h,u()):r},c.unknown=function(h){return arguments.length?(s=h,c):s},function(h,d){return n=h,o=d,u()}}function IZ(){return gE()(Nh,Nh)}function KRe(e,t,r,n){var o=kY(e,t,r),s;switch(n=gx(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=K3e(o,a))&&(n.precision=s),JY(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=J3e(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=Z3e(o))&&(n.precision=s-(n.type==="%")*2);break}}return kS(n)}function wy(e){var t=e.domain;return e.ticks=function(r){var n=t();return MY(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return KRe(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,s=n.length-1,a=n[o],f=n[s],i,l,u=10;for(f0;){if(l=EY(a,f,r),l===i)return n[o]=a,n[s]=f,t(n);if(l>0)a=Math.floor(a/l)*l,f=Math.ceil(f/l)*l;else if(l<0)a=Math.ceil(a*l)/l,f=Math.floor(f*l)/l;else break;i=l}return e},e}function JRe(){var e=IZ();return e.copy=function(){return hw(e,JRe())},zv.apply(e,arguments),wy(e)}function QRe(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,fS),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return QRe(e).unknown(t)},e=arguments.length?Array.from(e,fS):[0,1],wy(r)}function eLe(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],s=e[n],a;return sMath.pow(e,t)}function vst(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Awe(e){return(t,r)=>-e(-t,r)}function OZ(e){const t=e(wwe,Twe),r=t.domain;let n=10,o,s;function a(){return o=vst(n),s=dst(n),r()[0]<0?(o=Awe(o),s=Awe(s),e(fst,cst)):e(wwe,Twe),t}return t.base=function(f){return arguments.length?(n=+f,a()):n},t.domain=function(f){return arguments.length?(r(f),a()):r()},t.ticks=f=>{const i=r();let l=i[0],u=i[i.length-1];const c=u0){for(;h<=d;++h)for(v=1;vu)break;y.push(p)}}else for(;h<=d;++h)for(v=n-1;v>=1;--v)if(p=h>0?v/s(-h):v*s(h),!(pu)break;y.push(p)}y.length*2{if(f==null&&(f=10),i==null&&(i=n===10?"s":","),typeof i!="function"&&(!(n%1)&&(i=gx(i)).precision==null&&(i.trim=!0),i=kS(i)),f===1/0)return i;const l=Math.max(1,n*f/t.ticks().length);return u=>{let c=u/s(Math.round(o(u)));return c*nr(eLe(r(),{floor:f=>s(Math.floor(o(f))),ceil:f=>s(Math.ceil(o(f)))})),t}function tLe(){const e=OZ(gE()).domain([1,10]);return e.copy=()=>hw(e,tLe()).base(e.base()),zv.apply(e,arguments),e}function Swe(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mwe(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zZ(e){var t=1,r=e(Swe(t),Mwe(t));return r.constant=function(n){return arguments.length?e(Swe(t=+n),Mwe(t)):t},wy(r)}function rLe(){var e=zZ(gE());return e.copy=function(){return hw(e,rLe()).constant(e.constant())},zv.apply(e,arguments)}function Ewe(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pst(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function gst(e){return e<0?-e*e:e*e}function FZ(e){var t=e(Nh,Nh),r=1;function n(){return r===1?e(Nh,Nh):r===.5?e(pst,gst):e(Ewe(r),Ewe(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},wy(t)}function NZ(){var e=FZ(gE());return e.copy=function(){return hw(e,NZ()).exponent(e.exponent())},zv.apply(e,arguments),e}function yst(){return NZ.apply(null,arguments).exponent(.5)}function kwe(e){return Math.sign(e)*e*e}function mst(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nLe(){var e=IZ(),t=[0,1],r=!1,n;function o(s){var a=mst(e(s));return isNaN(a)?n:r?Math.round(a):a}return o.invert=function(s){return e.invert(kwe(s))},o.domain=function(s){return arguments.length?(e.domain(s),o):e.domain()},o.range=function(s){return arguments.length?(e.range((t=Array.from(s,fS)).map(kwe)),o):t.slice()},o.rangeRound=function(s){return o.range(s).round(!0)},o.round=function(s){return arguments.length?(r=!!s,o):r},o.clamp=function(s){return arguments.length?(e.clamp(s),o):e.clamp()},o.unknown=function(s){return arguments.length?(n=s,o):n},o.copy=function(){return nLe(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},zv.apply(o,arguments),wy(o)}function aLe(){var e=[],t=[],r=[],n;function o(){var a=0,f=Math.max(1,t.length);for(r=new Array(f-1);++a0?r[f-1]:e[0],f=r?[n[r-1],t]:[n[l-1],n[l]]},a.unknown=function(i){return arguments.length&&(s=i),a},a.thresholds=function(){return n.slice()},a.copy=function(){return iLe().domain([e,t]).range(o).unknown(s)},zv.apply(wy(a),arguments)}function oLe(){var e=[.5],t=[0,1],r,n=1;function o(s){return s!=null&&s<=s?t[cw(e,s,0,n)]:r}return o.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},o.unknown=function(s){return arguments.length?(r=s,o):r},o.copy=function(){return oLe().domain(e).range(t).unknown(r)},zv.apply(o,arguments)}const SG=new Date,MG=new Date;function Sf(e,t,r,n){function o(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return o.floor=s=>(e(s=new Date(+s)),s),o.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),o.round=s=>{const a=o(s),f=o.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),o.range=(s,a,f)=>{const i=[];if(s=o.ceil(s),f=f==null?1:Math.floor(f),!(s0))return i;let l;do i.push(l=new Date(+s)),t(s,f),e(s);while(lSf(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;t(a,-1),!s(a););else for(;--f>=0;)for(;t(a,1),!s(a););}),r&&(o.count=(s,a)=>(SG.setTime(+s),MG.setTime(+a),e(SG),e(MG),Math.floor(r(SG,MG))),o.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?a=>n(a)%s===0:a=>o.count(0,a)%s===0):o)),o}const cS=Sf(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cS.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Sf(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):cS);cS.range;const Y0=1e3,Mv=Y0*60,$0=Mv*60,Q0=$0*24,BZ=Q0*7,Cwe=Q0*30,EG=Q0*365,lm=Sf(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Y0)},(e,t)=>(t-e)/Y0,e=>e.getUTCSeconds());lm.range;const qZ=Sf(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Y0)},(e,t)=>{e.setTime(+e+t*Mv)},(e,t)=>(t-e)/Mv,e=>e.getMinutes());qZ.range;const jZ=Sf(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mv)},(e,t)=>(t-e)/Mv,e=>e.getUTCMinutes());jZ.range;const UZ=Sf(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Y0-e.getMinutes()*Mv)},(e,t)=>{e.setTime(+e+t*$0)},(e,t)=>(t-e)/$0,e=>e.getHours());UZ.range;const HZ=Sf(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*$0)},(e,t)=>(t-e)/$0,e=>e.getUTCHours());HZ.range;const GZ=Sf(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mv)/Q0,e=>e.getDate()-1);GZ.range;const sLe=Sf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Q0,e=>e.getUTCDate()-1);sLe.range;const lLe=Sf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Q0,e=>Math.floor(e/Q0));lLe.range;function Zm(e){return Sf(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Mv)/BZ)}const VZ=Zm(0),xst=Zm(1),bst=Zm(2),_st=Zm(3),wst=Zm(4),Tst=Zm(5),Ast=Zm(6);VZ.range;xst.range;bst.range;_st.range;wst.range;Tst.range;Ast.range;function Km(e){return Sf(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/BZ)}const YZ=Km(0),Sst=Km(1),Mst=Km(2),Est=Km(3),kst=Km(4),Cst=Km(5),Rst=Km(6);YZ.range;Sst.range;Mst.range;Est.range;kst.range;Cst.range;Rst.range;const $Z=Sf(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());$Z.range;const WZ=Sf(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());WZ.range;const yE=Sf(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yE.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Sf(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});yE.range;const mE=Sf(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());mE.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Sf(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});mE.range;function uLe(e,t,r,n,o,s){const a=[[lm,1,Y0],[lm,5,5*Y0],[lm,15,15*Y0],[lm,30,30*Y0],[s,1,Mv],[s,5,5*Mv],[s,15,15*Mv],[s,30,30*Mv],[o,1,$0],[o,3,3*$0],[o,6,6*$0],[o,12,12*$0],[n,1,Q0],[n,2,2*Q0],[r,1,BZ],[t,1,Cwe],[t,3,3*Cwe],[e,1,EG]];function f(l,u,c){const h=um).right(a,h);if(d===a.length)return e.every(kY(l/EG,u/EG,c));if(d===0)return cS.every(Math.max(kY(l,u,c),1));const[v,p]=a[h/a[d-1][2]t(o/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(o,s)=>rst(e,s/n))},r.copy=function(){return dLe(t).domain(e)},vg.apply(r,arguments)}function bE(){var e=0,t=.5,r=1,n=1,o,s,a,f,i,l=Nh,u,c=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+u(p))-s)*(n*pe.chartData,yLe=Tn([pg],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),mLe=(e,t,r,n)=>n?yLe(e):pg(e),jst=(e,t,r)=>r?yLe(e):pg(e);function eg(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(ps(t)&&ps(r))return!0}return!1}function Rwe(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function xLe(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,o,s;if(ps(r))o=r;else if(typeof r=="function")return;if(ps(n))s=n;else if(typeof n=="function")return;var a=[o,s];if(eg(a))return a}}function Ust(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(eg(n))return Rwe(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[o,s]=e,a,f;if(o==="auto")t!=null&&(a=Math.min(...t));else if(Ti(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&c2e.test(o)){var i=c2e.exec(o);if(i==null||i[1]==null||t==null)a=void 0;else{var l=+i[1];a=t[0]-l}}else a=t==null?void 0:t[0];if(s==="auto")t!=null&&(f=Math.max(...t));else if(Ti(s))f=s;else if(typeof s=="function")try{t!=null&&(f=s(t==null?void 0:t[1]))}catch{}else if(typeof s=="string"&&h2e.test(s)){var u=h2e.exec(s);if(u==null||u[1]==null||t==null)f=void 0;else{var c=+u[1];f=t[1]+c}}else f=t==null?void 0:t[1];var h=[a,f];if(eg(h))return t==null?h:Rwe(h,t,r)}}}var pb=1e9,Hst={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},QZ,Rl=!0,Lv="[DecimalError] ",hm=Lv+"Invalid argument: ",JZ=Lv+"Exponent out of range: ",gb=Math.floor,nm=Math.pow,Gst=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ud,nc=1e7,pl=7,bLe=9007199254740991,hS=gb(bLe/pl),Za={};Za.absoluteValue=Za.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Za.comparedTo=Za.cmp=function(e){var t,r,n,o,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(n=s.d.length,o=e.d.length,t=0,r=ne.d[t]^s.s<0?1:-1;return n===o?0:n>o^s.s<0?1:-1};Za.decimalPlaces=Za.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*pl;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Za.dividedBy=Za.div=function(e){return W0(this,new this.constructor(e))};Za.dividedToIntegerBy=Za.idiv=function(e){var t=this,r=t.constructor;return tl(W0(t,new r(e),0,1),r.precision)};Za.equals=Za.eq=function(e){return!this.cmp(e)};Za.exponent=function(){return $u(this)};Za.greaterThan=Za.gt=function(e){return this.cmp(e)>0};Za.greaterThanOrEqualTo=Za.gte=function(e){return this.cmp(e)>=0};Za.isInteger=Za.isint=function(){return this.e>this.d.length-2};Za.isNegative=Za.isneg=function(){return this.s<0};Za.isPositive=Za.ispos=function(){return this.s>0};Za.isZero=function(){return this.s===0};Za.lessThan=Za.lt=function(e){return this.cmp(e)<0};Za.lessThanOrEqualTo=Za.lte=function(e){return this.cmp(e)<1};Za.logarithm=Za.log=function(e){var t,r=this,n=r.constructor,o=n.precision,s=o+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ud))throw Error(Lv+"NaN");if(r.s<1)throw Error(Lv+(r.s?"NaN":"-Infinity"));return r.eq(Ud)?new n(0):(Rl=!1,t=W0(A2(r,s),A2(e,s),s),Rl=!0,tl(t,o))};Za.minus=Za.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TLe(t,e):_Le(t,(e.s=-e.s,e))};Za.modulo=Za.mod=function(e){var t,r=this,n=r.constructor,o=n.precision;if(e=new n(e),!e.s)throw Error(Lv+"NaN");return r.s?(Rl=!1,t=W0(r,e,0,1).times(e),Rl=!0,r.minus(t)):tl(new n(r),o)};Za.naturalExponential=Za.exp=function(){return wLe(this)};Za.naturalLogarithm=Za.ln=function(){return A2(this)};Za.negated=Za.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Za.plus=Za.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_Le(t,e):TLe(t,(e.s=-e.s,e))};Za.precision=Za.sd=function(e){var t,r,n,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hm+e);if(t=$u(o)+1,n=o.d.length-1,r=n*pl+1,n=o.d[n],n){for(;n%10==0;n/=10)r--;for(n=o.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Za.squareRoot=Za.sqrt=function(){var e,t,r,n,o,s,a,f=this,i=f.constructor;if(f.s<1){if(!f.s)return new i(0);throw Error(Lv+"NaN")}for(e=$u(f),Rl=!1,o=Math.sqrt(+f),o==0||o==1/0?(t=o0(f.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=gb((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new i(t)):n=new i(o.toString()),r=i.precision,o=a=r+3;;)if(s=n,n=s.plus(W0(f,s,a+2)).times(.5),o0(s.d).slice(0,a)===(t=o0(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(tl(s,r+1,0),s.times(s).eq(f)){n=s;break}}else if(t!="9999")break;a+=4}return Rl=!0,tl(n,r)};Za.times=Za.mul=function(e){var t,r,n,o,s,a,f,i,l,u=this,c=u.constructor,h=u.d,d=(e=new c(e)).d;if(!u.s||!e.s)return new c(0);for(e.s*=u.s,r=u.e+e.e,i=h.length,l=d.length,i=0;){for(t=0,o=i+n;o>n;)f=s[o]+d[n]*h[o-n-1]+t,s[o--]=f%nc|0,t=f/nc|0;s[o]=(s[o]+t)%nc|0}for(;!s[--a];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,Rl?tl(e,c.precision):e};Za.toDecimalPlaces=Za.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(d0(e,0,pb),t===void 0?t=n.rounding:d0(t,0,8),tl(r,e+$u(r)+1,t))};Za.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=km(n,!0):(d0(e,0,pb),t===void 0?t=o.rounding:d0(t,0,8),n=tl(new o(n),e+1,t),r=km(n,!0,e+1)),r};Za.toFixed=function(e,t){var r,n,o=this,s=o.constructor;return e===void 0?km(o):(d0(e,0,pb),t===void 0?t=s.rounding:d0(t,0,8),n=tl(new s(o),e+$u(o)+1,t),r=km(n.abs(),!1,e+$u(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)};Za.toInteger=Za.toint=function(){var e=this,t=e.constructor;return tl(new t(e),$u(e)+1,t.rounding)};Za.toNumber=function(){return+this};Za.toPower=Za.pow=function(e){var t,r,n,o,s,a,f=this,i=f.constructor,l=12,u=+(e=new i(e));if(!e.s)return new i(Ud);if(f=new i(f),!f.s){if(e.s<1)throw Error(Lv+"Infinity");return f}if(f.eq(Ud))return f;if(n=i.precision,e.eq(Ud))return tl(f,n);if(t=e.e,r=e.d.length-1,a=t>=r,s=f.s,a){if((r=u<0?-u:u)<=bLe){for(o=new i(Ud),t=Math.ceil(n/pl+4),Rl=!1;r%2&&(o=o.times(f),Pwe(o.d,t)),r=gb(r/2),r!==0;)f=f.times(f),Pwe(f.d,t);return Rl=!0,e.s<0?new i(Ud).div(o):tl(o,n)}}else if(s<0)throw Error(Lv+"NaN");return s=s<0&&e.d[Math.max(t,r)]&1?-1:1,f.s=1,Rl=!1,o=e.times(A2(f,n+l)),Rl=!0,o=wLe(o),o.s=s,o};Za.toPrecision=function(e,t){var r,n,o=this,s=o.constructor;return e===void 0?(r=$u(o),n=km(o,r<=s.toExpNeg||r>=s.toExpPos)):(d0(e,1,pb),t===void 0?t=s.rounding:d0(t,0,8),o=tl(new s(o),e,t),r=$u(o),n=km(o,e<=r||r<=s.toExpNeg,e)),n};Za.toSignificantDigits=Za.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(d0(e,1,pb),t===void 0?t=n.rounding:d0(t,0,8)),tl(new n(r),e,t)};Za.toString=Za.valueOf=Za.val=Za.toJSON=Za[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$u(e),r=e.constructor;return km(e,t<=r.toExpNeg||t>=r.toExpPos)};function _Le(e,t){var r,n,o,s,a,f,i,l,u=e.constructor,c=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Rl?tl(t,c):t;if(i=e.d,l=t.d,a=e.e,o=t.e,i=i.slice(),s=a-o,s){for(s<0?(n=i,s=-s,f=l.length):(n=l,o=a,f=i.length),a=Math.ceil(c/pl),f=a>f?a+1:f+1,s>f&&(s=f,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(f=i.length,s=l.length,f-s<0&&(s=f,n=l,l=i,i=n),r=0;s;)r=(i[--s]=i[s]+l[s]+r)/nc|0,i[s]%=nc;for(r&&(i.unshift(r),++o),f=i.length;i[--f]==0;)i.pop();return t.d=i,t.e=o,Rl?tl(t,c):t}function d0(e,t,r){if(e!==~~e||er)throw Error(hm+e)}function o0(e){var t,r,n,o=e.length-1,s="",a=e[0];if(o>0){for(s+=a,t=1;ta?1:-1;else for(f=i=0;fo[f]?1:-1;break}return i}function r(n,o,s){for(var a=0;s--;)n[s]-=a,a=n[s]1;)n.shift()}return function(n,o,s,a){var f,i,l,u,c,h,d,v,p,m,y,b,g,T,S,A,M,w,C=n.constructor,x=n.s==o.s?1:-1,_=n.d,k=o.d;if(!n.s)return new C(n);if(!o.s)throw Error(Lv+"Division by zero");for(i=n.e-o.e,M=k.length,S=_.length,d=new C(x),v=d.d=[],l=0;k[l]==(_[l]||0);)++l;if(k[l]>(_[l]||0)&&--i,s==null?b=s=C.precision:a?b=s+($u(n)-$u(o))+1:b=s,b<0)return new C(0);if(b=b/pl+2|0,l=0,M==1)for(u=0,k=k[0],b++;(l1&&(k=e(k,u),_=e(_,u),M=k.length,S=_.length),T=M,p=_.slice(0,M),m=p.length;m=nc/2&&++A;do u=0,f=t(k,p,M,m),f<0?(y=p[0],M!=m&&(y=y*nc+(p[1]||0)),u=y/A|0,u>1?(u>=nc&&(u=nc-1),c=e(k,u),h=c.length,m=p.length,f=t(c,p,h,m),f==1&&(u--,r(c,M16)throw Error(JZ+$u(e));if(!e.s)return new u(Ud);for(Rl=!1,f=c,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(n=Math.log(nm(2,l))/Math.LN10*2+5|0,f+=n,r=o=s=new u(Ud),u.precision=f;;){if(o=tl(o.times(e),f),r=r.times(++i),a=s.plus(W0(o,r,f)),o0(a.d).slice(0,f)===o0(s.d).slice(0,f)){for(;l--;)s=tl(s.times(s),f);return u.precision=c,t==null?(Rl=!0,tl(s,c)):s}s=a}}function $u(e){for(var t=e.e*pl,r=e.d[0];r>=10;r/=10)t++;return t}function kG(e,t,r){if(t>e.LN10.sd())throw Rl=!0,r&&(e.precision=r),Error(Lv+"LN10 precision limit exceeded");return tl(new e(e.LN10),t)}function $g(e){for(var t="";e--;)t+="0";return t}function A2(e,t){var r,n,o,s,a,f,i,l,u,c=1,h=10,d=e,v=d.d,p=d.constructor,m=p.precision;if(d.s<1)throw Error(Lv+(d.s?"NaN":"-Infinity"));if(d.eq(Ud))return new p(0);if(t==null?(Rl=!1,l=m):l=t,d.eq(10))return t==null&&(Rl=!0),kG(p,l);if(l+=h,p.precision=l,r=o0(v),n=r.charAt(0),s=$u(d),Math.abs(s)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=o0(d.d),n=r.charAt(0),c++;s=$u(d),n>1?(d=new p("0."+r),s++):d=new p(n+"."+r.slice(1))}else return i=kG(p,l+2,m).times(s+""),d=A2(new p(n+"."+r.slice(1)),l-h).plus(i),p.precision=m,t==null?(Rl=!0,tl(d,m)):d;for(f=a=d=W0(d.minus(Ud),d.plus(Ud),l),u=tl(d.times(d),l),o=3;;){if(a=tl(a.times(u),l),i=f.plus(W0(a,new p(o),l)),o0(i.d).slice(0,l)===o0(f.d).slice(0,l))return f=f.times(2),s!==0&&(f=f.plus(kG(p,l+2,m).times(s+""))),f=W0(f,new p(c),l),p.precision=m,t==null?(Rl=!0,tl(f,m)):f;f=i,o+=2}}function Lwe(e,t){var r,n,o;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(n,o),t){if(o-=n,r=r-n-1,e.e=gb(r/pl),e.d=[],n=(r+1)%pl,r<0&&(n+=pl),nhS||e.e<-hS))throw Error(JZ+r)}else e.s=0,e.e=0,e.d=[0];return e}function tl(e,t,r){var n,o,s,a,f,i,l,u,c=e.d;for(a=1,s=c[0];s>=10;s/=10)a++;if(n=t-a,n<0)n+=pl,o=t,l=c[u=0];else{if(u=Math.ceil((n+1)/pl),s=c.length,u>=s)return e;for(l=s=c[u],a=1;s>=10;s/=10)a++;n%=pl,o=n-pl+a}if(r!==void 0&&(s=nm(10,a-o-1),f=l/s%10|0,i=t<0||c[u+1]!==void 0||l%s,i=r<4?(f||i)&&(r==0||r==(e.s<0?3:2)):f>5||f==5&&(r==4||i||r==6&&(n>0?o>0?l/nm(10,a-o):0:c[u-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return i?(s=$u(e),c.length=1,t=t-s-1,c[0]=nm(10,(pl-t%pl)%pl),e.e=gb(-t/pl)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=u,s=1,u--):(c.length=u+1,s=nm(10,pl-n),c[u]=o>0?(l/nm(10,a-o)%nm(10,o)|0)*s:0),i)for(;;)if(u==0){(c[0]+=s)==nc&&(c[0]=1,++e.e);break}else{if(c[u]+=s,c[u]!=nc)break;c[u--]=0,s=1}for(n=c.length;c[--n]===0;)c.pop();if(Rl&&(e.e>hS||e.e<-hS))throw Error(JZ+$u(e));return e}function TLe(e,t){var r,n,o,s,a,f,i,l,u,c,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Rl?tl(t,d):t;if(i=e.d,c=t.d,n=t.e,l=e.e,i=i.slice(),a=l-n,a){for(u=a<0,u?(r=i,a=-a,f=c.length):(r=c,n=l,f=i.length),o=Math.max(Math.ceil(d/pl),f)+2,a>o&&(a=o,r.length=1),r.reverse(),o=a;o--;)r.push(0);r.reverse()}else{for(o=i.length,f=c.length,u=o0;--o)i[f++]=0;for(o=c.length;o>a;){if(i[--o]0?s=s.charAt(0)+"."+s.slice(1)+$g(n):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(o<0?"e":"e+")+o):o<0?(s="0."+$g(-o-1)+s,r&&(n=r-a)>0&&(s+=$g(n))):o>=a?(s+=$g(o+1-a),r&&(n=r-o-1)>0&&(s=s+"."+$g(n))):((n=o+1)0&&(o+1===a&&(s+="."),s+=$g(n))),e.s<0?"-"+s:s}function Pwe(e,t){if(e.length>t)return e.length=t,!0}function ALe(e){var t,r,n;function o(s){var a=this;if(!(a instanceof o))return new o(s);if(a.constructor=o,s instanceof o){a.s=s.s,a.e=s.e,a.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(hm+s);if(s>0)a.s=1;else if(s<0)s=-s,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(s===~~s&&s<1e7){a.e=0,a.d=[s];return}return Lwe(a,s.toString())}else if(typeof s!="string")throw Error(hm+s);if(s.charCodeAt(0)===45?(s=s.slice(1),a.s=-1):a.s=1,Gst.test(s))Lwe(a,s);else throw Error(hm+s)}if(o.prototype=Za,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=ALe,o.config=o.set=Vst,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(hm+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(hm+r+": "+n);return this}var QZ=ALe(Hst);Ud=new QZ(1);const Ls=QZ;function SLe(e){var t;return e===0?t=1:t=Math.floor(new Ls(e).abs().log(10).toNumber())+1,t}function MLe(e,t,r){for(var n=new Ls(e),o=0,s=[];n.lt(t)&&o<1e5;)s.push(n.toNumber()),n=n.add(r),o++;return s}var ELe=e=>{var[t,r]=e,[n,o]=[t,r];return t>r&&([n,o]=[r,t]),[n,o]},kLe=(e,t,r)=>{if(e.lte(0))return new Ls(0);var n=SLe(e.toNumber()),o=new Ls(10).pow(n),s=e.div(o),a=n!==1?.05:.1,f=new Ls(Math.ceil(s.div(a).toNumber())).add(r).mul(a),i=f.mul(o);return t?new Ls(i.toNumber()):new Ls(Math.ceil(i.toNumber()))},Yst=(e,t,r)=>{var n=new Ls(1),o=new Ls(e);if(!o.isint()&&r){var s=Math.abs(e);s<1?(n=new Ls(10).pow(SLe(e)-1),o=new Ls(Math.floor(o.div(n).toNumber())).mul(n)):s>1&&(o=new Ls(Math.floor(e)))}else e===0?o=new Ls(Math.floor((t-1)/2)):r||(o=new Ls(Math.floor(e)));for(var a=Math.floor((t-1)/2),f=[],i=0;i4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ls(0),tickMin:new Ls(0),tickMax:new Ls(0)};var a=kLe(new Ls(r).sub(t).div(n-1),o,s),f;t<=0&&r>=0?f=new Ls(0):(f=new Ls(t).add(r).div(2),f=f.sub(new Ls(f).mod(a)));var i=Math.ceil(f.sub(t).div(a).toNumber()),l=Math.ceil(new Ls(r).sub(f).div(a).toNumber()),u=i+l+1;return u>n?CLe(t,r,n,o,s+1):(u0?l+(n-u):l,i=r>0?i:i+(n-u)),{step:a,tickMin:f.sub(new Ls(i).mul(a)),tickMax:f.add(new Ls(l).mul(a))})},$st=function(t){var[r,n]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),[f,i]=ELe([r,n]);if(f===-1/0||i===1/0){var l=i===1/0?[f,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),i];return r>n?l.reverse():l}if(f===i)return Yst(f,o,s);var{step:u,tickMin:c,tickMax:h}=CLe(f,i,a,s,0),d=MLe(c,h.add(new Ls(.1).mul(u)),u);return r>n?d.reverse():d},Wst=function(t,r){var[n,o]=t,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,f]=ELe([n,o]);if(a===-1/0||f===1/0)return[n,o];if(a===f)return[a];var i=Math.max(r,2),l=kLe(new Ls(f).sub(a).div(i-1),s,0),u=[...MLe(new Ls(a),new Ls(f),l),f];return s===!1&&(u=u.map(c=>Math.round(c))),n>o?u.reverse():u},RLe=e=>e.rootProps.maxBarSize,Xst=e=>e.rootProps.barGap,LLe=e=>e.rootProps.barCategoryGap,Zst=e=>e.rootProps.barSize,_E=e=>e.rootProps.stackOffset,PLe=e=>e.rootProps.reverseStackOrder,eK=e=>e.options.chartName,tK=e=>e.rootProps.syncId,DLe=e=>e.rootProps.syncMethod,rK=e=>e.options.eventEmitter,pd={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Zy={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},$p={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},wE=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function TE(e,t,r){if(r!=="auto")return r;if(e!=null)return _y(e,t)?"category":"number"}function Dwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function dS(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},nK=Tn([elt,kRe],(e,t)=>{var r;if(e!=null)return e;var n=(r=TE(t,"angleAxis",Iwe.type))!==null&&r!==void 0?r:"category";return dS(dS({},Iwe),{},{type:n})}),tlt=(e,t)=>e.polarAxis.radiusAxis[t],aK=Tn([tlt,kRe],(e,t)=>{var r;if(e!=null)return e;var n=(r=TE(t,"radiusAxis",Owe.type))!==null&&r!==void 0?r:"category";return dS(dS({},Owe),{},{type:n})}),AE=e=>e.polarOptions,iK=Tn([hg,dg,dc],Rot),ILe=Tn([AE,iK],(e,t)=>{if(e!=null)return vp(e.innerRadius,t,0)}),OLe=Tn([AE,iK],(e,t)=>{if(e!=null)return vp(e.outerRadius,t,t*.8)}),rlt=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},zLe=Tn([AE],rlt);Tn([nK,zLe],wE);var FLe=Tn([iK,ILe,OLe],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Tn([aK,FLe],wE);var NLe=Tn([rl,AE,ILe,OLe,hg,dg],(e,t,r,n,o,s)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:a,cy:f,startAngle:i,endAngle:l}=t;return{cx:vp(a,o,o/2),cy:vp(f,s,s/2),innerRadius:r,outerRadius:n,startAngle:i,endAngle:l,clockWise:!1}}}),vc=(e,t)=>t,SE=(e,t,r)=>r;function oK(e){return e==null?void 0:e.id}function BLe(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:o,dataKey:s}=r,a=new Map;return e.forEach(f=>{var i,l=(i=f.data)!==null&&i!==void 0?i:n;if(!(l==null||l.length===0)){var u=oK(f);l.forEach((c,h)=>{var d=s==null||o?h:String(Nc(c,s,null)),v=Nc(c,f.dataKey,0),p;a.has(d)?p=a.get(d):p={},Object.assign(p,{[u]:v}),a.set(d,p)})}}),Array.from(a.values())}function ME(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var EE=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function kE(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function nlt(e,t){if(e.length===t.length){for(var r=0;r{var t=rl(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},yb=e=>e.tooltip.settings.axisId;function alt(e){if(e in U_)return U_[e]();var t="scale".concat(iw(e));if(t in U_)return U_[t]()}function zwe(e){var t=e.ticks,r=e.bandwidth,n=e.range(),o=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(s){function a(){return s.apply(this,arguments)}return a.toString=function(){return s.toString()},a})(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(s){var a=o[0],f=o[1];return a<=f?s>=a&&s<=f:s>=f&&s<=a},bandwidth:r?()=>r.call(e):void 0,ticks:t?s=>t.call(e,s):void 0,map:(s,a)=>{var f=e(s);if(f!=null){if(e.bandwidth&&a!==null&&a!==void 0&&a.position){var i=e.bandwidth();switch(a.position){case"middle":f+=i/2;break;case"end":f+=i;break}}return f}}}}function Fwe(e,t,r){if(typeof e=="function")return zwe(e.copy().domain(t).range(r));if(e!=null){var n=alt(e);if(n!=null)return n.domain(t).range(r),zwe(n)}}var ilt=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!eg(t)){for(var r,n,o=0;on)&&(n=s))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Nwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vS(e){for(var t=1;te.cartesianAxis.xAxis[t],gg=(e,t)=>{var r=qLe(e,t);return r??tc},rc={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:LY,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:lw},jLe=(e,t)=>e.cartesianAxis.yAxis[t],yg=(e,t)=>{var r=jLe(e,t);return r??rc},ult={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},sK=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??ult},Yh=(e,t,r)=>{switch(t){case"xAxis":return gg(e,r);case"yAxis":return yg(e,r);case"zAxis":return sK(e,r);case"angleAxis":return nK(e,r);case"radiusAxis":return aK(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},flt=(e,t,r)=>{switch(t){case"xAxis":return gg(e,r);case"yAxis":return yg(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},dw=(e,t,r)=>{switch(t){case"xAxis":return gg(e,r);case"yAxis":return yg(e,r);case"angleAxis":return nK(e,r);case"radiusAxis":return aK(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ULe=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function HLe(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var lK=e=>e.graphicalItems.cartesianItems,clt=Tn([vc,SE],HLe),GLe=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),vw=Tn([lK,Yh,clt],GLe,{memoizeOptions:{resultEqualityCheck:kE}}),VLe=Tn([vw],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(ME)),YLe=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),hlt=Tn([vw],YLe),$Le=e=>e.map(t=>t.data).filter(Boolean).flat(1),dlt=Tn([vw],$Le,{memoizeOptions:{resultEqualityCheck:kE}}),WLe=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:o}=t;return e.length>0?e:r.slice(n,o+1)},uK=Tn([dlt,mLe],WLe),XLe=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Nc(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(o=>({value:Nc(o,n)}))):e.map(n=>({value:n})),CE=Tn([uK,Yh,vw],XLe);function ZLe(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function O3(e){if(h0(e)||e instanceof Date){var t=Number(e);if(ps(t))return t}}function Bwe(e){if(Array.isArray(e)){var t=[O3(e[0]),O3(e[1])];return eg(t)?t:void 0}var r=O3(e);if(r!=null)return[r,r]}function tg(e){return e.map(O3).filter(a0)}function vlt(e,t,r){return!r||typeof t!="number"||c0(t)?[]:r.length?tg(r.flatMap(n=>{var o=Nc(e,n.dataKey),s,a;if(Array.isArray(o)?[s,a]=o:s=a=o,!(!ps(s)||!ps(a)))return[t-s,t+a]})):[]}var Mf=e=>{var t=pc(e),r=yb(e);return dw(e,t,r)},pw=Tn([Mf],e=>e==null?void 0:e.dataKey),plt=Tn([VLe,mLe,Mf],BLe),KLe=(e,t,r,n)=>{var o={},s=t.reduce((a,f)=>{if(f.stackId==null)return a;var i=a[f.stackId];return i==null&&(i=[]),i.push(f),a[f.stackId]=i,a},o);return Object.fromEntries(Object.entries(s).map(a=>{var[f,i]=a,l=n?[...i].reverse():i,u=l.map(oK);return[f,{stackedData:yat(e,u,r),graphicalItems:l}]}))},PY=Tn([plt,VLe,_E,PLe],KLe),JLe=(e,t,r,n)=>{var{dataStartIndex:o,dataEndIndex:s}=t;if(n==null&&r!=="zAxis"){var a=wat(e,o,s);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},glt=Tn([Yh],e=>e.allowDataOverflow),fK=e=>{var t;if(e==null||!("domain"in e))return LY;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=tg(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:LY},QLe=Tn([Yh],fK),ePe=Tn([QLe,glt],xLe),ylt=Tn([PY,pg,vc,ePe],JLe,{memoizeOptions:{resultEqualityCheck:EE}}),cK=e=>e.errorBars,mlt=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>ZLe(r,n)),pS=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var s,a;if(r.length>0&&e.forEach(f=>{r.forEach(i=>{var l,u,c=(l=n[i.id])===null||l===void 0?void 0:l.filter(y=>ZLe(o,y)),h=Nc(f,(u=t.dataKey)!==null&&u!==void 0?u:i.dataKey),d=vlt(f,h,c);if(d.length>=2){var v=Math.min(...d),p=Math.max(...d);(s==null||va)&&(a=p)}var m=Bwe(h);m!=null&&(s=s==null?m[0]:Math.min(s,m[0]),a=a==null?m[1]:Math.max(a,m[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(f=>{var i=Bwe(Nc(f,t.dataKey));i!=null&&(s=s==null?i[0]:Math.min(s,i[0]),a=a==null?i[1]:Math.max(a,i[1]))}),ps(s)&&ps(a))return[s,a]},xlt=Tn([uK,Yh,hlt,cK,vc],tPe,{memoizeOptions:{resultEqualityCheck:EE}});function blt(e){var{value:t}=e;if(h0(t)||t instanceof Date)return t}var _lt=(e,t,r)=>{var n=e.map(blt).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&R4e(n))?YRe(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},rPe=e=>e.referenceElements.dots,mb=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),wlt=Tn([rPe,vc,SE],mb),nPe=e=>e.referenceElements.areas,Tlt=Tn([nPe,vc,SE],mb),aPe=e=>e.referenceElements.lines,Alt=Tn([aPe,vc,SE],mb),iPe=(e,t)=>{if(e!=null){var r=tg(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Slt=Tn(wlt,vc,iPe),oPe=(e,t)=>{if(e!=null){var r=tg(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Mlt=Tn([Tlt,vc],oPe);function Elt(e){var t;if(e.x!=null)return tg([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:tg(r)}function klt(e){var t;if(e.y!=null)return tg([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:tg(r)}var sPe=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?Elt(n):klt(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Clt=Tn([Alt,vc],sPe),Rlt=Tn(Slt,Clt,Mlt,(e,t,r)=>pS(e,r,t)),lPe=(e,t,r,n,o,s,a,f)=>{if(r!=null)return r;var i=a==="vertical"&&f==="xAxis"||a==="horizontal"&&f==="yAxis",l=i?pS(n,s,o):pS(s,o);return Ust(t,l,e.allowDataOverflow)},Llt=Tn([Yh,QLe,ePe,ylt,xlt,Rlt,rl,vc],lPe,{memoizeOptions:{resultEqualityCheck:EE}}),Plt=[0,1],uPe=(e,t,r,n,o,s,a)=>{if(!((e==null||r==null||r.length===0)&&a===void 0)){var{dataKey:f,type:i}=e,l=_y(t,s);if(l&&f==null){var u;return YRe(0,(u=r==null?void 0:r.length)!==null&&u!==void 0?u:0)}return i==="category"?_lt(n,e,l):o==="expand"?Plt:a}},hK=Tn([Yh,rl,uK,CE,_E,vc,Llt],uPe);function Dlt(e){return e in U_}var fPe=(e,t,r)=>{if(e!=null){var{scale:n,type:o}=e;if(n==="auto")return o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":o==="category"?"band":"linear";if(typeof n=="string"){var s="scale".concat(iw(n));return Dlt(s)?s:"point"}}},xb=Tn([Yh,ULe,eK],fPe);function dK(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?Fwe(e.scale,r,n):Fwe(t,r,n)}var cPe=(e,t,r)=>{var n=fK(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&eg(e))return $st(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&eg(e))return Wst(e,t.tickCount,t.allowDecimals)}},vK=Tn([hK,dw,xb],cPe),hPe=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&eg(t)&&Array.isArray(r)&&r.length>0){var o,s,a=t[0],f=(o=r[0])!==null&&o!==void 0?o:0,i=t[1],l=(s=r[r.length-1])!==null&&s!==void 0?s:0;return[Math.min(a,f),Math.max(i,l)]}return t},Ilt=Tn([Yh,hK,vK,vc],hPe),Olt=Tn(CE,Yh,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(tg(e.map(c=>c.value))).sort((c,h)=>c-h),o=n[0],s=n[n.length-1];if(o==null||s==null)return 1/0;var a=s-o;if(a===0)return 1/0;for(var f=0;fo,(e,t,r,n,o)=>{if(!ps(e))return 0;var s=t==="vertical"?n.height:n.width;if(o==="gap")return e*s/2;if(o==="no-gap"){var a=vp(r,e*s),f=e*s/2;return f-a-(f-a)/s*a}return 0}),zlt=(e,t,r)=>{var n=gg(e,t);return n==null||typeof n.padding!="string"?0:dPe(e,"xAxis",t,r,n.padding)},Flt=(e,t,r)=>{var n=yg(e,t);return n==null||typeof n.padding!="string"?0:dPe(e,"yAxis",t,r,n.padding)},Nlt=Tn(gg,zlt,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((r=o.left)!==null&&r!==void 0?r:0)+t,right:((n=o.right)!==null&&n!==void 0?n:0)+t}}),Blt=Tn(yg,Flt,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((r=o.top)!==null&&r!==void 0?r:0)+t,bottom:((n=o.bottom)!==null&&n!==void 0?n:0)+t}}),qlt=Tn([dc,Nlt,fE,uE,(e,t,r)=>r],(e,t,r,n,o)=>{var{padding:s}=n;return o?[s.left,r.width-s.right]:[e.left+t.left,e.left+e.width-t.right]}),jlt=Tn([dc,rl,Blt,fE,uE,(e,t,r)=>r],(e,t,r,n,o,s)=>{var{padding:a}=o;return s?[n.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gw=(e,t,r,n)=>{var o;switch(t){case"xAxis":return qlt(e,r,n);case"yAxis":return jlt(e,r,n);case"zAxis":return(o=sK(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return zLe(e);case"radiusAxis":return FLe(e,r);default:return}},vPe=Tn([Yh,gw],wE),Ult=Tn([xb,Ilt],ilt),RE=Tn([Yh,xb,Ult,vPe],dK);Tn([vw,cK,vc],mlt);function pPe(e,t){return e.idt.id?1:0}var LE=(e,t)=>t,PE=(e,t,r)=>r,Hlt=Tn(sE,LE,PE,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(pPe)),Glt=Tn(lE,LE,PE,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(pPe)),gPe=(e,t)=>({width:e.width,height:t.height}),Vlt=(e,t)=>{var r=typeof t.width=="number"?t.width:lw;return{width:r,height:e.height}},yPe=Tn(dc,gg,gPe),Ylt=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},$lt=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},Wlt=Tn(dg,dc,Hlt,LE,PE,(e,t,r,n,o)=>{var s={},a;return r.forEach(f=>{var i=gPe(t,f);a==null&&(a=Ylt(t,n,e));var l=n==="top"&&!o||n==="bottom"&&o;s[f.id]=a-Number(l)*i.height,a+=(l?-1:1)*i.height}),s}),Xlt=Tn(hg,dc,Glt,LE,PE,(e,t,r,n,o)=>{var s={},a;return r.forEach(f=>{var i=Vlt(t,f);a==null&&(a=$lt(t,n,e));var l=n==="left"&&!o||n==="right"&&o;s[f.id]=a-Number(l)*i.width,a+=(l?-1:1)*i.width}),s}),Zlt=(e,t)=>{var r=gg(e,t);if(r!=null)return Wlt(e,r.orientation,r.mirror)},Klt=Tn([dc,gg,Zlt,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r==null?void 0:r[n];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),Jlt=(e,t)=>{var r=yg(e,t);if(r!=null)return Xlt(e,r.orientation,r.mirror)},Qlt=Tn([dc,yg,Jlt,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r==null?void 0:r[n];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),mPe=Tn(dc,yg,(e,t)=>{var r=typeof t.width=="number"?t.width:lw;return{width:r,height:e.height}}),qwe=(e,t,r)=>{switch(t){case"xAxis":return yPe(e,r).width;case"yAxis":return mPe(e,r).height;default:return}},xPe=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:o,type:s,dataKey:a}=r,f=_y(e,n),i=t.map(l=>l.value);if(a&&f&&s==="category"&&o&&R4e(i))return i}},pK=Tn([rl,CE,Yh,vc],xPe),bPe=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:s}=r,a=_y(e,n);if(a&&(o==="number"||s!=="auto"))return t.map(f=>f.value)}},gK=Tn([rl,CE,dw,vc],bPe);Tn([rl,flt,xb,RE,pK,gK,gw,vK,vc],(e,t,r,n,o,s,a,f,i)=>{if(t!=null){var l=_y(e,i);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:i,categoricalDomain:s,duplicateDomain:o,isCategorical:l,niceTicks:f,range:a,realScaleType:r,scale:n}}});var eut=(e,t,r,n,o,s,a,f,i)=>{if(!(t==null||n==null)){var l=_y(e,i),{type:u,ticks:c,tickCount:h}=t,d=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,v=u==="category"&&n.bandwidth?n.bandwidth()/d:0;v=i==="angleAxis"&&s!=null&&s.length>=2?Hd(s[0]-s[1])*2*v:v;var p=c||o;return p?p.map((m,y)=>{var b=a?a.indexOf(m):m,g=n.map(b);return ps(g)?{index:y,coordinate:g+v,value:m,offset:v}:null}).filter(a0):l&&f?f.map((m,y)=>{var b=n.map(m);return ps(b)?{coordinate:b+v,value:m,index:y,offset:v}:null}).filter(a0):n.ticks?n.ticks(h).map((m,y)=>{var b=n.map(m);return ps(b)?{coordinate:b+v,value:m,index:y,offset:v}:null}).filter(a0):n.domain().map((m,y)=>{var b=n.map(m);return ps(b)?{coordinate:b+v,value:a?a[m]:m,index:y,offset:v}:null}).filter(a0)}},_Pe=Tn([rl,dw,xb,RE,vK,gw,pK,gK,vc],eut),tut=(e,t,r,n,o,s,a)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var f=_y(e,a),{tickCount:i}=t,l=0;return l=a==="angleAxis"&&(n==null?void 0:n.length)>=2?Hd(n[0]-n[1])*2*l:l,f&&s?s.map((u,c)=>{var h=r.map(u);return ps(h)?{coordinate:h+l,value:u,index:c,offset:l}:null}).filter(a0):r.ticks?r.ticks(i).map((u,c)=>{var h=r.map(u);return ps(h)?{coordinate:h+l,value:u,index:c,offset:l}:null}).filter(a0):r.domain().map((u,c)=>{var h=r.map(u);return ps(h)?{coordinate:h+l,value:o?o[u]:u,index:c,offset:l}:null}).filter(a0)}},Dx=Tn([rl,dw,RE,gw,pK,gK,vc],tut),Ix=Tn(Yh,RE,(e,t)=>{if(!(e==null||t==null))return vS(vS({},e),{},{scale:t})}),rut=Tn([Yh,xb,hK,vPe],dK);Tn((e,t,r)=>sK(e,r),rut,(e,t)=>{if(!(e==null||t==null))return vS(vS({},e),{},{scale:t})});var nut=Tn([rl,sE,lE],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),wPe=e=>e.options.defaultTooltipEventType,TPe=e=>e.options.validateTooltipEventTypes;function APe(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function yK(e,t){var r=wPe(e),n=TPe(e);return APe(t,r,n)}function aut(e){return Li(t=>yK(t,e))}var SPe=(e,t)=>{var r,n=Number(t);if(!(c0(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},iut=e=>e.tooltip.settings,Xg={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},out={itemInteraction:{click:Xg,hover:Xg},axisInteraction:{click:Xg,hover:Xg},keyboardInteraction:Xg,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},MPe=xd({name:"tooltip",initialState:out,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Cl()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,o=cp(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=n)},prepare:Cl()},removeTooltipEntrySettings:{reducer(e,t){var r=cp(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Cl()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:sut,replaceTooltipEntrySettings:lut,removeTooltipEntrySettings:uut,setTooltipSettingsState:fut,setActiveMouseOverItemIndex:EPe,mouseLeaveItem:cut,mouseLeaveChart:kPe,setActiveClickItemIndex:hut,setMouseOverAxisIndex:CPe,setMouseClickAxisIndex:dut,setSyncInteraction:DY,setKeyboardInteraction:IY}=MPe.actions,vut=MPe.reducer;function jwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function p3(e){for(var t=1;t{if(t==null)return Xg;var o=mut(e,t,r);if(o==null)return Xg;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var s=e.settings.active===!0;if(xut(o)){if(s)return p3(p3({},o),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return p3(p3({},Xg),{},{coordinate:o.coordinate})};function but(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function _ut(e,t){var r=but(e),n=t[0],o=t[1];if(r===void 0)return!1;var s=Math.min(n,o),a=Math.max(n,o);return r>=s&&r<=a}function wut(e,t,r){if(r==null||t==null)return!0;var n=Nc(e,t);return n==null||!eg(r)?!0:_ut(n,r)}var mK=(e,t,r,n)=>{var o=e==null?void 0:e.index;if(o==null)return null;var s=Number(o);if(!ps(s))return o;var a=0,f=1/0;t.length>0&&(f=t.length-1);var i=Math.max(a,Math.min(s,f)),l=t[i];return l==null||wut(l,r,n)?String(i):null},LPe=(e,t,r,n,o,s,a)=>{if(s!=null){var f=a[0],i=f==null?void 0:f.getPosition(s);if(i!=null)return i;var l=o==null?void 0:o[Number(s)];if(l)switch(r){case"horizontal":return{x:l.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:l.coordinate}}}},PPe=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;if(r==="hover"?o=e.itemInteraction.hover.graphicalItemId:o=e.itemInteraction.click.graphicalItemId,o==null&&n!=null){var s=e.tooltipItemPayloads[0];return s!=null?[s]:[]}return e.tooltipItemPayloads.filter(a=>{var f;return((f=a.settings)===null||f===void 0?void 0:f.graphicalItemId)===o})},DPe=e=>e.options.tooltipPayloadSearcher,bb=e=>e.tooltip;function Uwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Hwe(e){for(var t=1;t{if(!(t==null||s==null)){var{chartData:f,computedData:i,dataStartIndex:l,dataEndIndex:u}=r,c=[];return e.reduce((h,d)=>{var v,{dataDefinedOnItem:p,settings:m}=d,y=Mut(p,f),b=Array.isArray(y)?_Re(y,l,u):y,g=(v=m==null?void 0:m.dataKey)!==null&&v!==void 0?v:n,T=m==null?void 0:m.nameKey,S;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&a==="axis"?S=Ktt(b,n,o):S=s(b,t,i,T),Array.isArray(S))S.forEach(M=>{var w=Hwe(Hwe({},m),{},{name:M.name,unit:M.unit,color:void 0,fill:void 0});h.push(d2e({tooltipEntrySettings:w,dataKey:M.dataKey,payload:M.payload,value:Nc(M.payload,M.dataKey),name:M.name}))});else{var A;h.push(d2e({tooltipEntrySettings:m,dataKey:g,payload:S,value:Nc(S,g),name:(A=Nc(S,T))!==null&&A!==void 0?A:m==null?void 0:m.name}))}return h},c)}},xK=Tn([Mf,ULe,eK],fPe),Eut=Tn([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),kut=Tn([pc,yb],HLe),_b=Tn([Eut,Mf,kut],GLe,{memoizeOptions:{resultEqualityCheck:kE}}),Cut=Tn([_b],e=>e.filter(ME)),Rut=Tn([_b],$Le,{memoizeOptions:{resultEqualityCheck:kE}}),wb=Tn([Rut,pg],WLe),Lut=Tn([Cut,pg,Mf],BLe),bK=Tn([wb,Mf,_b],XLe),OPe=Tn([Mf],fK),Put=Tn([Mf],e=>e.allowDataOverflow),zPe=Tn([OPe,Put],xLe),Dut=Tn([_b],e=>e.filter(ME)),Iut=Tn([Lut,Dut,_E,PLe],KLe),Out=Tn([Iut,pg,pc,zPe],JLe),zut=Tn([_b],YLe),Fut=Tn([wb,Mf,zut,cK,pc],tPe,{memoizeOptions:{resultEqualityCheck:EE}}),Nut=Tn([rPe,pc,yb],mb),But=Tn([Nut,pc],iPe),qut=Tn([nPe,pc,yb],mb),jut=Tn([qut,pc],oPe),Uut=Tn([aPe,pc,yb],mb),Hut=Tn([Uut,pc],sPe),Gut=Tn([But,Hut,jut],pS),Vut=Tn([Mf,OPe,zPe,Out,Fut,Gut,rl,pc],lPe),yw=Tn([Mf,rl,wb,bK,_E,pc,Vut],uPe),Yut=Tn([yw,Mf,xK],cPe),$ut=Tn([Mf,yw,Yut,pc],hPe),FPe=e=>{var t=pc(e),r=yb(e),n=!1;return gw(e,t,r,n)},NPe=Tn([Mf,FPe],wE),BPe=Tn([Mf,xK,$ut,NPe],dK),Wut=Tn([rl,bK,Mf,pc],xPe),Xut=Tn([rl,bK,Mf,pc],bPe),Zut=(e,t,r,n,o,s,a,f)=>{if(t){var{type:i}=t,l=_y(e,f);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,c=i==="category"&&n.bandwidth?n.bandwidth()/u:0;return c=f==="angleAxis"&&o!=null&&(o==null?void 0:o.length)>=2?Hd(o[0]-o[1])*2*c:c,l&&a?a.map((h,d)=>{var v=n.map(h);return ps(v)?{coordinate:v+c,value:h,index:d,offset:c}:null}).filter(a0):n.domain().map((h,d)=>{var v=n.map(h);return ps(v)?{coordinate:v+c,value:s?s[h]:h,index:d,offset:c}:null}).filter(a0)}}},mg=Tn([rl,Mf,xK,BPe,FPe,Wut,Xut,pc],Zut),_K=Tn([wPe,TPe,iut],(e,t,r)=>APe(r.shared,e,t)),qPe=e=>e.tooltip.settings.trigger,wK=e=>e.tooltip.settings.defaultIndex,mw=Tn([bb,_K,qPe,wK],RPe),Ox=Tn([mw,wb,pw,yw],mK),jPe=Tn([mg,Ox],SPe),UPe=Tn([mw],e=>{if(e)return e.dataKey});Tn([mw],e=>{if(e)return e.graphicalItemId});var HPe=Tn([bb,_K,qPe,wK],PPe),Kut=Tn([hg,dg,rl,dc,mg,wK,HPe],LPe),Jut=Tn([mw,Kut],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Qut=Tn([mw],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),eft=Tn([HPe,Ox,pg,pw,jPe,DPe,_K],IPe);Tn([eft],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Gwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vwe(e){for(var t=1;tLi(Mf),ift=()=>{var e=aft(),t=Li(mg),r=Li(BPe);return eS(!e||!r?void 0:Vwe(Vwe({},e),{},{scale:r}),t)};function Ywe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tx(e){for(var t=1;t{var o=t.find(s=>s&&s.index===r);if(o){if(e==="horizontal")return{x:o.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:o.coordinate}}return{x:0,y:0}},fft=(e,t,r,n)=>{var o=t.find(l=>l&&l.index===r);if(o){if(e==="centric"){var s=o.coordinate,{radius:a}=n;return tx(tx(tx({},n),Fc(n.cx,n.cy,a,s)),{},{angle:s,radius:a})}var f=o.coordinate,{angle:i}=n;return tx(tx(tx({},n),Fc(n.cx,n.cy,f,i)),{},{angle:i,radius:f})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function cft(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var GPe=(e,t,r,n,o)=>{var s,a=(s=t==null?void 0:t.length)!==null&&s!==void 0?s:0;if(a<=1||e==null)return 0;if(n==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var f=0;f0?(i=r[f-1])===null||i===void 0?void 0:i.coordinate:(l=r[a-1])===null||l===void 0?void 0:l.coordinate,v=(u=r[f])===null||u===void 0?void 0:u.coordinate,p=f>=a-1?(c=r[0])===null||c===void 0?void 0:c.coordinate:(h=r[f+1])===null||h===void 0?void 0:h.coordinate,m=void 0;if(!(d==null||v==null||p==null))if(Hd(v-d)!==Hd(p-v)){var y=[];if(Hd(p-v)===Hd(o[1]-o[0])){m=p;var b=v+o[1]-o[0];y[0]=Math.min(b,(b+d)/2),y[1]=Math.max(b,(b+d)/2)}else{m=d;var g=p+o[1]-o[0];y[0]=Math.min(v,(g+v)/2),y[1]=Math.max(v,(g+v)/2)}var T=[Math.min(v,(m+v)/2),Math.max(v,(m+v)/2)];if(e>T[0]&&e<=T[1]||e>=y[0]&&e<=y[1]){var S;return(S=r[f])===null||S===void 0?void 0:S.index}}else{var A=Math.min(d,p),M=Math.max(d,p);if(e>(A+v)/2&&e<=(M+v)/2){var w;return(w=r[f])===null||w===void 0?void 0:w.index}}}else if(t)for(var C=0;C(x.coordinate+k.coordinate)/2||C>0&&C(x.coordinate+k.coordinate)/2&&e<=(x.coordinate+_.coordinate)/2)return x.index}}return-1},hft=()=>Li(eK),TK=(e,t)=>t,VPe=(e,t,r)=>r,AK=(e,t,r,n)=>n,dft=Tn(mg,e=>KM(e,t=>t.coordinate)),SK=Tn([bb,TK,VPe,AK],RPe),MK=Tn([SK,wb,pw,yw],mK),vft=(e,t,r)=>{if(t!=null){var n=bb(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},YPe=Tn([bb,TK,VPe,AK],PPe),gS=Tn([hg,dg,rl,dc,mg,AK,YPe],LPe),pft=Tn([SK,gS],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),$Pe=Tn([mg,MK],SPe),gft=Tn([YPe,MK,pg,pw,$Pe,DPe,TK],IPe),yft=Tn([SK,MK],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),mft=(e,t,r,n,o,s,a)=>{if(!(!e||!r||!n||!o)&&cft(e,a)){var f=Tat(e,t),i=GPe(f,s,o,r,n),l=uft(t,o,i,e);return{activeIndex:String(i),activeCoordinate:l}}},xft=(e,t,r,n,o,s,a)=>{if(!(!e||!n||!o||!s||!r)){var f=Oot(e,r);if(f){var i=Aat(f,t),l=GPe(i,a,s,n,o),u=fft(t,s,l,f);return{activeIndex:String(l),activeCoordinate:u}}}},bft=(e,t,r,n,o,s,a,f)=>{if(!(!e||!t||!n||!o||!s))return t==="horizontal"||t==="vertical"?mft(e,t,n,o,s,a,f):xft(e,t,r,n,o,s,a)},_ft=Tn(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),wft=Tn(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(pd)),r=Array.from(new Set(t));return r.sort((n,o)=>n-o)},{memoizeOptions:{resultEqualityCheck:nlt}});function $we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wwe(e){for(var t=1;tWwe(Wwe({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Mft)},kft=new Set(Object.values(pd));function Cft(e){return kft.has(e)}var WPe=xd({name:"zIndex",initialState:Eft,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Cl()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!Cft(r)&&delete e.zIndexMap[r])},prepare:Cl()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:o?void 0:n,panoramaElement:o?n:void 0}},prepare:Cl()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Cl()}}}),{registerZIndexPortal:Rft,unregisterZIndexPortal:Lft,registerZIndexPortalElement:Pft,unregisterZIndexPortalElement:Dft}=WPe.actions,Ift=WPe.reducer;function Ay(e){var{zIndex:t,children:r}=e,n=oit(),o=n&&t!==void 0&&t!==0,s=Xd(),a=Ru();Vt.useLayoutEffect(()=>o?(a(Rft({zIndex:t})),()=>{a(Lft({zIndex:t}))}):db,[a,t,o]);var f=Li(i=>_ft(i,t,s));return o?f?h4e.createPortal(r,f):null:r}function OY(){return OY=Object.assign?Object.assign.bind():function(e){for(var t=1;tVt.useContext(XPe),CG={exports:{}},Zwe;function Uft(){return Zwe||(Zwe=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(i,l,u){this.fn=i,this.context=l,this.once=u||!1}function s(i,l,u,c,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var d=new o(u,c||i,h),v=r?r+l:l;return i._events[v]?i._events[v].fn?i._events[v]=[i._events[v],d]:i._events[v].push(d):(i._events[v]=d,i._eventsCount++),i}function a(i,l){--i._eventsCount===0?i._events=new n:delete i._events[l]}function f(){this._events=new n,this._eventsCount=0}f.prototype.eventNames=function(){var l=[],u,c;if(this._eventsCount===0)return l;for(c in u=this._events)t.call(u,c)&&l.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},f.prototype.listeners=function(l){var u=r?r+l:l,c=this._events[u];if(!c)return[];if(c.fn)return[c.fn];for(var h=0,d=c.length,v=new Array(d);h{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!c0(r))return e[r]}},Yft={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},ZPe=xd({name:"options",initialState:Yft,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),$ft=ZPe.reducer,{createEventEmitter:Wft}=ZPe.actions;function Xft(e){return e.tooltip.syncInteraction}var Zft={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},KPe=xd({name:"chartData",initialState:Zft,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Jwe,setDataStartEndIndexes:Kft,setComputedData:ggt}=KPe.actions,Jft=KPe.reducer,Qft=["x","y"];function Qwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rx(e){for(var t=1;ti.rootProps.className);Vt.useEffect(()=>{if(e==null)return db;var i=(l,u,c)=>{if(t!==c&&e===l){if(n==="index"){var h;if(a&&u!==null&&u!==void 0&&(h=u.payload)!==null&&h!==void 0&&h.coordinate&&u.payload.sourceViewBox){var d=u.payload.coordinate,{x:v,y:p}=d,m=nct(d,Qft),{x:y,y:b,width:g,height:T}=u.payload.sourceViewBox,S=rx(rx({},m),{},{x:a.x+(g?(v-y)/g:0)*a.width,y:a.y+(T?(p-b)/T:0)*a.height});r(rx(rx({},u),{},{payload:rx(rx({},u.payload),{},{coordinate:S})}))}else r(u);return}if(o!=null){var A;if(typeof n=="function"){var M={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},w=n(o,M);A=o[w]}else n==="value"&&(A=o.find(D=>String(D.value)===u.payload.label));var{coordinate:C}=u.payload;if(A==null||u.payload.active===!1||C==null||a==null){r(DY({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x,y:_}=C,k=Math.min(x,a.x+a.width),E=Math.min(_,a.y+a.height),I={x:s==="horizontal"?A.coordinate:k,y:s==="horizontal"?E:A.coordinate},F=DY({active:u.payload.active,coordinate:I,dataKey:u.payload.dataKey,index:String(A.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r(F)}}};return S2.on(zY,i),()=>{S2.off(zY,i)}},[f,r,t,e,n,o,s,a])}function oct(){var e=Li(tK),t=Li(rK),r=Ru();Vt.useEffect(()=>{if(e==null)return db;var n=(o,s,a)=>{t!==a&&e===o&&r(Kft(s))};return S2.on(Kwe,n),()=>{S2.off(Kwe,n)}},[r,t,e])}function sct(){var e=Ru();Vt.useEffect(()=>{e(Wft())},[e]),ict(),oct()}function lct(e,t,r,n,o,s){var a=Li(d=>vft(d,e,t)),f=Li(rK),i=Li(tK),l=Li(DLe),u=Li(Xft),c=u==null?void 0:u.active,h=cE();Vt.useEffect(()=>{if(!c&&i!=null&&f!=null){var d=DY({active:s,coordinate:r,dataKey:a,index:o,label:typeof n=="number"?String(n):n,sourceViewBox:h,graphicalItemId:void 0});S2.emit(zY,i,d,f)}},[c,r,a,o,n,f,i,l,s,h])}function eTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tTe(e){for(var t=1;t{M(fut({shared:b,trigger:g,axisId:A,active:o,defaultIndex:w}))},[M,b,g,A,o,w]);var C=cE(),x=zRe(),_=aut(b),{activeIndex:k,isActive:E}=(t=Li(Z=>yft(Z,_,g,w)))!==null&&t!==void 0?t:{},I=Li(Z=>gft(Z,_,g,w)),F=Li(Z=>$Pe(Z,_,g,w)),D=Li(Z=>pft(Z,_,g,w)),z=I,N=jft(),q=(r=o??E)!==null&&r!==void 0?r:!1,[P,B]=lnt([z,q]),$=_==="axis"?F:void 0;lct(_,g,D,$,k,q);var Q=S??N;if(Q==null||C==null||_==null)return null;var J=z??rTe;q||(J=rTe),l&&J.length&&(J=Irt(J.filter(Z=>Z.value!=null&&(Z.hide!==!0||n.includeHidden)),h,hct));var ne=J.length>0,te=Vt.createElement(Iit,{allowEscapeViewBox:s,animationDuration:a,animationEasing:f,isAnimationActive:u,active:q,coordinate:D,hasPayload:ne,offset:c,position:d,reverseDirection:v,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:P,innerRef:B,hasPortalFromProps:!!S},dct(i,tTe(tTe({},n),{},{payload:J,label:$,active:q,activeIndex:k,coordinate:D,accessibilityLayer:x})));return Vt.createElement(Vt.Fragment,null,h4e.createPortal(te,Q),q&&Vt.createElement(qft,{cursor:y,tooltipEventType:_,coordinate:D,payload:J,index:k}))}var EK=e=>null;EK.displayName="Cell";function gct(e,t,r){return(t=yct(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yct(e){var t=mct(e,"string");return typeof t=="symbol"?t:t+""}function mct(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class xct{constructor(t){gct(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function nTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function bct(e){for(var t=1;t{try{var r=document.getElementById(iTe);r||(r=document.createElement("span"),r.setAttribute("id",iTe),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,Sct,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Q_=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||pE.isSsr)return{width:0,height:0};if(!JPe.enableCache)return oTe(t,r);var n=Mct(t,r),o=aTe.get(n);if(o)return o;var s=oTe(t,r);return aTe.set(n,s),s},QPe;function Ect(e,t,r){return(t=kct(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kct(e){var t=Cct(e,"string");return typeof t=="symbol"?t:t+""}function Cct(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sTe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,lTe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Rct=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Lct=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Pct={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Dct=["cm","mm","pt","pc","in","Q","px"];function Ict(e){return Dct.includes(e)}var lx="NaN";function Oct(e,t){return e*Pct[t]}class Oc{static parse(t){var r,[,n,o]=(r=Lct.exec(t))!==null&&r!==void 0?r:[];return n==null?Oc.NaN:new Oc(parseFloat(n),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,c0(t)&&(this.unit=""),r!==""&&!Rct.test(r)&&(this.num=NaN,this.unit=""),Ict(r)&&(this.num=Oct(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Oc(NaN,""):new Oc(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Oc(NaN,""):new Oc(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Oc(NaN,""):new Oc(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Oc(NaN,""):new Oc(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return c0(this.num)}}QPe=Oc;Ect(Oc,"NaN",new QPe(NaN,""));function eDe(e){if(e==null||e.includes(lx))return lx;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,o,s]=(r=sTe.exec(t))!==null&&r!==void 0?r:[],a=Oc.parse(n??""),f=Oc.parse(s??""),i=o==="*"?a.multiply(f):a.divide(f);if(i.isNaN())return lx;t=t.replace(sTe,i.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,u,c,h]=(l=lTe.exec(t))!==null&&l!==void 0?l:[],d=Oc.parse(u??""),v=Oc.parse(h??""),p=c==="+"?d.add(v):d.subtract(v);if(p.isNaN())return lx;t=t.replace(lTe,p.toString())}return t}var uTe=/\(([^()]*)\)/;function zct(e){for(var t=e,r;(r=uTe.exec(t))!=null;){var[,n]=r;t=t.replace(uTe,eDe(n))}return t}function Fct(e){var t=e.replace(/\s+/g,"");return t=zct(t),t=eDe(t),t}function Nct(e){try{return Fct(e)}catch{return lx}}function RG(e){var t=Nct(e.slice(5,-1));return t===lx?"":t}var Bct=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],qct=["dx","dy","angle","className","breakAll"];function FY(){return FY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:r,style:n}=e;try{var o=[];uc(t)||(r?o=t.toString().split(""):o=t.toString().split(tDe));var s=o.map(f=>({word:f,width:Q_(f,n).width})),a=r?0:Q_(" ",n).width;return{wordsWithComputedWidth:s,spaceWidth:a}}catch{return null}};function Uct(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var nDe=(e,t,r,n)=>e.reduce((o,s)=>{var{word:a,width:f}=s,i=o[o.length-1];if(i&&f!=null&&(t==null||n||i.width+f+re.reduce((t,r)=>t.width>r.width?t:r),Hct="…",cTe=(e,t,r,n,o,s,a,f)=>{var i=e.slice(0,t),l=rDe({breakAll:r,style:n,children:i+Hct});if(!l)return[!1,[]];var u=nDe(l.wordsWithComputedWidth,s,a,f),c=u.length>o||aDe(u).width>Number(s);return[c,u]},Gct=(e,t,r,n,o)=>{var{maxLines:s,children:a,style:f,breakAll:i}=e,l=Ti(s),u=String(a),c=nDe(t,n,r,o);if(!l||o)return c;var h=c.length>s||aDe(c).width>Number(n);if(!h)return c;for(var d=0,v=u.length-1,p=0,m;d<=v&&p<=u.length-1;){var y=Math.floor((d+v)/2),b=y-1,[g,T]=cTe(u,b,i,f,s,n,r,o),[S]=cTe(u,y,i,f,s,n,r,o);if(!g&&!S&&(d=y+1),g&&S&&(v=y-1),!g&&S){m=T;break}p++}return m||c},hTe=e=>{var t=uc(e)?[]:e.toString().split(tDe);return[{words:t,width:void 0}]},Vct=e=>{var{width:t,scaleToFit:r,children:n,style:o,breakAll:s,maxLines:a}=e;if((t||r)&&!pE.isSsr){var f,i,l=rDe({breakAll:s,children:n,style:o});if(l){var{wordsWithComputedWidth:u,spaceWidth:c}=l;f=u,i=c}else return hTe(n);return Gct({breakAll:s,children:n,maxLines:a,style:o},f,i,t,!!r)}return hTe(n)},iDe="#808080",Yct={angle:0,breakAll:!1,capHeight:"0.71em",fill:iDe,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},kK=Vt.forwardRef((e,t)=>{var r=Ov(e,Yct),{x:n,y:o,lineHeight:s,capHeight:a,fill:f,scaleToFit:i,textAnchor:l,verticalAnchor:u}=r,c=fTe(r,Bct),h=Vt.useMemo(()=>Vct({breakAll:c.breakAll,children:c.children,maxLines:c.maxLines,scaleToFit:i,style:c.style,width:c.width}),[c.breakAll,c.children,c.maxLines,i,c.style,c.width]),{dx:d,dy:v,angle:p,className:m,breakAll:y}=c,b=fTe(c,qct);if(!h0(n)||!h0(o)||h.length===0)return null;var g=Number(n)+(Ti(d)?d:0),T=Number(o)+(Ti(v)?v:0);if(!ps(g)||!ps(T))return null;var S;switch(u){case"start":S=RG("calc(".concat(a,")"));break;case"middle":S=RG("calc(".concat((h.length-1)/2," * -").concat(s," + (").concat(a," / 2))"));break;default:S=RG("calc(".concat(h.length-1," * -").concat(s,")"));break}var A=[],M=h[0];if(i&&M!=null){var w=M.width,{width:C}=c;A.push("scale(".concat(Ti(C)&&Ti(w)?C/w:1,")"))}return p&&A.push("rotate(".concat(p,", ").concat(g,", ").concat(T,")")),A.length&&(b.transform=A.join(" ")),Vt.createElement("text",FY({},Cv(b),{ref:t,x:g,y:T,className:ml("recharts-text",m),textAnchor:l,fill:f.includes("url")?iDe:f}),h.map((x,_)=>{var k=x.words.join(y?"":" ");return Vt.createElement("tspan",{x:g,dy:_===0?S:s,key:"".concat(k,"-").concat(_)},k)}))});kK.displayName="Text";function dTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wp(e){for(var t=1;t{var{viewBox:t,position:r,offset:n=0,parentViewBox:o}=e,{x:s,y:a,height:f,upperWidth:i,lowerWidth:l}=MZ(t),u=s,c=s+(i-l)/2,h=(u+c)/2,d=(i+l)/2,v=u+i/2,p=f>=0?1:-1,m=p*n,y=p>0?"end":"start",b=p>0?"start":"end",g=i>=0?1:-1,T=g*n,S=g>0?"end":"start",A=g>0?"start":"end",M=o;if(r==="top"){var w={x:u+i/2,y:a-m,horizontalAnchor:"middle",verticalAnchor:y};return M&&(w.height=Math.max(a-M.y,0),w.width=i),w}if(r==="bottom"){var C={x:c+l/2,y:a+f+m,horizontalAnchor:"middle",verticalAnchor:b};return M&&(C.height=Math.max(M.y+M.height-(a+f),0),C.width=l),C}if(r==="left"){var x={x:h-T,y:a+f/2,horizontalAnchor:S,verticalAnchor:"middle"};return M&&(x.width=Math.max(x.x-M.x,0),x.height=f),x}if(r==="right"){var _={x:h+d+T,y:a+f/2,horizontalAnchor:A,verticalAnchor:"middle"};return M&&(_.width=Math.max(M.x+M.width-_.x,0),_.height=f),_}var k=M?{width:d,height:f}:{};return r==="insideLeft"?Wp({x:h+T,y:a+f/2,horizontalAnchor:A,verticalAnchor:"middle"},k):r==="insideRight"?Wp({x:h+d-T,y:a+f/2,horizontalAnchor:S,verticalAnchor:"middle"},k):r==="insideTop"?Wp({x:u+i/2,y:a+m,horizontalAnchor:"middle",verticalAnchor:b},k):r==="insideBottom"?Wp({x:c+l/2,y:a+f-m,horizontalAnchor:"middle",verticalAnchor:y},k):r==="insideTopLeft"?Wp({x:u+T,y:a+m,horizontalAnchor:A,verticalAnchor:b},k):r==="insideTopRight"?Wp({x:u+i-T,y:a+m,horizontalAnchor:S,verticalAnchor:b},k):r==="insideBottomLeft"?Wp({x:c+T,y:a+f-m,horizontalAnchor:A,verticalAnchor:y},k):r==="insideBottomRight"?Wp({x:c+l-T,y:a+f-m,horizontalAnchor:S,verticalAnchor:y},k):r&&typeof r=="object"&&(Ti(r.x)||Am(r.x))&&(Ti(r.y)||Am(r.y))?Wp({x:s+vp(r.x,d),y:a+vp(r.y,f),horizontalAnchor:"end",verticalAnchor:"end"},k):Wp({x:v,y:a+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},k)},Kct=["labelRef"],Jct=["content"];function vTe(e,t){if(e==null)return{};var r,n,o=Qct(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var{x:t,y:r,upperWidth:n,lowerWidth:o,width:s,height:a,children:f}=e,i=Vt.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:o,width:s,height:a}),[t,r,n,o,s,a]);return Vt.createElement(oDe.Provider,{value:i},f)},sDe=()=>{var e=Vt.useContext(oDe),t=cE();return e||(t?MZ(t):void 0)},aht=Vt.createContext(null),iht=()=>{var e=Vt.useContext(aht),t=Li(NLe);return e||t},oht=e=>{var{value:t,formatter:r}=e,n=uc(e.children)?t:e.children;return typeof r=="function"?r(n):n},CK=e=>e!=null&&typeof e=="function",sht=(e,t)=>{var r=Hd(t-e),n=Math.min(Math.abs(t-e),360);return r*n},lht=(e,t,r,n,o)=>{var{offset:s,className:a}=e,{cx:f,cy:i,innerRadius:l,outerRadius:u,startAngle:c,endAngle:h,clockWise:d}=o,v=(l+u)/2,p=sht(c,h),m=p>=0?1:-1,y,b;switch(t){case"insideStart":y=c+m*s,b=d;break;case"insideEnd":y=h-m*s,b=!d;break;case"end":y=h+m*s,b=d;break;default:throw new Error("Unsupported position ".concat(t))}b=p<=0?b:!b;var g=Fc(f,i,v,y),T=Fc(f,i,v,y+(b?1:-1)*359),S="M".concat(g.x,",").concat(g.y,` + A`).concat(v,",").concat(v,",0,1,").concat(b?0:1,`, + `).concat(T.x,",").concat(T.y),A=uc(e.id)?g2("recharts-radial-line-"):e.id;return Vt.createElement("text",U0({},n,{dominantBaseline:"central",className:ml("recharts-radial-bar-label",a)}),Vt.createElement("defs",null,Vt.createElement("path",{id:A,d:S})),Vt.createElement("textPath",{xlinkHref:"#".concat(A)},r))},uht=(e,t,r)=>{var{cx:n,cy:o,innerRadius:s,outerRadius:a,startAngle:f,endAngle:i}=e,l=(f+i)/2;if(r==="outside"){var{x:u,y:c}=Fc(n,o,a+t,l);return{x:u,y:c,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"end"};var h=(s+a)/2,{x:d,y:v}=Fc(n,o,h,l);return{x:d,y:v,textAnchor:"middle",verticalAnchor:"middle"}},z3=e=>e!=null&&"cx"in e&&Ti(e.cx),fht={angle:0,offset:5,zIndex:pd.label,position:"middle",textBreakAll:!1};function cht(e){if(!z3(e))return e;var{cx:t,cy:r,outerRadius:n}=e,o=n*2;return{x:t-n,y:r-n,width:o,upperWidth:o,lowerWidth:o,height:o}}function Wg(e){var t=Ov(e,fht),{viewBox:r,parentViewBox:n,position:o,value:s,children:a,content:f,className:i="",textBreakAll:l,labelRef:u}=t,c=iht(),h=sDe(),d=o==="center"?h:c??h,v,p,m;r==null?v=d:z3(r)?v=r:v=MZ(r);var y=cht(v);if(!v||uc(s)&&uc(a)&&!Vt.isValidElement(f)&&typeof f!="function")return null;var b=H_(H_({},t),{},{viewBox:v});if(Vt.isValidElement(f)){var{labelRef:g}=b,T=vTe(b,Kct);return Vt.cloneElement(f,T)}if(typeof f=="function"){var{content:S}=b,A=vTe(b,Jct);if(p=Vt.createElement(f,A),Vt.isValidElement(p))return p}else p=oht(t);var M=Cv(t);if(z3(v)){if(o==="insideStart"||o==="insideEnd"||o==="end")return lht(t,o,p,M,v);m=uht(v,t.offset,t.position)}else{if(!y)return null;var w=Zct({viewBox:y,position:o,offset:t.offset,parentViewBox:z3(n)?void 0:n});m=H_(H_({x:w.x,y:w.y,textAnchor:w.horizontalAnchor,verticalAnchor:w.verticalAnchor},w.width!==void 0?{width:w.width}:{}),w.height!==void 0?{height:w.height}:{})}return Vt.createElement(Ay,{zIndex:t.zIndex},Vt.createElement(kK,U0({ref:u,className:ml("recharts-label",i)},M,m,{textAnchor:Uct(M.textAnchor)?M.textAnchor:m.textAnchor,breakAll:l}),p))}Wg.displayName="Label";var hht=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?Vt.createElement(Wg,U0({key:"label-implicit"},n)):h0(e)?Vt.createElement(Wg,U0({key:"label-implicit",value:e},n)):Vt.isValidElement(e)?e.type===Wg?Vt.cloneElement(e,H_({key:"label-implicit"},n)):Vt.createElement(Wg,U0({key:"label-implicit",content:e},n)):CK(e)?Vt.createElement(Wg,U0({key:"label-implicit",content:e},n)):e&&typeof e=="object"?Vt.createElement(Wg,U0({},e,{key:"label-implicit"},n)):null};function dht(e){var{label:t,labelRef:r}=e,n=sDe();return hht(t,n,r)||null}var LG={},PG={},gTe;function vht(){return gTe||(gTe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(PG)),PG}var DG={},yTe;function pht(){return yTe||(yTe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(DG)),DG}var mTe;function ght(){return mTe||(mTe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vht(),r=pht(),n=pZ();function o(s){if(n.isArrayLike(s))return t.last(r.toArray(s))}e.last=o})(LG)),LG}var IG,xTe;function yht(){return xTe||(xTe=1,IG=ght().last),IG}var mht=yht();const xht=Pv(mht);var bht=["valueAccessor"],_ht=["dataKey","clockWise","id","textBreakAll","zIndex"];function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;tArray.isArray(e.value)?xht(e.value):e.value,lDe=Vt.createContext(void 0),Aht=lDe.Provider,uDe=Vt.createContext(void 0);uDe.Provider;function Sht(){return Vt.useContext(lDe)}function Mht(){return Vt.useContext(uDe)}function F3(e){var{valueAccessor:t=Tht}=e,r=bTe(e,bht),{dataKey:n,clockWise:o,id:s,textBreakAll:a,zIndex:f}=r,i=bTe(r,_ht),l=Sht(),u=Mht(),c=l||u;return!c||!c.length?null:Vt.createElement(Ay,{zIndex:f??pd.label},Vt.createElement(K0,{className:"recharts-label-list"},c.map((h,d)=>{var v,p=uc(n)?t(h,d):Nc(h.payload,n),m=uc(s)?{}:{id:"".concat(s,"-").concat(d)};return Vt.createElement(Wg,yS({key:"label-".concat(d)},Cv(h),i,m,{fill:(v=r.fill)!==null&&v!==void 0?v:h.fill,parentViewBox:h.parentViewBox,value:p,textBreakAll:a,viewBox:h.viewBox,index:d,zIndex:0}))})))}F3.displayName="LabelList";function Eht(e){var{label:t}=e;return t?t===!0?Vt.createElement(F3,{key:"labelList-implicit"}):Vt.isValidElement(t)||CK(t)?Vt.createElement(F3,{key:"labelList-implicit",content:t}):typeof t=="object"?Vt.createElement(F3,yS({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var kht={radiusAxis:{},angleAxis:{}},fDe=xd({name:"polarAxis",initialState:kht,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:ygt,removeRadiusAxis:mgt,addAngleAxis:xgt,removeAngleAxis:bgt}=fDe.actions,Cht=fDe.reducer;function Rht(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var OG={exports:{}},Us={};/** + * @license React + * react-is.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _Te;function Lht(){if(_Te)return Us;_Te=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),d=Symbol.for("react.client.reference");function v(p){if(typeof p=="object"&&p!==null){var m=p.$$typeof;switch(m){case e:switch(p=p.type,p){case r:case o:case n:case i:case l:case h:return p;default:switch(p=p&&p.$$typeof,p){case a:case f:case c:case u:return p;case s:return p;default:return m}}case t:return m}}}return Us.ContextConsumer=s,Us.ContextProvider=a,Us.Element=e,Us.ForwardRef=f,Us.Fragment=r,Us.Lazy=c,Us.Memo=u,Us.Portal=t,Us.Profiler=o,Us.StrictMode=n,Us.Suspense=i,Us.SuspenseList=l,Us.isContextConsumer=function(p){return v(p)===s},Us.isContextProvider=function(p){return v(p)===a},Us.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},Us.isForwardRef=function(p){return v(p)===f},Us.isFragment=function(p){return v(p)===r},Us.isLazy=function(p){return v(p)===c},Us.isMemo=function(p){return v(p)===u},Us.isPortal=function(p){return v(p)===t},Us.isProfiler=function(p){return v(p)===o},Us.isStrictMode=function(p){return v(p)===n},Us.isSuspense=function(p){return v(p)===i},Us.isSuspenseList=function(p){return v(p)===l},Us.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===o||p===n||p===i||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===c||p.$$typeof===u||p.$$typeof===a||p.$$typeof===s||p.$$typeof===f||p.$$typeof===d||p.getModuleId!==void 0)},Us.typeOf=v,Us}var wTe;function Pht(){return wTe||(wTe=1,OG.exports=Lht()),OG.exports}var Dht=Pht(),TTe=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",ATe=null,zG=null,cDe=e=>{if(e===ATe&&Array.isArray(zG))return zG;var t=[];return Vt.Children.forEach(e,r=>{uc(r)||(Dht.isFragment(r)?t=t.concat(cDe(r.props.children)):t.push(r))}),zG=t,ATe=e,t};function Iht(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(o=>TTe(o)):n=[TTe(t)],cDe(e).forEach(o=>{var s=Rx(o,"type.displayName")||Rx(o,"type.name");s&&n.indexOf(s)!==-1&&r.push(o)}),r}var FG={},STe;function Oht(){return STe||(STe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var o;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const s=r[Symbol.toStringTag];return s==null||!((o=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&o.writable)?!1:r.toString()===`[object ${s}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(FG)),FG}var NG,MTe;function zht(){return MTe||(MTe=1,NG=Oht().isPlainObject),NG}var Fht=zht();const Nht=Pv(Fht);var ETe,kTe,CTe,RTe,LTe;function PTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function DTe(e){for(var t=1;t{var s=r-n,a;return a=uu(ETe||(ETe=k_(["M ",",",""])),e,t),a+=uu(kTe||(kTe=k_(["L ",",",""])),e+r,t),a+=uu(CTe||(CTe=k_(["L ",",",""])),e+r-s/2,t+o),a+=uu(RTe||(RTe=k_(["L ",",",""])),e+r-s/2-n,t+o),a+=uu(LTe||(LTe=k_(["L ",","," Z"])),e,t),a},Uht={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Hht=e=>{var t=Ov(e,Uht),{x:r,y:n,upperWidth:o,lowerWidth:s,height:a,className:f}=t,{animationEasing:i,animationDuration:l,animationBegin:u,isUpdateAnimationActive:c}=t,h=Vt.useRef(null),[d,v]=Vt.useState(-1),p=Vt.useRef(o),m=Vt.useRef(s),y=Vt.useRef(a),b=Vt.useRef(r),g=Vt.useRef(n),T=RZ(e,"trapezoid-");if(Vt.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var I=h.current.getTotalLength();I&&v(I)}catch{}},[]),r!==+r||n!==+n||o!==+o||s!==+s||a!==+a||o===0&&s===0||a===0)return null;var S=ml("recharts-trapezoid",f);if(!c)return Vt.createElement("g",null,Vt.createElement("path",mS({},Cv(t),{className:S,d:ITe(r,n,o,s,a)})));var A=p.current,M=m.current,w=y.current,C=b.current,x=g.current,_="0px ".concat(d===-1?1:d,"px"),k="".concat(d,"px 0px"),E=NRe(["strokeDasharray"],l,i);return Vt.createElement(CZ,{animationId:T,key:T,canBegin:d>0,duration:l,easing:i,isActive:c,begin:u},I=>{var F=zc(A,o,I),D=zc(M,s,I),z=zc(w,a,I),N=zc(C,r,I),q=zc(x,n,I);h.current&&(p.current=F,m.current=D,y.current=z,b.current=N,g.current=q);var P=I>0?{transition:E,strokeDasharray:k}:{strokeDasharray:_};return Vt.createElement("path",mS({},Cv(t),{className:S,d:ITe(N,q,F,D,z),ref:h,style:DTe(DTe({},P),t.style)}))})},Ght=["option","shapeType","activeClassName"];function Vht(e,t){if(e==null)return{};var r,n,o=Yht(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var n=Ru();return(o,s)=>a=>{e==null||e(o,s,a),n(EPe({activeIndex:String(s),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},dDe=e=>{var t=Ru();return(r,n)=>o=>{e==null||e(r,n,o),t(cut())}},vDe=(e,t,r)=>{var n=Ru();return(o,s)=>a=>{e==null||e(o,s,a),n(hut({activeIndex:String(s),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function edt(e){var{tooltipEntrySettings:t}=e,r=Ru(),n=Xd(),o=Vt.useRef(null);return Vt.useLayoutEffect(()=>{n||(o.current===null?r(sut(t)):o.current!==t&&r(lut({prev:o.current,next:t})),o.current=t)},[t,r,n]),Vt.useLayoutEffect(()=>()=>{o.current&&(r(uut(o.current)),o.current=null)},[r]),null}function tdt(e){var{legendPayload:t}=e,r=Ru(),n=Xd(),o=Vt.useRef(null);return Vt.useLayoutEffect(()=>{n||(o.current===null?r(xit(t)):o.current!==t&&r(bit({prev:o.current,next:t})),o.current=t)},[r,n,t]),Vt.useLayoutEffect(()=>()=>{o.current&&(r(_it(o.current)),o.current=null)},[r]),null}var BG,rdt=()=>{var[e]=Vt.useState(()=>g2("uid-"));return e},ndt=(BG=c6e.useId)!==null&&BG!==void 0?BG:rdt;function adt(e,t){var r=ndt();return t||(e?"".concat(e,"-").concat(r):r)}var idt=Vt.createContext(void 0),odt=e=>{var{id:t,type:r,children:n}=e,o=adt("recharts-".concat(r),t);return Vt.createElement(idt.Provider,{value:o},n(o))},sdt={cartesianItems:[],polarItems:[]},pDe=xd({name:"graphicalItems",initialState:sdt,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Cl()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,o=cp(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=n)},prepare:Cl()},removeCartesianGraphicalItem:{reducer(e,t){var r=cp(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Cl()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Cl()},removePolarGraphicalItem:{reducer(e,t){var r=cp(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Cl()}}}),{addCartesianGraphicalItem:ldt,replaceCartesianGraphicalItem:udt,removeCartesianGraphicalItem:fdt,addPolarGraphicalItem:_gt,removePolarGraphicalItem:wgt}=pDe.actions,cdt=pDe.reducer,hdt=e=>{var t=Ru(),r=Vt.useRef(null);return Vt.useLayoutEffect(()=>{r.current===null?t(ldt(e)):r.current!==e&&t(udt({prev:r.current,next:e})),r.current=e},[t,e]),Vt.useLayoutEffect(()=>()=>{r.current&&(t(fdt(r.current)),r.current=null)},[t]),null},ddt=Vt.memo(hdt);function FTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function NTe(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Edt=Tn([Mdt,hg,dg],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),mDe=()=>Li(Edt),BTe=(e,t,r)=>{var n=r??e;if(!uc(n))return vp(n,t,0)},kdt=(e,t,r)=>{var n={},o=e.filter(ME),s=e.filter(l=>l.stackId==null),a=o.reduce((l,u)=>{var c=l[u.stackId];return c==null&&(c=[]),c.push(u),l[u.stackId]=c,l},n),f=Object.entries(a).map(l=>{var u,[c,h]=l,d=h.map(p=>p.dataKey),v=BTe(t,r,(u=h[0])===null||u===void 0?void 0:u.barSize);return{stackId:c,dataKeys:d,barSize:v}}),i=s.map(l=>{var u=[l.dataKey].filter(h=>h!=null),c=BTe(t,r,l.barSize);return{stackId:void 0,dataKeys:u,barSize:c}});return[...f,...i]};function qTe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function y3(e){for(var t=1;tb+(g.barSize||0),0);h+=(a-1)*f,h>=r&&(h-=(a-1)*f,f=0),h>=r&&c>0&&(u=!0,c*=.9,h=a*c);var d=(r-h)/2>>0,v={offset:d-f,size:0};i=n.reduce((b,g)=>{var T,S={stackId:g.stackId,dataKeys:g.dataKeys,position:{offset:v.offset+v.size+f,size:u?c:(T=g.barSize)!==null&&T!==void 0?T:0}},A=[...b,S];return v=S.position,A},l)}else{var p=vp(t,r,0,!0);r-2*p-(a-1)*f<=0&&(f=0);var m=(r-2*p-(a-1)*f)/a;m>1&&(m>>=0);var y=ps(o)?Math.min(m,o):m;i=n.reduce((b,g,T)=>[...b,{stackId:g.stackId,dataKeys:g.dataKeys,position:{offset:p+(m+f)*T+(m-y)/2,size:y}}],l)}return i}}var Ddt=(e,t,r,n,o,s,a)=>{var f=uc(a)?t:a,i=Pdt(r,n,o!==s?o:s,e,f);return o!==s&&i!=null&&(i=i.map(l=>y3(y3({},l),{},{position:y3(y3({},l.position),{},{offset:l.position.offset-o/2})}))),i},Idt=(e,t)=>{var r=oK(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var o=e[n];if(o){var{stackedData:s}=o;if(s)return s.find(a=>a.key===r)}}}},Odt=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function zdt(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ps(e.zIndex)?e.zIndex:t}var Fdt=e=>{var{chartData:t}=e,r=Ru(),n=Xd();return Vt.useEffect(()=>n?()=>{}:(r(Jwe(t)),()=>{r(Jwe(void 0))}),[t,r,n]),null},jTe={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},xDe=xd({name:"brush",initialState:jTe,reducers:{setBrushSettings(e,t){return t.payload==null?jTe:t.payload}}}),{setBrushSettings:Mgt}=xDe.actions,Ndt=xDe.reducer;function Bdt(e){return(e%180+180)%180}var qdt=function(t){var{width:r,height:n}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=Bdt(o),a=s*Math.PI/180,f=Math.atan(n/r),i=a>f&&a{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=cp(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=cp(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=cp(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Egt,removeDot:kgt,addArea:Cgt,removeArea:Rgt,addLine:Lgt,removeLine:Pgt}=bDe.actions,Udt=bDe.reducer,Hdt=Vt.createContext(void 0),Gdt=e=>{var{children:t}=e,[r]=Vt.useState("".concat(g2("recharts"),"-clip")),n=mDe();if(n==null)return null;var{x:o,y:s,width:a,height:f}=n;return Vt.createElement(Hdt.Provider,{value:r},Vt.createElement("defs",null,Vt.createElement("clipPath",{id:r},Vt.createElement("rect",{x:o,y:s,height:f,width:a}))),t)};function _De(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*o)return!1;var s=r();return e*(t-e*s/2-n)>=0&&e*(t+e*s/2-o)<=0}function $dt(e,t){return _De(e,t+1)}function Wdt(e,t,r,n,o){for(var s=(n||[]).slice(),{start:a,end:f}=t,i=0,l=1,u=a,c=function(){var v=n==null?void 0:n[i];if(v===void 0)return{v:_De(n,l)};var p=i,m,y=()=>(m===void 0&&(m=r(v,p)),m),b=v.coordinate,g=i===0||M2(e,b,y,u,f);g||(i=0,u=a,l+=1),g&&(u=b+e*(y()/2+o),i+=l)},h;l<=s.length;)if(h=c(),h)return h.v;return[]}function Xdt(e,t,r,n,o){var s=(n||[]).slice(),a=s.length;if(a===0)return[];for(var{start:f,end:i}=t,l=1;l<=a;l++){for(var u=(a-1)%l,c=f,h=!0,d=function(){var T=n[p];if(T==null)return 0;var S=p,A,M=()=>(A===void 0&&(A=r(T,S)),A),w=T.coordinate,C=p===u||M2(e,w,M,c,i);if(!C)return h=!1,1;C&&(c=w+e*(M()/2+o))},v,p=u;p(p===void 0&&(p=r(d,h)),p);if(h===a-1){var y=e*(v.coordinate+e*m()/2-i);s[h]=v=ah(ah({},v),{},{tickCoord:y>0?v.coordinate-y*e:v.coordinate})}else s[h]=v=ah(ah({},v),{},{tickCoord:v.coordinate});if(v.tickCoord!=null){var b=M2(e,v.tickCoord,m,f,i);b&&(i=v.tickCoord-e*(m()/2+o),s[h]=ah(ah({},v),{},{isShow:!0}))}},u=a-1;u>=0;u--)l(u);return s}function evt(e,t,r,n,o,s){var a=(n||[]).slice(),f=a.length,{start:i,end:l}=t;if(s){var u=n[f-1];if(u!=null){var c=r(u,f-1),h=e*(u.coordinate+e*c/2-l);if(a[f-1]=u=ah(ah({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate}),u.tickCoord!=null){var d=M2(e,u.tickCoord,()=>c,i,l);d&&(l=u.tickCoord-e*(c/2+o),a[f-1]=ah(ah({},u),{},{isShow:!0}))}}}for(var v=s?f-1:f,p=function(b){var g=a[b];if(g==null)return 1;var T=g,S,A=()=>(S===void 0&&(S=r(g,b)),S);if(b===0){var M=e*(T.coordinate-e*A()/2-i);a[b]=T=ah(ah({},T),{},{tickCoord:M<0?T.coordinate-M*e:T.coordinate})}else a[b]=T=ah(ah({},T),{},{tickCoord:T.coordinate});if(T.tickCoord!=null){var w=M2(e,T.tickCoord,A,i,l);w&&(i=T.tickCoord+e*(A()/2+o),a[b]=ah(ah({},T),{},{isShow:!0}))}},m=0;m{var M=typeof l=="function"?l(S.value,A):S.value;return v==="width"?Vdt(Q_(M,{fontSize:t,letterSpacing:r}),p,c):Q_(M,{fontSize:t,letterSpacing:r})[v]},y=o[0],b=o[1],g=o.length>=2&&y!=null&&b!=null?Hd(b.coordinate-y.coordinate):1,T=Ydt(s,g,v);return i==="equidistantPreserveStart"?Wdt(g,T,m,o,a):i==="equidistantPreserveEnd"?Xdt(g,T,m,o,a):(i==="preserveStart"||i==="preserveStartEnd"?d=evt(g,T,m,o,a,i==="preserveStartEnd"):d=Qdt(g,T,m,o,a),d.filter(S=>S.isShow))}var rvt=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:o=0,tickMargin:s=0}=e,a=0;if(t){Array.from(t).forEach(u=>{if(u){var c=u.getBoundingClientRect();c.width>a&&(a=c.width)}});var f=r?r.getBoundingClientRect().width:0,i=o+s,l=a+i+f+(r?n:0);return Math.round(l)}return 0},nvt=["axisLine","width","height","className","hide","ticks","axisType"];function avt(e,t){if(e==null)return{};var r,n,o=ivt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var{ticks:r=[],tick:n,tickLine:o,stroke:s,tickFormatter:a,unit:f,padding:i,tickTextProps:l,orientation:u,mirror:c,x:h,y:d,width:v,height:p,tickSize:m,tickMargin:y,fontSize:b,letterSpacing:g,getTicksConfig:T,events:S,axisType:A}=e,M=tvt(lu(lu({},T),{},{ticks:r}),b,g),w=cvt(u,c),C=hvt(u,c),x=oy(T),_=sZ(n),k={};typeof o=="object"&&(k=o);var E=lu(lu({},x),{},{fill:"none"},k),I=M.map(z=>lu({entry:z},fvt(z,h,d,v,p,u,m,c,y))),F=I.map(z=>{var{entry:N,line:q}=z;return Vt.createElement(K0,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},o&&Vt.createElement("line",Cm({},E,q,{className:ml("recharts-cartesian-axis-tick-line",Rx(o,"className"))})))}),D=I.map((z,N)=>{var q,P,{entry:B,tick:$}=z,Q=lu(lu(lu(lu({verticalAnchor:C},x),{},{textAnchor:w,stroke:"none",fill:s},$),{},{index:N,payload:B,visibleTicksCount:M.length,tickFormatter:a,padding:i},l),{},{angle:(q=(P=l==null?void 0:l.angle)!==null&&P!==void 0?P:x.angle)!==null&&q!==void 0?q:0}),J=lu(lu({},Q),_);return Vt.createElement(K0,Cm({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(B.value,"-").concat(B.coordinate,"-").concat(B.tickCoord)},vZ(S,B,N)),n&&Vt.createElement(dvt,{option:n,tickProps:J,value:"".concat(typeof a=="function"?a(B.value,N):B.value).concat(f||"")}))});return Vt.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},D.length>0&&Vt.createElement(Ay,{zIndex:pd.label},Vt.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},D)),F.length>0&&Vt.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},F))}),pvt=Vt.forwardRef((e,t)=>{var{axisLine:r,width:n,height:o,className:s,hide:a,ticks:f,axisType:i}=e,l=avt(e,nvt),[u,c]=Vt.useState(""),[h,d]=Vt.useState(""),v=Vt.useRef(null);Vt.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var m;return rvt({ticks:v.current,label:(m=e.labelRef)===null||m===void 0?void 0:m.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var p=Vt.useCallback(m=>{if(m){var y=m.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=y;var b=y[0];if(b){var g=window.getComputedStyle(b),T=g.fontSize,S=g.letterSpacing;(T!==u||S!==h)&&(c(T),d(S))}}},[u,h]);return a||n!=null&&n<=0||o!=null&&o<=0?null:Vt.createElement(Ay,{zIndex:e.zIndex},Vt.createElement(K0,{className:ml("recharts-cartesian-axis",s)},Vt.createElement(uvt,{x:e.x,y:e.y,width:n,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:oy(e)}),Vt.createElement(vvt,{ref:p,axisType:i,events:l,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:f,unit:e.unit,width:e.width,x:e.x,y:e.y}),Vt.createElement(nht,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},Vt.createElement(dht,{label:e.label,labelRef:e.labelRef}),e.children)))}),RK=Vt.forwardRef((e,t)=>{var r=Ov(e,dm);return Vt.createElement(pvt,Cm({},r,{ref:t}))});RK.displayName="CartesianAxis";var gvt={},wDe=xd({name:"errorBars",initialState:gvt,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:o}=t.payload;e[r]&&(e[r]=e[r].map(s=>s.dataKey===n.dataKey&&s.direction===n.direction?o:s))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(o=>o.dataKey!==n.dataKey||o.direction!==n.direction))}}}),{addErrorBar:Dgt,replaceErrorBar:Igt,removeErrorBar:Ogt}=wDe.actions,yvt=wDe.reducer,mvt=["children"];function xvt(e,t){if(e==null)return{};var r,n,o=bvt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n({x:0,y:0,value:0}),errorBarOffset:0},wvt=Vt.createContext(_vt);function Tvt(e){var{children:t}=e,r=xvt(e,mvt);return Vt.createElement(wvt.Provider,{value:r},t)}function TDe(e,t){var r,n,o=Li(l=>gg(l,e)),s=Li(l=>yg(l,t)),a=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:tc.allowDataOverflow,f=(n=s==null?void 0:s.allowDataOverflow)!==null&&n!==void 0?n:rc.allowDataOverflow,i=a||f;return{needClip:i,needClipX:a,needClipY:f}}function Avt(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,o=mDe(),{needClipX:s,needClipY:a,needClip:f}=TDe(t,r);if(!f||!o)return null;var{x:i,y:l,width:u,height:c}=o;return Vt.createElement("clipPath",{id:"clipPath-".concat(n)},Vt.createElement("rect",{x:s?i:i-u/2,y:a?l:l-c/2,width:s?u:u*2,height:a?c:c*2}))}var qG={exports:{}},jG={};/** + * @license React + * use-sync-external-store-with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var GTe;function Svt(){if(GTe)return jG;GTe=1;var e=zx();function t(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,f=e.useDebugValue;return jG.useSyncExternalStoreWithSelector=function(i,l,u,c,h){var d=o(null);if(d.current===null){var v={hasValue:!1,value:null};d.current=v}else v=d.current;d=a(function(){function m(S){if(!y){if(y=!0,b=S,S=c(S),h!==void 0&&v.hasValue){var A=v.value;if(h(A,S))return g=A}return g=S}if(A=g,r(b,S))return A;var M=c(S);return h!==void 0&&h(A,M)?(b=S,A):(b=S,g=M)}var y=!1,b,g,T=u===void 0?null:u;return[function(){return m(l())},T===null?void 0:function(){return m(T())}]},[l,u,c,h]);var p=n(i,d[0],d[1]);return s(function(){v.hasValue=!0,v.value=p},[p]),f(p),p},jG}var VTe;function Mvt(){return VTe||(VTe=1,qG.exports=Svt()),qG.exports}Mvt();function Evt(e){e()}function kvt(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Evt(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var YTe={notify(){},get:()=>[]};function Cvt(e,t){let r,n=YTe,o=0,s=!1;function a(p){u();const m=n.subscribe(p);let y=!1;return()=>{y||(y=!0,m(),c())}}function f(){n.notify()}function i(){v.onStateChange&&v.onStateChange()}function l(){return s}function u(){o++,r||(r=e.subscribe(i),n=kvt())}function c(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=YTe)}function h(){s||(s=!0,u())}function d(){s&&(s=!1,c())}const v={addNestedSub:a,notifyNestedSubs:f,handleChangeWrapper:i,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return v}var Rvt=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lvt=Rvt(),Pvt=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Dvt=Pvt(),Ivt=()=>Lvt||Dvt?Vt.useLayoutEffect:Vt.useEffect,Ovt=Ivt();function $Te(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function zvt(e,t){if($Te(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o{const i=Cvt(o);return{store:o,subscription:i,getServerState:n?()=>n:void 0}},[o,n]),a=Vt.useMemo(()=>o.getState(),[o]);Ovt(()=>{const{subscription:i}=s;return i.onStateChange=i.notifyNestedSubs,i.trySubscribe(),a!==o.getState()&&i.notifyNestedSubs(),()=>{i.tryUnsubscribe(),i.onStateChange=void 0}},[s,a]);const f=r||Nvt;return Vt.createElement(f.Provider,{value:s},t)}var qvt=Bvt,jvt=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function Uvt(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function LK(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(jvt.has(n)){if(e[n]==null&&t[n]==null)continue;if(!zvt(e[n],t[n]))return!1}else if(!Uvt(e[n],t[n]))return!1;return!0}function Jm(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:gDe}function Qm(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:gDe}var Hvt="Invariant failed";function Gvt(e,t){throw new Error(Hvt)}function NY(){return NY=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0;return(n,o)=>{if(Ti(t))return t;var s=Ti(n)||uc(n);return s?t(n,o):(s||Gvt(),r)}},Yvt=(e,t,r)=>r,$vt=(e,t)=>t,xw=Tn([lK,$vt],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Wvt=Tn([xw],e=>e==null?void 0:e.maxBarSize),Xvt=(e,t,r,n)=>n,Zvt=Tn([rl,lK,Jm,Qm,Yvt],(e,t,r,n,o)=>t.filter(s=>e==="horizontal"?s.xAxisId===r:s.yAxisId===n).filter(s=>s.isPanorama===o).filter(s=>s.hide===!1).filter(s=>s.type==="bar")),Kvt=(e,t,r)=>{var n=rl(e),o=Jm(e,t),s=Qm(e,t);if(!(o==null||s==null))return n==="horizontal"?PY(e,"yAxis",s,r):PY(e,"xAxis",o,r)},Jvt=(e,t)=>{var r=rl(e),n=Jm(e,t),o=Qm(e,t);if(!(n==null||o==null))return r==="horizontal"?qwe(e,"xAxis",n):qwe(e,"yAxis",o)},Qvt=Tn([Zvt,Zst,Jvt],kdt),ept=(e,t,r)=>{var n,o,s=xw(e,t);if(s==null)return 0;var a=Jm(e,t),f=Qm(e,t);if(a==null||f==null)return 0;var i=rl(e),l=RLe(e),{maxBarSize:u}=s,c=uc(u)?l:u,h,d;return i==="horizontal"?(h=Ix(e,"xAxis",a,r),d=Dx(e,"xAxis",a,r)):(h=Ix(e,"yAxis",f,r),d=Dx(e,"yAxis",f,r)),(n=(o=eS(h,d,!0))!==null&&o!==void 0?o:c)!==null&&n!==void 0?n:0},ADe=(e,t,r)=>{var n=rl(e),o=Jm(e,t),s=Qm(e,t);if(!(o==null||s==null)){var a,f;return n==="horizontal"?(a=Ix(e,"xAxis",o,r),f=Dx(e,"xAxis",o,r)):(a=Ix(e,"yAxis",s,r),f=Dx(e,"yAxis",s,r)),eS(a,f)}},tpt=Tn([Qvt,RLe,Xst,LLe,ept,ADe,Wvt],Ddt),rpt=(e,t,r)=>{var n=Jm(e,t);if(n!=null)return Ix(e,"xAxis",n,r)},npt=(e,t,r)=>{var n=Qm(e,t);if(n!=null)return Ix(e,"yAxis",n,r)},apt=(e,t,r)=>{var n=Jm(e,t);if(n!=null)return Dx(e,"xAxis",n,r)},ipt=(e,t,r)=>{var n=Qm(e,t);if(n!=null)return Dx(e,"yAxis",n,r)},opt=Tn([tpt,xw],Odt),spt=Tn([Kvt,xw],Idt),lpt=Tn([dc,AZ,rpt,npt,apt,ipt,opt,rl,jst,ADe,spt,xw,Xvt],(e,t,r,n,o,s,a,f,i,l,u,c,h)=>{var{chartData:d,dataStartIndex:v,dataEndIndex:p}=i;if(!(c==null||a==null||t==null||f!=="horizontal"&&f!=="vertical"||r==null||n==null||o==null||s==null||l==null)){var{data:m}=c,y;if(m!=null&&m.length>0?y=m:y=d==null?void 0:d.slice(v,p+1),y!=null)return zpt({layout:f,barSettings:c,pos:a,parentViewBox:t,bandSize:l,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:s,stackedData:u,displayedData:y,offset:e,cells:h,dataStartIndex:v})}}),upt=["index"];function BY(){return BY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Vt.useContext(SDe);if(t!=null)return t.stackId;if(e!=null)return mat(e)},dpt=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),vpt=e=>{var t=Vt.useContext(SDe);if(t!=null){var{stackId:r}=t;return"url(#".concat(dpt(r,e),")")}},MDe=e=>{var{index:t}=e,r=fpt(e,upt),n=vpt(t);return Vt.createElement(K0,BY({className:"recharts-bar-stack-layer",clipPath:n},r))},ppt=["onMouseEnter","onMouseLeave","onClick"],gpt=["value","background","tooltipPosition"],ypt=["id"],mpt=["onMouseEnter","onClick","onMouseLeave"];function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:r,fill:n,legendType:o,hide:s}=e;return[{inactive:s,dataKey:t,type:o,color:n,value:wRe(r,t),payload:e}]},Apt=Vt.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:o,name:s,hide:a,unit:f,tooltipType:i,id:l}=e,u={dataDefinedOnItem:void 0,getPosition:db,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:t,nameKey:void 0,name:wRe(s,t),hide:a,type:i,color:o,unit:f,graphicalItemId:l}};return Vt.createElement(edt,{tooltipEntrySettings:u})});function Spt(e){var t=Li(Ox),{data:r,dataKey:n,background:o,allOtherBarProps:s}=e,{onMouseEnter:a,onMouseLeave:f,onClick:i}=s,l=_S(s,ppt),u=hDe(a,n,s.id),c=dDe(f),h=vDe(i,n,s.id);if(!o||r==null)return null;var d=sZ(o);return Vt.createElement(Ay,{zIndex:zdt(o,pd.barBackground)},r.map((v,p)=>{var{value:m,background:y,tooltipPosition:b}=v,g=_S(v,gpt);if(!y)return null;var T=u(v,p),S=c(v,p),A=h(v,p),M=zh(zh(zh(zh(zh({option:o,isActive:String(p)===t},g),{},{fill:"#eee"},y),d),vZ(l,v,p)),{},{onMouseEnter:T,onMouseLeave:S,onClick:A,dataKey:n,index:p,className:"recharts-bar-background-rectangle"});return Vt.createElement(bS,rg({key:"background-bar-".concat(p)},M))}))}function Mpt(e){var{showLabels:t,children:r,rects:n}=e,o=n==null?void 0:n.map(s=>{var a={x:s.x,y:s.y,width:s.width,lowerWidth:s.width,upperWidth:s.width,height:s.height};return zh(zh({},a),{},{value:s.value,payload:s.payload,parentViewBox:s.parentViewBox,viewBox:a,fill:s.fill})});return Vt.createElement(Aht,{value:t?o:void 0},r)}function Ept(e){var{shape:t,activeBar:r,baseProps:n,entry:o,index:s,dataKey:a}=e,f=Li(Ox),i=Li(UPe),l=r&&String(s)===f&&(i==null||a===i),u=l?r:t;return l?Vt.createElement(Ay,{zIndex:pd.activeBar},Vt.createElement(MDe,{index:s},Vt.createElement(bS,rg({},n,{name:String(n.name)},o,{isActive:l,option:u,index:s,dataKey:a})))):Vt.createElement(bS,rg({},n,{name:String(n.name)},o,{isActive:l,option:u,index:s,dataKey:a}))}function kpt(e){var{shape:t,baseProps:r,entry:n,index:o,dataKey:s}=e;return Vt.createElement(bS,rg({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:o,dataKey:s}))}function Cpt(e){var t,{data:r,props:n}=e,o=(t=oy(n))!==null&&t!==void 0?t:{},{id:s}=o,a=_S(o,ypt),{shape:f,dataKey:i,activeBar:l}=n,{onMouseEnter:u,onClick:c,onMouseLeave:h}=n,d=_S(n,mpt),v=hDe(u,i,s),p=dDe(h),m=vDe(c,i,s);return r?Vt.createElement(Vt.Fragment,null,r.map((y,b)=>Vt.createElement(MDe,rg({index:b,key:"rectangle-".concat(y==null?void 0:y.x,"-").concat(y==null?void 0:y.y,"-").concat(y==null?void 0:y.value,"-").concat(b),className:"recharts-bar-rectangle"},vZ(d,y,b),{onMouseEnter:v(y,b),onMouseLeave:p(y,b),onClick:m(y,b)}),l?Vt.createElement(Ept,{shape:f,activeBar:l,baseProps:a,entry:y,index:b,dataKey:i}):Vt.createElement(kpt,{shape:f,baseProps:a,entry:y,index:b,dataKey:i})))):null}function Rpt(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:o,isAnimationActive:s,animationBegin:a,animationDuration:f,animationEasing:i,onAnimationEnd:l,onAnimationStart:u}=t,c=r.current,h=RZ(t,"recharts-bar-"),[d,v]=Vt.useState(!1),p=!d,m=Vt.useCallback(()=>{typeof l=="function"&&l(),v(!1)},[l]),y=Vt.useCallback(()=>{typeof u=="function"&&u(),v(!0)},[u]);return Vt.createElement(Mpt,{showLabels:p,rects:n},Vt.createElement(CZ,{animationId:h,begin:a,duration:f,isActive:s,easing:i,onAnimationEnd:m,onAnimationStart:y,key:h},b=>{var g=b===1?n:n==null?void 0:n.map((T,S)=>{var A=c&&c[S];if(A)return zh(zh({},T),{},{x:zc(A.x,T.x,b),y:zc(A.y,T.y,b),width:zc(A.width,T.width,b),height:zc(A.height,T.height,b)});if(o==="horizontal"){var M=zc(0,T.height,b),w=zc(T.stackedBarStart,T.y,b);return zh(zh({},T),{},{y:w,height:M})}var C=zc(0,T.width,b),x=zc(T.stackedBarStart,T.x,b);return zh(zh({},T),{},{width:C,x})});return b>0&&(r.current=g??null),g==null?null:Vt.createElement(K0,null,Vt.createElement(Cpt,{props:t,data:g}))}),Vt.createElement(Eht,{label:t.label}),t.children)}function Lpt(e){var t=Vt.useRef(null);return Vt.createElement(Rpt,{previousRectanglesRef:t,props:e})}var EDe=0,Ppt=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Nc(e,t)}};class Dpt extends Vt.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:o,xAxisId:s,yAxisId:a,needClip:f,background:i,id:l}=this.props;if(t||r==null)return null;var u=ml("recharts-bar",o),c=l;return Vt.createElement(K0,{className:u,id:l},f&&Vt.createElement("defs",null,Vt.createElement(Avt,{clipPathId:c,xAxisId:s,yAxisId:a})),Vt.createElement(K0,{className:"recharts-bar-rectangles",clipPath:f?"url(#clipPath-".concat(c,")"):void 0},Vt.createElement(Spt,{data:r,dataKey:n,background:i,allOtherBarProps:this.props}),Vt.createElement(Lpt,this.props)))}}var Ipt={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:EDe,xAxisId:0,yAxisId:0,zIndex:pd.bar};function Opt(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:s,activeBar:a,animationBegin:f,animationDuration:i,animationEasing:l,isAnimationActive:u}=e,{needClip:c}=TDe(t,r),h=vb(),d=Xd(),v=Iht(e.children,EK),p=Li(b=>lpt(b,e.id,d,v));if(h!=="vertical"&&h!=="horizontal")return null;var m,y=p==null?void 0:p[0];return y==null||y.height==null||y.width==null?m=0:m=h==="vertical"?y.height/2:y.width/2,Vt.createElement(Tvt,{xAxisId:t,yAxisId:r,data:p,dataPointFormatter:Ppt,errorBarOffset:m},Vt.createElement(Dpt,rg({},e,{layout:h,needClip:c,data:p,xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:s,activeBar:a,animationBegin:f,animationDuration:i,animationEasing:l,isAnimationActive:u})))}function zpt(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:o,bandSize:s,xAxis:a,yAxis:f,xAxisTicks:i,yAxisTicks:l,stackedData:u,displayedData:c,offset:h,cells:d,parentViewBox:v,dataStartIndex:p}=e,m=t==="horizontal"?f:a,y=u?m.scale.domain():null,b=xat({numericAxis:m}),g=m.scale.map(b);return c.map((T,S)=>{var A,M,w,C,x,_;if(u){var k=u[S+p];if(k==null)return null;A=dat(k,y)}else A=Nc(T,r),Array.isArray(A)||(A=[b,A]);var E=Vvt(n,EDe)(A[1],S);if(t==="horizontal"){var I,F=f.scale.map(A[0]),D=f.scale.map(A[1]);if(F==null||D==null)return null;M=f2e({axis:a,ticks:i,bandSize:s,offset:o.offset,entry:T,index:S}),w=(I=D??F)!==null&&I!==void 0?I:void 0,C=o.size;var z=F-D;if(x=c0(z)?0:z,_={x:M,y:h.top,width:C,height:h.height},Math.abs(E)>0&&Math.abs(x)0&&Math.abs(C)Vt.createElement(Vt.Fragment,null,Vt.createElement(tdt,{legendPayload:Tpt(t)}),Vt.createElement(Apt,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),Vt.createElement(ddt,{type:"bar",id:o,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),Vt.createElement(Ay,{zIndex:t.zIndex},Vt.createElement(Opt,rg({},t,{id:o})))))}var kDe=Vt.memo(Fpt,LK);kDe.displayName="Bar";var Npt=["domain","range"],Bpt=["domain","range"];function XTe(e,t){if(e==null)return{};var r,n,o=qpt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{if(a!=null)return JTe(JTe({},s),{},{type:a})},[s,a]);return Vt.useLayoutEffect(()=>{f!=null&&(r.current===null?t(mdt(f)):r.current!==f&&t(xdt({prev:r.current,next:f})),r.current=f)},[f,t]),Vt.useLayoutEffect(()=>()=>{r.current&&(t(bdt(r.current)),r.current=null)},[t]),null}var Xpt=e=>{var{xAxisId:t,className:r}=e,n=Li(AZ),o=Xd(),s="xAxis",a=Li(y=>_Pe(y,s,t,o)),f=Li(y=>yPe(y,t)),i=Li(y=>Klt(y,t)),l=Li(y=>qLe(y,t));if(f==null||i==null||l==null)return null;var{dangerouslySetInnerHTML:u,ticks:c,scale:h}=e,d=jY(e,Upt),{id:v,scale:p}=l,m=jY(l,Hpt);return Vt.createElement(RK,qY({},d,m,{x:i.x,y:i.y,width:f.width,height:f.height,className:ml("recharts-".concat(s," ").concat(s),r),viewBox:n,ticks:a,axisType:s}))},Zpt={allowDataOverflow:tc.allowDataOverflow,allowDecimals:tc.allowDecimals,allowDuplicatedCategory:tc.allowDuplicatedCategory,angle:tc.angle,axisLine:dm.axisLine,height:tc.height,hide:!1,includeHidden:tc.includeHidden,interval:tc.interval,label:!1,minTickGap:tc.minTickGap,mirror:tc.mirror,orientation:tc.orientation,padding:tc.padding,reversed:tc.reversed,scale:tc.scale,tick:tc.tick,tickCount:tc.tickCount,tickLine:dm.tickLine,tickSize:dm.tickSize,type:tc.type,xAxisId:0},Kpt=e=>{var t=Ov(e,Zpt);return Vt.createElement(Vt.Fragment,null,Vt.createElement(Wpt,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),Vt.createElement(Xpt,t))},RDe=Vt.memo(Kpt,CDe);RDe.displayName="XAxis";var Jpt=["type"],Qpt=["dangerouslySetInnerHTML","ticks","scale"],e0t=["id","scale"];function UY(){return UY=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(a!=null)return e3e(e3e({},s),{},{type:a})},[a,s]);return Vt.useLayoutEffect(()=>{f!=null&&(r.current===null?t(_dt(f)):r.current!==f&&t(wdt({prev:r.current,next:f})),r.current=f)},[f,t]),Vt.useLayoutEffect(()=>()=>{r.current&&(t(Tdt(r.current)),r.current=null)},[t]),null}function o0t(e){var{yAxisId:t,className:r,width:n,label:o}=e,s=Vt.useRef(null),a=Vt.useRef(null),f=Li(AZ),i=Xd(),l=Ru(),u="yAxis",c=Li(A=>mPe(A,t)),h=Li(A=>Qlt(A,t)),d=Li(A=>_Pe(A,u,t,i)),v=Li(A=>jLe(A,t));if(Vt.useLayoutEffect(()=>{if(!(n!=="auto"||!c||CK(o)||Vt.isValidElement(o)||v==null)){var A=s.current;if(A){var M=A.getCalculatedWidth();Math.round(c.width)!==Math.round(M)&&l(Adt({id:t,width:M}))}}},[d,c,l,o,t,n,v]),c==null||h==null||v==null)return null;var{dangerouslySetInnerHTML:p,ticks:m,scale:y}=e,b=HY(e,Qpt),{id:g,scale:T}=v,S=HY(v,e0t);return Vt.createElement(RK,UY({},b,S,{ref:s,labelRef:a,x:h.x,y:h.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:c.width,height:c.height,className:ml("recharts-".concat(u," ").concat(u),r),viewBox:f,ticks:d,axisType:u}))}var s0t={allowDataOverflow:rc.allowDataOverflow,allowDecimals:rc.allowDecimals,allowDuplicatedCategory:rc.allowDuplicatedCategory,angle:rc.angle,axisLine:dm.axisLine,hide:!1,includeHidden:rc.includeHidden,interval:rc.interval,label:!1,minTickGap:rc.minTickGap,mirror:rc.mirror,orientation:rc.orientation,padding:rc.padding,reversed:rc.reversed,scale:rc.scale,tick:rc.tick,tickCount:rc.tickCount,tickLine:dm.tickLine,tickSize:dm.tickSize,type:rc.type,width:rc.width,yAxisId:0},l0t=e=>{var t=Ov(e,s0t);return Vt.createElement(Vt.Fragment,null,Vt.createElement(i0t,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),Vt.createElement(o0t,t))},LDe=Vt.memo(l0t,CDe);LDe.displayName="YAxis";var u0t=(e,t)=>t,PK=Tn([u0t,rl,NLe,pc,NPe,mg,dft,dc],bft),DK=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},PDe=Rv("mouseClick"),DDe=sw();DDe.startListening({actionCreator:PDe,effect:(e,t)=>{var r=e.payload,n=PK(t.getState(),DK(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(dut({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var GY=Rv("mouseMove"),IDe=sw(),m3=null;IDe.startListening({actionCreator:GY,effect:(e,t)=>{var r=e.payload;m3!==null&&cancelAnimationFrame(m3);var n=DK(r);m3=requestAnimationFrame(()=>{var o=t.getState(),s=yK(o,o.tooltip.settings.shared);if(s==="axis"){var a=PK(o,n);(a==null?void 0:a.activeIndex)!=null?t.dispatch(CPe({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(kPe())}m3=null})}});function f0t(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var t3e={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},ODe=xd({name:"rootProps",initialState:t3e,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:t3e.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),c0t=ODe.reducer,{updateOptions:h0t}=ODe.actions,d0t=null,v0t={updatePolarOptions:(e,t)=>t.payload},zDe=xd({name:"polarOptions",initialState:d0t,reducers:v0t}),{updatePolarOptions:zgt}=zDe.actions,p0t=zDe.reducer,FDe=Rv("keyDown"),NDe=Rv("focus"),IK=sw();IK.startListening({actionCreator:FDe,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,s=e.payload;if(!(s!=="ArrowRight"&&s!=="ArrowLeft"&&s!=="Enter")){var a=mK(o,wb(r),pw(r),yw(r)),f=a==null?-1:Number(a);if(!(!Number.isFinite(f)||f<0)){var i=mg(r);if(s==="Enter"){var l=gS(r,"axis","hover",String(o.index));t.dispatch(IY({active:!o.active,activeIndex:o.index,activeCoordinate:l}));return}var u=nut(r),c=u==="left-to-right"?1:-1,h=s==="ArrowRight"?1:-1,d=f+h*c;if(!(i==null||d>=i.length||d<0)){var v=gS(r,"axis","hover",String(d));t.dispatch(IY({active:!0,activeIndex:d.toString(),activeCoordinate:v}))}}}}}});IK.startListening({actionCreator:NDe,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var s="0",a=gS(r,"axis","hover",String(s));t.dispatch(IY({active:!0,activeIndex:s,activeCoordinate:a}))}}}});var _v=Rv("externalEvent"),BDe=sw(),GG=new Map;BDe.startListening({actionCreator:_v,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var o=n.type,s=GG.get(o);s!==void 0&&cancelAnimationFrame(s);var a=requestAnimationFrame(()=>{try{var f=t.getState(),i={activeCoordinate:Jut(f),activeDataKey:UPe(f),activeIndex:Ox(f),activeLabel:jPe(f),activeTooltipIndex:Ox(f),isTooltipActive:Qut(f)};r(i,n)}finally{GG.delete(o)}});GG.set(o,a)}}});var g0t=Tn([bb],e=>e.tooltipItemPayloads),y0t=Tn([g0t,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(s=>s.settings.graphicalItemId===r);if(n!=null){var{getPosition:o}=n;if(o!=null)return o(t)}}}),qDe=Rv("touchMove"),jDe=sw();jDe.startListening({actionCreator:qDe,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),o=yK(n,n.tooltip.settings.shared);if(o==="axis"){var s=r.touches[0];if(s==null)return;var a=PK(n,DK({clientX:s.clientX,clientY:s.clientY,currentTarget:r.currentTarget}));(a==null?void 0:a.activeIndex)!=null&&t.dispatch(CPe({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var f,i=r.touches[0];if(document.elementFromPoint==null||i==null)return;var l=document.elementFromPoint(i.clientX,i.clientY);if(!l||!l.getAttribute)return;var u=l.getAttribute(Mat),c=(f=l.getAttribute(Eat))!==null&&f!==void 0?f:void 0,h=_b(n).find(p=>p.id===c);if(u==null||h==null||c==null)return;var{dataKey:d}=h,v=y0t(n,u,c);t.dispatch(EPe({activeDataKey:d,activeIndex:u,activeCoordinate:v,activeGraphicalItemId:c}))}}}});var m0t=$4e({brush:Ndt,cartesianAxis:Sdt,chartData:Jft,errorBars:yvt,graphicalItems:cdt,layout:lat,legend:wit,options:$ft,polarAxis:Cht,polarOptions:p0t,referenceElements:Udt,rootProps:c0t,tooltip:vut,zIndex:Ift}),x0t=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Dnt({reducer:m0t,preloadedState:t,middleware:n=>{var o;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([DDe.middleware,IDe.middleware,IK.middleware,BDe.middleware,jDe.middleware])},enhancers:n=>{var o=n;return typeof n=="function"&&(o=n()),o.concat(lRe({type:"raf"}))},devTools:{serialize:{replacer:f0t},name:"recharts-".concat(r)}})};function b0t(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Xd(),s=Vt.useRef(null);if(o)return r;s.current==null&&(s.current=x0t(t,n));var a=yZ;return Vt.createElement(qvt,{context:a,store:s.current},r)}function _0t(e){var{layout:t,margin:r}=e,n=Ru(),o=Xd();return Vt.useEffect(()=>{o||(n(iat(t)),n(aat(r)))},[n,o,t,r]),null}var w0t=Vt.memo(_0t,LK);function T0t(e){var t=Ru();return Vt.useEffect(()=>{t(h0t(e))},[t,e]),null}function r3e(e){var{zIndex:t,isPanorama:r}=e,n=Vt.useRef(null),o=Ru();return Vt.useLayoutEffect(()=>(n.current&&o(Pft({zIndex:t,element:n.current,isPanorama:r})),()=>{o(Dft({zIndex:t,isPanorama:r}))}),[o,t,r]),Vt.createElement("g",{tabIndex:-1,ref:n})}function n3e(e){var{children:t,isPanorama:r}=e,n=Li(wft);if(!n||n.length===0)return t;var o=n.filter(a=>a<0),s=n.filter(a=>a>0);return Vt.createElement(Vt.Fragment,null,o.map(a=>Vt.createElement(r3e,{key:a,zIndex:a,isPanorama:r})),t,s.map(a=>Vt.createElement(r3e,{key:a,zIndex:a,isPanorama:r})))}var A0t=["children"];function S0t(e,t){if(e==null)return{};var r,n,o=M0t(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var r=ait(),n=iit(),o=zRe();if(!sy(r)||!sy(n))return null;var{children:s,otherAttributes:a,title:f,desc:i}=e,l,u;return a!=null&&(typeof a.tabIndex=="number"?l=a.tabIndex:l=o?0:void 0,typeof a.role=="string"?u=a.role:u=o?"application":void 0),Vt.createElement(c4e,wS({},a,{title:f,desc:i,role:u,tabIndex:l,width:r,height:n,style:E0t,ref:t}),s)}),C0t=e=>{var{children:t}=e,r=Li(fE);if(!r)return null;var{width:n,height:o,y:s,x:a}=r;return Vt.createElement(c4e,{width:n,height:o,x:a,y:s},t)},a3e=Vt.forwardRef((e,t)=>{var{children:r}=e,n=S0t(e,A0t),o=Xd();return o?Vt.createElement(C0t,null,Vt.createElement(n3e,{isPanorama:!0},r)):Vt.createElement(k0t,wS({ref:t},n),Vt.createElement(n3e,{isPanorama:!1},r))});function R0t(){var e=Ru(),[t,r]=Vt.useState(null),n=Li(Sat);return Vt.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),s=o.width/t.offsetWidth;ps(s)&&s!==n&&e(sat(s))}},[t,e,n]),r}function i3e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function L0t(e){for(var t=1;t(sct(),null);function TS(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var z0t=Vt.forwardRef((e,t)=>{var r,n,o=Vt.useRef(null),[s,a]=Vt.useState({containerWidth:TS((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:TS((n=e.style)===null||n===void 0?void 0:n.height)}),f=Vt.useCallback((l,u)=>{a(c=>{var h=Math.round(l),d=Math.round(u);return c.containerWidth===h&&c.containerHeight===d?c:{containerWidth:h,containerHeight:d}})},[]),i=Vt.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null&&typeof ResizeObserver<"u"){var{width:u,height:c}=l.getBoundingClientRect();f(u,c);var h=v=>{var p=v[0];if(p!=null){var{width:m,height:y}=p.contentRect;f(m,y)}},d=new ResizeObserver(h);d.observe(l),o.current=d}},[t,f]);return Vt.useEffect(()=>()=>{var l=o.current;l!=null&&l.disconnect()},[f]),Vt.createElement(Vt.Fragment,null,Vt.createElement(uw,{width:s.containerWidth,height:s.containerHeight}),Vt.createElement("div",ry({ref:i},e)))}),F0t=Vt.forwardRef((e,t)=>{var{width:r,height:n}=e,[o,s]=Vt.useState({containerWidth:TS(r),containerHeight:TS(n)}),a=Vt.useCallback((i,l)=>{s(u=>{var c=Math.round(i),h=Math.round(l);return u.containerWidth===c&&u.containerHeight===h?u:{containerWidth:c,containerHeight:h}})},[]),f=Vt.useCallback(i=>{if(typeof t=="function"&&t(i),i!=null){var{width:l,height:u}=i.getBoundingClientRect();a(l,u)}},[t,a]);return Vt.createElement(Vt.Fragment,null,Vt.createElement(uw,{width:o.containerWidth,height:o.containerHeight}),Vt.createElement("div",ry({ref:f},e)))}),N0t=Vt.forwardRef((e,t)=>{var{width:r,height:n}=e;return Vt.createElement(Vt.Fragment,null,Vt.createElement(uw,{width:r,height:n}),Vt.createElement("div",ry({ref:t},e)))}),B0t=Vt.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?Vt.createElement(F0t,ry({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?Vt.createElement(N0t,ry({},e,{width:r,height:n,ref:t})):Vt.createElement(Vt.Fragment,null,Vt.createElement(uw,{width:r,height:n}),Vt.createElement("div",ry({ref:t},e)))});function q0t(e){return e?z0t:B0t}var j0t=Vt.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:s,onContextMenu:a,onDoubleClick:f,onMouseDown:i,onMouseEnter:l,onMouseLeave:u,onMouseMove:c,onMouseUp:h,onTouchEnd:d,onTouchMove:v,onTouchStart:p,style:m,width:y,responsive:b,dispatchTouchEvents:g=!0}=e,T=Vt.useRef(null),S=Ru(),[A,M]=Vt.useState(null),[w,C]=Vt.useState(null),x=R0t(),_=SZ(),k=(_==null?void 0:_.width)>0?_.width:y,E=(_==null?void 0:_.height)>0?_.height:o,I=Vt.useCallback(j=>{x(j),typeof t=="function"&&t(j),M(j),C(j),j!=null&&(T.current=j)},[x,t,M,C]),F=Vt.useCallback(j=>{S(PDe(j)),S(_v({handler:s,reactEvent:j}))},[S,s]),D=Vt.useCallback(j=>{S(GY(j)),S(_v({handler:l,reactEvent:j}))},[S,l]),z=Vt.useCallback(j=>{S(kPe()),S(_v({handler:u,reactEvent:j}))},[S,u]),N=Vt.useCallback(j=>{S(GY(j)),S(_v({handler:c,reactEvent:j}))},[S,c]),q=Vt.useCallback(()=>{S(NDe())},[S]),P=Vt.useCallback(j=>{S(FDe(j.key))},[S]),B=Vt.useCallback(j=>{S(_v({handler:a,reactEvent:j}))},[S,a]),$=Vt.useCallback(j=>{S(_v({handler:f,reactEvent:j}))},[S,f]),Q=Vt.useCallback(j=>{S(_v({handler:i,reactEvent:j}))},[S,i]),J=Vt.useCallback(j=>{S(_v({handler:h,reactEvent:j}))},[S,h]),ne=Vt.useCallback(j=>{S(_v({handler:p,reactEvent:j}))},[S,p]),te=Vt.useCallback(j=>{g&&S(qDe(j)),S(_v({handler:v,reactEvent:j}))},[S,g,v]),Z=Vt.useCallback(j=>{S(_v({handler:d,reactEvent:j}))},[S,d]),G=q0t(b);return Vt.createElement(XPe.Provider,{value:A},Vt.createElement(ctt.Provider,{value:w},Vt.createElement(G,{width:k??(m==null?void 0:m.width),height:E??(m==null?void 0:m.height),className:ml("recharts-wrapper",n),style:L0t({position:"relative",cursor:"default",width:k,height:E},m),onClick:F,onContextMenu:B,onDoubleClick:$,onFocus:q,onKeyDown:P,onMouseDown:Q,onMouseEnter:D,onMouseLeave:z,onMouseMove:N,onMouseUp:J,onTouchEnd:Z,onTouchMove:te,onTouchStart:ne,ref:I},Vt.createElement(O0t,null),r)))}),U0t=["width","height","responsive","children","className","style","compact","title","desc"];function H0t(e,t){if(e==null)return{};var r,n,o=G0t(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var{width:r,height:n,responsive:o,children:s,className:a,style:f,compact:i,title:l,desc:u}=e,c=H0t(e,U0t),h=oy(c);return i?Vt.createElement(Vt.Fragment,null,Vt.createElement(uw,{width:r,height:n}),Vt.createElement(a3e,{otherAttributes:h,title:l,desc:u},s)):Vt.createElement(j0t,{className:a,style:f,width:r,height:n,responsive:o??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},Vt.createElement(a3e,{otherAttributes:h,title:l,desc:u,ref:t},Vt.createElement(Gdt,null,s)))});function VY(){return VY=Object.assign?Object.assign.bind():function(e){for(var t=1;tVt.createElement(W0t,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:X0t,tooltipPayloadSearcher:Vft,categoricalChartProps:e,ref:t}));const o3e=[{name:"SyncUsers",score:82,color:"#ffffff"},{name:"Claude 3.7 Sonnet",score:64,color:"#4b5563"},{name:"Gemini 1.5 pro",score:63,color:"#4b5563"},{name:"GPT-4o",score:60,color:"#4b5563"},{name:"GPT-3.5 Turbo",score:54,color:"#4b5563"}],K0t=()=>ct.jsx("section",{id:"accuracy",className:"py-24 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[ct.jsxs("div",{children:[ct.jsx("div",{className:"inline-block px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300 mb-8",children:"Accuracy"}),ct.jsxs("h2",{className:"text-3xl md:text-5xl font-semibold leading-tight mb-8",children:["SyncUsers is ",ct.jsx("span",{className:"text-white",children:"30% more accurate"})," at predicting engagement than standard LLMs."]}),ct.jsxs("div",{className:"bg-gray-900/30 border border-gray-800 rounded-2xl p-6 md:p-8",children:[ct.jsx("h4",{className:"text-gray-400 mb-6",children:"Success rate at picking winners from pairs of LinkedIn posts"}),ct.jsxs("div",{className:"h-[300px] w-full",children:[ct.jsx(tit,{width:"100%",height:"100%",children:ct.jsxs(Z0t,{data:o3e,layout:"vertical",margin:{left:0,right:40},children:[ct.jsx(RDe,{type:"number",hide:!0}),ct.jsx(LDe,{dataKey:"name",type:"category",width:150,tick:{fill:"#9ca3af",fontSize:12},axisLine:!1,tickLine:!1}),ct.jsx(pct,{cursor:{fill:"transparent"},contentStyle:{backgroundColor:"#111",border:"1px solid #333"}}),ct.jsx(kDe,{dataKey:"score",radius:[0,4,4,0],barSize:32,children:o3e.map((e,t)=>ct.jsx(EK,{fill:e.name==="SyncUsers"?"url(#gradient)":"#374151"},`cell-${t}`))})]})}),ct.jsx("svg",{style:{height:0},children:ct.jsx("defs",{children:ct.jsxs("linearGradient",{id:"gradient",x1:"0",y1:"0",x2:"1",y2:"0",children:[ct.jsx("stop",{offset:"0%",stopColor:"#e5e7eb"}),ct.jsx("stop",{offset:"100%",stopColor:"#ffffff"})]})})})]}),ct.jsx("div",{className:"hidden"})]})]}),ct.jsxs("div",{className:"relative h-[600px] flex items-end justify-center perspective-1000",children:[ct.jsxs("div",{className:"relative w-40 h-80 bg-teal-800 transform rotate-y-12 shadow-2xl translate-x-10 translate-y-10 z-10 opacity-90",children:[ct.jsx("div",{className:"absolute top-0 left-0 w-full h-10 bg-teal-400 transform -skew-x-[40deg] origin-top -translate-y-10"}),ct.jsx("div",{className:"absolute top-0 left-0 h-full w-10 bg-teal-900 transform skew-y-[50deg] origin-left -translate-x-10"})]}),ct.jsxs("div",{className:"relative w-24 h-40 bg-blue-900 transform rotate-y-12 shadow-xl -translate-x-10 translate-y-20 opacity-70",children:[ct.jsx("div",{className:"absolute top-0 left-0 w-full h-8 bg-blue-500 transform -skew-x-[40deg] origin-top -translate-y-8"}),ct.jsx("div",{className:"absolute top-0 left-0 h-full w-8 bg-blue-950 transform skew-y-[50deg] origin-left -translate-x-8"})]}),ct.jsx("div",{className:"absolute top-20 right-20 text-9xl font-bold text-gray-800 opacity-20 select-none",children:"Λ"})]})]})}),J0t=()=>ct.jsx("section",{id:"docs",className:"py-24 bg-black border-t border-gray-900",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[ct.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-end mb-12 gap-6",children:[ct.jsxs("div",{children:[ct.jsx("div",{className:"inline-block px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300 mb-6",children:"Developers First"}),ct.jsx("h2",{className:"text-3xl md:text-5xl font-semibold mb-4",children:"Build with our API"}),ct.jsx("p",{className:"text-gray-400 text-lg max-w-xl",children:"Integrate user simulation directly into your CI/CD pipeline or product workflow. Get started for free."})]}),ct.jsx(sh,{variant:"outline",children:"View Full Documentation"})]}),ct.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[ct.jsxs("div",{className:"bg-gray-900/30 border border-gray-800 rounded-2xl p-6 md:p-8 font-mono text-sm overflow-hidden relative group",children:[ct.jsxs("div",{className:"absolute top-4 right-4 flex gap-2",children:[ct.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/20 border border-red-500/50"}),ct.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/20 border border-yellow-500/50"}),ct.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/20 border border-green-500/50"})]}),ct.jsx("div",{className:"text-gray-500 mb-2",children:"# Install the SDK"}),ct.jsx("div",{className:"text-teal-400 mb-6",children:"$ npm install @aux/sdk"}),ct.jsx("div",{className:"text-gray-500 mb-2",children:"# Run a simulation"}),ct.jsx("div",{className:"text-purple-300",children:"import"})," ",ct.jsx("div",{className:"text-white inline",children:"{ AuxClient }"})," ",ct.jsx("div",{className:"text-purple-300 inline",children:"from"})," ",ct.jsx("div",{className:"text-green-300 inline",children:"'@aux/sdk'"}),";",ct.jsx("br",{}),ct.jsx("br",{}),ct.jsx("div",{className:"text-purple-300",children:"const"})," ",ct.jsx("div",{className:"text-white inline",children:"client"})," = ",ct.jsx("div",{className:"text-purple-300 inline",children:"new"})," ",ct.jsx("div",{className:"text-yellow-300 inline",children:"AuxClient"}),"(","{ apiKey: '...' }",");",ct.jsx("br",{}),ct.jsx("br",{}),ct.jsx("div",{className:"text-purple-300",children:"const"})," ",ct.jsx("div",{className:"text-white inline",children:"result"})," = ",ct.jsx("div",{className:"text-purple-300 inline",children:"await"})," client.simulation.",ct.jsx("div",{className:"text-blue-300 inline",children:"create"}),"(","{",ct.jsx("br",{}),"  audience: ",ct.jsx("div",{className:"text-green-300 inline",children:"'tech-founders'"}),",",ct.jsx("br",{}),"  content: ",ct.jsx("div",{className:"text-green-300 inline",children:"'https://myapp.com/launch'"}),ct.jsx("br",{}),"}",");"]}),ct.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[ct.jsxs("div",{className:"bg-gray-900/20 border border-gray-800 p-6 rounded-xl hover:bg-gray-900/40 transition-colors cursor-pointer group",children:[ct.jsx(E6e,{className:"w-8 h-8 text-teal-500 mb-4 group-hover:scale-110 transition-transform"}),ct.jsx("h3",{className:"text-white font-medium mb-2",children:"Quick Start Guide"}),ct.jsx("p",{className:"text-gray-500 text-sm",children:"Deploy your first simulation in under 5 minutes."})]}),ct.jsxs("div",{className:"bg-gray-900/20 border border-gray-800 p-6 rounded-xl hover:bg-gray-900/40 transition-colors cursor-pointer group",children:[ct.jsx(FIe,{className:"w-8 h-8 text-purple-500 mb-4 group-hover:scale-110 transition-transform"}),ct.jsx("h3",{className:"text-white font-medium mb-2",children:"API Reference"}),ct.jsx("p",{className:"text-gray-500 text-sm",children:"Detailed endpoints, parameters, and response types."})]}),ct.jsxs("div",{className:"bg-gray-900/20 border border-gray-800 p-6 rounded-xl hover:bg-gray-900/40 transition-colors cursor-pointer group",children:[ct.jsx(V6e,{className:"w-8 h-8 text-blue-500 mb-4 group-hover:scale-110 transition-transform"}),ct.jsx("h3",{className:"text-white font-medium mb-2",children:"SDKs & Libraries"}),ct.jsx("p",{className:"text-gray-500 text-sm",children:"Official libraries for Node.js, Python, and Go."})]}),ct.jsxs("div",{className:"bg-gray-900/20 border border-gray-800 p-6 rounded-xl hover:bg-gray-900/40 transition-colors cursor-pointer group",children:[ct.jsx(WY,{className:"w-8 h-8 text-yellow-500 mb-4 group-hover:scale-110 transition-transform"}),ct.jsx("h3",{className:"text-white font-medium mb-2",children:"Webhooks"}),ct.jsx("p",{className:"text-gray-500 text-sm",children:"Real-time event notifications for your integrations."})]})]})]})]})}),Q0t=()=>{const[e,t]=Vt.useState(0),r=n=>{t(e===n?null:n)};return ct.jsx("section",{className:"py-24 bg-black",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 grid grid-cols-1 lg:grid-cols-2 gap-16",children:[ct.jsxs("div",{children:[ct.jsx("div",{className:"inline-block px-4 py-1.5 rounded-full border border-gray-700 text-sm text-gray-300 mb-8",children:"FAQ"}),ct.jsx("h2",{className:"text-3xl md:text-5xl font-semibold mb-6",children:"We simulated what questions you need answering"}),ct.jsxs("p",{className:"text-gray-400 text-lg mb-8",children:["Explore quick solutions to common questions. Need more? Feel free to contact our ",ct.jsx("u",{className:"text-white cursor-pointer",children:"support team"}),"."]})]}),ct.jsx("div",{className:"space-y-4",children:JIe.map((n,o)=>ct.jsxs("div",{className:"border border-gray-800 rounded-xl overflow-hidden bg-gray-900/20",children:[ct.jsxs("button",{className:"w-full flex justify-between items-center p-6 text-left hover:bg-gray-900/50 transition-colors",onClick:()=>r(o),children:[ct.jsx("span",{className:"font-medium text-lg",children:n.question}),e===o?ct.jsx(I6e,{className:"text-gray-400"}):ct.jsx(WG,{className:"text-gray-400"})]}),ct.jsx("div",{className:`transition-all duration-300 ease-in-out overflow-hidden ${e===o?"max-h-48 opacity-100":"max-h-0 opacity-0"}`,children:ct.jsx("div",{className:"p-6 pt-0 text-gray-400 leading-relaxed",children:n.answer})})]},o))})]})})},egt=()=>ct.jsx("footer",{className:"py-12 bg-black border-t border-gray-900 text-sm text-gray-500",children:ct.jsxs("div",{className:"max-w-7xl mx-auto px-6 flex flex-col md:flex-row justify-between items-center gap-6",children:[ct.jsxs("div",{className:"flex items-center gap-2",children:[ct.jsx("div",{className:"w-6 h-6 flex items-center justify-center font-bold text-white bg-gray-800 rounded",children:"Λ"}),ct.jsx("span",{className:"text-white font-semibold",children:"SyncUsers"})]}),ct.jsxs("div",{className:"flex gap-8",children:[ct.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Twitter"}),ct.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"LinkedIn"}),ct.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Privacy"}),ct.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Terms"})]}),ct.jsx("div",{children:"© 2024 SyncUsers Inc."})]})}),tgt=({isBuilding:e,societyType:t,simulationId:r,onStartChat:n})=>{var l,u,c;const o=Vt.useRef(null),[s,a]=Vt.useState(null),[f,i]=Vt.useState(!1);return Vt.useEffect(()=>{e&&a(null)},[e]),Vt.useEffect(()=>{if(!o.current||e)return;(async()=>{let d=[],v=[],p=[];const m=t.includes("Tech")||t.includes("Founders");try{if(r){const w=await ac.getNetworkGraph(r);w&&w.nodes&&(d=w.nodes.map(C=>({...C,x:C.x??Math.random(),y:C.y??Math.random(),connections:0})),w.edges&&w.edges.forEach(C=>{const x=d.find(k=>k.name===C.source||k.id===C.source),_=d.find(k=>k.name===C.target||k.id===C.target);x&&_&&(x.connections++,_.connections++,v.push(x.x,_.x,null),p.push(x.y,_.y,null))}))}}catch(w){console.error("Failed to fetch real graph:",w)}if(d.length===0){const w=m?120:80,C=m?.18:.22;for(let x=0;xw.x),b=d.map(w=>w.y),g=d.map(w=>w.connections),T={x:v,y:p,mode:"lines",line:{width:.5,color:"#4b5563"},hoverinfo:"none",type:"scatter"},S={x:y,y:b,mode:"markers",hoverinfo:"none",marker:{showscale:!1,colorscale:m?"Electric":"Viridis",color:g,size:10,line:{width:0}},type:"scatter"},A={showlegend:!1,hovermode:"closest",margin:{b:0,l:0,r:0,t:0},xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,range:[-.05,1.05],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,range:[-.05,1.05],fixedrange:!0},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",autosize:!0,dragmode:!1},M={staticPlot:!1,displayModeBar:!1,responsive:!0};L3.newPlot(o.current,[T,S],A,M).then(w=>{w.on("plotly_click",async C=>{const x=C.points[0];if(x){const _=x.pointNumber,k=d[_];if(a({x:x.x,y:x.y,data:k}),r&&k.name){i(!0);try{const E=await ac.getPersona(r,k.name);a(I=>I?{...I,data:{...I.data,...E}}:null)}catch(E){console.error("Failed to fetch persona details:",E)}finally{i(!1)}}}})})})()},[e,t,r]),ct.jsxs("div",{className:"relative w-full h-full bg-black",children:[e&&ct.jsxs("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm transition-opacity duration-300",children:[ct.jsx("div",{className:"w-16 h-16 border-4 border-teal-900 border-t-teal-500 rounded-full animate-spin mb-4"}),ct.jsx("p",{className:"text-teal-400 font-mono animate-pulse",children:"Constructing Focus Group Graph..."})]}),ct.jsx("div",{ref:o,className:"w-full h-full"}),s&&!e&&ct.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 bg-gray-900/90 backdrop-blur-md border border-gray-700 rounded-2xl shadow-2xl overflow-hidden z-40 animate-in fade-in zoom-in-95 duration-200",children:[ct.jsxs("div",{className:"p-4 border-b border-gray-800 flex justify-between items-start",children:[ct.jsxs("div",{className:"flex items-center gap-3",children:[ct.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-teal-400 to-blue-600 flex items-center justify-center text-white font-bold text-lg",children:((l=s.data.role)==null?void 0:l[0])||((u=s.data.name)==null?void 0:u[0])||"?"}),ct.jsxs("div",{children:[ct.jsx("h3",{className:"text-white font-semibold text-sm",children:s.data.name||s.data.role}),ct.jsx("p",{className:"text-gray-400 text-xs",children:s.data.occupation||s.data.role||"Community Member"})]})]}),ct.jsx("button",{onClick:()=>a(null),className:"text-gray-500 hover:text-white",children:ct.jsx(ey,{size:16})})]}),ct.jsxs("div",{className:"p-4 space-y-4 relative",children:[f&&ct.jsx("div",{className:"absolute inset-0 bg-gray-900/50 backdrop-blur-sm z-10 flex items-center justify-center",children:ct.jsx(vm,{size:20,className:"text-teal-400 animate-spin"})}),ct.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:[ct.jsx("span",{children:"Built from"}),ct.jsx($Y,{size:14,className:"text-[#0077b5]"}),ct.jsx(Q6e,{size:14,className:"text-gray-300"})]}),ct.jsxs("div",{className:"flex flex-wrap gap-2",children:[ct.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-gray-800 border border-gray-700 text-xs text-gray-300",children:[ct.jsx(fIe,{size:12})," ",s.data.location||"Unknown"]}),ct.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-gray-800 border border-gray-700 text-xs text-gray-300",children:[ct.jsx(XG,{size:12})," ",s.data.age_group||"Millennial"]}),ct.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-gray-800 border border-gray-700 text-xs text-gray-300",children:[ct.jsx(C6e,{size:12})," ",s.data.level||"Mid Level"]}),ct.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-gray-800 border border-gray-700 text-xs text-gray-300",children:[ct.jsx(YIe,{size:12})," ",((c=s.data.interests)==null?void 0:c[0])||"Creative & Design"]})]}),s.data.description&&ct.jsxs("p",{className:"text-xs text-gray-400 line-clamp-3 italic",children:['"',s.data.description,'"']})]}),ct.jsx("div",{className:"p-4 pt-0",children:ct.jsx(sh,{className:"w-full text-sm py-2",onClick:n,children:"Start Conversation"})})]})]})},s3e={Country:[{label:"United States",color:"bg-blue-600"},{label:"United Kingdom",color:"bg-purple-600"},{label:"Netherlands",color:"bg-teal-600"},{label:"France",color:"bg-orange-600"},{label:"India",color:"bg-pink-600"}],"Job Title":[{label:"Founder",color:"bg-indigo-500"},{label:"Product Manager",color:"bg-emerald-500"},{label:"Engineer",color:"bg-rose-500"},{label:"Investor",color:"bg-amber-500"},{label:"Designer",color:"bg-fuchsia-500"}],Sentiment:[{label:"Positive",color:"bg-green-500"},{label:"Neutral",color:"bg-gray-500"},{label:"Negative",color:"bg-red-500"},{label:"Mixed",color:"bg-yellow-500"}],"Activity Level":[{label:"Power User",color:"bg-red-600"},{label:"Daily Active",color:"bg-orange-500"},{label:"Weekly Active",color:"bg-blue-500"},{label:"Lurker",color:"bg-slate-600"}]},rgt=()=>ct.jsxs("div",{className:"bg-red-900/80 border border-red-700/50 rounded-xl p-4 mt-4 cursor-default animate-pulse",children:[ct.jsxs("div",{className:"flex items-center gap-2 text-white font-bold text-sm mb-1",children:[ct.jsx(HIe,{size:16,className:"text-red-400"}),ct.jsx("span",{children:"Service Alert"})]}),ct.jsx("p",{className:"text-red-200 text-xs leading-relaxed",children:"LinkedIn data provider is experiencing an outage. Only X (Twitter) is available for now."})]}),ngt=({onBack:e,onOpenConversation:t,onOpenChat:r})=>{const[n,o]=Vt.useState("NYT Readers"),[s,a]=Vt.useState("Country"),[f,i]=Vt.useState(!1),[l,u]=Vt.useState(!1),[c,h]=Vt.useState(["NYT Readers","Tech Founders EU","Gen Z Gamers","SaaS Investors"]),[d,v]=Vt.useState([]),[p,m]=Vt.useState(null);Vt.useEffect(()=>{(async()=>{try{const M=await ac.listFocusGroups();M&&Array.isArray(M)&&M.length>0&&h(M);const w=await ac.listSimulations();w&&Array.isArray(w)&&(v(w),w.length>0&&!p&&(m(w[0].id),o(w[0].name)))}catch(M){console.error("Failed to fetch sidebar data:",M)}})()},[]);const y=(A,M)=>{if(!(M===n||M===s&&A===a)){if(A(M),i(!0),A===o){const w=d.find(C=>C.name===M);w&&m(w.id)}setTimeout(()=>{i(!1)},800)}},b=async()=>{const A=prompt("Describe the audience for your new focus group:");if(A){u(!0),i(!0);try{const M=await ac.identifyPersonas(A),w=Array.isArray(M)?M.length:0,C=`Group ${d.length+1}: ${A.substring(0,20)}...`,x=await ac.generateSocialNetwork(C,w,"scale_free");v(_=>[x,..._]),m(x.id),o(x.name),confirm(`Identified ${w} personas. Would you like to save this focus group for future use?`)&&await ac.saveFocusGroup(C,x.id)}catch(M){console.error("Failed to assemble focus group:",M),alert("Failed to assemble focus group. Please try again.")}finally{u(!1),i(!1)}}},g=async(A,M)=>{if(M.stopPropagation(),confirm("Are you sure you want to delete this simulation?"))try{await ac.deleteSimulation(A),v(w=>w.filter(C=>C.id!==A)),p===A&&(m(null),o("NYT Readers"))}catch(w){console.error("Failed to delete simulation:",w)}},T=async()=>{if(p)try{const A=await ac.exportSimulation(p);alert("Simulation exported successfully!"),console.log("Export result:",A)}catch(A){console.error("Failed to export simulation:",A)}},S=s3e[s]||s3e.Country;return ct.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-black text-white font-sans",children:[ct.jsxs("aside",{className:"w-[300px] flex-shrink-0 border-r border-gray-800 flex flex-col bg-[#0a0a0a] z-20",children:[ct.jsxs("div",{className:"p-4 h-16 border-b border-gray-800 flex items-center justify-between",children:[ct.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:e,children:[ct.jsx("div",{className:"w-6 h-6 flex items-center justify-center font-bold text-white",children:"Λ"}),ct.jsx("span",{className:"font-semibold tracking-tight",children:"SyncUsers"})]}),ct.jsx("button",{className:"text-gray-500 hover:text-white",children:ct.jsx(_Ie,{size:18})})]}),ct.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[ct.jsxs("div",{className:"space-y-2",children:[ct.jsx("label",{className:"text-xs text-gray-500 font-medium uppercase tracking-wider",children:"Current Focus Group"}),ct.jsxs("div",{className:"relative group",children:[ct.jsx("select",{value:n,onChange:A=>y(o,A.target.value),className:"w-full appearance-none bg-[#111] border border-gray-700 text-white rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-teal-500 cursor-pointer",children:c.map(A=>ct.jsx("option",{children:A},A))}),ct.jsx(WG,{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none w-4 h-4"})]})]}),ct.jsxs("div",{className:"space-y-2",children:[ct.jsx("label",{className:"text-xs text-gray-500 font-medium uppercase tracking-wider",children:"Current View"}),ct.jsxs("div",{className:"relative",children:[ct.jsxs("select",{value:s,onChange:A=>y(a,A.target.value),className:"w-full appearance-none bg-[#111] border border-gray-700 text-white rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-teal-500 cursor-pointer",children:[ct.jsx("option",{children:"Country"}),ct.jsx("option",{children:"Job Title"}),ct.jsx("option",{children:"Sentiment"}),ct.jsx("option",{children:"Activity Level"})]}),ct.jsx(WG,{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none w-4 h-4"})]})]}),ct.jsx("div",{className:"h-px bg-gray-800 my-4"}),ct.jsxs("button",{onClick:b,disabled:l,className:"w-full flex items-center justify-between text-left text-sm text-gray-300 hover:text-white group py-2",children:[ct.jsx("span",{children:"Assemble new group"}),ct.jsx(G_,{size:18,className:"text-gray-500 group-hover:text-white"})]}),ct.jsxs("button",{onClick:()=>t(p),className:"w-full flex items-center justify-between text-left text-sm text-gray-300 hover:text-white group py-2",children:[ct.jsx("span",{children:"Create a new test"}),ct.jsx(G_,{size:18,className:"text-gray-500 group-hover:text-white"})]}),ct.jsxs("button",{onClick:()=>r(p),className:"w-full flex items-center gap-3 px-4 py-3 bg-gray-800 hover:bg-gray-700 text-white rounded-lg transition-colors border border-gray-700",children:[ct.jsx(hJ,{size:18}),ct.jsx("span",{className:"font-medium text-sm",children:"Open Global Chat"})]}),ct.jsx(rgt,{}),ct.jsxs("div",{className:"space-y-1 pt-4",children:[ct.jsx("label",{className:"text-xs text-gray-500 font-medium uppercase tracking-wider mb-2 block",children:"Recent Simulations"}),d.length>0?d.slice(0,5).map(A=>ct.jsxs("div",{onClick:()=>y(o,A.name),className:`text-sm py-2 px-2 hover:bg-gray-800/50 rounded cursor-pointer flex items-center justify-between group ${p===A.id?"text-teal-400 bg-gray-800/30":"text-gray-400"}`,children:[ct.jsx("span",{className:"truncate",children:A.name}),ct.jsx("button",{onClick:M=>g(A.id,M),className:"opacity-0 group-hover:opacity-100 text-gray-600 hover:text-red-500 transition-opacity p-1",children:ct.jsx(jIe,{size:14})})]},A.id)):ct.jsx("div",{className:"text-xs text-gray-600 italic px-2",children:"No recent simulations"})]})]}),ct.jsxs("div",{className:"border-t border-gray-800 p-4 space-y-1 bg-[#0a0a0a]",children:[ct.jsxs("div",{className:"flex justify-between items-center py-2 text-sm text-gray-400 border-b border-gray-800 mb-2 pb-4",children:[ct.jsx("span",{children:"Credits: 0"}),ct.jsx(rIe,{size:14,className:"cursor-help"})]}),ct.jsx(C_,{icon:ct.jsx(G_,{size:16}),label:"Start Free Trial",highlight:!0}),ct.jsx(C_,{icon:ct.jsx(X6e,{size:16}),label:"Export Simulation",onClick:T}),ct.jsx(C_,{icon:ct.jsx(b3e,{size:16}),label:"Leave Feedback"}),ct.jsx(C_,{icon:ct.jsx(S6e,{size:16}),label:"Product Guide"}),ct.jsx(C_,{icon:ct.jsx(sIe,{size:16}),label:"Log Out"}),ct.jsx("div",{className:"pt-4 text-[10px] text-gray-600",children:"Version 2.1"})]})]}),ct.jsxs("main",{className:"flex-1 flex flex-col relative bg-black",children:[ct.jsx("div",{className:"absolute top-6 left-6 right-6 z-10 flex justify-center pointer-events-none",children:ct.jsx("div",{className:"flex flex-wrap justify-center gap-2 pointer-events-auto",children:S.map((A,M)=>ct.jsx(agt,{color:A.color,label:A.label},M))})}),ct.jsx("div",{className:"flex-1 w-full h-full",children:ct.jsx(tgt,{isBuilding:f,societyType:n,simulationId:p,onStartChat:()=>r(p)})}),ct.jsx("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-30",children:ct.jsxs("button",{onClick:()=>r(p),className:"flex items-center gap-2 bg-black/80 backdrop-blur-md border border-gray-700 text-white px-6 py-3 rounded-full shadow-2xl hover:bg-gray-900 transition-all hover:scale-105",children:[ct.jsx(hJ,{size:20}),ct.jsx("span",{className:"font-medium",children:"Open Simulation Chat"})]})})]})]})},C_=({icon:e,label:t,highlight:r=!1,onClick:n})=>ct.jsxs("button",{onClick:n,className:`w-full flex items-center gap-3 px-2 py-2.5 rounded-md text-sm transition-colors ${r?"text-teal-400 hover:bg-teal-950/30":"text-gray-400 hover:bg-gray-800 hover:text-white"}`,children:[e,ct.jsx("span",{children:t})]}),agt=({color:e,label:t})=>ct.jsxs("button",{className:"flex items-center gap-2 bg-gray-900/80 backdrop-blur border border-gray-700 rounded-full pl-2 pr-4 py-1.5 hover:border-gray-500 transition-colors",children:[ct.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${e}`}),ct.jsx("span",{className:"text-xs font-medium text-gray-300",children:t})]}),igt=({onBack:e,simulationId:t})=>{const[r,n]=Vt.useState("Article"),[o,s]=Vt.useState(""),[a,f]=Vt.useState(!1),[i,l]=Vt.useState("idle"),u=async()=>{if(!t){alert("No active focus group selected. Please go back and select or generate one.");return}if(!o.trim()){alert("Please enter some content to simulate.");return}f(!0),l("simulating");try{await ac.startSimulationAsync(t,o,r),l("success"),setTimeout(()=>e(),2e3)}catch(c){console.error("Simulation failed:",c),l("error")}finally{f(!1)}};return ct.jsxs("div",{className:"fixed inset-0 z-50 bg-black flex items-center justify-center p-6 animate-in fade-in duration-300",children:[ct.jsxs("div",{className:"absolute inset-0 pointer-events-none opacity-20",children:[ct.jsx("div",{className:"absolute top-10 left-10 w-64 h-64 bg-purple-900/30 rounded-full blur-[100px]"}),ct.jsx("div",{className:"absolute bottom-10 right-10 w-96 h-96 bg-teal-900/20 rounded-full blur-[120px]"})]}),ct.jsxs("div",{className:"bg-[#050505] border border-gray-800 w-full max-w-5xl rounded-3xl shadow-2xl flex flex-col overflow-hidden max-h-[90vh] relative z-10",children:[ct.jsx("button",{onClick:e,className:"absolute top-6 right-6 text-gray-500 hover:text-white transition-colors",children:ct.jsx(ey,{size:24})}),ct.jsxs("div",{className:"p-10 pb-0",children:[ct.jsx("h2",{className:"text-2xl font-semibold text-center mb-8",children:"What would you like to simulate?"}),ct.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-12 gap-y-8 max-w-4xl mx-auto",children:[ct.jsxs("div",{className:"space-y-6",children:[ct.jsx("h3",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest mb-4",children:"Survey"}),ct.jsx(Xp,{icon:ct.jsx(g3e,{}),label:"Survey",active:r==="Survey",onClick:()=>n("Survey")}),ct.jsx("h3",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest mt-8 mb-4",children:"Marketing Content"}),ct.jsx(Xp,{icon:ct.jsx(_3e,{}),label:"Article",active:r==="Article",onClick:()=>n("Article")}),ct.jsx(Xp,{icon:ct.jsx(dJ,{}),label:"Advertisement",active:r==="Advertisement",onClick:()=>n("Advertisement")})]}),ct.jsxs("div",{className:"space-y-6",children:[ct.jsx("h3",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest mb-4",children:"Social Media Posts"}),ct.jsx(Xp,{icon:ct.jsx($Y,{}),label:"LinkedIn Post",active:r==="LinkedIn Post",onClick:()=>n("LinkedIn Post")}),ct.jsx(Xp,{icon:ct.jsx(m3e,{}),label:"Instagram Post",active:r==="Instagram Post",onClick:()=>n("Instagram Post")}),ct.jsx(Xp,{icon:ct.jsx(ey,{className:"text-white"}),label:"X Post",active:r==="X Post",onClick:()=>n("X Post")}),ct.jsx(Xp,{icon:ct.jsx(dJ,{}),label:"TikTok Script",active:r==="TikTok Script",onClick:()=>n("TikTok Script")})]}),ct.jsxs("div",{className:"space-y-6",children:[ct.jsx("h3",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest mb-4",children:"Communication"}),ct.jsx(Xp,{icon:ct.jsx(N3,{}),label:"Email Subject Line",active:r==="Email Subject Line",onClick:()=>n("Email Subject Line")}),ct.jsx(Xp,{icon:ct.jsx(N3,{}),label:"Email",active:r==="Email",onClick:()=>n("Email")}),ct.jsx("h3",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest mt-8 mb-4",children:"Product"}),ct.jsx(Xp,{icon:ct.jsx(x3e,{}),label:"Product Proposition",active:r==="Product Proposition",onClick:()=>n("Product Proposition")})]})]})]}),ct.jsxs("div",{className:"mt-8 p-6 bg-gray-900/30 border-t border-gray-800 flex-1 flex flex-col justify-end relative",children:[i==="simulating"&&ct.jsxs("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm z-20 flex flex-col items-center justify-center gap-4",children:[ct.jsx("div",{className:"w-12 h-12 border-4 border-teal-900 border-t-teal-500 rounded-full animate-spin"}),ct.jsx("p",{className:"text-teal-400 font-medium",children:"Running Simulation..."})]}),i==="success"&&ct.jsxs("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm z-20 flex flex-col items-center justify-center gap-4",children:[ct.jsx("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center",children:ct.jsx(vm,{className:"text-green-500"})}),ct.jsx("p",{className:"text-green-400 font-medium",children:"Simulation Started Successfully!"})]}),i==="error"&&ct.jsxs("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm z-20 flex flex-col items-center justify-center gap-4",children:[ct.jsx(YY,{className:"text-red-500",size:48}),ct.jsx("p",{className:"text-red-400 font-medium",children:"Simulation Failed. Please try again."}),ct.jsx(sh,{size:"sm",onClick:()=>l("idle"),children:"Dismiss"})]}),ct.jsxs("div",{className:"max-w-4xl mx-auto w-full",children:[ct.jsxs("div",{className:"bg-black border border-gray-700 rounded-2xl p-4 shadow-lg",children:[ct.jsx("textarea",{placeholder:`Describe your ${r.toLowerCase()} here...`,value:o,onChange:c=>s(c.target.value),className:"w-full bg-transparent text-gray-300 placeholder-gray-600 resize-none focus:outline-none min-h-[80px]"}),ct.jsxs("div",{className:"flex justify-between items-center mt-4",children:[ct.jsxs("div",{className:"flex gap-3",children:[ct.jsxs(sh,{variant:"outline",size:"sm",className:"gap-2 text-xs border-gray-800 bg-gray-900 text-gray-300",children:[ct.jsx(TIe,{size:14})," ",r]}),ct.jsxs(sh,{variant:"outline",size:"sm",className:"gap-2 text-xs border-gray-800 bg-gray-900 text-gray-300",children:[ct.jsx(y3e,{size:14})," Upload Images"]})]}),ct.jsxs("div",{className:"flex gap-3",children:[ct.jsxs(sh,{variant:"ghost",size:"sm",className:"text-xs text-teal-400 hover:text-teal-300",children:["Help Me Craft ",ct.jsx("span",{className:"ml-1",children:"✨"})]}),ct.jsxs(sh,{variant:"primary",size:"sm",className:"gap-2 bg-white text-black hover:bg-gray-200",onClick:u,disabled:a,children:["Simulate ",ct.jsx("span",{className:"ml-1",children:"⚡"})]})]})]})]}),ct.jsx("div",{className:"flex justify-center mt-4",children:ct.jsxs("button",{className:"text-gray-500 text-sm hover:text-white flex items-center gap-2",children:[ct.jsx(G_,{size:14})," Request a new context"]})})]})]})]})]})},Xp=({icon:e,label:t,active:r,onClick:n})=>ct.jsxs("div",{onClick:n,className:`flex items-center gap-4 group cursor-pointer p-2 rounded-lg transition-colors ${r?"bg-gray-800":"hover:bg-gray-900"}`,children:[ct.jsx("div",{className:"w-8 h-8 flex items-center justify-center text-gray-400 group-hover:text-white transition-colors",children:e}),ct.jsx("span",{className:`text-sm font-medium ${r?"text-white":"text-gray-400 group-hover:text-white"}`,children:t})]}),VG=({label:e,primary:t,icon:r,onClick:n,className:o=""})=>ct.jsxs("button",{onClick:n,className:`flex items-center gap-2 px-4 py-2 rounded-lg text-xs md:text-sm font-medium transition-all duration-200 whitespace-nowrap + ${t?"bg-white text-black hover:bg-gray-200 shadow-[0_0_15px_rgba(255,255,255,0.2)]":"bg-gray-900 border border-gray-800 text-gray-300 hover:bg-gray-800 hover:text-white hover:border-gray-600"} ${o}`,children:[r,t&&ct.jsx(WY,{size:14,className:"fill-black"}),e]}),R_=({title:e,options:t})=>ct.jsxs("div",{className:"flex flex-col gap-3",children:[ct.jsx("h3",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2 ml-1",children:e}),ct.jsx("div",{className:"space-y-1",children:t.map(r=>ct.jsxs("div",{className:"group flex items-center gap-3 p-3 rounded-xl hover:bg-gray-900/80 cursor-pointer border border-transparent hover:border-gray-800 transition-all duration-200",children:[ct.jsx("div",{className:"text-gray-500 group-hover:text-white transition-colors w-5 flex justify-center",children:r.icon}),ct.jsx("span",{className:"text-sm font-medium text-gray-400 group-hover:text-gray-200",children:r.label})]},r.label))})]}),ogt=({onSimulate:e,onSendMessage:t})=>{const[r,n]=Vt.useState(""),o=()=>{r.trim()&&(t(r),n(""))};return ct.jsx("div",{className:"border-t border-gray-800 pt-6 mt-4 bg-[#0a0a0a] px-6 pb-8 md:pb-10 absolute bottom-0 left-0 right-0 z-20 shadow-[0_-20px_50px_rgba(0,0,0,0.8)]",children:ct.jsxs("div",{className:"max-w-5xl mx-auto space-y-4",children:[ct.jsx("textarea",{className:"w-full h-24 bg-black border border-gray-800 text-gray-200 placeholder-gray-600 p-4 rounded-2xl resize-none focus:outline-none focus:border-gray-600 focus:ring-1 focus:ring-gray-600 transition-all text-sm leading-relaxed",placeholder:"Paste your website link here",value:r,onChange:s=>n(s.target.value)}),ct.jsxs("div",{className:"flex flex-wrap justify-between items-start gap-4",children:[ct.jsx("div",{className:"flex gap-2 md:gap-3 flex-wrap",children:ct.jsx(VG,{label:"Upload Images",icon:ct.jsx(y3e,{size:14}),className:"h-fit"})}),ct.jsxs("div",{className:"flex gap-3 items-center mt-auto",children:[ct.jsxs("button",{className:"hidden md:flex text-xs text-gray-500 hover:text-white transition-colors items-center gap-1 mr-2",children:["Help Me Craft ",ct.jsx(vm,{size:12})]}),ct.jsx(VG,{label:"Send",icon:ct.jsx(w3e,{size:14}),onClick:o}),ct.jsx(VG,{label:"Simulate",primary:!0,onClick:e})]})]})]})})},sgt=({onBack:e,simulationId:t})=>{const[r,n]=Vt.useState(!1),[o,s]=Vt.useState([]),[a,f]=Vt.useState(!1);Vt.useEffect(()=>{t&&i()},[t]);const i=async()=>{if(t){f(!0);try{const h=await ac.getChatHistory(t);h&&Array.isArray(h)&&s(h)}catch(h){console.error("Failed to load chat history:",h)}finally{f(!1)}}},l=async h=>{if(!t){alert("No active simulation selected.");return}try{const d=await ac.sendChatMessage(t,h);s(v=>[...v,{sender:"User",message:h},{sender:"Assistant",message:d}])}catch(d){console.error("Failed to send message:",d)}},u=()=>{n(!0),setTimeout(()=>n(!1),1e4)},c={Survey:[{label:"Survey",icon:ct.jsx(g3e,{size:18})}],"Marketing Content":[{label:"Article",icon:ct.jsx(_3e,{size:18})},{label:"Advertisement",icon:ct.jsx(vIe,{size:18})}],"Social Media Posts":[{label:"LinkedIn Post",icon:ct.jsx($Y,{size:18})},{label:"Instagram Post",icon:ct.jsx(m3e,{size:18})},{label:"X Post",icon:ct.jsx(ey,{size:18})},{label:"TikTok Script",icon:ct.jsx(WIe,{size:18})}],Communication:[{label:"Email Subject Line",icon:ct.jsx(N3,{size:18})},{label:"Email",icon:ct.jsx(N3,{size:18})}],Product:[{label:"Product Proposition",icon:ct.jsx(x3e,{size:18})}]};return ct.jsxs("div",{className:"fixed inset-0 z-50 bg-[#050505] text-white flex flex-col animate-in fade-in duration-300",children:[ct.jsxs("div",{className:"flex items-center justify-between px-6 py-4 md:px-8 md:py-6 border-b border-gray-800/50 bg-[#050505] z-10 relative",children:[ct.jsxs("div",{className:"flex items-center gap-3",children:[ct.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-gray-800 rounded-lg text-white font-bold",children:"Λ"}),ct.jsx("h2",{className:"text-xl font-medium tracking-tight",children:"New Simulation"})]}),ct.jsx("button",{onClick:e,className:"p-2 text-gray-500 hover:text-white hover:bg-gray-900 rounded-full transition-colors",children:ct.jsx(ey,{size:24})})]}),r&&ct.jsx("div",{className:"absolute top-24 left-1/2 -translate-x-1/2 z-50 w-[90%] max-w-lg animate-in slide-in-from-top-4 fade-in duration-500",children:ct.jsxs("div",{className:"bg-[#0f1f15] backdrop-blur-xl border border-green-500/20 text-green-100 px-6 py-5 rounded-2xl shadow-2xl flex items-start gap-4 ring-1 ring-green-500/10",children:[ct.jsx("div",{className:"p-1.5 bg-green-500/20 rounded-full mt-0.5 shrink-0",children:ct.jsx(YY,{size:18,className:"text-green-400"})}),ct.jsxs("div",{children:[ct.jsx("h4",{className:"font-semibold text-green-300 mb-1",children:"Simulation Initiated"}),ct.jsxs("p",{className:"text-sm text-green-200/70 leading-relaxed",children:["The simulation has started. This process can take up to ",ct.jsx("strong",{className:"text-white",children:"30 minutes"}),". The results will be sent to this chat automatically when ready."]})]}),ct.jsx("button",{onClick:()=>n(!1),className:"text-green-400 hover:text-white ml-auto p-1",children:ct.jsx(ey,{size:16})})]})}),ct.jsxs("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-6 md:p-8 pb-80",children:[" ",ct.jsx("div",{className:"max-w-5xl mx-auto",children:o.length>0?ct.jsx("div",{className:"space-y-6 mb-12",children:o.map((h,d)=>ct.jsx("div",{className:`flex ${h.sender==="User"?"justify-end":"justify-start"}`,children:ct.jsxs("div",{className:`max-w-[80%] p-4 rounded-2xl ${h.sender==="User"?"bg-teal-900/30 border border-teal-800 text-teal-50":"bg-gray-900 border border-gray-800 text-gray-200"}`,children:[ct.jsx("div",{className:"text-[10px] uppercase font-bold text-gray-500 mb-1",children:h.sender}),ct.jsx("div",{className:"text-sm leading-relaxed",children:h.message})]})},d))}):ct.jsxs(ct.Fragment,{children:[ct.jsx("h1",{className:"text-2xl md:text-3xl font-semibold text-center mb-12 mt-4 md:mt-8",children:"What would you like to simulate?"}),ct.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-12",children:[ct.jsxs("div",{className:"space-y-12",children:[ct.jsx(R_,{title:"Survey",options:c.Survey}),ct.jsx(R_,{title:"Marketing Content",options:c["Marketing Content"]})]}),ct.jsx("div",{className:"space-y-12",children:ct.jsx(R_,{title:"Social Media Posts",options:c["Social Media Posts"]})}),ct.jsxs("div",{className:"space-y-12",children:[ct.jsx(R_,{title:"Communication",options:c.Communication}),ct.jsx(R_,{title:"Product",options:c.Product})]})]}),ct.jsx("div",{className:"flex justify-center mt-16 mb-8",children:ct.jsxs("button",{className:"flex items-center gap-2 text-gray-500 hover:text-gray-300 transition-colors text-sm px-4 py-2 hover:bg-gray-900 rounded-lg",children:[ct.jsx(G_,{size:16}),"Request a new context"]})})]})})]}),ct.jsx(ogt,{onSimulate:u,onSendMessage:l})]})};function lgt(){const[e,t]=Vt.useState("content"),[r,n]=Vt.useState(null),o=()=>{t("simulation"),window.scrollTo(0,0)},s=()=>{t("landing")},a=l=>{n(l),t("conversation")},f=l=>{n(l),t("chat")},i=()=>{t("simulation")};return e==="simulation"?ct.jsx(ngt,{onBack:s,onOpenConversation:a,onOpenChat:f}):e==="conversation"?ct.jsx(igt,{onBack:i,simulationId:r}):e==="content"?ct.jsx(ContentEngine,{}):e==="chat"?ct.jsx(sgt,{onBack:i,simulationId:r}):ct.jsxs("div",{className:"bg-black min-h-screen text-white selection:bg-teal-500/30",children:[ct.jsx(QIe,{onStart:o}),ct.jsxs("main",{children:[ct.jsx(IQe,{onStart:o}),ct.jsx(OQe,{}),ct.jsx(zQe,{}),ct.jsx(Jet,{}),ct.jsx(Qet,{}),ct.jsx(ett,{}),ct.jsx(K0t,{}),ct.jsx(J0t,{}),ct.jsx(Q0t,{})]}),ct.jsx(egt,{})]})}const UDe=document.getElementById("root");if(!UDe)throw new Error("Could not find root element to mount to");const ugt=m6e.createRoot(UDe);ugt.render(ct.jsx(h3e.StrictMode,{children:ct.jsx(lgt,{})}));